2002-12-08 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 9 Dec 2002 00:59:27 +0000 (00:59 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 9 Dec 2002 00:59:27 +0000 (00:59 +0000)
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>.

gdb/ChangeLog
gdb/cli/cli-dump.c
gdb/completer.c
gdb/completer.h
gdb/corelow.c
gdb/exec.c
gdb/solib.c
gdb/source.c
gdb/symfile.c
gdb/symmisc.c
gdb/top.c

index 630e43ea68fe81d492ad21b9ca5abdc2b59d8a34..a4bca6370110ff4e9ded019c1d0b49eeddca7e20 100644 (file)
@@ -1,3 +1,25 @@
+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>.
+
 2002-12-08  Andrew Cagney  <ac131313@redhat.com>
 
        * stack.c (frame_info): Use get_prev_frame.
index a648093dd47e5047a29d9f0eeeafb452c20e1620..7a58fcbbd7ba145f731a16da16c2c3357ddc07c0 100644 (file)
@@ -31,6 +31,7 @@
 #include "gdb_assert.h"
 #include <ctype.h>
 #include "target.h"
+#include <readline/readline.h>
 
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 
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 */
index b0362314e7ed46a2b7f438b32a22f45c0f5b0800..7a96951aae3ead727c8b34df53e7e94f3c5bdada 100644 (file)
 #if !defined (COMPLETER_H)
 #define COMPLETER_H 1
 
-extern char **complete_line (char *text, char *line_buffer, int point);
+extern char **complete_line (const char *text, char *line_buffer, int point);
 
-extern char *line_completion_function (char *, int, char *, int);
-
-extern char *readline_line_completion_function (char *text, int matches);
+extern char *readline_line_completion_function (const char *text, int matches);
 
 extern char **noop_completer (char *, char *);
 
index edcf46e26b334c6d701a6b5b3f707b33d2a508a6..90ac0627aa0c682bdbf56f6cf4c3b39ddfad88e0 100644 (file)
@@ -38,6 +38,7 @@
 #include "gdbthread.h"
 #include "regcache.h"
 #include "symfile.h"
+#include <readline/readline.h>
 
 #ifndef O_BINARY
 #define O_BINARY 0
index edb730802d649d778c3f2fd7e30cd99c4e71b11b..bc9c22b3f0f9b11fd09f92e523df88f76af008d8 100644 (file)
@@ -36,6 +36,7 @@
 #endif
 
 #include <fcntl.h>
+#include <readline/readline.h>
 #include "gdb_string.h"
 
 #include "gdbcore.h"
index d4876c15e7a4c116812065f9a3464577bd85174c..639788b3e50367e588a976d5cf0f4cfcdc4b4dd8 100644 (file)
@@ -42,6 +42,7 @@
 #include "filenames.h"         /* for DOSish file names */
 
 #include "solist.h"
+#include <readline/readline.h>
 
 /* external data declarations */
 
index 0107bfa2355a62e27ae37150bf39e4dd48e45849..be5d90c338651d6186e89e50c29cf64b76e058ae 100644 (file)
@@ -44,6 +44,7 @@
 #include "filenames.h"         /* for DOSish file names */
 #include "completer.h"
 #include "ui-out.h"
+#include <readline/readline.h>
 
 #ifdef CRLF_SOURCE_FILES
 
index 0ede698f3c3dd4f32c15509e0fd4065604656df5..f27391aaa280fb22e1e731a4786d4ccf135ff0be 100644 (file)
@@ -42,6 +42,7 @@
 #include "gdb_obstack.h"
 #include "completer.h"
 #include "bcache.h"
+#include <readline/readline.h>
 
 #include <sys/types.h>
 #include <fcntl.h>
index 198b2d632eca8a981721a23fce670595483b8e8f..87722ba5a039d9cd0de4e1d779dc1bce32bcc291 100644 (file)
@@ -34,6 +34,7 @@
 #include "bcache.h"
 
 #include "gdb_string.h"
+#include <readline/readline.h>
 
 #ifndef DEV_TTY
 #define DEV_TTY "/dev/tty"
index 3d5783fbe82c9aafb0de6a9d02724c9ea6c1b413..d25bc3b8a79cdd008c9ff4c859d57686c2bebfc7 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1952,7 +1952,7 @@ init_main (void)
   write_history_p = 0;
 
   /* Setup important stuff for command line editing.  */
-  rl_completion_entry_function = (int (*)()) readline_line_completion_function;
+  rl_completion_entry_function = readline_line_completion_function;
   rl_completer_word_break_characters =
                                 get_gdb_completer_word_break_characters ();
   rl_completer_quote_characters = get_gdb_completer_quote_characters ();
This page took 0.064975 seconds and 4 git commands to generate.