* tui/tui-source.h: Update copyright. Include "tui-data.h".
(struct symtab): Declare.
(tui_set_source_content): Rename tuiSetSourceContent.
(tui_show_symtab_source): Rename tuiShowSource.
(tui_source_is_displayed): Rename tuiSourceIsDisplayed.
(tui_vertical_source_scroll): Rename tuiVerticalSourceScroll.
* tui/tui-source.c: Update copyright. Update references.
* tui/tui-win.c, tui/tui-winsource.c: Update references.
* tui/tui-stack.c: Update references.
2004-02-06 Andrew Cagney <cagney@redhat.com>
+ * tui/tui-source.h: Update copyright. Include "tui-data.h".
+ (struct symtab): Declare.
+ (tui_set_source_content): Rename tuiSetSourceContent.
+ (tui_show_symtab_source): Rename tuiShowSource.
+ (tui_source_is_displayed): Rename tuiSourceIsDisplayed.
+ (tui_vertical_source_scroll): Rename tuiVerticalSourceScroll.
+ * tui/tui-source.c: Update copyright. Update references.
+ * tui/tui-win.c, tui/tui-winsource.c: Update references.
+ * tui/tui-stack.c: Update references.
+
* tui/tui-win.h: Update copyright. Include "tui-data.h".
(struct tui_win_info): Declare.
(tui_scroll_forward): Rename tuiScrollForward.
/* TUI display source window.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
- Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+ Foundation, Inc.
Contributed by Hewlett-Packard Company.
#endif
/* Function to display source in the source window. */
-TuiStatus
-tuiSetSourceContent (struct symtab *s, int lineNo, int noerror)
+enum tui_status
+tui_set_source_content (struct symtab *s, int lineNo, int noerror)
{
TuiStatus ret = TUI_FAILURE;
/* Function to display source in the source window. This function
initializes the horizontal scroll to 0. */
void
-tuiShowSource (struct symtab *s, TuiLineOrAddress line, int noerror)
+tui_show_symtab_source (struct symtab *s, TuiLineOrAddress line, int noerror)
{
srcWin->detail.sourceInfo.horizontalOffset = 0;
tui_update_source_window_as_is (srcWin, s, line, noerror);
}
-/* Answer whether the source is currently displayed in the source window. */
+/* Answer whether the source is currently displayed in the source
+ window. */
int
-tuiSourceIsDisplayed (char *fname)
+tui_source_is_displayed (char *fname)
{
return (srcWin->generic.contentInUse &&
(strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())->
/* Scroll the source forward or backward vertically. */
void
-tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
- int numToScroll)
+tui_vertical_source_scroll (TuiScrollDirection scrollDirection,
+ int numToScroll)
{
if (srcWin->generic.content != (OpaquePtr) NULL)
{
/* TUI display source window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software
+ Foundation, Inc.
+
Contributed by Hewlett-Packard Company.
This file is part of GDB.
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TUI_SOURCE_H
-#define _TUI_SOURCE_H
+#ifndef TUI_SOURCE_H
+#define TUI_SOURCE_H
+
+#include "tui/tui-data.h"
+struct symtab;
struct tui_win_info;
extern void tui_set_source_content_nil (struct tui_win_info *, char *);
-extern TuiStatus tuiSetSourceContent (struct symtab *, int, int);
-extern void tuiShowSource (struct symtab *, TuiLineOrAddress, int);
-extern int tuiSourceIsDisplayed (char *);
-extern void tuiVerticalSourceScroll (TuiScrollDirection, int);
+extern enum tui_status tui_set_source_content (struct symtab *, int, int);
+extern void tui_show_symtab_source (struct symtab *, union tui_line_or_address, int);
+extern int tui_source_is_displayed (char *);
+extern void tui_vertical_source_scroll (enum tui_scroll_direction, int);
#endif
-/*_TUI_SOURCE_H*/
find_frame_sal (fi, &sal);
sourceAlreadyDisplayed = sal.symtab != 0
- && tuiSourceIsDisplayed (sal.symtab->filename);
+ && tui_source_is_displayed (sal.symtab->filename);
tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
tui_get_function_from_frame (fi),
sal.line,
** command window do nothing since the term should handle it.
*/
if (winToScroll == srcWin)
- tuiVerticalSourceScroll (FORWARD_SCROLL, _numToScroll);
+ tui_vertical_source_scroll (FORWARD_SCROLL, _numToScroll);
else if (winToScroll == disassemWin)
tui_vertical_disassem_scroll (FORWARD_SCROLL, _numToScroll);
else if (winToScroll == dataWin)
** command window do nothing since the term should handle it.
*/
if (winToScroll == srcWin)
- tuiVerticalSourceScroll (BACKWARD_SCROLL, _numToScroll);
+ tui_vertical_source_scroll (BACKWARD_SCROLL, _numToScroll);
else if (winToScroll == disassemWin)
tui_vertical_disassem_scroll (BACKWARD_SCROLL, _numToScroll);
else if (winToScroll == dataWin)
TuiStatus ret;
if (winInfo->generic.type == SRC_WIN)
- ret = tuiSetSourceContent (s, lineOrAddr.lineNo, noerror);
+ ret = tui_set_source_content (s, lineOrAddr.lineNo, noerror);
else
ret = tui_set_disassem_content (lineOrAddr.addr);
default:
sal = find_pc_line (addr, 0);
l.lineNo = sal.line;
- tuiShowSource (sal.symtab, l, FALSE);
+ tui_show_symtab_source (sal.symtab, l, FALSE);
break;
}
}
break;
default:
l.lineNo = line;
- tuiShowSource (s, l, FALSE);
+ tui_show_symtab_source (s, l, FALSE);
if (currentLayout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);