Change "win_resized" to bool
authorTom Tromey <tom@tromey.com>
Wed, 24 Jul 2019 21:43:40 +0000 (15:43 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 20 Sep 2019 19:49:08 +0000 (13:49 -0600)
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.

gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-win.c
gdb/tui/tui.c

index 188984ee8029044a1929fca7e6cedf13b97bea2c..e36b54f226a3912ce3daad4caa2384500f3253d6 100644 (file)
@@ -1,3 +1,14 @@
+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>:
index 833ea49a951131c553d5d14a7793810427cdb637..c14b1711f6095d0f8c3f13203b5ef66be4792b8b 100644 (file)
@@ -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;
 }
index be819503cf277b7b00e075693e816f998286918b..264652361ef5ca536406f59f87168e505954fc68 100644 (file)
@@ -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 *);
index bf84cdac442cc7751ba65e23c42a3dff20f3f26c..d07a777360fd6b05885969595f61e14f7cb53ad6 100644 (file)
@@ -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 ();
index 5d6b9f320368f2d0e4e37f738622729f01657f34..966304f34080197740bce2acc83c81e678e92cf6 100644 (file)
@@ -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 ();
     }
 
This page took 0.033806 seconds and 4 git commands to generate.