public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove tui_make_visible and tui_make_invisible
@ 2019-07-17 18:40 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-07-17 18:40 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4a38112da00f45527de4aec0b645443c6ee0e01e
commit 4a38112da00f45527de4aec0b645443c6ee0e01e
Author: Tom Tromey <tom@tromey.com>
Date: Mon Jul 1 14:41:28 2019 -0600
Remove tui_make_visible and tui_make_invisible
tui_make_visible and tui_make_invisible are just wrappers for a method
call, so remove them and have the callers simply make the method call
themselves.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h (tui_make_visible, tui_make_invisible):
Don't declare.
* tui/tui-wingeneral.c (tui_make_visible, tui_make_invisible):
Remove.
* tui/tui-win.c (tui_source_window_base::set_new_height)
(tui_source_window_base::set_new_height)
(make_invisible_and_set_new_height)
(tui_source_window_base::do_make_visible_with_new_height)
(tui_source_window_base::do_make_visible_with_new_height):
Update.
* tui/tui-layout.c (show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Update.
* tui/tui-layout.c (show_layout): Update.
Diff:
---
gdb/ChangeLog | 16 ++++++++++++++++
gdb/tui/tui-layout.c | 16 ++++++++--------
gdb/tui/tui-win.c | 10 +++++-----
gdb/tui/tui-wingeneral.c | 12 ------------
gdb/tui/tui-wingeneral.h | 2 --
5 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4a43ba4..f6d464f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,21 @@
2019-07-17 Tom Tromey <tom@tromey.com>
+ * tui/tui-wingeneral.h (tui_make_visible, tui_make_invisible):
+ Don't declare.
+ * tui/tui-wingeneral.c (tui_make_visible, tui_make_invisible):
+ Remove.
+ * tui/tui-win.c (tui_source_window_base::set_new_height)
+ (tui_source_window_base::set_new_height)
+ (make_invisible_and_set_new_height)
+ (tui_source_window_base::do_make_visible_with_new_height)
+ (tui_source_window_base::do_make_visible_with_new_height):
+ Update.
+ * tui/tui-layout.c (show_source_disasm_command, show_data)
+ (show_source_or_disasm_and_command): Update.
+ * tui/tui-layout.c (show_layout): Update.
+
+2019-07-17 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (make_data_window): Remove.
(show_data): Unify creation and re-initialization cases.
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 7478c2c..4869cd9 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -80,7 +80,7 @@ show_layout (enum tui_layout_type layout)
{
/* First make the current layout be invisible. */
tui_make_all_invisible ();
- tui_make_invisible (tui_locator_win_info_ptr ());
+ tui_locator_win_info_ptr ()->make_visible (false);
switch (layout)
{
@@ -514,7 +514,7 @@ show_source_disasm_command (void)
tui_term_width (),
0,
0);
- tui_make_visible (TUI_SRC_WIN);
+ TUI_SRC_WIN->make_visible (true);
TUI_SRC_WIN->m_has_locator = false;
struct tui_locator_window *locator = tui_locator_win_info_ptr ();
@@ -527,14 +527,14 @@ show_source_disasm_command (void)
tui_term_width (),
0,
src_height - 1);
- tui_make_visible (TUI_DISASM_WIN);
+ TUI_DISASM_WIN->make_visible (true);
locator->reset (2 /* 1 */ ,
tui_term_width (),
0,
(src_height + asm_height) - 1);
TUI_SRC_WIN->m_has_locator = false;
TUI_DISASM_WIN->m_has_locator = true;
- tui_make_visible (locator);
+ locator->make_visible (true);
tui_show_locator_content ();
tui_show_source_content (TUI_DISASM_WIN);
@@ -567,7 +567,7 @@ show_data (enum tui_layout_type new_layout)
data_height = total_height / 2;
src_height = total_height - data_height;
tui_make_all_invisible ();
- tui_make_invisible (locator);
+ locator->make_visible (false);
if (tui_win_list[DATA_WIN] == nullptr)
tui_win_list[DATA_WIN] = new tui_data_window ();
tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0);
@@ -598,7 +598,7 @@ show_data (enum tui_layout_type new_layout)
total_height - 1);
base->make_visible (true);
base->m_has_locator = true;
- tui_make_visible (locator);
+ locator->make_visible (true);
tui_show_locator_content ();
tui_add_to_source_windows (base);
tui_set_current_layout_to (new_layout);
@@ -662,11 +662,11 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
tui_term_width (),
0,
0);
- tui_make_visible (win_info);
+ win_info->make_visible (true);
win_info->m_has_locator = true;
- tui_make_visible (locator);
+ locator->make_visible (true);
tui_show_locator_content ();
tui_show_source_content (win_info);
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 9d9d9a5..c92a706 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1226,7 +1226,7 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
void
tui_source_window_base::set_new_height (int height)
{
- tui_make_invisible (execution_info);
+ execution_info->make_visible (false);
execution_info->height = height;
execution_info->origin.y = origin.y;
if (height > 1)
@@ -1238,7 +1238,7 @@ tui_source_window_base::set_new_height (int height)
if (has_locator ())
{
tui_locator_window *gen_win_info = tui_locator_win_info_ptr ();
- tui_make_invisible (gen_win_info);
+ gen_win_info->make_visible (false);
gen_win_info->origin.y = origin.y + height;
}
}
@@ -1263,7 +1263,7 @@ static void
make_invisible_and_set_new_height (struct tui_win_info *win_info,
int height)
{
- tui_make_invisible (win_info);
+ win_info->make_visible (false);
win_info->height = height;
if (height > 1)
win_info->viewport_height = height - 1;
@@ -1292,7 +1292,7 @@ tui_win_info::make_visible_with_new_height ()
void
tui_source_window_base::do_make_visible_with_new_height ()
{
- tui_make_visible (execution_info);
+ execution_info->make_visible (true);
if (!content.empty ())
{
struct tui_line_or_address line_or_addr;
@@ -1326,7 +1326,7 @@ tui_source_window_base::do_make_visible_with_new_height ()
}
if (has_locator ())
{
- tui_make_visible (tui_locator_win_info_ptr ());
+ tui_locator_win_info_ptr ()->make_visible (true);
tui_show_locator_content ();
}
}
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index 4e6637e..2fb8d6c 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -179,18 +179,6 @@ tui_gen_win_info::make_visible (bool visible)
}
}
-void
-tui_make_visible (struct tui_gen_win_info *win_info)
-{
- win_info->make_visible (true);
-}
-
-void
-tui_make_invisible (struct tui_gen_win_info *win_info)
-{
- win_info->make_visible (false);
-}
-
/* See tui-data.h. */
void
diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h
index 20b7f21..5e6198d 100644
--- a/gdb/tui/tui-wingeneral.h
+++ b/gdb/tui/tui-wingeneral.h
@@ -28,8 +28,6 @@ struct tui_win_info;
struct tui_gen_win_info;
extern void tui_unhighlight_win (struct tui_win_info *);
-extern void tui_make_visible (struct tui_gen_win_info *);
-extern void tui_make_invisible (struct tui_gen_win_info *);
extern void tui_make_all_visible (void);
extern void tui_make_all_invisible (void);
extern void tui_make_window (struct tui_gen_win_info *, enum tui_box);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-17 18:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 18:40 [binutils-gdb] Remove tui_make_visible and tui_make_invisible 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).