This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Minor cleanups in tui-io.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=84371624ada07e6f107ee14c48a609466055fe0d

commit 84371624ada07e6f107ee14c48a609466055fe0d
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Sep 1 18:44:33 2018 -0600

    Minor cleanups in tui-io.c
    
    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.

Diff:
---
 gdb/ChangeLog    |  8 ++++++++
 gdb/tui/tui-io.c | 18 ++++--------------
 gdb/tui/tui-io.h |  8 --------
 3 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 483b00e..57a0a95 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 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".
 
 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 4476151..7823688 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -46,24 +46,14 @@
    "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;
diff --git a/gdb/tui/tui-io.h b/gdb/tui/tui-io.h
index 6f7ee8d..11752d0 100644
--- a/gdb/tui/tui-io.h
+++ b/gdb/tui/tui-io.h
@@ -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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]