changed output to be non-cascarding when using -n switch
[yaz-moved-to-github.git] / client / tabcomplete.c
index 870188a..4d2032d 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (C) 1995-2006, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tabcomplete.c,v 1.15 2006-05-07 19:43:00 adam Exp $
+ * $Id: tabcomplete.c,v 1.17 2007-01-03 08:42:13 adam Exp $
  */
 
 #include <string.h>
 #include <yaz/oid.h>
 #include "tabcomplete.h"
 
-extern char** current_global_list;
-
 /* ***************************************************************************
  *
  * generic completer 
  * 
  * ***************************************************************************/
 
-char* complete_from_list(char* completions[], const char *text, int state)
+char *complete_from_list(char* completions[], const char *text, int state)
 {       
 #if HAVE_READLINE_READLINE_H
     static int idx;
@@ -142,11 +140,6 @@ char* complete_attributeset(const char* text, int state)
 }
 
 
-char* default_completer(const char* text, int state)
-{
-    return complete_from_list(current_global_list, text, state);
-}
-
 /*
  * Local variables:
  * c-basic-offset: 4