public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Change "win_resized" to bool
@ 2019-09-20 20:06 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-09-20 20:06 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9abd8a65c1298258c005af3f80bdc4da9726ee05
commit 9abd8a65c1298258c005af3f80bdc4da9726ee05
Author: Tom Tromey <tom@tromey.com>
Date: Wed Jul 24 15:43:40 2019 -0600
Change "win_resized" to bool
This changes the "win_resized" global to be a bool and then updates
the uses.
gdb/ChangeLog
2019-09-20 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_enable): Update.
* tui/tui-win.c (tui_sigwinch_handler, tui_async_resize_screen):
Update.
* tui/tui-data.h (tui_win_resized, tui_set_win_resized_to):
Update.
* tui/tui-data.c (win_resized): Now bool.
(tui_win_resized): Return bool.
(tui_set_win_resized_to): Accept a bool.
Diff:
---
gdb/ChangeLog | 11 +++++++++++
gdb/tui/tui-data.c | 8 ++++----
gdb/tui/tui-data.h | 4 ++--
gdb/tui/tui-win.c | 4 ++--
gdb/tui/tui.c | 2 +-
5 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 188984e..e36b54f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
2019-09-20 Tom Tromey <tom@tromey.com>
+ * tui/tui.c (tui_enable): Update.
+ * tui/tui-win.c (tui_sigwinch_handler, tui_async_resize_screen):
+ Update.
+ * tui/tui-data.h (tui_win_resized, tui_set_win_resized_to):
+ Update.
+ * tui/tui-data.c (win_resized): Now bool.
+ (tui_win_resized): Return bool.
+ (tui_set_win_resized_to): Accept a bool.
+
+2019-09-20 Tom Tromey <tom@tromey.com>
+
* tui/tui-regs.h (struct tui_data_window) <show_register_group>:
Change type of "refresh_values_only".
* tui/tui-regs.c (tui_data_window::show_register_group): Change
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 833ea49..c14b171 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -38,7 +38,7 @@ struct tui_win_info *tui_win_list[MAX_MAJOR_WINDOWS];
static int term_height, term_width;
static struct tui_win_info *win_with_focus = NULL;
-static int win_resized = FALSE;
+static bool win_resized = false;
/*********************************
@@ -56,8 +56,8 @@ tui_win_is_auxiliary (enum tui_win_type win_type)
******************************************/
/* Answer a whether the terminal window has been resized or not. */
-int
-tui_win_resized (void)
+bool
+tui_win_resized ()
{
return win_resized;
}
@@ -65,7 +65,7 @@ tui_win_resized (void)
/* Set a whether the terminal window has been resized or not. */
void
-tui_set_win_resized_to (int resized)
+tui_set_win_resized_to (bool resized)
{
win_resized = resized;
}
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index be81950..2646523 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -297,8 +297,8 @@ extern void tui_set_term_width_to (int);
extern struct tui_locator_window *tui_locator_win_info_ptr (void);
extern struct tui_win_info *tui_win_with_focus (void);
extern void tui_set_win_with_focus (struct tui_win_info *);
-extern int tui_win_resized (void);
-extern void tui_set_win_resized_to (int);
+extern bool tui_win_resized ();
+extern void tui_set_win_resized_to (bool);
extern struct tui_win_info *tui_next_win (struct tui_win_info *);
extern struct tui_win_info *tui_prev_win (struct tui_win_info *);
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index bf84cda..d07a777 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -664,7 +664,7 @@ static void
tui_sigwinch_handler (int signal)
{
mark_async_signal_handler (tui_sigwinch_token);
- tui_set_win_resized_to (TRUE);
+ tui_set_win_resized_to (true);
}
/* Callback for asynchronously resizing TUI following a SIGWINCH signal. */
@@ -685,7 +685,7 @@ tui_async_resize_screen (gdb_client_data arg)
}
else
{
- tui_set_win_resized_to (FALSE);
+ tui_set_win_resized_to (false);
tui_resize_all ();
tui_refresh_all_win ();
tui_update_gdb_sizes ();
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 5d6b9f3..966304f 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -504,7 +504,7 @@ tui_enable (void)
window. */
if (tui_win_resized ())
{
- tui_set_win_resized_to (FALSE);
+ tui_set_win_resized_to (false);
tui_resize_all ();
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-20 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 20:06 [binutils-gdb] Change "win_resized" to bool Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).