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] Cleanup tui-data.h


Committed,
Andrew
2004-01-19  Andrew Cagney  <cagney@redhat.com>

	* tui/tui-regs.h: Include "tui-data.h".
	(tuiFirstRegElementNoInLine): Delete declaration.
	(tui_display_registers_from): Rename tuiDisplayRegistersFrom.
	(tui_last_regs_line_no): Rename tuiLastRegsLineNo.
	(tui_line_from_reg_element_no): Rename tuiLineFromRegElementNo.
	(tui_calculate_regs_column_count): Rename
	tuiCalculateRegsColumnCount.
	(tui_check_register_values): Rename tuiCheckRegisterValues.
	(tui_show_registers): Rename tuiShowRegisters.
	(tui_display_registers_from_line): Rename
	tuiDisplayRegistersFromLine.
	(tui_first_reg_element_inline): Rename tuiFirstRegElementInLine.
	(tui_toggle_float_regs): Rename tuiToggleFloatRegs.
	(tui_first_reg_element_no_inline): Rename
	tuiFirstRegElementNoInLine.
	* tui/tui-data.h: Update copyright.
	(enum tui_register_display_type): Rename _TuiRegisterDisplayType.
	* tui/tui-windata.c: Update copyright, update references.
	* tui/tui-regs.c: Update copyright, update references.
	* tui/tui-win.c: Update copyright, update references.
	* tui/tui-layout.c: Update copyright, update references.
	
Index: tui/tui-data.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-data.h,v
retrieving revision 1.1
diff -u -r1.1 tui-data.h
--- tui/tui-data.h	19 Jan 2004 04:31:50 -0000	1.1
+++ tui/tui-data.h	19 Jan 2004 05:54:51 -0000
@@ -1,5 +1,8 @@
 /* TUI data manipulation routines.
-   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.
@@ -135,7 +138,7 @@
 TuiDataType, TuiDataTypePtr;
 
 /* Types of register displays */
-typedef enum _TuiRegisterDisplayType
+typedef enum tui_register_display_type
   {
     TUI_UNDEFINED_REGS,
     TUI_GENERAL_REGS,
Index: tui/tui-layout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-layout.c,v
retrieving revision 1.1
diff -u -r1.1 tui-layout.c
--- tui/tui-layout.c	19 Jan 2004 04:31:50 -0000	1.1
+++ tui/tui-layout.c	19 Jan 2004 05:54:58 -0000
@@ -1,7 +1,7 @@
 /* TUI layout window management.
 
-   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.
 
@@ -258,7 +258,7 @@
 	      layoutDef->regsDisplayType =
 		(regsDisplayType == TUI_UNDEFINED_REGS ?
 		 TUI_GENERAL_REGS : regsDisplayType);
-	      tuiShowRegisters (layoutDef->regsDisplayType);
+	      tui_show_registers (layoutDef->regsDisplayType);
 	    }
 	}
     }
Index: tui/tui-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-regs.c,v
retrieving revision 1.1
diff -u -r1.1 tui-regs.c
--- tui/tui-regs.c	19 Jan 2004 04:31:51 -0000	1.1
+++ tui/tui-regs.c	19 Jan 2004 05:55:01 -0000
@@ -1,7 +1,7 @@
 /* TUI display registers in 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.
 
@@ -105,13 +105,10 @@
 ** PUBLIC FUNCTIONS                     **
 ******************************************/
 
-/*
-   ** tuiLastRegsLineNo()
-   **        Answer the number of the last line in the regs display.
-   **        If there are no registers (-1) is returned.
- */
+/* Answer the number of the last line in the regs display.  If there
+   are no registers (-1) is returned.  */
 int
-tuiLastRegsLineNo (void)
+tui_last_regs_line_no (void)
 {
   register int numLines = (-1);
 
@@ -124,17 +121,14 @@
 	numLines++;
     }
   return numLines;
-}				/* tuiLastRegsLineNo */
+}
 
 
-/*
-   ** tuiLineFromRegElementNo()
-   **        Answer the line number that the register element at elementNo is
-   **        on.  If elementNo is greater than the number of register elements
-   **        there are, -1 is returned.
- */
+/* Answer the line number that the register element at elementNo is
+   on.  If elementNo is greater than the number of register elements
+   there are, -1 is returned.  */
 int
