projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
60f5103
)
tabcomplete only if readline is in use (second attempt)
author
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 7 May 2006 19:38:58 +0000
(19:38 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sun, 7 May 2006 19:38:58 +0000
(19:38 +0000)
client/tabcomplete.c
patch
|
blob
|
history
diff --git
a/client/tabcomplete.c
b/client/tabcomplete.c
index
cbfd14e
..
546c239
100644
(file)
--- a/
client/tabcomplete.c
+++ b/
client/tabcomplete.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* 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.14 2006-05-07 19:38:58 adam Exp $
*/
#include <string.h>
*/
#include <string.h>
@@
-12,7
+12,6
@@
#include <yaz/oid.h>
#include "tabcomplete.h"
#include <yaz/oid.h>
#include "tabcomplete.h"
-#if HAVE_READLINE_READLINE_H
extern char** curret_global_list;
/* ***************************************************************************
extern char** curret_global_list;
/* ***************************************************************************
@@
-23,6
+22,7
@@
extern char** curret_global_list;
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
+41,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;
}
@@
-144,7
+145,6
@@
char* default_completer(const char* text, int state)
{
return complete_from_list(curret_global_list,text,state);
}
{
return complete_from_list(curret_global_list,text,state);
}
-#endif
/*
* Local variables:
/*
* Local variables: