[binutils-gdb] Remove tui_wrefresh

Tom Tromey tromey@sourceware.org
Sat Sep 7 20:33:37 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a35cc8ff85af39f571dcba2446ed47b6c65ddca9

commit a35cc8ff85af39f571dcba2446ed47b6c65ddca9
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jun 29 10:07:20 2024 -0600

    Remove tui_wrefresh
    
    This removes tui_wrefresh, moving the code into refresh_window.  We
    remove tui_norefresh_window as well, because now the command window's
    refresh_window has to do what tui_wrefresh previously did.

Diff:
---
 gdb/python/py-tui.c      |  4 ++--
 gdb/tui/tui-command.c    |  4 +---
 gdb/tui/tui-command.h    |  3 +--
 gdb/tui/tui-data.h       |  9 ---------
 gdb/tui/tui-wingeneral.c | 10 +---------
 gdb/tui/tui-wingeneral.h |  4 ----
 6 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c
index b3544c6c7f2..8ad2b7d9733 100644
--- a/gdb/python/py-tui.c
+++ b/gdb/python/py-tui.c
@@ -95,7 +95,7 @@ class tui_py_window : public tui_win_info
       {
 	wnoutrefresh (handle.get ());
 	touchwin (m_inner_window.get ());
-	tui_wrefresh (m_inner_window.get ());
+	wnoutrefresh (m_inner_window.get ());
       }
     else
       tui_win_info::refresh_window ();
@@ -275,7 +275,7 @@ tui_py_window::output (const char *text, bool full_window)
       if (full_window)
 	check_and_display_highlight_if_needed ();
       else
-	tui_wrefresh (m_inner_window.get ());
+	wnoutrefresh (m_inner_window.get ());
     }
 }
 
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index b9bc19ee9ee..2060a36b062 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -57,7 +57,5 @@ tui_cmd_window::resize (int height_, int width_, int origin_x, int origin_y)
 void
 tui_refresh_cmd_win (void)
 {
-  WINDOW *w = tui_cmd_win ()->handle.get ();
-
-  tui_wrefresh (w);
+  tui_cmd_win ()->refresh_window ();
 }
diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h
index 90b8de7535b..666b8f59c3c 100644
--- a/gdb/tui/tui-command.h
+++ b/gdb/tui/tui-command.h
@@ -26,8 +26,7 @@
 
 /* The TUI command window.  */
 struct tui_cmd_window
-  : public tui_noscroll_window, tui_nobox_window, tui_norefresh_window,
-    tui_always_visible_window
+  : public tui_noscroll_window, tui_nobox_window, tui_always_visible_window
 {
   tui_cmd_window () = default;
 
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 14c9b87c8c0..79a41637d21 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -253,15 +253,6 @@ struct tui_nobox_window : public virtual tui_win_info
   }
 };
 
-/* A TUI window that is not refreshed.  */
-
-struct tui_norefresh_window : public virtual tui_win_info
-{
-  virtual void refresh_window () final override
-  {
-  }
-};
-
 /* A TUI window that is always visible.  */
 
 struct tui_always_visible_window : public virtual tui_win_info
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index 963a1658ae5..369d1529f94 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -52,19 +52,11 @@ tui_batch_rendering::~tui_batch_rendering ()
 
 /* See tui-data.h.  */
 
-void
-tui_wrefresh (WINDOW *win)
-{
-  wnoutrefresh (win);
-}
-
-/* See tui-data.h.  */
-
 void
 tui_win_info::refresh_window ()
 {
   if (handle != NULL)
-    tui_wrefresh (handle.get ());
+    wnoutrefresh (handle.get ());
 }
 
 /* Draw a border around the window.  */
diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h
index 6387afdcbaa..83ecb7d1645 100644
--- a/gdb/tui/tui-wingeneral.h
+++ b/gdb/tui/tui-wingeneral.h
@@ -50,8 +50,4 @@ class tui_batch_rendering
   bool m_saved_suppress;
 };
 
-/* Call wrefresh on the given window.  However, if output is being
-   suppressed via tui_suppress_output, do not call wrefresh.  */
-extern void tui_wrefresh (WINDOW *win);
-
 #endif /* TUI_TUI_WINGENERAL_H */


More information about the Gdb-cvs mailing list