tabcomplete only if readline is in use (second attempt)
[yaz-moved-to-github.git] / client / tabcomplete.c
index b748c10..546c239 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tabcomplete.c,v 1.12 2005-06-25 15:46:01 adam Exp $
+ * $Id: tabcomplete.c,v 1.14 2006-05-07 19:38:58 adam Exp $
  */
 
 #include <string.h>
@@ -22,6 +22,7 @@ extern char** curret_global_list;
 
 char* complete_from_list(char* completions[], const char *text, int state)
 {       
+#if HAVE_READLINE_READLINE_H
     static int idx;
     
     if(!completions) return NULL;
@@ -40,6 +41,7 @@ char* complete_from_list(char* completions[], const char *text, int state)
             return (char*)strdup(completions[idx-1]);
         };
     };
+#endif
     return NULL;
 }