From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31017 invoked by alias); 3 Sep 2018 18:43:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 30904 invoked by uid 89); 3 Sep 2018 18:43:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*r:esmtpsa X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Sep 2018 18:43:27 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 4DB744BDBC for ; Mon, 3 Sep 2018 13:43:26 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id wtoVfgH9ebXuJwtoif0h5B; Mon, 03 Sep 2018 13:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v+NTd3yrcER2jgVyKKEjuIgAhKxqhJ/gGgUAkasrQPw=; b=VSEi1Uuy7TmBf+ZE8/pFo/d7LH /KsNagqaqD9p8Xg1436PeU7wrjEV3ENviloqZE0Heg3C5FEpfpvr4pJHxAtFsWQaFd9zrvpDGJqS1 KTlkdbWwuprwnH7iNZUQH+2LI; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:58052 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fwtoU-002fHL-T6; Mon, 03 Sep 2018 13:43:02 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 1/3] Minor cleanups in tui-io.c Date: Mon, 03 Sep 2018 18:43:00 -0000 Message-Id: <20180903184300.9961-2-tom@tromey.com> In-Reply-To: <20180903184300.9961-1-tom@tromey.com> References: <20180903184300.9961-1-tom@tromey.com> X-SW-Source: 2018-09/txt/msg00021.txt.bz2 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 * 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