summaryrefslogtreecommitdiff
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
commit23140485f33c70237fe0705f74246e03a06e9ce0 (patch)
treec9b4c29960b9305db9f2fd3f8371535d8d37be38 /gdb/completer.c
parenta50a1418c6efa6f67169a6a62a16724da5028051 (diff)
downloadgdb-23140485f33c70237fe0705f74246e03a06e9ce0.tar.gz
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 19db617f9cd..f63fe02f993 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)