This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/tui] Cleanup tui-source.h


commited, tui-data.h is next ...
Andrew
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.

Index: tui/tui-source.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-source.c,v
retrieving revision 1.2
diff -u -r1.2 tui-source.c
--- tui/tui-source.c	6 Feb 2004 22:42:18 -0000	1.2
+++ tui/tui-source.c	7 Feb 2004 01:35:00 -0000
@@ -1,7 +1,7 @@
 /* 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.
 
@@ -45,8 +45,8 @@
 #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;
 
@@ -300,16 +300,17 @@
 /* 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 ())->
@@ -319,8 +320,8 @@
 
 /* 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)
     {
Index: tui/tui-source.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-source.h,v
retrieving revision 1.2
diff -u -r1.2 tui-source.h
--- tui/tui-source.h	6 Feb 2004 22:42:18 -0000	1.2
+++ tui/tui-source.h	7 Feb 2004 01:35:00 -0000
@@ -1,5 +1,8 @@
 /* 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.
@@ -19,17 +22,19 @@
    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*/
Index: tui/tui-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-stack.c,v
retrieving revision 1.4
diff -u -r1.4 tui-stack.c
--- tui/tui-stack.c	6 Feb 2004 23:55:34 -0000	1.4
+++ tui/tui-stack.c	7 Feb 2004 01:35:01 -0000
@@ -340,7 +340,7 @@
       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,
Index: tui/tui-win.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
retrieving revision 1.8
diff -u -r1.8 tui-win.c
--- tui/tui-win.c	7 Feb 2004 01:02:54 -0000	1.8
+++ tui/tui-win.c	7 Feb 2004 01:35:06 -0000
@@ -459,7 +459,7 @@
          ** 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)
@@ -483,7 +483,7 @@
          ** 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)
Index: tui/tui-winsource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-winsource.c,v
retrieving revision 1.6
diff -u -r1.6 tui-winsource.c
--- tui/tui-winsource.c	7 Feb 2004 01:02:54 -0000	1.6
+++ tui/tui-winsource.c	7 Feb 2004 01:35:09 -0000
@@ -94,7 +94,7 @@
   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);
 
@@ -153,7 +153,7 @@
 	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;
 	}
     }
@@ -190,7 +190,7 @@
       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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]