-tuiLineFromRegElementNo (int elementNo)
+tui_line_from_reg_element_no (int elementNo)
 {
   if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
     {
@@ -154,16 +148,13 @@
     }
   else
     return (-1);
-}				/* tuiLineFromRegElementNo */
+}
 
 
-/*
-   ** tuiFirstRegElementNoInLine()
-   **        Answer the index of the first element in lineNo.  If lineNo is
-   **        past the register area (-1) is returned.
- */
+/* Answer the index of the first element in lineNo.  If lineNo is past
+   the register area (-1) is returned.  */
 int
-tuiFirstRegElementNoInLine (int lineNo)
+tui_first_reg_element_no_inline (int lineNo)
 {
   if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount)
       <= dataWin->detail.dataDisplayInfo.regsContentCount)
@@ -172,7 +163,7 @@
       dataWin->detail.dataDisplayInfo.regsColumnCount;
   else
     return (-1);
-}				/* tuiFirstRegElementNoInLine */
+}
 
 
 /*
@@ -192,13 +183,10 @@
 }				/* tuiLastRegElementNoInLine */
 
 
-/*
-   ** tuiCalculateRegsColumnCount
-   **        Calculate the number of columns that should be used to display
-   **        the registers.
- */
+/* Calculate the number of columns that should be used to display the
+   registers.  */
 int
-tuiCalculateRegsColumnCount (TuiRegisterDisplayType dpyType)
+tui_calculate_regs_column_count (TuiRegisterDisplayType dpyType)
 {
   int colCount, colWidth;
 
@@ -217,14 +205,11 @@
 }				/* tuiCalulateRegsColumnCount */
 
 
-/*
-   ** tuiShowRegisters().
-   **        Show the registers int the data window as indicated by dpyType.
-   **        If there is any other registers being displayed, then they are
-   **        cleared.  What registers are displayed is dependent upon dpyType.
- */
+/* Show the registers int the data window as indicated by dpyType.  If
+   there is any other registers being displayed, then they are
+   cleared.  What registers are displayed is dependent upon dpyType.  */
 void
-tuiShowRegisters (TuiRegisterDisplayType dpyType)
+tui_show_registers (TuiRegisterDisplayType dpyType)
 {
   TuiStatus ret = TUI_FAILURE;
   int refreshValuesOnly = FALSE;
@@ -286,18 +271,15 @@
   (tuiLayoutDef ())->regsDisplayType = dpyType;
 
   return;
-}				/* tuiShowRegisters */
+}
 
 
-/*
-   ** tuiDisplayRegistersFrom().
-   **        Function to display the registers in the content from
-   **        'startElementNo' until the end of the register content or the
-   **        end of the display height.  No checking for displaying past
-   **        the end of the registers is done here.
- */
+/* Function to display the registers in the content from
+   'startElementNo' until the end of the register content or the end
+   of the display height.  No checking for displaying past the end of
+   the registers is done here.  */
 void
-tuiDisplayRegistersFrom (int startElementNo)
+tui_display_registers_from (int startElementNo)
 {
   if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
       dataWin->detail.dataDisplayInfo.regsContentCount > 0)
@@ -374,7 +356,7 @@
     }
 
   return;
-}				/* tuiDisplayRegistersFrom */
+}
 
 
 /*
@@ -397,7 +379,7 @@
 	{
 	  register int lastLineNo, firstLineOnLastPage;
 
-	  lastLineNo = tuiLastRegsLineNo ();
+	  lastLineNo = tui_last_regs_line_no ();
 	  firstLineOnLastPage = lastLineNo - (dataWin->generic.height - 2);
 	  if (firstLineOnLastPage < 0)
 	    firstLineOnLastPage = 0;
@@ -408,9 +390,9 @@
 	   */
 	  if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0 &&
 	      startLineNo > firstLineOnLastPage)
-	    elementNo = tuiFirstRegElementNoInLine (firstLineOnLastPage);
+	    elementNo = tui_first_reg_element_no_inline (firstLineOnLastPage);
 	}
-      tuiDisplayRegistersFrom (elementNo);
+      tui_display_registers_from (elementNo);
     }
 
   return;
@@ -418,14 +400,11 @@
 
 
 
-/*
-   ** tuiDisplayRegistersFromLine().
-   **        Function to display the registers starting at line lineNo in
-   **        the data window.  Answers the line number that the display
-   **        actually started from.  If nothing is displayed (-1) is returned.
- */
+/* Function to display the registers starting at line lineNo in the
+   data window.  Answers the line number that the display actually
+   started from.  If nothing is displayed (-1) is returned.  */
 int
-tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
+tui_display_registers_from_line (int lineNo, int forceDisplay)
 {
   if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
     {
@@ -438,9 +417,9 @@
 				   ** If we must display regs (forceDisplay is true), then make
 				   ** sure that we don't display off the end of the registers.
 				 */
-	  if (lineNo >= tuiLastRegsLineNo ())
+	  if (lineNo >= tui_last_regs_line_no ())
 	    {
-	      if ((line = tuiLineFromRegElementNo (
+	      if ((line = tui_line_from_reg_element_no (
 		 dataWin->detail.dataDisplayInfo.regsContentCount - 1)) < 0)
 		line = 0;
 	    }
@@ -450,7 +429,7 @@
       else
 	line = lineNo;
 
-      elementNo = tuiFirstRegElementNoInLine (line);
+      elementNo = tui_first_reg_element_no_inline (line);
       if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
 	tuiDisplayRegElementAtLine (elementNo, line);
       else
@@ -460,23 +439,20 @@
     }
 
   return (-1);			/* nothing was displayed */
-}				/* tuiDisplayRegistersFromLine */
+}
 
 
-/*
-   ** tuiCheckRegisterValues()
-   **        This function check all displayed registers for changes in
-   **        values, given a particular frame.  If the values have changed,
-   **        they are updated with the new value and highlighted.
- */
+/* This function check all displayed registers for changes in values,
+   given a particular frame.  If the values have changed, they are
+   updated with the new value and highlighted.  */
 void
-tuiCheckRegisterValues (struct frame_info *frame)
+tui_check_register_values (struct frame_info *frame)
 {
   if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
     {
       if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0 &&
 	  dataWin->detail.dataDisplayInfo.displayRegs)
-	tuiShowRegisters ((tuiLayoutDef ())->regsDisplayType);
+	tui_show_registers ((tuiLayoutDef ())->regsDisplayType);
       else
 	{
 	  int i, j;
@@ -524,7 +500,7 @@
 	}
     }
   return;
-}				/* tuiCheckRegisterValues */
+}
 
 
 /*
@@ -543,7 +519,7 @@
   if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible &&
       (dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_SFLOAT_REGS ||
        dataWin->detail.dataDisplayInfo.regsDisplayType == TUI_DFLOAT_REGS))
-    tuiShowRegisters (layoutDef->floatRegsDisplayType);
+    tui_show_registers (layoutDef->floatRegsDisplayType);
 
   return;
 }				/* tuiToggleFloatRegs */
@@ -889,7 +865,7 @@
 				   !allocatedHere && refreshValuesOnly);
 	}
       dataWin->detail.dataDisplayInfo.regsColumnCount =
