* 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.
+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.
+
2004-01-18 Andrew Cagney <cagney@redhat.com>
* tui/tui-io.c: Update copyright.
/* 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.
TuiDataType, TuiDataTypePtr;
/* Types of register displays */
-typedef enum _TuiRegisterDisplayType
+typedef enum tui_register_display_type
{
TUI_UNDEFINED_REGS,
TUI_GENERAL_REGS,
/* 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.
layoutDef->regsDisplayType =
(regsDisplayType == TUI_UNDEFINED_REGS ?
TUI_GENERAL_REGS : regsDisplayType);
- tuiShowRegisters (layoutDef->regsDisplayType);
+ tui_show_registers (layoutDef->regsDisplayType);
}
}
}
/* 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.
** 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);
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)
{
}
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)
dataWin->detail.dataDisplayInfo.regsColumnCount;
else
return (-1);
-} /* tuiFirstRegElementNoInLine */
+}
/*
} /* 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;
} /* 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;
(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)
}
return;
-} /* tuiDisplayRegistersFrom */
+}
/*
{
register int lastLineNo, firstLineOnLastPage;
- lastLineNo = tuiLastRegsLineNo ();
+ lastLineNo = tui_last_regs_line_no ();
firstLineOnLastPage = lastLineNo - (dataWin->generic.height - 2);
if (firstLineOnLastPage < 0)
firstLineOnLastPage = 0;
*/
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;
-/*
- ** 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)
{
** 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;
}
else
line = lineNo;
- elementNo = tuiFirstRegElementNoInLine (line);
+ elementNo = tui_first_reg_element_no_inline (line);
if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount)
tuiDisplayRegElementAtLine (elementNo, line);
else
}
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;
}
}
return;
-} /* tuiCheckRegisterValues */
+}
/*
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 */
!allocatedHere && refreshValuesOnly);
}
dataWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (dpyType);
+ tui_calculate_regs_column_count (dpyType);
#ifdef LATER
if (dataWin->detail.dataDisplayInfo.dataContentCount > 0)
{
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;
/* 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.
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*/
/* 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.
if (firstWin == dataWin && widthDiff != 0)
firstWin->detail.dataDisplayInfo.regsColumnCount =
- tuiCalculateRegsColumnCount (
+ tui_calculate_regs_column_count (
firstWin->detail.dataDisplayInfo.regsDisplayType);
locator->width += widthDiff;
/* 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.
** 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
*/
tuiEraseDataContent ((char *) NULL);
tuiDeleteDataContentWindows ();
checkAndDisplayHighlightIfNeeded (dataWin);
- tuiDisplayRegistersFrom (0);
+ tui_display_registers_from (0);
/*
** Then display the other data
*/
/* 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
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 */
}
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)
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