diff options
author | Tom Tromey <tom@tromey.com> | 2019-10-01 17:03:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-10-09 16:50:33 -0600 |
commit | 6d7fd9aa4768c3fad5b5354c87eefb8026a0ba10 (patch) | |
tree | f5bf4062127409a843119d1983703d26a792ea72 /gdb/tui/tui-layout.c | |
parent | d2dd1084c10839efb916a0bfe57ca7a056d08b47 (diff) | |
download | fsf-binutils-gdb-6d7fd9aa4768c3fad5b5354c87eefb8026a0ba10.zip fsf-binutils-gdb-6d7fd9aa4768c3fad5b5354c87eefb8026a0ba10.tar.gz fsf-binutils-gdb-6d7fd9aa4768c3fad5b5354c87eefb8026a0ba10.tar.bz2 |
Remove tui_default_win_viewport_height
tui_default_win_viewport_height was only called from a single spot,
for a single type of window. This patch removes the function and
moves the logic into the sole caller.
gdb/ChangeLog
2019-10-09 Tom Tromey <tom@tromey.com>
* tui/tui-disasm.c (tui_get_low_disassembly_address): Compute
window height directly.
* tui/tui-layout.h (tui_default_win_viewport_height): Don't
declare.
* tui/tui-layout.c (tui_default_win_height): Remove.
(tui_default_win_viewport_height): Remove.
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 7aa670e..ccc750e 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -233,66 +233,6 @@ tui_add_win_to_layout (enum tui_win_type type) } } - -/* Answer the height of a window. If it hasn't been created yet, - answer what the height of a window would be based upon its type and - the layout. */ -static int -tui_default_win_height (enum tui_win_type type, - enum tui_layout_type layout) -{ - int h; - - if (tui_win_list[type] != NULL) - h = tui_win_list[type]->height; - else - { - switch (layout) - { - case SRC_COMMAND: - case DISASSEM_COMMAND: - if (TUI_CMD_WIN == NULL) - h = tui_term_height () / 2; - else - h = tui_term_height () - TUI_CMD_WIN->height; - break; - case SRC_DISASSEM_COMMAND: - case SRC_DATA_COMMAND: - case DISASSEM_DATA_COMMAND: - if (TUI_CMD_WIN == NULL) - h = tui_term_height () / 3; - else - h = (tui_term_height () - TUI_CMD_WIN->height) / 2; - break; - default: - h = 0; - break; - } - } - - return h; -} - - -/* Answer the height of a window. If it hasn't been created yet, - answer what the height of a window would be based upon its type and - the layout. */ -int -tui_default_win_viewport_height (enum tui_win_type type, - enum tui_layout_type layout) -{ - int h; - - h = tui_default_win_height (type, layout); - - if (type == CMD_WIN) - h -= 1; - else - h -= 2; - - return h; -} - /* Complete possible layout names. TEXT is the complete text entered so far, WORD is the word currently being completed. */ |