-	tuiCalculateRegsColumnCount (dpyType);
+	tui_calculate_regs_column_count (dpyType);
 #ifdef LATER
       if (dataWin->detail.dataDisplayInfo.dataContentCount > 0)
 	{
@@ -978,7 +954,7 @@
   if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
     {				/* Data window already displayed, show the registers */
       if (dataWin->detail.dataDisplayInfo.regsDisplayType != dpyType)
-	tuiShowRegisters (dpyType);
+	tui_show_registers (dpyType);
     }
   else
     (tuiLayoutDef ())->regsDisplayType = dpyType;
Index: tui/tui-regs.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-regs.h,v
retrieving revision 1.1
diff -u -r1.1 tui-regs.h
--- tui/tui-regs.h	19 Jan 2004 04:31:51 -0000	1.1
+++ tui/tui-regs.h	19 Jan 2004 05:55:01 -0000
@@ -1,5 +1,8 @@
 /* TUI display registers in window.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -19,29 +22,20 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _TUI_REGS_H
-#define _TUI_REGS_H
-
-/*****************************************
-** TYPE DEFINITIONS                        **
-******************************************/
-
+#ifndef TUI_REGS_H
+#define TUI_REGS_H
 
+#include "tui/tui-data.h"	/* For TuiRegisterDisplayType.  */
 
-/*****************************************
-** PUBLIC FUNCTION EXTERNAL DECLS        **
-******************************************/
-extern void tuiCheckRegisterValues (struct frame_info *);
-extern void tuiShowRegisters (TuiRegisterDisplayType);
-extern void tuiDisplayRegistersFrom (int);
-extern int tuiDisplayRegistersFromLine (int, int);
-extern int tuiLastRegsLineNo (void);
-extern int tuiFirstRegElementInLine (int);
-extern int tuiLastRegElementInLine (int);
-extern int tuiLineFromRegElementNo (int);
-extern void tuiToggleFloatRegs (void);
-extern int tuiCalculateRegsColumnCount (TuiRegisterDisplayType);
-extern int tuiFirstRegElementNoInLine (int lineno);
+extern void tui_check_register_values (struct frame_info *);
+extern void tui_show_registers (enum tui_register_display_type);
+extern void tui_display_registers_from (int);
+extern int tui_display_registers_from_line (int, int);
+extern int tui_last_regs_line_no (void);
+extern int tui_first_reg_element_inline (int);
+extern int tui_line_from_reg_element_no (int);
+extern void tui_toggle_float_regs (void);
+extern int tui_calculate_regs_column_count (enum tui_register_display_type);
+extern int tui_first_reg_element_no_inline (int lineno);
 
 #endif
-/*_TUI_REGS_H*/
Index: tui/tui-win.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
retrieving revision 1.1
diff -u -r1.1 tui-win.c
--- tui/tui-win.c	19 Jan 2004 04:31:51 -0000	1.1
+++ tui/tui-win.c	19 Jan 2004 05:55:05 -0000
@@ -1,7 +1,7 @@
 /* TUI window generic functions.
 
-   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.
 
@@ -722,7 +722,7 @@
 
 	  if (firstWin == dataWin && widthDiff != 0)
 	    firstWin->detail.dataDisplayInfo.regsColumnCount =
-	      tuiCalculateRegsColumnCount (
+	      tui_calculate_regs_column_count (
 			  firstWin->detail.dataDisplayInfo.regsDisplayType);
 	  locator->width += widthDiff;
 
Index: tui/tui-windata.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-windata.c,v
retrieving revision 1.1
diff -u -r1.1 tui-windata.c
--- tui/tui-windata.c	19 Jan 2004 04:31:51 -0000	1.1
+++ tui/tui-windata.c	19 Jan 2004 05:55:06 -0000
@@ -1,7 +1,7 @@
 /* Data/register window display.
 
-   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.
 
@@ -87,7 +87,7 @@
      ** First see if there is a register on lineNo, and if so, set the
      ** first element number
    */
-  if ((firstElementNo = tuiFirstRegElementNoInLine (lineNo)) == -1)
+  if ((firstElementNo = tui_first_reg_element_no_inline (lineNo)) == -1)
     {				/*
 				   ** Looking at the general data, the 1st element on lineNo
 				 */
@@ -161,7 +161,7 @@
       tuiEraseDataContent ((char *) NULL);
       tuiDeleteDataContentWindows ();
       checkAndDisplayHighlightIfNeeded (dataWin);
-      tuiDisplayRegistersFrom (0);
+      tui_display_registers_from (0);
       /*
          ** Then display the other data
        */
@@ -192,15 +192,15 @@
 
   /* there is no general data, force regs to display (if there are any) */
   if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0)
-    tuiDisplayRegistersFromLine (_lineNo, TRUE);
+    tui_display_registers_from_line (_lineNo, TRUE);
   else
     {
       int elementNo, startLineNo;
-      int regsLastLine = tuiLastRegsLineNo ();
+      int regsLastLine = tui_last_regs_line_no ();
 
 
       /* display regs if we can */
-      if (tuiDisplayRegistersFromLine (_lineNo, FALSE) < 0)
+      if (tui_display_registers_from_line (_lineNo, FALSE) < 0)
 	{			/*
 				   ** _lineNo is past the regs display, so calc where the
 				   ** start data element is
@@ -234,7 +234,7 @@
   int firstLine = (-1);
 
   if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
-    firstLine = tuiLineFromRegElementNo (elementNo);
+    firstLine = tui_line_from_reg_element_no (elementNo);
   else
     {				/* calculate the firstLine from the element number */
     }
@@ -278,7 +278,7 @@
 void
 tuiCheckDataValues (struct frame_info *frame)
 {
-  tuiCheckRegisterValues (frame);
+  tui_check_register_values (frame);
 
   /* Now check any other data values that there are */
   if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
@@ -320,7 +320,7 @@
 
   firstElementNo = tuiFirstDataItemDisplayed ();
   if (firstElementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
-    firstLine = tuiLineFromRegElementNo (firstElementNo);
+    firstLine = tui_line_from_reg_element_no (firstElementNo);
   else
     {				/* calculate the first line from the element number which is in
 				   ** the general data content

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