From 89549d7f4d27b63c4aaab4456e21dab1ee96a40a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 4 Jun 2019 06:17:09 -0600 Subject: Remove trailing newlines from help text I noticed recently that some command had a trailing newline in its "help" output. So, I temporarily hacked cli-decode.c to print something when a new command was installed that had a trailing newline in its help message, and wrote this patch, which removes all the ones I could find this way. (There could still be a few more in *-nat files.) Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-06-11 Tom Tromey * infcall.c (_initialize_infcall): Remove trailing newline from help. * user-regs.c (_initialize_user_regs): Remove trailing newline from help. * typeprint.c (_initialize_typeprint): Remove trailing newline from help. * reverse.c (_initialize_reverse): Remove trailing newlines from help. * tracepoint.c (_initialize_tracepoint): Remove trailing newlines from help. * language.c (add_set_language_command): Remove trailing newline from help. * infcmd.c (_initialize_infcmd): Remove trailing newlines from help. * disasm.c (_initialize_disasm): Remove trailing newline from help. * top.c (init_main): Remove trailing newline from help. * interps.c (_initialize_interpreter): Remove trailing newline from help. * btrace.c (_initialize_btrace): Remove trailing newlines from help. * breakpoint.c (_initialize_breakpoint): Remove trailing newline from help. * python/python.c (_initialize_python): Remove trailing newline from help. * spu-tdep.c (_initialize_spu_tdep): Remove trailing newlines from help. * tui/tui-win.c (_initialize_tui_win): Remove trailing newlines from help. Reformat some text. * tui/tui-stack.c (_initialize_tui_stack): Remove trailing newline from help. * tui/tui-layout.c (_initialize_tui_layout): Remove trailing newline from help. --- gdb/tui/tui-layout.c | 2 +- gdb/tui/tui-stack.c | 2 +- gdb/tui/tui-win.c | 64 ++++++++++++++++++++++++++-------------------------- 3 files changed, 34 insertions(+), 34 deletions(-) (limited to 'gdb/tui') diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index f4e926e..da50ced 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -384,7 +384,7 @@ Layout names are:\n\ register window is displayed. If the\n\ source/assembly/command (split) is displayed, \n\ the register window is displayed with \n\ - the window that has current logical focus.\n")); + the window that has current logical focus.")); set_cmd_completer (cmd, layout_completer); } diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index b85b7a5..79f1f6f 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -495,7 +495,7 @@ _initialize_tui_stack (void) { add_com ("update", class_tui, tui_update_command, _("Update the source window and locator to " - "display the current execution point.\n")); + "display the current execution point.")); } /* Command to update the display with the current execution point. */ diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index a24f259..575620f 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -1666,47 +1666,47 @@ _initialize_tui_win (void) 0 /* allow-unknown */, &showlist); add_com ("refresh", class_tui, tui_refresh_all_command, - _("Refresh the terminal display.\n")); + _("Refresh the terminal display.")); cmd = 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")); deprecate_cmd (cmd, "set tui tab-width"); cmd = add_com ("winheight", class_tui, tui_set_win_height_command, _("\ 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\ -regs : the register display\n")); + src : the source window\n\ + cmd : the command window\n\ + asm : the disassembly window\n\ + regs : the register display")); add_com_alias ("wh", "winheight", class_tui, 0); set_cmd_completer (cmd, winheight_completer); add_info ("win", tui_all_windows_info, - _("List of all displayed windows.\n")); + _("List of all displayed windows.")); cmd = add_com ("focus", class_tui, tui_set_focus_command, _("\ 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\ -cmd : the command window\n")); + src : the source window\n\ + asm : the disassembly window\n\ + regs : the register display\n\ + cmd : the command window")); add_com_alias ("fs", "focus", class_tui, 0); 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]")); add_com ("-", class_tui, tui_scroll_backward_command, _("\ Scroll window backward.\n\ -Usage: - [WIN] [N]\n")); +Usage: - [WIN] [N]")); add_com ("<", class_tui, tui_scroll_left_command, _("\ Scroll window text to the left.\n\ -Usage: < [WIN] [N]\n")); +Usage: < [WIN] [N]")); add_com (">", class_tui, tui_scroll_right_command, _("\ Scroll window text to the right.\n\ -Usage: > [WIN] [N]\n")); +Usage: > [WIN] [N]")); /* Define the tui control variables. */ add_setshow_enum_cmd ("border-kind", no_class, tui_border_kind_enums, @@ -1714,9 +1714,9 @@ Usage: > [WIN] [N]\n")); Set the kind of border for TUI windows."), _("\ Show the kind of border for TUI windows."), _("\ This variable controls the border of TUI windows:\n\ -space use a white space\n\ -ascii use ascii characters + - | for the border\n\ -acs use the Alternate Character Set"), + space use a white space\n\ + ascii use ascii characters + - | for the border\n\ + acs use the Alternate Character Set"), tui_set_var_cmd, show_tui_border_kind, &tui_setlist, &tui_showlist); @@ -1726,13 +1726,13 @@ acs use the Alternate Character Set"), Set the attribute mode to use for the TUI window borders."), _("\ Show the attribute mode to use for the TUI window borders."), _("\ This variable controls the attributes to use for the window borders:\n\ -normal normal display\n\ -standout use highlight mode of terminal\n\ -reverse use reverse video mode\n\ -half use half bright\n\ -half-standout use half bright and standout mode\n\ -bold use extra bright or bold\n\ -bold-standout use extra bright or bold with standout mode"), + normal normal display\n\ + standout use highlight mode of terminal\n\ + reverse use reverse video mode\n\ + half use half bright\n\ + half-standout use half bright and standout mode\n\ + bold use extra bright or bold\n\ + bold-standout use extra bright or bold with standout mode"), tui_set_var_cmd, show_tui_border_mode, &tui_setlist, &tui_showlist); @@ -1742,13 +1742,13 @@ bold-standout use extra bright or bold with standout mode"), Set the attribute mode to use for the active TUI window border."), _("\ Show the attribute mode to use for the active TUI window border."), _("\ This variable controls the attributes to use for the active window border:\n\ -normal normal display\n\ -standout use highlight mode of terminal\n\ -reverse use reverse video mode\n\ -half use half bright\n\ -half-standout use half bright and standout mode\n\ -bold use extra bright or bold\n\ -bold-standout use extra bright or bold with standout mode"), + normal normal display\n\ + standout use highlight mode of terminal\n\ + reverse use reverse video mode\n\ + half use half bright\n\ + half-standout use half bright and standout mode\n\ + bold use extra bright or bold\n\ + bold-standout use extra bright or bold with standout mode"), tui_set_var_cmd, show_tui_active_border_mode, &tui_setlist, &tui_showlist); -- cgit v1.1