aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-06-07 15:10:01 +0200
committerTom de Vries <tdevries@suse.de>2023-06-07 15:10:01 +0200
commitdcb16346459f8e08b1e7e5891a056492a8543182 (patch)
tree1111cb2c58f91fccac59693e5cc06103cc1e3bb6
parenta6bc87757c85035a7cbb44da0706084043af68d1 (diff)
downloadgdb-dcb16346459f8e08b1e7e5891a056492a8543182.zip
gdb-dcb16346459f8e08b1e7e5891a056492a8543182.tar.gz
gdb-dcb16346459f8e08b1e7e5891a056492a8543182.tar.bz2
[gdb/tui] Factor out border-mode help text
I noticed that the help texts for tui border-mode and tui active-border-mode are similar. Factor out the common part into macro HELP_ATTRIBUTE_MODE. Tested on x86_64-linux.
-rw-r--r--gdb/tui/tui-win.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 08a21fb..71f961e 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1220,18 +1220,22 @@ This variable controls the border of TUI windows:\n\
show_tui_border_kind,
&tui_setlist, &tui_showlist);
- add_setshow_enum_cmd ("border-mode", no_class, tui_border_mode_enums,
- &tui_border_mode, _("\
-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\
+#define HELP_ATTRIBUTE_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"),
+ bold-standout use extra bright or bold with standout mode"
+
+ add_setshow_enum_cmd ("border-mode", no_class, tui_border_mode_enums,
+ &tui_border_mode, _("\
+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"
+ HELP_ATTRIBUTE_MODE),
tui_set_var_cmd,
show_tui_border_mode,
&tui_setlist, &tui_showlist);
@@ -1239,19 +1243,16 @@ This variable controls the attributes to use for the window borders:\n\
add_setshow_enum_cmd ("active-border-mode", no_class, tui_border_mode_enums,
&tui_active_border_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"),
+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"
+ HELP_ATTRIBUTE_MODE),
tui_set_var_cmd,
show_tui_active_border_mode,
&tui_setlist, &tui_showlist);
+#undef HELP_ATTRIBUTE_MODE
+
add_setshow_zuinteger_cmd ("tab-width", no_class,
&internal_tab_width, _("\
Set the tab width, in characters, for the TUI."), _("\