projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For the CQL parser, make boolean node names lowercase.. but this time at
[yaz-moved-to-github.git]
/
client
/
tabcomplete.c
diff --git
a/client/tabcomplete.c
b/client/tabcomplete.c
index
cbfd14e
..
28faedf
100644
(file)
--- a/
client/tabcomplete.c
+++ b/
client/tabcomplete.c
@@
-1,8
+1,8
@@
/*
/*
- * Copyright (C) 1995-2005, Index Data ApS
+ * Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: tabcomplete.c,v 1.13 2006-05-07 19:37:23 adam Exp $
+ * $Id: tabcomplete.c,v 1.16 2006-05-07 20:57:26 adam Exp $
*/
#include <string.h>
*/
#include <string.h>
@@
-12,17
+12,15
@@
#include <yaz/oid.h>
#include "tabcomplete.h"
#include <yaz/oid.h>
#include "tabcomplete.h"
-#if HAVE_READLINE_READLINE_H
-extern char** curret_global_list;
-
/* ***************************************************************************
*
* generic completer
*
* ***************************************************************************/
/* ***************************************************************************
*
* 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;
if(!completions) return NULL;
static int idx;
if(!completions) return NULL;
@@
-41,6
+39,7
@@
char* complete_from_list(char* completions[], const char *text, int state)
return (char*)strdup(completions[idx-1]);
};
};
return (char*)strdup(completions[idx-1]);
};
};
+#endif
return NULL;
}
return NULL;
}
@@
-79,7
+78,8
@@
void oid_loader(struct oident* oid, void* data_)
}
}
}
}
-char** build_list_for_oclass(oid_class oclass) {
+char** build_list_for_oclass(oid_class oclass)
+{
oid_callback_t data;
data.values = (char **) calloc(10,sizeof(char*));
data.index = 0;
oid_callback_t data;
data.values = (char **) calloc(10,sizeof(char*));
data.index = 0;
@@
-122,8
+122,8
@@
char* complete_format(const char* text, int state)
char* complete_schema(const char* text, int state)
{
char* complete_schema(const char* text, int state)
{
- char** list=build_list_for_oclass(CLASS_SCHEMA);
- char* res=complete_from_list(list,text,state);
+ char** list = build_list_for_oclass(CLASS_SCHEMA);
+ char* res = complete_from_list(list,text,state);
free(list);
return res;
free(list);
return res;
@@
-132,20
+132,14
@@
char* complete_schema(const char* text, int state)
char* complete_attributeset(const char* text, int state)
{
char* complete_attributeset(const char* text, int state)
{
- char** list=build_list_for_oclass(CLASS_ATTSET);
- char* res=complete_from_list(list,text,state);
+ char** list = build_list_for_oclass(CLASS_ATTSET);
+ char* res = complete_from_list(list,text,state);
free(list);
return res;
}
free(list);
return res;
}
-char* default_completer(const char* text, int state)
-{
- return complete_from_list(curret_global_list,text,state);
-}
-#endif
-
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4