aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-09 00:59:27 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-09 00:59:27 +0000
commit38017ce81c4c5f3853b46c0d497e4bcefdbac593 (patch)
treeb97d4640aead816cab67a571f474a96e35c7ff2d /gdb/completer.c
parent75e3c1f98d4e0b3d89560b5981ade71c246b504b (diff)
downloadgdb-38017ce81c4c5f3853b46c0d497e4bcefdbac593.zip
gdb-38017ce81c4c5f3853b46c0d497e4bcefdbac593.tar.gz
gdb-38017ce81c4c5f3853b46c0d497e4bcefdbac593.tar.bz2
2002-12-08 Elena Zannoni <ezannoni@redhat.com>
More cleanup from import of readline 4.3. * completer.h (complete_line, readline_line_completion_function): Update prototypes. (line_completion_function): Removed, not used outside of completer.c. * completer.c (readline_line_completion_function, complete_function, line_completion_function): Use const for first parameter. (line_completion_function): Make static. (filename_completer): filename_completion_function is now called rl_filename_completion_function * corelow.c: Include <readline/readline.h>. * exec.c: Ditto. * solib.c: Ditto. * source.c: Ditto. * symfile.c: Ditto. * symmisc.c: Ditto. * top.c (init_main): No need to coerce readline_line_completion_function anymore. * cli/cli-dump.c: Include <readline/readline.h>.
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 7fa1759..4274241 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -31,7 +31,7 @@
#include "gdbcmd.h"
/* Needed for rl_completer_word_break_characters() and for
- filename_completion_function. */
+ rl_filename_completion_function. */
#include <readline/readline.h>
/* readline defines this. */
@@ -40,7 +40,8 @@
#include "completer.h"
/* Prototypes for local functions */
-char *line_completion_function (char *text, int matches, char *line_buffer,
+static
+char *line_completion_function (const char *text, int matches, char *line_buffer,
int point);
/* readline uses the word breaks for two things:
@@ -104,7 +105,7 @@ get_gdb_completer_quote_characters (void)
/* Line completion interface function for readline. */
char *
-readline_line_completion_function (char *text, int matches)
+readline_line_completion_function (const char *text, int matches)
{
return line_completion_function (text, matches, rl_line_buffer, rl_point);
}
@@ -135,7 +136,7 @@ filename_completer (char *text, char *word)
while (1)
{
char *p;
- p = filename_completion_function (text, subsequent_name);
+ p = rl_filename_completion_function (text, subsequent_name);
if (return_val_used >= return_val_alloced)
{
return_val_alloced *= 2;
@@ -382,7 +383,7 @@ command_completer (char *text, char *word)
should pretend that the line ends at POINT. */
char **
-complete_line (char *text, char *line_buffer, int point)
+complete_line (const char *text, char *line_buffer, int point)
{
char **list = NULL;
char *tmp_command, *p;
@@ -628,8 +629,8 @@ complete_line (char *text, char *line_buffer, int point)
which is a possible completion, it is the caller's responsibility to
free the string. */
-char *
-line_completion_function (char *text, int matches, char *line_buffer, int point)
+static char *
+line_completion_function (const char *text, int matches, char *line_buffer, int point)
{
static char **list = (char **) NULL; /* Cache of completions */
static int index; /* Next cached completion */