]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor cleanups in tui-io.c
authorTom Tromey <tom@tromey.com>
Sun, 2 Sep 2018 00:44:33 +0000 (18:44 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 19 Oct 2018 23:22:27 +0000 (17:22 -0600)
I noticed that a couple of functions in tui-io.c could be static, and
that a couple more were unused and could be removed.

gdb/ChangeLog
2018-10-19  Tom Tromey  <tom@tromey.com>

* tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
(key_is_backspace, tui_getc): Don't declare.
* tui/tui-io.c (key_is_start_sequence): Now static.
(key_is_end_sequence, key_is_backspace): Remove.
(tui_getc): Now static.

gdb/ChangeLog
gdb/tui/tui-io.c
gdb/tui/tui-io.h

index 483b00e32a1f49d5736f825e28e888c897b5e258..57a0a95cf2d4c9fac36acf09d6ca076403643b9a 100644 (file)
@@ -1,3 +1,11 @@
+2018-10-19  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
+       (key_is_backspace, tui_getc): Don't declare.
+       * tui/tui-io.c (key_is_start_sequence): Now static.
+       (key_is_end_sequence, key_is_backspace): Remove.
+       (tui_getc): Now static.
+
 2018-10-19  Tom Tromey  <tom@tromey.com>
 
        * symfile.c (reread_symbols): Clear "static_links".
index 447615140990e69294c22a0fd635fd4853184bf8..7823688522f48fed0fb6453aa60e7c22a0ed204a 100644 (file)
    "gdb_curses.h".  */
 #include "readline/readline.h"
 
-int
+static int tui_getc (FILE *fp);
+
+static int
 key_is_start_sequence (int ch)
 {
   return (ch == 27);
 }
 
-int
-key_is_end_sequence (int ch)
-{
-  return (ch == 126);
-}
-
-int
-key_is_backspace (int ch)
-{
-  return (ch == 8);
-}
-
 /* Use definition from readline 4.3.  */
 #undef CTRL_CHAR
 #define CTRL_CHAR(c) \
@@ -614,7 +604,7 @@ tui_initialize_io (void)
 
 /* Get a character from the command window.  This is called from the
    readline package.  */
-int
+static int
 tui_getc (FILE *fp)
 {
   int ch;
index 6f7ee8d55a7af1d5fd7ff7571ea88627e9debfdb..11752d084592bc1fcf265e24e366da43e81f80dd 100644 (file)
@@ -38,9 +38,6 @@ extern void tui_setup_io (int mode);
 /* Initialize the IO for gdb in curses mode.  */
 extern void tui_initialize_io (void);
 
-/* Get a character from the command window.  */
-extern int tui_getc (FILE *);
-
 /* Readline callback.
    Redisplay the command line with its prompt after readline has
    changed the edited text.  */
@@ -52,9 +49,4 @@ extern char *tui_expand_tabs (const char *, int);
 extern struct ui_out *tui_out;
 extern cli_ui_out *tui_old_uiout;
 
-extern int key_is_start_sequence (int ch);
-extern int key_is_end_sequence (int ch);
-extern int key_is_backspace (int ch);
-extern int key_is_command_char (int ch);
-
 #endif