- struct tui_gen_win_info * exec_info = win_info->detail.source_info.execution_info;
-
- werase (exec_info->handle);
- tui_refresh_win (exec_info);
-}
-
-void
-tui_clear_exec_info_content (struct tui_win_info * win_info)
-{
- win_info->detail.source_info.execution_info->content_in_use = FALSE;
- tui_erase_exec_info_content (win_info);
-
- return;
-}
-
-/* Function to update the execution info window. */
-void
-tui_update_exec_info (struct tui_win_info * win_info)
-{
- tui_set_exec_info_content (win_info);
- tui_show_exec_info_content (win_info);
-}
-
-enum tui_status
-tui_alloc_source_buffer (struct tui_win_info *win_info)
-{
- char *src_line_buf;
- int i, line_width, max_lines;
-
- max_lines = win_info->generic.height; /* less the highlight box */
- line_width = win_info->generic.width - 1;
- /*
- * Allocate the buffer for the source lines. Do this only once
- * since they will be re-used for all source displays. The only
- * other time this will be done is when a window's size changes.
- */
- if (win_info->generic.content == NULL)
- {
- src_line_buf = (char *)
- xmalloc ((max_lines * line_width) * sizeof (char));
- if (src_line_buf == (char *) NULL)
- {
- fputs_unfiltered ("Unable to Allocate Memory for Source or Disassembly Display.\n",
- gdb_stderr);
- return TUI_FAILURE;
- }
- /* allocate the content list */
- if ((win_info->generic.content =
- (void **) tui_alloc_content (max_lines, SRC_WIN)) == NULL)
- {
- xfree (src_line_buf);
- fputs_unfiltered ("Unable to Allocate Memory for Source or Disassembly Display.\n",
- gdb_stderr);
- return TUI_FAILURE;
- }
- for (i = 0; i < max_lines; i++)
- ((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line =
- src_line_buf + (line_width * i);
- }
-
- return TUI_SUCCESS;
-}
-
-
-/* Answer whether the a particular line number or address is displayed
- in the current source window. */
-int
-tui_line_is_displayed (int line, struct tui_win_info * win_info,
- int check_threshold)
-{
- int is_displayed = FALSE;
- int i, threshold;
-
- if (check_threshold)
- threshold = SCROLL_THRESHOLD;
- else
- threshold = 0;
- i = 0;
- while (i < win_info->generic.content_size - threshold && !is_displayed)
- {
- is_displayed = (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.loa
- == LOA_LINE)
- && (((struct tui_win_element *)
- win_info->generic.content[i])->which_element.source.line_or_addr.u.line_no
- == (int) line);
- i++;
- }
-
- return is_displayed;
-}
-
-
-/* Answer whether the a particular line number or address is displayed
- in the current source window. */
-int
-tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info * win_info,
- int check_threshold)
-{
- int is_displayed = FALSE;
- int i, threshold;
-
- if (check_threshold)
- threshold = SCROLL_THRESHOLD;
- else
- threshold = 0;
- i = 0;
- while (i < win_info->generic.content_size - threshold && !is_displayed)