aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-wingeneral.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-17 17:15:23 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:42 -0600
commit17374de40e7be36e4eb27d29bb8aac89586ce4a1 (patch)
tree39a2f41ceb57c70963b937994e7da68cf2fed38c /gdb/tui/tui-wingeneral.c
parentf936bca26dd7593a3b792e76eba37c5de2374961 (diff)
downloadgdb-17374de40e7be36e4eb27d29bb8aac89586ce4a1.zip
gdb-17374de40e7be36e4eb27d29bb8aac89586ce4a1.tar.gz
gdb-17374de40e7be36e4eb27d29bb8aac89586ce4a1.tar.bz2
Introduce enum tui_box
This adds a new enum to the TUI, replacing two #define constants, providing better type safety. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-wingeneral.h (tui_make_window): Change type of "box_it" parameter. * tui/tui-wingeneral.c (tui_make_window): Change type of "box_it" parameter. (tui_gen_win_info::make_visible): Update. * tui/tui-layout.c (init_and_make_win): Change type of "box_it" parameter. * tui/tui-data.h (enum tui_box): New enum. (BOX_WINDOW, DONT_BOX_WINDOW): Remove defines.
Diffstat (limited to 'gdb/tui/tui-wingeneral.c')
-rw-r--r--gdb/tui/tui-wingeneral.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index acb8a26..cfa4a08 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -146,7 +146,7 @@ tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info)
void
-tui_make_window (struct tui_gen_win_info *win_info, int box_it)
+tui_make_window (struct tui_gen_win_info *win_info, enum tui_box box_it)
{
WINDOW *handle;
@@ -175,7 +175,8 @@ tui_gen_win_info::make_visible (bool visible)
{
if (!is_visible)
{
- tui_make_window (this, !tui_win_is_auxillary (type));
+ tui_make_window (this, (tui_win_is_auxillary (type)
+ ? DONT_BOX_WINDOW : BOX_WINDOW));
is_visible = true;
}
}