diff options
author | Tom Tromey <tom@tromey.com> | 2016-06-28 14:25:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2016-07-14 10:35:38 -0600 |
commit | cecc8b99060bf82632345bd1c07d50c7ae8d81ef (patch) | |
tree | 87ad730603dfc12cbed8be0a1b71b7d2913a97b4 /gdb/tui/tui-winsource.c | |
parent | 821fc4aeef26bc7e5d5943c2f5d009a23e16883c (diff) | |
download | gdb-cecc8b99060bf82632345bd1c07d50c7ae8d81ef.zip gdb-cecc8b99060bf82632345bd1c07d50c7ae8d81ef.tar.gz gdb-cecc8b99060bf82632345bd1c07d50c7ae8d81ef.tar.bz2 |
Use getcurx in curses code
As suggested by Pedro, this changes a few spots to use getcurx, rather
than getyx. This avoids some unused variable warnings.
2016-07-14 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_show_source_line): Use getcurx.
* tui/tui-io.c (tui_puts): Use getcurx.
(tui_redisplay_readline): Likewise.
Diffstat (limited to 'gdb/tui/tui-winsource.c')
-rw-r--r-- | gdb/tui/tui-winsource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 48975b6..09080b8 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -273,7 +273,7 @@ static void tui_show_source_line (struct tui_win_info *win_info, int lineno) { struct tui_win_element *line; - int x, y; + int x; line = win_info->generic.content[lineno - 1]; if (line->which_element.source.is_exec_point) @@ -285,11 +285,11 @@ tui_show_source_line (struct tui_win_info *win_info, int lineno) wattroff (win_info->generic.handle, A_STANDOUT); /* Clear to end of line but stop before the border. */ - getyx (win_info->generic.handle, y, x); + x = getcurx (win_info->generic.handle); while (x + 1 < win_info->generic.width) { waddch (win_info->generic.handle, ' '); - getyx (win_info->generic.handle, y, x); + x = getcurx (win_info->generic.handle); } } |