+2019-07-17 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-windata.h (tui_display_data_from_line): Don't declare.
+ * tui/tui-windata.c (tui_display_data_from_line): Remove.
+ (tui_display_data_from, tui_data_window::do_scroll_vertical): Call
+ tui_display_registers_from_line.
+ * tui/tui-regs.h (tui_display_registers_from_line): Update.
+ * tui/tui-regs.c (tui_display_registers_from_line): Remove
+ "force_display" parameter.
+
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (tui_first_reg_element_no_inline): Don't
data window. Answers the line number that the display actually
started from. If nothing is displayed (-1) is returned. */
int
-tui_display_registers_from_line (int line_no,
- int force_display)
+tui_display_registers_from_line (int line_no)
{
+ tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
if (!TUI_DATA_WIN->regs_content.empty ())
{
- int line, element_no;
+ int element_no;
if (line_no < 0)
- line = 0;
- else if (force_display)
- { /* If we must display regs (force_display is true), then
- make sure that we don't display off the end of the
+ line_no = 0;
+ else
+ {
+ /* Make sure that we don't display off the end of the
registers. */
if (line_no >= TUI_DATA_WIN->last_regs_line_no ())
{
- if ((line = TUI_DATA_WIN->line_from_reg_element_no (
+ if ((line_no = TUI_DATA_WIN->line_from_reg_element_no (
TUI_DATA_WIN->regs_content.size () - 1)) < 0)
- line = 0;
+ line_no = 0;
}
- else
- line = line_no;
}
- else
- line = line_no;
- element_no = TUI_DATA_WIN->first_reg_element_no_inline (line);
+ element_no = TUI_DATA_WIN->first_reg_element_no_inline (line_no);
if (element_no < TUI_DATA_WIN->regs_content.size ())
- tui_display_reg_element_at_line (element_no, line);
+ tui_display_reg_element_at_line (element_no, line_no);
else
- line = (-1);
+ line_no = (-1);
- return line;
+ return line_no;
}
return (-1); /* Nothing was displayed. */
extern void tui_check_register_values (struct frame_info *);
extern void tui_show_registers (struct reggroup *group);
extern void tui_display_registers_from (int);
-extern int tui_display_registers_from_line (int, int);
+extern int tui_display_registers_from_line (int);
extern int tui_first_reg_element_inline (int);
#endif /* TUI_TUI_REGS_H */
}
-/* Function to display the data starting at line, line_no, in the data
- window. */
-void
-tui_display_data_from_line (int line_no)
-{
- int _line_no = line_no;
-
- if (line_no < 0)
- _line_no = 0;
-
- tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
-
- tui_display_registers_from_line (_line_no, TRUE);
-}
-
-
/* Display data starting at element element_no. */
void
tui_display_data_from (int element_no, int reuse_windows)
tui_erase_data_content (NULL);
if (!reuse_windows)
tui_delete_data_content_windows ();
- tui_display_data_from_line (first_line);
+ tui_display_registers_from_line (first_line);
}
}
first_line += num_to_scroll;
tui_erase_data_content (NULL);
tui_delete_data_content_windows ();
- tui_display_data_from_line (first_line);
+ tui_display_registers_from_line (first_line);
}
}
extern void tui_erase_data_content (const char *);
extern void tui_display_all_data (void);
-extern void tui_display_data_from_line (int);
extern void tui_delete_data_content_windows (void);
extern void tui_refresh_data_win (void);
extern void tui_display_data_from (int, int);