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
--tabs option no longer available
[yaz-moved-to-github.git]
/
client
/
tabcomplete.c
diff --git
a/client/tabcomplete.c
b/client/tabcomplete.c
index
db4552c
..
ad48f3b
100644
(file)
--- a/
client/tabcomplete.c
+++ b/
client/tabcomplete.c
@@
-2,7
+2,7
@@
* Copyright (c) 2002, Index Data
* See the file LICENSE for details.
*
* Copyright (c) 2002, Index Data
* See the file LICENSE for details.
*
- * $Id: tabcomplete.c,v 1.5 2002-06-17 14:57:34 ja7 Exp $
+ * $Id: tabcomplete.c,v 1.8 2002-09-24 08:05:41 adam Exp $
*/
#include <string.h>
*/
#include <string.h>
@@
-29,7
+29,13
@@
char* complete_from_list(char* completions[], const char *text, int state)
idx = 0;
}
for(; completions[idx]; ++ idx) {
idx = 0;
}
for(; completions[idx]; ++ idx) {
- if(!strncasecmp(completions[idx],text,strlen(text))) {
+ if(!
+#ifdef WIN32
+ _strnicmp
+#else
+ strncasecmp
+#endif
+ (completions[idx],text,strlen(text))) {
++idx; /* skip this entry on the next run */
return (char*)strdup(completions[idx-1]);
};
++idx; /* skip this entry on the next run */
return (char*)strdup(completions[idx-1]);
};
@@
-74,7
+80,7
@@
void oid_loader(struct oident* oid, void* data_)
char** build_list_for_oclass(oid_class oclass) {
oid_callback_t data;
char** build_list_for_oclass(oid_class oclass) {
oid_callback_t data;
- data.values = calloc(10,sizeof(char*));
+ data.values = (char **) calloc(10,sizeof(char*));
data.index = 0;
data.max = 9;
data.oclass = oclass;
data.index = 0;
data.max = 9;
data.oclass = oclass;
@@
-97,6
+103,12
@@
char* complete_querytype(const char *text, int state)
return complete_from_list(querytypes,text,state);
}
return complete_from_list(querytypes,text,state);
}
+char* complete_auto_reconnect(const char *text, int state)
+{
+ char* querytypes[] = {"on","off",0};
+ return complete_from_list(querytypes,text,state);
+}
+
char* complete_format(const char* text, int state)
{
char* complete_format(const char* text, int state)
{