/*****************************************
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
******************************************/
-static TuiStatus _tuiSetRegsContent
- (int, int, struct frame_info *, TuiRegisterDisplayType, int);
+static enum tui_status _tuiSetRegsContent
+ (int, int, struct frame_info *, enum tui_register_display_type, int);
static const char *_tuiRegisterName (int);
-static TuiStatus _tuiGetRegisterRawValue (int, char *, struct frame_info *);
+static enum tui_status _tuiGetRegisterRawValue (int, char *, struct frame_info *);
static void _tuiSetRegisterElement
- (int, struct frame_info *, TuiDataElementPtr, int);
-static void _tuiDisplayRegister (int, TuiGenWinInfoPtr, enum precision_type);
+ (int, struct frame_info *, struct tui_data_element *, int);
+static void _tuiDisplayRegister (int, struct tui_gen_win_info *, enum precision_type);
static void _tuiRegisterFormat
- (char *, int, int, TuiDataElementPtr, enum precision_type);
-static TuiStatus _tuiSetGeneralRegsContent (int);
-static TuiStatus _tuiSetSpecialRegsContent (int);
-static TuiStatus _tuiSetGeneralAndSpecialRegsContent (int);
-static TuiStatus _tuiSetFloatRegsContent (TuiRegisterDisplayType, int);
+ (char *, int, int, struct tui_data_element *, enum precision_type);
+static enum tui_status _tuiSetGeneralRegsContent (int);
+static enum tui_status _tuiSetSpecialRegsContent (int);
+static enum tui_status _tuiSetGeneralAndSpecialRegsContent (int);
+static enum tui_status _tuiSetFloatRegsContent (enum tui_register_display_type, int);
static int _tuiRegValueHasChanged
- (TuiDataElementPtr, struct frame_info *, char *);
+ (struct tui_data_element *, struct frame_info *, char *);
static void _tuiShowFloat_command (char *, int);
static void _tuiShowGeneral_command (char *, int);
static void _tuiShowSpecial_command (char *, int);
-static void _tui_vShowRegisters_commandSupport (TuiRegisterDisplayType);
+static void _tui_vShowRegisters_commandSupport (enum tui_register_display_type);
static void _tuiToggleFloatRegs_command (char *, int);
static void _tuiScrollRegsForward_command (char *, int);
static void _tuiScrollRegsBackward_command (char *, int);
/* Calculate the number of columns that should be used to display the
registers. */
int
-tui_calculate_regs_column_count (TuiRegisterDisplayType dpyType)
+tui_calculate_regs_column_count (enum tui_register_display_type dpyType)
{
int colCount, colWidth;
there is any other registers being displayed, then they are
cleared. What registers are displayed is dependent upon dpyType. */
void
-tui_show_registers (TuiRegisterDisplayType dpyType)
+tui_show_registers (enum tui_register_display_type dpyType)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
int refreshValuesOnly = FALSE;
/* Say that registers should be displayed, even if there is a problem */
if (ret == TUI_FAILURE)
{
dataWin->detail.dataDisplayInfo.regsDisplayType = TUI_UNDEFINED_REGS;
- tuiEraseDataContent (NO_REGS_STRING);
+ tui_erase_data_content (NO_REGS_STRING);
}
else
{
/* Clear all notation of changed values */
for (i = 0; (i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
{
- TuiGenWinInfoPtr dataItemWin;
+ struct tui_gen_win_info * dataItemWin;
dataItemWin = &dataWin->detail.dataDisplayInfo.
regsContent[i]->whichElement.dataWindow;
- (&((TuiWinElementPtr)
+ (&((struct tui_win_element *)
dataItemWin->content[0])->whichElement.data)->highlight = FALSE;
}
dataWin->detail.dataDisplayInfo.regsDisplayType = dpyType;
- tuiDisplayAllData ();
+ tui_display_all_data ();
}
- (tuiLayoutDef ())->regsDisplayType = dpyType;
+ (tui_layout_def ())->regsDisplayType = dpyType;
return;
}
void
tui_display_registers_from (int startElementNo)
{
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
+ if (dataWin->detail.dataDisplayInfo.regsContent != (tui_win_content) NULL &&
dataWin->detail.dataDisplayInfo.regsContentCount > 0)
{
register int i = startElementNo;
(j < dataWin->detail.dataDisplayInfo.regsColumnCount &&
i < dataWin->detail.dataDisplayInfo.regsContentCount); j++)
{
- TuiGenWinInfoPtr dataItemWin;
- TuiDataElementPtr dataElementPtr;
+ struct tui_gen_win_info * dataItemWin;
+ struct tui_data_element * dataElementPtr;
/* create the window if necessary */
dataItemWin = &dataWin->detail.dataDisplayInfo.
regsContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinElementPtr)
+ dataElementPtr = &((struct tui_win_element *)
dataItemWin->content[0])->whichElement.data;
if (dataItemWin->handle == (WINDOW *) NULL)
{
itemWinWidth + 2 : itemWinWidth + 1;
dataItemWin->origin.x = (itemWinWidth * j) + 1;
dataItemWin->origin.y = curY;
- makeWindow (dataItemWin, DONT_BOX_WINDOW);
+ tui_make_window (dataItemWin, DONT_BOX_WINDOW);
scrollok (dataItemWin->handle, FALSE);
}
touchwin (dataItemWin->handle);
void
tuiDisplayRegElementAtLine (int startElementNo, int startLineNo)
{
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL &&
+ if (dataWin->detail.dataDisplayInfo.regsContent != (tui_win_content) NULL &&
dataWin->detail.dataDisplayInfo.regsContentCount > 0)
{
register int elementNo = startElementNo;
{
if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0 &&
dataWin->detail.dataDisplayInfo.displayRegs)
- tui_show_registers ((tuiLayoutDef ())->regsDisplayType);
+ tui_show_registers ((tui_layout_def ())->regsDisplayType);
else
{
int i, j;
for (i = 0;
(i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
{
- TuiDataElementPtr dataElementPtr;
- TuiGenWinInfoPtr dataItemWinPtr;
+ struct tui_data_element * dataElementPtr;
+ struct tui_gen_win_info * dataItemWinPtr;
int wasHilighted;
dataItemWinPtr = &dataWin->detail.dataDisplayInfo.
regsContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinElementPtr)
+ dataElementPtr = &((struct tui_win_element *)
dataItemWinPtr->content[0])->whichElement.data;
wasHilighted = dataElementPtr->highlight;
dataElementPtr->highlight =
void
tuiToggleFloatRegs (void)
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
*/
static void
_tuiRegisterFormat (char *buf, int bufLen, int regNum,
- TuiDataElementPtr dataElement,
+ struct tui_data_element * dataElement,
enum precision_type precision)
{
struct ui_file *stream;
** _tuiSetGeneralRegsContent().
** Set the content of the data window to consist of the general registers.
*/
-static TuiStatus
+static enum tui_status
_tuiSetGeneralRegsContent (int refreshValuesOnly)
{
return (_tuiSetRegsContent (0,
** _tuiSetSpecialRegsContent().
** Set the content of the data window to consist of the special registers.
*/
-static TuiStatus
+static enum tui_status
_tuiSetSpecialRegsContent (int refreshValuesOnly)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
int endRegNum;
endRegNum = FP0_REGNUM - 1;
** _tuiSetGeneralAndSpecialRegsContent().
** Set the content of the data window to consist of the special registers.
*/
-static TuiStatus
+static enum tui_status
_tuiSetGeneralAndSpecialRegsContent (int refreshValuesOnly)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
int endRegNum = (-1);
endRegNum = FP0_REGNUM - 1;
** _tuiSetFloatRegsContent().
** Set the content of the data window to consist of the float registers.
*/
-static TuiStatus
-_tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, int refreshValuesOnly)
+static enum tui_status
+_tuiSetFloatRegsContent (enum tui_register_display_type dpyType, int refreshValuesOnly)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
int startRegNum;
startRegNum = FP0_REGNUM;
** If TRUE, newValue is filled in with the new value.
*/
static int
-_tuiRegValueHasChanged (TuiDataElementPtr dataElement,
+_tuiRegValueHasChanged (struct tui_data_element * dataElement,
struct frame_info *frame,
char *newValue)
{
** _tuiGetRegisterRawValue().
** Get the register raw value. The raw value is returned in regValue.
*/
-static TuiStatus
+static enum tui_status
_tuiGetRegisterRawValue (int regNum, char *regValue, struct frame_info *frame)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
if (target_has_registers)
{
*/
static void
_tuiSetRegisterElement (int regNum, struct frame_info *frame,
- TuiDataElementPtr dataElement,
+ struct tui_data_element * dataElement,
int refreshValueOnly)
{
- if (dataElement != (TuiDataElementPtr) NULL)
+ if (dataElement != (struct tui_data_element *) NULL)
{
if (!refreshValueOnly)
{
dataElement->name = _tuiRegisterName (regNum);
dataElement->highlight = FALSE;
}
- if (dataElement->value == (Opaque) NULL)
- dataElement->value = (Opaque) xmalloc (MAX_REGISTER_SIZE);
- if (dataElement->value != (Opaque) NULL)
+ if (dataElement->value == NULL)
+ dataElement->value = xmalloc (MAX_REGISTER_SIZE);
+ if (dataElement->value != NULL)
_tuiGetRegisterRawValue (regNum, dataElement->value, frame);
}
** numbered from startRegNum to endRegNum. Note that if
** refreshValuesOnly is TRUE, startRegNum and endRegNum are ignored.
*/
-static TuiStatus
+static enum tui_status
_tuiSetRegsContent (int startRegNum, int endRegNum,
struct frame_info *frame,
- TuiRegisterDisplayType dpyType,
+ enum tui_register_display_type dpyType,
int refreshValuesOnly)
{
- TuiStatus ret = TUI_FAILURE;
+ enum tui_status ret = TUI_FAILURE;
int numRegs = endRegNum - startRegNum + 1;
int allocatedHere = FALSE;
if (dataWin->detail.dataDisplayInfo.regsContentCount > 0 &&
!refreshValuesOnly)
{
- freeDataContent (dataWin->detail.dataDisplayInfo.regsContent,
- dataWin->detail.dataDisplayInfo.regsContentCount);
+ tui_free_data_content (dataWin->detail.dataDisplayInfo.regsContent,
+ dataWin->detail.dataDisplayInfo.regsContentCount);
dataWin->detail.dataDisplayInfo.regsContentCount = 0;
}
if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0)
{
dataWin->detail.dataDisplayInfo.regsContent =
- allocContent (numRegs, DATA_WIN);
+ tui_alloc_content (numRegs, DATA_WIN);
allocatedHere = TRUE;
}
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL)
+ if (dataWin->detail.dataDisplayInfo.regsContent != (tui_win_content) NULL)
{
int i;
if (!refreshValuesOnly || allocatedHere)
{
- dataWin->generic.content = (OpaquePtr) NULL;
+ dataWin->generic.content = NULL;
dataWin->generic.contentSize = 0;
- addContentElements (&dataWin->generic, numRegs);
+ tui_add_content_elements (&dataWin->generic, numRegs);
dataWin->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) dataWin->generic.content;
+ (tui_win_content) dataWin->generic.content;
dataWin->detail.dataDisplayInfo.regsContentCount = numRegs;
}
/*
*/
for (i = startRegNum; (i <= endRegNum); i++)
{
- TuiGenWinInfoPtr dataItemWin;
+ struct tui_gen_win_info * dataItemWin;
dataItemWin = &dataWin->detail.dataDisplayInfo.
regsContent[i - startRegNum]->whichElement.dataWindow;
_tuiSetRegisterElement (
i,
frame,
- &((TuiWinElementPtr) dataItemWin->content[0])->whichElement.data,
+ &((struct tui_win_element *) dataItemWin->content[0])->whichElement.data,
!allocatedHere && refreshValuesOnly);
}
dataWin->detail.dataDisplayInfo.regsColumnCount =
*/
static void
_tuiDisplayRegister (int regNum,
- TuiGenWinInfoPtr winInfo, /* the data item window */
+ struct tui_gen_win_info * winInfo, /* the data item window */
enum precision_type precision)
{
if (winInfo->handle != (WINDOW *) NULL)
int i;
char buf[40];
int valueCharsWide, labelWidth;
- TuiDataElementPtr dataElementPtr = &((TuiWinContent)
+ struct tui_data_element * dataElementPtr = &((tui_win_content)
winInfo->content)[0]->whichElement.data;
if (IS_64BIT ||
if (dataElementPtr->highlight)
wstandend (winInfo->handle);
- tuiRefreshWin (winInfo);
+ tui_refresh_win (winInfo);
}
return;
} /* _tuiDisplayRegister */
static void
-_tui_vShowRegisters_commandSupport (TuiRegisterDisplayType dpyType)
+_tui_vShowRegisters_commandSupport (enum tui_register_display_type dpyType)
{
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
tui_show_registers (dpyType);
}
else
- (tuiLayoutDef ())->regsDisplayType = dpyType;
+ (tui_layout_def ())->regsDisplayType = dpyType;
return;
} /* _tui_vShowRegisters_commandSupport */
if (m_winPtrIsNull (dataWin) || !dataWin->generic.isVisible ||
(dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_SFLOAT_REGS &&
dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_DFLOAT_REGS))
- _tui_vShowRegisters_commandSupport ((tuiLayoutDef ())->floatRegsDisplayType);
+ _tui_vShowRegisters_commandSupport ((tui_layout_def ())->floatRegsDisplayType);
return;
} /* _tuiShowFloat_command */
tuiToggleFloatRegs ();
else
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;