[PATCH 51/66] Remove layout_def::split

Tom Tromey
2019-06-24T18:48:55Z

The "split" field in struct layout_def is never used, so this patch
removes it.

2019-06-23 Tom Tromey <tom@tromey.com>

* tui/tui-layout.c (tui_set_layout): Update.
* tui/tui-data.h (struct tui_layout_def) <split>: Remove.
* tui/tui-data.c (layout_def): Update.
---
gdb/ChangeLog | 6 ++++++
gdb/tui/tui-data.c | 2 +-
gdb/tui/tui-data.h | 1 -
gdb/tui/tui-layout.c | 5 -----
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 4f5f710ba94..f6d36e670fb 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -41,7 +41,7 @@ static struct std::vector<tui_source_window_base *> source_windows;
static struct tui_win_info *win_with_focus = NULL;
static struct tui_layout_def layout_def = {
SRC_WIN, /* DISPLAY_MODE */
- FALSE}; /* SPLIT */
+};

static int win_resized = FALSE;

diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index cdafc69a379..922f1301fa4 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -176,7 +176,6 @@ struct tui_line_or_address
struct tui_layout_def
{
enum tui_win_type display_mode;
- int split;
};

/* Elements in the Source/Disassembly Window. */
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index cf8f13feeed..61be48b877f 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -154,7 +154,6 @@ tui_set_layout (enum tui_layout_type layout_type)
case SRC_COMMAND:
tui_set_win_focus_to (TUI_SRC_WIN);
layout_def->display_mode = SRC_WIN;
- layout_def->split = FALSE;
break;
case DISASSEM_COMMAND:
/* The previous layout was not showing code.
@@ -168,7 +167,6 @@ tui_set_layout (enum tui_layout_type layout_type)
tui_get_begin_asm_address (&gdbarch, &addr);
tui_set_win_focus_to (TUI_DISASM_WIN);
layout_def->display_mode = DISASSEM_WIN;
- layout_def->split = FALSE;
break;
case SRC_DISASSEM_COMMAND:
/* The previous layout was not showing code.
@@ -184,7 +182,6 @@ tui_set_layout (enum tui_layout_type layout_type)
tui_set_win_focus_to (TUI_SRC_WIN);
else
tui_set_win_focus_to (TUI_DISASM_WIN);
- layout_def->split = TRUE;
break;
case SRC_DATA_COMMAND:
if (win_with_focus != TUI_DATA_WIN)
@@ -192,7 +189,6 @@ tui_set_layout (enum tui_layout_type layout_type)
else
tui_set_win_focus_to (TUI_DATA_WIN);
layout_def->display_mode = SRC_WIN;
- layout_def->split = FALSE;
break;
case DISASSEM_DATA_COMMAND:
/* The previous layout was not showing code.
@@ -209,7 +205,6 @@ tui_set_layout (enum tui_layout_type layout_type)
else
tui_set_win_focus_to (TUI_DATA_WIN);
layout_def->display_mode = DISASSEM_WIN;
- layout_def->split = FALSE;
break;
default:
break;
--
2.17.2