This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: Use 'set tui xxx' and 'show tui xxx' for tui configuration vars


Hi!

To follow Andrew's suggestion and use 'set tui xxx' commands for setting
tui variables, I've committed this patch (following the set remote model).
I've also committed the doc patch as it's probably obvious.

	Stephane

2001-07-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* tuiWin.c (_initialize_tuiWin): Use specific tui prefix for
	set/show configuration variables.
	(show_tui_cmd): New function.
	(set_tui_cmd): New function.

2001-07-28  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* gdb.texinfo (TUI Configuration): Rename tui configuration variables.
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.46
diff -u -p -r1.46 gdb.texinfo
--- gdb.texinfo	2001/07/24 18:48:15	1.46
+++ gdb.texinfo	2001/07/28 19:21:39
@@ -13348,8 +13348,8 @@ The TUI has several configuration variab
 appearance of windows on the terminal.
 
 @table @code
-@item set tui-border-kind @var{kind}
-@kindex set tui-border-kind
+@item set tui border-kind @var{kind}
+@kindex set tui border-kind
 Select the border appearance for the source, assembly and register windows.
 The possible values are the following:
 @table @code
@@ -13365,14 +13365,14 @@ drawn using character line graphics if t
 
 @end table
 
-@item set tui-active-border-mode @var{mode}
-@kindex set tui-active-border-mode
+@item set tui active-border-mode @var{mode}
+@kindex set tui active-border-mode
 Select the attributes to display the border of the active window.
 The possible values are @code{normal}, @code{standout}, @code{reverse},
 @code{half}, @code{half-standout}, @code{bold} and @code{bold-standout}.
 
-@item set tui-border-mode @var{mode}
-@kindex set tui-border-mode
+@item set tui border-mode @var{mode}
+@kindex set tui border-mode
 Select the attributes to display the border of other windows.
 The @var{mode} can be one of the following:
 @table @code
Index: tui/tuiWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v
retrieving revision 1.15
diff -u -p -r1.15 tuiWin.c
--- tuiWin.c	2001/07/23 21:13:57	1.15
+++ tuiWin.c	2001/07/28 19:21:42
@@ -257,6 +257,15 @@ tui_update_variables ()
   return need_redraw;
 }
 
+static void
+set_tui_cmd (char *args, int from_tty)
+{
+}
+
+static void
+show_tui_cmd (char *args, int from_tty)
+{
+}
 
 /*
    ** _initialize_tuiWin().
@@ -266,14 +275,24 @@ void
 _initialize_tuiWin (void)
 {
   struct cmd_list_element *c;
+  static struct cmd_list_element *tui_setlist;
+  static struct cmd_list_element *tui_showlist;
 
   /* Define the classes of commands.
      They will appear in the help list in the reverse of this order.  */
-
   add_cmd ("tui", class_tui, NO_FUNCTION,
 	   "Text User Interface commands.",
 	   &cmdlist);
 
+  add_prefix_cmd ("tui", class_tui, set_tui_cmd,
+                  "TUI configuration variables",
+		  &tui_setlist, "set tui ",
+		  0/*allow-unknown*/, &setlist);
+  add_prefix_cmd ("tui", class_tui, show_tui_cmd,
+                  "TUI configuration variables",
+		  &tui_showlist, "show tui ",
+		  0/*allow-unknown*/, &showlist);
+
   add_com ("refresh", class_tui, _tuiRefreshAll_command,
            "Refresh the terminal display.\n");
   if (xdb_commands)
@@ -316,18 +335,18 @@ Usage: w <#lines>\n");
 
   /* Define the tui control variables.  */
   c = add_set_enum_cmd
-    ("tui-border-kind", class_tui,
+    ("border-kind", no_class,
      tui_border_kind_enums, &tui_border_kind,
      "Set the kind of border for TUI windows.\n"
      "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\n",
-     &setlist);
-  add_show_from_set (c, &showlist);
+     &tui_setlist);
+  add_show_from_set (c, &tui_showlist);
 
   c = add_set_enum_cmd
-    ("tui-border-mode", class_tui,
+    ("border-mode", no_class,
      tui_border_mode_enums, &tui_border_mode,
      "Set the attribute mode to use for the TUI window borders.\n"
      "This variable controls the attributes to use for the window borders:\n"
@@ -338,11 +357,11 @@ Usage: w <#lines>\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\n",
-     &setlist);
-  add_show_from_set (c, &showlist);
+     &tui_setlist);
+  add_show_from_set (c, &tui_showlist);
 
   c = add_set_enum_cmd
-    ("tui-active-border-mode", class_tui,
+    ("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.\n"
      "This variable controls the attributes to use for the active window border:\n"
@@ -353,8 +372,8 @@ Usage: w <#lines>\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\n",
-     &setlist);
-  add_show_from_set (c, &showlist);
+     &tui_setlist);
+  add_show_from_set (c, &tui_showlist);
 }
 
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]