2003-04-09 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / completer.c
index 7fa17594893fa5f9b970af86409e449397bb74f7..4274241b00e0f6757a93982693968ee0c6663e31 100644 (file)
@@ -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 */
This page took 0.024193 seconds and 4 git commands to generate.