Introduce TUI window iterator
authorTom Tromey <tom@tromey.com>
Thu, 27 Jun 2019 22:04:26 +0000 (16:04 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:03 +0000 (12:19 -0600)
commit1ce3e8442e5bab6f700f5f011de56201f76b8461
tree03a4a7a990697c748a9cea081cf13b2dcc693e72
parentfe3eaf1cd9af54cd4c678a8dde7fd0df601c9490
Introduce TUI window iterator

This introduces an iterator class and a range adapter to make it
simpler to iterate over TUI windows.

One explicit iteration remains, in tui-win.c, because that spot is
deleting windows as well.

gdb/ChangeLog
2019-07-17  Tom Tromey  <tom@tromey.com>

* tui/tui-wingeneral.h (tui_refresh_all): Update.
* tui/tui-wingeneral.c (make_all_visible): Use foreach.
(tui_refresh_all): Remove "list" parameter.  Use foreach.
* tui/tui-win.c (window_name_completer): Use foreach.
(tui_refresh_all_win, tui_rehighlight_all, tui_all_windows_info)
(update_tab_width): Likewise.
* tui/tui-layout.c (show_layout): Update.
* tui/tui-data.h (class tui_window_iterator): New.
(struct all_tui_windows): New.
* tui/tui-data.c (tui_partial_win_by_name): Use foreach.
gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-layout.c
gdb/tui/tui-win.c
gdb/tui/tui-wingeneral.c
gdb/tui/tui-wingeneral.h