]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove some defines from tui-data.h
authorTom Tromey <tom@tromey.com>
Sun, 14 Jul 2019 00:30:53 +0000 (18:30 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 20 Aug 2019 22:45:50 +0000 (16:45 -0600)
This removes the HILITE and NO_HILITE defines from tui-data.h, in
favor of simply passing a bool to box_win.

2019-08-20  Tom Tromey  <tom@tromey.com>

* tui/tui-wingeneral.c (box_win): Change type of highlight_flag.
(tui_unhighlight_win, tui_highlight_win)
(tui_win_info::make_window): Update.
* tui/tui-data.h (HILITE, NO_HILITE): Remove.

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

index ea228474d87de843f03736afd55f2f73735ea035..b8b062fc3e6df923e77f4e45178a022a6d59c218 100644 (file)
@@ -1,3 +1,10 @@
+2019-08-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-wingeneral.c (box_win): Change type of highlight_flag.
+       (tui_unhighlight_win, tui_highlight_win)
+       (tui_win_info::make_window): Update.
+       * tui/tui-data.h (HILITE, NO_HILITE): Remove.
+
 2019-08-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-data.h (PROC_PREFIX, LINE_PREFIX, PC_PREFIX)
index dda15d1fbe14d2c1cf20f181b425b96d997339ce..6dfea41d49e1b0d0045b98af043b09bf3e15ed0a 100644 (file)
@@ -102,8 +102,6 @@ public:
 #define CMD_NAME                "cmd"
 #define DATA_NAME               "regs"
 #define DISASSEM_NAME           "asm"
-#define HILITE                  TRUE
-#define NO_HILITE               FALSE
 #define MIN_WIN_HEIGHT          3
 #define MIN_CMD_WIN_HEIGHT      3
 
index 5fa4cfd9eee99ee6bef17e8e3c675c63ab7a859b..ab0363f856cfcb616fd3b1be49fab99546f8bf9c 100644 (file)
@@ -56,7 +56,7 @@ tui_delete_win (WINDOW *window)
 /* Draw a border arround the window.  */
 static void
 box_win (struct tui_win_info *win_info, 
-        int highlight_flag)
+        bool highlight_flag)
 {
   if (win_info && win_info->handle)
     {
@@ -64,7 +64,7 @@ box_win (struct tui_win_info *win_info,
       int attrs;
 
       win = win_info->handle;
-      if (highlight_flag == HILITE)
+      if (highlight_flag)
         attrs = tui_active_border_attrs;
       else
         attrs = tui_border_attrs;
@@ -92,7 +92,7 @@ tui_unhighlight_win (struct tui_win_info *win_info)
       && win_info->can_highlight
       && win_info->handle != NULL)
     {
-      box_win (win_info, NO_HILITE);
+      box_win (win_info, false);
       win_info->refresh_window ();
       win_info->set_highlight (false);
     }
@@ -106,7 +106,7 @@ tui_highlight_win (struct tui_win_info *win_info)
       && win_info->can_highlight
       && win_info->handle != NULL)
     {
-      box_win (win_info, HILITE);
+      box_win (win_info, true);
       win_info->refresh_window ();
       win_info->set_highlight (true);
     }
@@ -138,7 +138,7 @@ tui_win_info::make_window ()
 {
   tui_gen_win_info::make_window ();
   if (handle != NULL && can_box ())
-    box_win (this, NO_HILITE);
+    box_win (this, false);
 }
 
 /* We can't really make windows visible, or invisible.  So we have to