public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFC 1/3] Minor cleanups in tui-io.c
Date: Mon, 03 Sep 2018 18:43:00 -0000	[thread overview]
Message-ID: <20180903184300.9961-2-tom@tromey.com> (raw)
In-Reply-To: <20180903184300.9961-1-tom@tromey.com>

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-09-03  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    |  8 ++++++++
 gdb/tui/tui-io.c | 18 ++++--------------
 gdb/tui/tui-io.h |  8 --------
 3 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index c7df50a4f24..b1bda6e4f54 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) \
@@ -599,7 +589,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 6f7ee8d55a7..11752d08459 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
-- 
2.13.6

  reply	other threads:[~2018-09-03 18:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 18:43 [RFC 0/3] Some TUI fixes Tom Tromey
2018-09-03 18:43 ` Tom Tromey [this message]
2018-09-03 18:43 ` [RFC 2/3] Making ANSI terminal escape sequences work in TUI Tom Tromey
2018-10-11 23:04   ` Tom Tromey
2018-09-03 18:43 ` [RFC 3/3] Deprecate and replace the "tabset" command Tom Tromey
2018-09-03 18:58   ` Eli Zaretskii
2018-10-18 21:42 ` [RFC 0/3] Some TUI fixes Tom Tromey
2018-10-18 22:04   ` Tom Tromey
2018-10-19 23:20     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180903184300.9961-2-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).