From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 05/12] Update help strings in TUI
Date: Mon, 30 Apr 2018 14:37:00 -0000 [thread overview]
Message-ID: <20180430143731.30007-6-tom@tromey.com> (raw)
In-Reply-To: <20180430143731.30007-1-tom@tromey.com>
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 <tom@tromey.com>
* 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 | <layout_name> \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 <win_name> [+ | -] <#lines>\n"
-#define XDBWIN_HEIGHT_USAGE "Usage: w <#lines>\n"
-#define FOCUS_USAGE "Usage: focus {<win> | 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>\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 <win_name> [+ | -] <#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 {<win> | 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,
--
2.13.6
next prev parent reply other threads:[~2018-04-30 14:37 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 14:37 [RFA 00/12] Small help text tweaks Tom Tromey
2018-04-30 14:37 ` [RFA 04/12] Update memattr.c help strings Tom Tromey
2018-05-04 18:16 ` Pedro Alves
2018-05-09 20:35 ` Tom Tromey
2018-05-24 17:53 ` Pedro Alves
2018-04-30 14:37 ` [RFA 10/12] Update help text in record-btrace.c Tom Tromey
2018-05-04 18:55 ` Pedro Alves
2018-04-30 14:37 ` [RFA 11/12] Update help text in linux-fork.c Tom Tromey
2018-05-04 18:56 ` Pedro Alves
2018-04-30 14:37 ` [RFA 03/12] Update core-related help strings Tom Tromey
2018-05-04 18:11 ` Pedro Alves
2018-05-09 20:31 ` Tom Tromey
2018-05-24 21:28 ` Pedro Alves
2018-04-30 14:37 ` [RFA 07/12] Update help text for "jump" command Tom Tromey
2018-05-04 18:52 ` Pedro Alves
2018-04-30 14:37 ` [RFA 09/12] Update help text in tracepoint.c Tom Tromey
2018-05-04 18:54 ` Pedro Alves
2018-04-30 14:37 ` Tom Tromey [this message]
2018-05-04 18:26 ` [RFA 05/12] Update help strings in TUI Pedro Alves
2018-04-30 14:37 ` [RFA 06/12] Update help text in dcache.c Tom Tromey
2018-05-04 18:27 ` Pedro Alves
2018-04-30 14:37 ` [RFA 08/12] Update help text in disasm.c Tom Tromey
2018-05-04 18:54 ` Pedro Alves
2018-04-30 14:37 ` [RFA 02/12] Update help strings in skip.c Tom Tromey
2018-05-04 18:09 ` Pedro Alves
2018-04-30 14:37 ` [RFA 01/12] Fix help and documentation for inferior commands Tom Tromey
2018-04-30 15:26 ` Eli Zaretskii
2018-05-04 18:07 ` Pedro Alves
2018-05-09 20:29 ` Tom Tromey
2018-05-10 9:17 ` Eli Zaretskii
2018-04-30 14:37 ` [RFA 12/12] Update help text in record.c Tom Tromey
2018-05-04 18:57 ` Pedro Alves
2018-04-30 14:40 ` [RFA 00/12] Small help text tweaks Eli Zaretskii
2018-04-30 15:13 ` 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=20180430143731.30007-6-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