Remove command from tui_which_element
authorTom Tromey <tom@tromey.com>
Fri, 21 Jun 2019 12:16:06 +0000 (06:16 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 25 Jun 2019 13:48:46 +0000 (07:48 -0600)
union tui_which_element has a "command" member, but it is never used.
This removes it.

gdb/ChangeLog
2019-06-25  Tom Tromey  <tom@tromey.com>

* tui/tui-data.h (struct tui_command_element): Remove.
(union tui_which_element) <command>: Remove.
* tui/tui-data.c (init_content_element): Remove CMD_WIN case.  Add
assert.
(free_content_elements): Remove CMD_WIN case.

gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h

index b0e0547d69f213b22dd5415e7b0251f91f736cb1..9c6cf686cb3bb8cd9fb7da7624162c68d4f206d0 100644 (file)
@@ -1,3 +1,11 @@
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-data.h (struct tui_command_element): Remove.
+       (union tui_which_element) <command>: Remove.
+       * tui/tui-data.c (init_content_element): Remove CMD_WIN case.  Add
+       assert.
+       (free_content_elements): Remove CMD_WIN case.
+
 2019-06-25  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-layout.c (tui_set_layout): Update.
index 2c1e575dc4885191d8fc56a4c503ddae2eb881eb..427f04abc2f400714bbf8c808b1463b4405b29c0 100644 (file)
@@ -366,6 +366,7 @@ init_content_element (struct tui_win_element *element,
 {
   gdb_assert (type != EXEC_INFO_WIN);
   gdb_assert (type != LOCATOR_WIN);
+  gdb_assert (type != CMD_WIN);
 
   switch (type)
     {
@@ -383,9 +384,6 @@ init_content_element (struct tui_win_element *element,
        tui_alloc_content (1, DATA_ITEM_WIN);
       element->which_element.data_window->content_size = 1;
       break;
-    case CMD_WIN:
-      element->which_element.command.line = NULL;
-      break;
     case DATA_ITEM_WIN:
       element->which_element.data.name = NULL;
       element->which_element.data.type = TUI_REGISTER;
@@ -627,9 +625,6 @@ free_content_elements (tui_win_content content,
                       xfree (element->which_element.data.content);
                      xfree (element);
                      break;
-                   case CMD_WIN:
-                     xfree (element->which_element.command.line);
-                     break;
                    default:
                      break;
                    }
index 0990a2d169007b1ff5896db934c8a0a1563cdd35..5c1f2bdc8907cf91a17a4a28a772aa7a4aea2848 100644 (file)
@@ -201,12 +201,6 @@ struct tui_data_element
 };
 
 
-/* Elements in the command window content.  */
-struct tui_command_element
-{
-  char *line;
-};
-
 #ifdef PATH_MAX
 # define MAX_LOCATOR_ELEMENT_LEN        PATH_MAX
 #else
@@ -234,7 +228,6 @@ union tui_which_element
   struct tui_source_element source;    /* The source elements.  */
   struct tui_gen_win_info *data_window;        /* Data display elements.  */
   struct tui_data_element data;                /* Elements of data_window.  */
-  struct tui_command_element command;  /* Command elements.  */
 };
 
 struct tui_win_element
This page took 0.031167 seconds and 4 git commands to generate.