From patchwork Mon Apr 30 14:37:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27047 Received: (qmail 91609 invoked by alias); 30 Apr 2018 14:37:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 91301 invoked by uid 89); 30 Apr 2018 14:37:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=tab, PUBLIC, displayed, scroll X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.194.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 14:37:36 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway30.websitewelcome.com (Postfix) with ESMTP id F0A10A544 for ; Mon, 30 Apr 2018 09:37:34 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9vqfWB1Uy2aLD9vqfr6Qe; Mon, 30 Apr 2018 09:37:34 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:38242 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fD9vq-003hNM-Ou; Mon, 30 Apr 2018 09:37:34 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 05/12] Update help strings in TUI Date: Mon, 30 Apr 2018 08:37:24 -0600 Message-Id: <20180430143731.30007-6-tom@tromey.com> In-Reply-To: <20180430143731.30007-1-tom@tromey.com> References: <20180430143731.30007-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fD9vq-003hNM-Ou X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:38242 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes This updates some help strings in the TUI to more closely follow GNU standards. In this case I chose to reuse some existing "usage" macros in the help text. Also, I found that XDBWIN_HEIGHT_USAGE is unused, so I removed it. ChangeLog 2018-04-29 Tom Tromey * tui/tui-layout.c (_initialize_tui_layout): Update help text. * tui/tui-win.c (WIN_HEIGHT_USAGE, FOCUS_USAGE): Update (XDBWIN_HEIGHT_USAGE): Remove. (_initialize_tui_win): Use macros. Update help text. --- gdb/ChangeLog | 7 +++++++ gdb/tui/tui-layout.c | 2 +- gdb/tui/tui-win.c | 27 +++++++++++++-------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 8e15f4e705..66e8e45f37 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -374,7 +374,7 @@ _initialize_tui_layout (void) cmd = add_com ("layout", class_tui, tui_layout_command, _("\ Change the layout of windows.\n\ -Usage: layout prev | next | \n\ +Usage: layout prev | next | LAYOUT-NAME\n\ Layout names are:\n\ src : Displays source and command windows.\n\ asm : Displays disassembly and command windows.\n\ diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index f3b7873d53..c42d7f036c 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -78,9 +78,8 @@ static void parse_scrolling_args (const char *, /*************************************** ** DEFINITIONS ***************************************/ -#define WIN_HEIGHT_USAGE "Usage: winheight [+ | -] <#lines>\n" -#define XDBWIN_HEIGHT_USAGE "Usage: w <#lines>\n" -#define FOCUS_USAGE "Usage: focus { | next | prev}\n" +#define WIN_HEIGHT_USAGE "Usage: winheight WINDOW-NAME> [+ | -] NUM-LINES>\n" +#define FOCUS_USAGE "Usage: focus [WINDOW-NAME | next | prev]\n" /*************************************** ** PUBLIC FUNCTIONS @@ -456,11 +455,11 @@ _initialize_tui_win (void) _("Refresh the terminal display.\n")); add_com ("tabset", class_tui, tui_set_tab_width_command, _("\ Set the width (in characters) of tab stops.\n\ -Usage: tabset \n")); +Usage: tabset N\n")); cmd = add_com ("winheight", class_tui, tui_set_win_height_command, _("\ -Set or modify the height of a specified window.\n\ -Usage: winheight [+ | -] <#lines>\n\ -Window names are:\n\ +Set or modify the height of a specified window.\n" +WIN_HEIGHT_USAGE +"Window names are:\n\ src : the source window\n\ cmd : the command window\n\ asm : the disassembly window\n\ @@ -470,9 +469,9 @@ regs : the register display\n")); add_info ("win", tui_all_windows_info, _("List of all displayed windows.\n")); cmd = add_com ("focus", class_tui, tui_set_focus_command, _("\ -Set focus to named window or next/prev window.\n\ -Usage: focus { | next | prev}\n\ -Valid Window names are:\n\ +Set focus to named window or next/prev window.\n" +FOCUS_USAGE +"Valid Window names are:\n\ src : the source window\n\ asm : the disassembly window\n\ regs : the register display\n\ @@ -481,16 +480,16 @@ cmd : the command window\n")); set_cmd_completer (cmd, focus_completer); add_com ("+", class_tui, tui_scroll_forward_command, _("\ Scroll window forward.\n\ -Usage: + [win] [n]\n")); +Usage: + [WIN] [N]\n")); add_com ("-", class_tui, tui_scroll_backward_command, _("\ Scroll window backward.\n\ -Usage: - [win] [n]\n")); +Usage: - [WIN] [N]\n")); add_com ("<", class_tui, tui_scroll_left_command, _("\ Scroll window text to the left.\n\ -Usage: < [win] [n]\n")); +Usage: < [WIN] [N]\n")); add_com (">", class_tui, tui_scroll_right_command, _("\ Scroll window text to the right.\n\ -Usage: > [win] [n]\n")); +Usage: > [WIN] [N]\n")); /* Define the tui control variables. */ add_setshow_enum_cmd ("border-kind", no_class, tui_border_kind_enums,