aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-07-15 18:57:06 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-07-15 18:57:06 +0000
commitd75b5104df76c05fc85594425d35c30959eec84d (patch)
tree702465627c1a5e28b250c9ddea323db8872140e0 /gdb/completer.c
parented8fee27bc6b8daee958eff4ccb0d63d8984d41d (diff)
downloadgdb-d75b5104df76c05fc85594425d35c30959eec84d.zip
gdb-d75b5104df76c05fc85594425d35c30959eec84d.tar.gz
gdb-d75b5104df76c05fc85594425d35c30959eec84d.tar.bz2
2001-07-15 Elena Zannoni <ezannoni@redhat.com>
* top.c (readline_line_completion_function, noop_completer): Move from here... * completer.c (readline_line_completion_function, noop_completer): ...to here. * gdbcmd.h (readline_line_completion_function, noop_completer): Move declarations from here... * completer.h (readline_line_completion_function, noop_completer): ...to here. * corefile.c: Include completer.h. * source.c: Ditto. * symfile.c: Ditto. * Makefile.in: Update dependencies.
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 19db617..f63fe02 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -38,6 +38,8 @@
#include "completer.h"
/* Prototypes for local functions */
+char *line_completion_function (char *text, int matches, char *line_buffer,
+ int point);
/* readline uses the word breaks for two things:
(1) In figuring out where to point the TEXT parameter to the
@@ -97,6 +99,22 @@ get_gdb_completer_quote_characters (void)
return gdb_completer_quote_characters;
}
+/* Line completion interface function for readline. */
+
+char *
+readline_line_completion_function (char *text, int matches)
+{
+ return line_completion_function (text, matches, rl_line_buffer, rl_point);
+}
+
+/* This can be used for functions which don't want to complete on symbols
+ but don't want to complete on anything else either. */
+char **
+noop_completer (char *text, char *prefix)
+{
+ return NULL;
+}
+
/* Complete on filenames. */
char **
filename_completer (char *text, char *word)