From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104263 invoked by alias); 27 Dec 2019 17:50:58 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 104255 invoked by uid 89); 27 Dec 2019 17:50:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Dec 2019 17:50:57 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Change tui_active to bool From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 27 Dec 2019 18:10:00 -0000 X-SW-Source: 2019-q4/txt/msg06110.txt.bz2 *** TEST RESULTS FOR COMMIT a1e4dee4350dec57393bec8944762c9848ee6049 *** commit a1e4dee4350dec57393bec8944762c9848ee6049 Author: Tom Tromey AuthorDate: Sat Dec 21 10:41:25 2019 -0700 Commit: Tom Tromey CommitDate: Fri Dec 27 09:33:36 2019 -0700 Change tui_active to bool This changes tui_active and tui_finish_init to have type "bool". gdb/ChangeLog 2019-12-27 Tom Tromey * 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 diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee11a3f6e1..b31ddcd64f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2019-12-27 Tom Tromey + + * 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. + 2019-12-27 Tom Tromey * tui/tui-source.c (tui_source_window::maybe_update): Update. diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index f33ff44128..0ebe846e0d 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) diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index 06f3ef1f01..14f2939fd2 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -81,6 +81,6 @@ extern enum tui_key_mode tui_current_key_mode; keymap. */ extern void tui_set_key_mode (enum tui_key_mode mode); -extern int tui_active; +extern bool tui_active; #endif /* TUI_TUI_H */