diff options
author | Tom Tromey <tom@tromey.com> | 2019-12-21 10:41:25 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-27 09:33:36 -0700 |
commit | a1e4dee4350dec57393bec8944762c9848ee6049 (patch) | |
tree | 9944a7f547e77ee31d742b342efd877c2603be22 /gdb/tui/tui.c | |
parent | 1630140dc64fcc6ce2366650eedce690235a8178 (diff) | |
download | binutils-a1e4dee4350dec57393bec8944762c9848ee6049.zip binutils-a1e4dee4350dec57393bec8944762c9848ee6049.tar.gz binutils-a1e4dee4350dec57393bec8944762c9848ee6049.tar.bz2 |
Change tui_active to bool
This changes tui_active and tui_finish_init to have type "bool".
gdb/ChangeLog
2019-12-27 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_active): Now bool.
(tui_finish_init): Likewise.
(tui_enable): Update.
(tui_disable): Update.
(tui_is_window_visible): Update.
* tui/tui.h (tui_active): Now bool.
Change-Id: Ia159ae9beb041137e34956b77f5bcf4e83eaf2b9
Diffstat (limited to 'gdb/tui/tui.c')
-rw-r--r-- | gdb/tui/tui.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index f33ff44..0ebe846 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -58,8 +58,8 @@ #include "readline/readline.h" /* Tells whether the TUI is active or not. */ -int tui_active = 0; -static int tui_finish_init = 1; +bool tui_active = false; +static bool tui_finish_init = true; enum tui_key_mode tui_current_key_mode = TUI_COMMAND_MODE; @@ -482,7 +482,7 @@ tui_enable (void) tui_set_win_focus_to (TUI_SRC_WIN); keypad (TUI_CMD_WIN->handle.get (), TRUE); wrefresh (TUI_CMD_WIN->handle.get ()); - tui_finish_init = 0; + tui_finish_init = false; } else { @@ -501,7 +501,7 @@ tui_enable (void) tui_setup_io (1); - tui_active = 1; + tui_active = true; /* Resize windows before anything might display/refresh a window. */ @@ -555,7 +555,7 @@ tui_disable (void) /* Update gdb's knowledge of its terminal. */ gdb_save_tty_state (); - tui_active = 0; + tui_active = false; tui_update_gdb_sizes (); } @@ -638,7 +638,7 @@ tui_show_assembly (struct gdbarch *gdbarch, CORE_ADDR addr) bool tui_is_window_visible (enum tui_win_type type) { - if (tui_active == 0) + if (!tui_active) return false; if (tui_win_list[type] == 0) |