aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-07 16:31:22 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-07 16:31:22 +0000
commit2a8854a78354414c75a91fbd662ee32f743dd510 (patch)
treeea3cbe5c01f32799dae0f927c2ec1d58e9f954f9 /gdb/tui
parent05cbe71add4ea89679340baff1a51f3680492c1c (diff)
downloadgdb-2a8854a78354414c75a91fbd662ee32f743dd510.zip
gdb-2a8854a78354414c75a91fbd662ee32f743dd510.tar.gz
gdb-2a8854a78354414c75a91fbd662ee32f743dd510.tar.bz2
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui-data.h (tui_win_element): Rename TuiWinElement. (tui_exec_info_content): Rename TuiExecInfoContent. (TuiGenWinInfo, TuiGenWinInfoPtr): Delete definitions. (TuiWinInfo, TuiWinInfoPtr): Ditto. (TuiScrollDirection, TuiScrollDirectionPtr): Ditto. (TuiList, TuiListPtr): Ditto. (TuiLayoutType, TuiLayoutTypePtr): Ditto. (TuiDataType, TuiDataTypePtr): Ditto. (TuiRegisterDisplayType, TuiRegisterDisplayTypePtr): Ditto. (TuiLineOrAddress, TuiLineOrAddressPtr): Ditto. (TuiLayoutDef, TuiLayoutDefPtr): Ditto. (TuiSourceElement, TuiSourceElementPtr): Ditto. (TuiDataElement, TuiDataElementPtr): Ditto. (TuiWinElement, TuiWinElementPtr): Ditto. (TuiDataInfo, TuiDataInfoPtr): Ditto. (TuiCommandElement, TuiCommandElementPtr): Ditto. (TuiLocatorElement, TuiLocatorElementPtr): Ditto. (TuiWhichElement, TuiWhichElementPtr): Ditto. (TuiSourceInfo, TuiSourceInfoPtr): Ditto. (TuiCommandInfo, TuiCommandInfoPtr): Ditto. * tui/tui-command.c, tui/tui-data.c: Update references. * tui/tui-data.h, tui/tui-disasm.c, tui/tui-layout.c: Ditto. * tui/tui-regs.c, tui/tui-source.c, tui/tui-stack.c: Ditto. * tui/tui-win.c, tui/tui-windata.c, tui/tui-wingeneral.c: Ditto. * tui/tui-winsource.c, tui/tui.c: Ditto.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-command.c4
-rw-r--r--gdb/tui/tui-data.c178
-rw-r--r--gdb/tui/tui-data.h347
-rw-r--r--gdb/tui/tui-disasm.c28
-rw-r--r--gdb/tui/tui-layout.c101
-rw-r--r--gdb/tui/tui-regs.c68
-rw-r--r--gdb/tui/tui-source.c32
-rw-r--r--gdb/tui/tui-stack.c36
-rw-r--r--gdb/tui/tui-win.c109
-rw-r--r--gdb/tui/tui-windata.c16
-rw-r--r--gdb/tui/tui-wingeneral.c26
-rw-r--r--gdb/tui/tui-winsource.c90
-rw-r--r--gdb/tui/tui.c10
13 files changed, 516 insertions, 529 deletions
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index 9b6a20d..820126e 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -52,7 +52,7 @@
unsigned int
tui_dispatch_ctrl_char (unsigned int ch)
{
- TuiWinInfoPtr winInfo = tui_win_with_focus ();
+ struct tui_win_info * winInfo = tui_win_with_focus ();
WINDOW *w = cmdWin->generic.handle;
/*
@@ -60,7 +60,7 @@ tui_dispatch_ctrl_char (unsigned int ch)
** assume it is the command window; in this case, pass the
** character on through and do nothing here.
*/
- if (winInfo == (TuiWinInfoPtr) NULL || winInfo == cmdWin)
+ if (winInfo == (struct tui_win_info *) NULL || winInfo == cmdWin)
return ch;
else
{
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index 5435b00..b962eee 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -39,21 +39,21 @@
/****************************
** GLOBAL DECLARATIONS
****************************/
-TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS];
+struct tui_win_info *(winList[MAX_MAJOR_WINDOWS]);
/***************************
** Private data
****************************/
-static TuiLayoutType _currentLayout = UNDEFINED_LAYOUT;
+static enum tui_layout_type _currentLayout = UNDEFINED_LAYOUT;
static int _termHeight, _termWidth;
-static TuiGenWinInfo _locator;
-static TuiGenWinInfo _execInfo[2];
-static TuiWinInfoPtr _srcWinList[2];
-static TuiList _sourceWindows =
+static struct tui_gen_win_info _locator;
+static struct tui_gen_win_info _execInfo[2];
+static struct tui_win_info * _srcWinList[2];
+static struct tui_list _sourceWindows =
{(OpaqueList) _srcWinList, 0};
static int _defaultTabLen = DEFAULT_TAB_LEN;
-static TuiWinInfoPtr _winWithFocus = (TuiWinInfoPtr) NULL;
-static TuiLayoutDef _layoutDef =
+static struct tui_win_info * _winWithFocus = (struct tui_win_info *) NULL;
+static struct tui_layout_def _layoutDef =
{SRC_WIN, /* displayMode */
FALSE, /* split */
TUI_UNDEFINED_REGS, /* regsDisplayType */
@@ -64,8 +64,8 @@ static int _winResized = FALSE;
/*********************************
** Static function forward decls
**********************************/
-static void freeContent (TuiWinContent, int, TuiWinType);
-static void freeContentElements (TuiWinContent, int, TuiWinType);
+static void freeContent (tui_win_content, int, TuiWinType);
+static void freeContentElements (tui_win_content, int, TuiWinType);
@@ -94,7 +94,7 @@ tui_set_win_resized_to (int resized)
/* Answer a pointer to the current layout definition. */
-TuiLayoutDefPtr
+struct tui_layout_def *
tui_layout_def (void)
{
return &_layoutDef;
@@ -102,7 +102,7 @@ tui_layout_def (void)
/* Answer the window with the logical focus. */
-TuiWinInfoPtr
+struct tui_win_info *
tui_win_with_focus (void)
{
return _winWithFocus;
@@ -111,7 +111,7 @@ tui_win_with_focus (void)
/* Set the window that has the logical focus. */
void
-tui_set_win_with_focus (TuiWinInfoPtr winInfo)
+tui_set_win_with_focus (struct tui_win_info * winInfo)
{
_winWithFocus = winInfo;
}
@@ -139,7 +139,7 @@ tui_set_default_tab_len (int len)
** one source window (either source or disassembly), but both can
** be displayed at the same time.
*/
-TuiListPtr
+struct tui_list *
tui_source_windows (void)
{
return &_sourceWindows;
@@ -165,7 +165,7 @@ tui_clear_source_windows_detail (void)
int i;
for (i = 0; i < (tui_source_windows ())->count; i++)
- tui_clear_win_detail ((TuiWinInfoPtr) (tui_source_windows ())->list[i]);
+ tui_clear_win_detail ((struct tui_win_info *) (tui_source_windows ())->list[i]);
}
@@ -173,7 +173,7 @@ tui_clear_source_windows_detail (void)
one source window (either source or disassembly), but both can be
displayed at the same time. */
void
-tui_add_to_source_windows (TuiWinInfoPtr winInfo)
+tui_add_to_source_windows (struct tui_win_info * winInfo)
{
if (_sourceWindows.count < 2)
_sourceWindows.list[_sourceWindows.count++] = (Opaque) winInfo;
@@ -182,7 +182,7 @@ tui_add_to_source_windows (TuiWinInfoPtr winInfo)
/* Clear the pertinant detail in the windows. */
void
-tui_clear_win_detail (TuiWinInfoPtr winInfo)
+tui_clear_win_detail (struct tui_win_info * winInfo)
{
if (m_winPtrNotNull (winInfo))
{
@@ -199,10 +199,10 @@ tui_clear_win_detail (TuiWinInfoPtr winInfo)
break;
case DATA_WIN:
winInfo->detail.dataDisplayInfo.dataContent =
- (TuiWinContent) NULL;
+ (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.dataContentCount = 0;
winInfo->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) NULL;
+ (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.regsContentCount = 0;
winInfo->detail.dataDisplayInfo.regsDisplayType =
TUI_UNDEFINED_REGS;
@@ -222,7 +222,7 @@ tui_clear_win_detail (TuiWinInfoPtr winInfo)
** sourceExecInfoPtr().
** Accessor for the source execution info ptr.
*/
-TuiGenWinInfoPtr
+struct tui_gen_win_info *
tui_source_exec_info_win_ptr (void)
{
return &_execInfo[0];
@@ -233,7 +233,7 @@ tui_source_exec_info_win_ptr (void)
** disassemExecInfoPtr().
** Accessor for the disassem execution info ptr.
*/
-TuiGenWinInfoPtr
+struct tui_gen_win_info *
tui_disassem_exec_info_win_ptr (void)
{
return &_execInfo[1];
@@ -242,11 +242,11 @@ tui_disassem_exec_info_win_ptr (void)
/* Accessor for the locator win info. Answers a pointer to the static
locator win info struct. */
-TuiGenWinInfoPtr
+struct tui_gen_win_info *
tui_locator_win_info_ptr (void)
{
return &_locator;
-} /* locatorWinInfoPtr */
+}
/* Accessor for the termHeight. */
@@ -282,7 +282,7 @@ tui_set_term_width_to (int w)
/* Accessor for the current layout. */
-TuiLayoutType
+enum tui_layout_type
tui_current_layout (void)
{
return _currentLayout;
@@ -291,7 +291,7 @@ tui_current_layout (void)
/* Mutator for the current layout. */
void
-tui_set_current_layout_to (TuiLayoutType newLayout)
+tui_set_current_layout_to (enum tui_layout_type newLayout)
{
_currentLayout = newLayout;
}
@@ -302,7 +302,7 @@ tui_set_current_layout_to (TuiLayoutType newLayout)
** Set the origin of the window
*/
void
-setGenWinOrigin (TuiGenWinInfoPtr winInfo, int x, int y)
+setGenWinOrigin (struct tui_gen_win_info * winInfo, int x, int y)
{
winInfo->origin.x = x;
winInfo->origin.y = y;
@@ -318,11 +318,11 @@ setGenWinOrigin (TuiGenWinInfoPtr winInfo, int x, int y)
/* Answer the next window in the list, cycling back to the top if
necessary. */
-TuiWinInfoPtr
-tui_next_win (TuiWinInfoPtr curWin)
+struct tui_win_info *
+tui_next_win (struct tui_win_info * curWin)
{
TuiWinType type = curWin->generic.type;
- TuiWinInfoPtr nextWin = (TuiWinInfoPtr) NULL;
+ struct tui_win_info * nextWin = (struct tui_win_info *) NULL;
if (curWin->generic.type == CMD_WIN)
type = SRC_WIN;
@@ -347,11 +347,11 @@ tui_next_win (TuiWinInfoPtr curWin)
/* Answer the prev window in the list, cycling back to the bottom if
necessary. */
-TuiWinInfoPtr
-tui_prev_win (TuiWinInfoPtr curWin)
+struct tui_win_info *
+tui_prev_win (struct tui_win_info * curWin)
{
TuiWinType type = curWin->generic.type;
- TuiWinInfoPtr prev = (TuiWinInfoPtr) NULL;
+ struct tui_win_info * prev = (struct tui_win_info *) NULL;
if (curWin->generic.type == SRC_WIN)
type = CMD_WIN;
@@ -375,10 +375,10 @@ tui_prev_win (TuiWinInfoPtr curWin)
/* Answer the window represented by name. */
-TuiWinInfoPtr
+struct tui_win_info *
tui_partial_win_by_name (char *name)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
+ struct tui_win_info * winInfo = (struct tui_win_info *) NULL;
if (name != (char *) NULL)
{
@@ -406,7 +406,7 @@ tui_partial_win_by_name (char *name)
** Answer the name of the window
*/
char *
-tui_win_name (TuiGenWinInfoPtr winInfo)
+tui_win_name (struct tui_gen_win_info * winInfo)
{
char *name = (char *) NULL;
@@ -442,13 +442,13 @@ tui_initialize_static_data (void)
}
-TuiGenWinInfoPtr
+struct tui_gen_win_info *
tui_alloc_generic_win_info (void)
{
- TuiGenWinInfoPtr win;
+ struct tui_gen_win_info * win;
- if ((win = (TuiGenWinInfoPtr) xmalloc (
- sizeof (TuiGenWinInfoPtr))) != (TuiGenWinInfoPtr) NULL)
+ if ((win = (struct tui_gen_win_info *) xmalloc (
+ sizeof (struct tui_gen_win_info *))) != (struct tui_gen_win_info *) NULL)
tui_init_generic_part (win);
return win;
@@ -459,7 +459,7 @@ tui_alloc_generic_win_info (void)
** initGenericPart().
*/
void
-tui_init_generic_part (TuiGenWinInfoPtr win)
+tui_init_generic_part (struct tui_gen_win_info * win)
{
win->width =
win->height =
@@ -480,7 +480,7 @@ tui_init_generic_part (TuiGenWinInfoPtr win)
** initContentElement().
*/
void
-initContentElement (TuiWinElementPtr element, TuiWinType type)
+initContentElement (struct tui_win_element * element, TuiWinType type)
{
element->highlight = FALSE;
switch (type)
@@ -495,9 +495,9 @@ initContentElement (TuiWinElementPtr element, TuiWinType type)
case DATA_WIN:
tui_init_generic_part (&element->whichElement.dataWindow);
element->whichElement.dataWindow.type = DATA_ITEM_WIN;
- ((TuiGenWinInfoPtr) & element->whichElement.dataWindow)->content =
+ ((struct tui_gen_win_info *) & element->whichElement.dataWindow)->content =
(OpaquePtr) tui_alloc_content (1, DATA_ITEM_WIN);
- ((TuiGenWinInfoPtr)
+ ((struct tui_gen_win_info *)
& element->whichElement.dataWindow)->contentSize = 1;
break;
case CMD_WIN:
@@ -530,7 +530,7 @@ initContentElement (TuiWinElementPtr element, TuiWinType type)
** initWinInfo().
*/
void
-initWinInfo (TuiWinInfoPtr winInfo)
+initWinInfo (struct tui_win_info * winInfo)
{
tui_init_generic_part (&winInfo->generic);
winInfo->canHighlight =
@@ -539,16 +539,16 @@ initWinInfo (TuiWinInfoPtr winInfo)
{
case SRC_WIN:
case DISASSEM_WIN:
- winInfo->detail.sourceInfo.executionInfo = (TuiGenWinInfoPtr) NULL;
+ winInfo->detail.sourceInfo.executionInfo = (struct tui_gen_win_info *) NULL;
winInfo->detail.sourceInfo.hasLocator = FALSE;
winInfo->detail.sourceInfo.horizontalOffset = 0;
winInfo->detail.sourceInfo.startLineOrAddr.addr = 0;
winInfo->detail.sourceInfo.filename = 0;
break;
case DATA_WIN:
- winInfo->detail.dataDisplayInfo.dataContent = (TuiWinContent) NULL;
+ winInfo->detail.dataDisplayInfo.dataContent = (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.dataContentCount = 0;
- winInfo->detail.dataDisplayInfo.regsContent = (TuiWinContent) NULL;
+ winInfo->detail.dataDisplayInfo.regsContent = (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.regsContentCount = 0;
winInfo->detail.dataDisplayInfo.regsDisplayType =
TUI_UNDEFINED_REGS;
@@ -568,12 +568,12 @@ initWinInfo (TuiWinInfoPtr winInfo)
} /* initWinInfo */
-TuiWinInfoPtr
+struct tui_win_info *
tui_alloc_win_info (TuiWinType type)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
+ struct tui_win_info * winInfo = (struct tui_win_info *) NULL;
- winInfo = (TuiWinInfoPtr) xmalloc (sizeof (TuiWinInfo));
+ winInfo = (struct tui_win_info *) xmalloc (sizeof (struct tui_win_info));
if (m_winPtrNotNull (winInfo))
{
winInfo->generic.type = type;
@@ -588,15 +588,15 @@ tui_alloc_win_info (TuiWinType type)
** allocContent().
** Allocates the content and elements in a block.
*/
-TuiWinContent
+tui_win_content
tui_alloc_content (int numElements, TuiWinType type)
{
- TuiWinContent content = (TuiWinContent) NULL;
+ tui_win_content content = (tui_win_content) NULL;
char *elementBlockPtr = (char *) NULL;
int i;
- if ((content = (TuiWinContent)
- xmalloc (sizeof (TuiWinElementPtr) * numElements)) != (TuiWinContent) NULL)
+ if ((content = (tui_win_content)
+ xmalloc (sizeof (struct tui_win_element *) * numElements)) != (tui_win_content) NULL)
{ /*
** All windows, except the data window, can allocate the elements
** in a chunk. The data window cannot because items can be
@@ -605,19 +605,19 @@ tui_alloc_content (int numElements, TuiWinType type)
if (type != DATA_WIN)
{
if ((elementBlockPtr = (char *)
- xmalloc (sizeof (TuiWinElement) * numElements)) != (char *) NULL)
+ xmalloc (sizeof (struct tui_win_element) * numElements)) != (char *) NULL)
{
for (i = 0; i < numElements; i++)
{
- content[i] = (TuiWinElementPtr) elementBlockPtr;
+ content[i] = (struct tui_win_element *) elementBlockPtr;
initContentElement (content[i], type);
- elementBlockPtr += sizeof (TuiWinElement);
+ elementBlockPtr += sizeof (struct tui_win_element);
}
}
else
{
tuiFree ((char *) content);
- content = (TuiWinContent) NULL;
+ content = (tui_win_content) NULL;
}
}
}
@@ -632,9 +632,9 @@ tui_alloc_content (int numElements, TuiWinType type)
there is a memory allocation error, in which case, (-1) is
returned. */
int
-tui_add_content_elements (TuiGenWinInfoPtr winInfo, int numElements)
+tui_add_content_elements (struct tui_gen_win_info * winInfo, int numElements)
{
- TuiWinElementPtr elementPtr;
+ struct tui_win_element * elementPtr;
int i, indexStart;
if (winInfo->content == (OpaquePtr) NULL)
@@ -648,8 +648,8 @@ tui_add_content_elements (TuiGenWinInfoPtr winInfo, int numElements)
{
for (i = indexStart; (i < numElements + indexStart); i++)
{
- if ((elementPtr = (TuiWinElementPtr)
- xmalloc (sizeof (TuiWinElement))) != (TuiWinElementPtr) NULL)
+ if ((elementPtr = (struct tui_win_element *)
+ xmalloc (sizeof (struct tui_win_element))) != (struct tui_win_element *) NULL)
{
winInfo->content[i] = (Opaque) elementPtr;
initContentElement (elementPtr, winInfo->type);
@@ -667,16 +667,16 @@ tui_add_content_elements (TuiGenWinInfoPtr winInfo, int numElements)
/* Delete all curses windows associated with winInfo, leaving everything
else intact. */
void
-tuiDelWindow (TuiWinInfoPtr winInfo)
+tuiDelWindow (struct tui_win_info * winInfo)
{
- TuiGenWinInfoPtr genericWin;
+ struct tui_gen_win_info * genericWin;
switch (winInfo->generic.type)
{
case SRC_WIN:
case DISASSEM_WIN:
genericWin = tui_locator_win_info_ptr ();
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -688,7 +688,7 @@ tuiDelWindow (TuiWinInfoPtr winInfo)
winInfo->detail.sourceInfo.filename = 0;
}
genericWin = winInfo->detail.sourceInfo.executionInfo;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -717,16 +717,16 @@ tuiDelWindow (TuiWinInfoPtr winInfo)
void
-tui_free_window (TuiWinInfoPtr winInfo)
+tui_free_window (struct tui_win_info * winInfo)
{
- TuiGenWinInfoPtr genericWin;
+ struct tui_gen_win_info * genericWin;
switch (winInfo->generic.type)
{
case SRC_WIN:
case DISASSEM_WIN:
genericWin = tui_locator_win_info_ptr ();
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -738,7 +738,7 @@ tui_free_window (TuiWinInfoPtr winInfo)
winInfo->detail.sourceInfo.filename = 0;
}
genericWin = winInfo->detail.sourceInfo.executionInfo;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -751,12 +751,12 @@ tui_free_window (TuiWinInfoPtr winInfo)
tui_free_data_content (winInfo->detail.dataDisplayInfo.regsContent,
winInfo->detail.dataDisplayInfo.regsContentCount);
winInfo->detail.dataDisplayInfo.regsContent =
- (TuiWinContent) NULL;
+ (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.regsContentCount = 0;
tui_free_data_content (winInfo->detail.dataDisplayInfo.dataContent,
winInfo->detail.dataDisplayInfo.dataContentCount);
winInfo->detail.dataDisplayInfo.dataContent =
- (TuiWinContent) NULL;
+ (tui_win_content) NULL;
winInfo->detail.dataDisplayInfo.dataContentCount = 0;
winInfo->detail.dataDisplayInfo.regsDisplayType =
TUI_UNDEFINED_REGS;
@@ -788,7 +788,7 @@ tui_free_all_source_wins_content (void)
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
+ struct tui_win_info * winInfo = (struct tui_win_info *) (tui_source_windows ())->list[i];
if (m_winPtrNotNull (winInfo))
{
@@ -800,11 +800,11 @@ tui_free_all_source_wins_content (void)
void
-tui_free_win_content (TuiGenWinInfoPtr winInfo)
+tui_free_win_content (struct tui_gen_win_info * winInfo)
{
if (winInfo->content != (OpaquePtr) NULL)
{
- freeContent ((TuiWinContent) winInfo->content,
+ freeContent ((tui_win_content) winInfo->content,
winInfo->contentSize,
winInfo->type);
winInfo->content = (OpaquePtr) NULL;
@@ -816,19 +816,19 @@ tui_free_win_content (TuiGenWinInfoPtr winInfo)
void
-tui_del_data_windows (TuiWinContent content, int contentSize)
+tui_del_data_windows (tui_win_content content, int contentSize)
{
int i;
/*
- ** Remember that data window content elements are of type TuiGenWinInfoPtr,
+ ** Remember that data window content elements are of type struct tui_gen_win_info *,
** each of which whose single element is a data element.
*/
for (i = 0; i < contentSize; i++)
{
- TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow;
+ struct tui_gen_win_info * genericWin = &content[i]->whichElement.dataWindow;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -839,19 +839,19 @@ tui_del_data_windows (TuiWinContent content, int contentSize)
void
-tui_free_data_content (TuiWinContent content, int contentSize)
+tui_free_data_content (tui_win_content content, int contentSize)
{
int i;
/*
- ** Remember that data window content elements are of type TuiGenWinInfoPtr,
+ ** Remember that data window content elements are of type struct tui_gen_win_info *,
** each of which whose single element is a data element.
*/
for (i = 0; i < contentSize; i++)
{
- TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow;
+ struct tui_gen_win_info * genericWin = &content[i]->whichElement.dataWindow;
- if (genericWin != (TuiGenWinInfoPtr) NULL)
+ if (genericWin != (struct tui_gen_win_info *) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
@@ -875,9 +875,9 @@ tui_free_data_content (TuiWinContent content, int contentSize)
** freeContent().
*/
static void
-freeContent (TuiWinContent content, int contentSize, TuiWinType winType)
+freeContent (tui_win_content content, int contentSize, TuiWinType winType)
{
- if (content != (TuiWinContent) NULL)
+ if (content != (tui_win_content) NULL)
{
freeContentElements (content, contentSize, winType);
tuiFree ((char *) content);
@@ -891,9 +891,9 @@ freeContent (TuiWinContent content, int contentSize, TuiWinType winType)
** freeContentElements().
*/
static void
-freeContentElements (TuiWinContent content, int contentSize, TuiWinType type)
+freeContentElements (tui_win_content content, int contentSize, TuiWinType type)
{
- if (content != (TuiWinContent) NULL)
+ if (content != (tui_win_content) NULL)
{
int i;
@@ -907,10 +907,10 @@ freeContentElements (TuiWinContent content, int contentSize, TuiWinType type)
{
for (i = 0; i < contentSize; i++)
{
- TuiWinElementPtr element;
+ struct tui_win_element * element;
element = content[i];
- if (element != (TuiWinElementPtr) NULL)
+ if (element != (struct tui_win_element *) NULL)
{
switch (type)
{
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 58b7e49..e0269cb 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -32,22 +32,21 @@
#endif
/* Generic window information */
- typedef struct tui_gen_win_info
- {
- WINDOW *handle; /* window handle */
- TuiWinType type; /* type of window */
- int width; /* window width */
- int height; /* window height */
- TuiPoint origin; /* origin of window */
- OpaquePtr content; /* content of window */
- int contentSize; /* Size of content (# of elements) */
- int contentInUse; /* Can it be used, or is it already used? */
- int viewportHeight; /* viewport height */
- int lastVisibleLine; /* index of last visible line */
- int isVisible; /* whether the window is visible or not */
- char* title; /* Window title to display. */
- }
-TuiGenWinInfo, *TuiGenWinInfoPtr;
+struct tui_gen_win_info
+{
+ WINDOW *handle; /* window handle */
+ TuiWinType type; /* type of window */
+ int width; /* window width */
+ int height; /* window height */
+ TuiPoint origin; /* origin of window */
+ OpaquePtr content; /* content of window */
+ int contentSize; /* Size of content (# of elements) */
+ int contentInUse; /* Can it be used, or is it already used? */
+ int viewportHeight; /* viewport height */
+ int lastVisibleLine; /* index of last visible line */
+ int isVisible; /* whether the window is visible or not */
+ char* title; /* Window title to display. */
+};
/* Constant definitions */
#define DEFAULT_TAB_LEN 8
@@ -95,120 +94,109 @@ TuiGenWinInfo, *TuiGenWinInfoPtr;
#define TUI_GENERAL_SPECIAL_REGS_NAME "$REGS"
#define TUI_GENERAL_SPECIAL_REGS_NAME_LOWER "$regs"
-/* Scroll direction enum */
-typedef enum tui_scroll_direction
- {
- FORWARD_SCROLL,
- BACKWARD_SCROLL,
- LEFT_SCROLL,
- RIGHT_SCROLL
- }
-TuiScrollDirection, *TuiScrollDirectionPtr;
+/* Scroll direction enum. */
+enum tui_scroll_direction
+{
+ FORWARD_SCROLL,
+ BACKWARD_SCROLL,
+ LEFT_SCROLL,
+ RIGHT_SCROLL
+};
-/* General list struct */
-typedef struct tui_list
- {
- OpaqueList list;
- int count;
- }
-TuiList, *TuiListPtr;
+/* General list struct. */
+struct tui_list
+{
+ OpaqueList list;
+ int count;
+};
/* The kinds of layouts available */
-typedef enum tui_layout_type
- {
- SRC_COMMAND,
- DISASSEM_COMMAND,
- SRC_DISASSEM_COMMAND,
- SRC_DATA_COMMAND,
- DISASSEM_DATA_COMMAND,
- UNDEFINED_LAYOUT
- }
-TuiLayoutType, *TuiLayoutTypePtr;
+enum tui_layout_type
+{
+ SRC_COMMAND,
+ DISASSEM_COMMAND,
+ SRC_DISASSEM_COMMAND,
+ SRC_DATA_COMMAND,
+ DISASSEM_DATA_COMMAND,
+ UNDEFINED_LAYOUT
+};
/* Basic data types that can be displayed in the data window. */
-typedef enum tui_data_type
- {
- TUI_REGISTER,
- TUI_SCALAR,
- TUI_COMPLEX,
- TUI_STRUCT
- }
-TuiDataType, TuiDataTypePtr;
+enum tui_data_type
+{
+ TUI_REGISTER,
+ TUI_SCALAR,
+ TUI_COMPLEX,
+ TUI_STRUCT
+};
/* Types of register displays */
-typedef enum tui_register_display_type
- {
- TUI_UNDEFINED_REGS,
- TUI_GENERAL_REGS,
- TUI_SFLOAT_REGS,
- TUI_DFLOAT_REGS,
- TUI_SPECIAL_REGS,
- TUI_GENERAL_AND_SPECIAL_REGS
- }
-TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr;
+enum tui_register_display_type
+{
+ TUI_UNDEFINED_REGS,
+ TUI_GENERAL_REGS,
+ TUI_SFLOAT_REGS,
+ TUI_DFLOAT_REGS,
+ TUI_SPECIAL_REGS,
+ TUI_GENERAL_AND_SPECIAL_REGS
+};
/* Structure describing source line or line address */
-typedef union tui_line_or_address
- {
- int lineNo;
- CORE_ADDR addr;
- }
-TuiLineOrAddress, *TuiLineOrAddressPtr;
+union tui_line_or_address
+{
+ int lineNo;
+ CORE_ADDR addr;
+};
/* Current Layout definition */
-typedef struct tui_layout_def
- {
- TuiWinType displayMode;
- int split;
- TuiRegisterDisplayType regsDisplayType;
- TuiRegisterDisplayType floatRegsDisplayType;
- }
-TuiLayoutDef, *TuiLayoutDefPtr;
+struct tui_layout_def
+{
+ TuiWinType displayMode;
+ int split;
+ enum tui_register_display_type regsDisplayType;
+ enum tui_register_display_type floatRegsDisplayType;
+};
/* Elements in the Source/Disassembly Window */
-typedef struct tui_source_element
- {
- char *line;
- TuiLineOrAddress lineOrAddr;
- int isExecPoint;
- int hasBreak;
- }
-TuiSourceElement, *TuiSourceElementPtr;
+struct tui_source_element
+{
+ char *line;
+ union tui_line_or_address lineOrAddr;
+ int isExecPoint;
+ int hasBreak;
+};
/* Elements in the data display window content */
-typedef struct tui_data_element
- {
- const char *name;
- int itemNo; /* the register number, or data display number */
- TuiDataType type;
- Opaque value;
- int highlight;
- }
-TuiDataElement, *TuiDataElementPtr;
+struct tui_data_element
+{
+ const char *name;
+ int itemNo; /* the register number, or data display number */
+ enum tui_data_type type;
+ Opaque value;
+ int highlight;
+};
/* Elements in the command window content */
-typedef struct tui_command_element
- {
- char *line;
- }
-TuiCommandElement, *TuiCommandElementPtr;
+struct tui_command_element
+{
+ char *line;
+};
#define MAX_LOCATOR_ELEMENT_LEN 100
/* Elements in the locator window content */
-typedef struct tui_locator_element
- {
- char fileName[MAX_LOCATOR_ELEMENT_LEN];
- char procName[MAX_LOCATOR_ELEMENT_LEN];
- int lineNo;
- CORE_ADDR addr;
- }
-TuiLocatorElement, *TuiLocatorElementPtr;
+struct tui_locator_element
+{
+ char fileName[MAX_LOCATOR_ELEMENT_LEN];
+ char procName[MAX_LOCATOR_ELEMENT_LEN];
+ int lineNo;
+ CORE_ADDR addr;
+};
/* Flags to tell what kind of breakpoint is at current line. */
#define TUI_BP_ENABLED 0x01
@@ -223,114 +211,109 @@ TuiLocatorElement, *TuiLocatorElementPtr;
#define TUI_EXEC_POS 2
#define TUI_EXECINFO_SIZE 4
-typedef char TuiExecInfoContent[TUI_EXECINFO_SIZE];
+typedef char tui_exec_info_content[TUI_EXECINFO_SIZE];
/* An content element in a window */
-typedef union tui_which_element
- {
- TuiSourceElement source; /* the source elements */
- TuiGenWinInfo dataWindow; /* data display elements */
- TuiDataElement data; /* elements of dataWindow */
- TuiCommandElement command; /* command elements */
- TuiLocatorElement locator; /* locator elements */
- TuiExecInfoContent simpleString; /* simple char based elements */
- }
-TuiWhichElement, *TuiWhichElementPtr;
-
-typedef struct tui_win_element
- {
- int highlight;
- TuiWhichElement whichElement;
- }
-TuiWinElement, *TuiWinElementPtr;
+union tui_which_element
+{
+ struct tui_source_element source; /* the source elements */
+ struct tui_gen_win_info dataWindow; /* data display elements */
+ struct tui_data_element data; /* elements of dataWindow */
+ struct tui_command_element command; /* command elements */
+ struct tui_locator_element locator; /* locator elements */
+ tui_exec_info_content simpleString; /* simple char based elements */
+};
+
+struct tui_win_element
+{
+ int highlight;
+ union tui_which_element whichElement;
+};
/* This describes the content of the window. */
-typedef TuiWinElementPtr *TuiWinContent;
+typedef struct tui_win_element **tui_win_content;
/* This struct defines the specific information about a data display window */
-typedef struct tui_data_info
- {
- TuiWinContent dataContent; /* start of data display content */
- int dataContentCount;
- TuiWinContent regsContent; /* start of regs display content */
- int regsContentCount;
- TuiRegisterDisplayType regsDisplayType;
- int regsColumnCount;
- int displayRegs; /* Should regs be displayed at all? */
- }
-TuiDataInfo, *TuiDataInfoPtr;
-
-
-typedef struct tui_source_info
- {
- int hasLocator; /* Does locator belongs to this window? */
- TuiGenWinInfoPtr executionInfo; /* execution information window */
- int horizontalOffset; /* used for horizontal scroll */
- TuiLineOrAddress startLineOrAddr;
- char* filename;
- }
-TuiSourceInfo, *TuiSourceInfoPtr;
-
-
-typedef struct tui_command_info
- {
- int curLine; /* The current line position */
- int curch; /* The current cursor position */
- int start_line;
- }
-TuiCommandInfo, *TuiCommandInfoPtr;
+struct tui_data_info
+{
+ tui_win_content dataContent; /* start of data display content */
+ int dataContentCount;
+ tui_win_content regsContent; /* start of regs display content */
+ int regsContentCount;
+ enum tui_register_display_type regsDisplayType;
+ int regsColumnCount;
+ int displayRegs; /* Should regs be displayed at all? */
+};
+
+
+struct tui_source_info
+{
+ int hasLocator; /* Does locator belongs to this window? */
+ /* Execution information window. */
+ struct tui_gen_win_info *executionInfo;
+ int horizontalOffset; /* used for horizontal scroll */
+ union tui_line_or_address startLineOrAddr;
+ char* filename;
+};
+
+
+struct tui_command_info
+{
+ int curLine; /* The current line position */
+ int curch; /* The current cursor position */
+ int start_line;
+};
/* This defines information about each logical window */
-typedef struct tui_win_info
+struct tui_win_info
+{
+ struct tui_gen_win_info generic; /* general window information */
+ union
{
- TuiGenWinInfo generic; /* general window information */
- union
- {
- TuiSourceInfo sourceInfo;
- TuiDataInfo dataDisplayInfo;
- TuiCommandInfo commandInfo;
- Opaque opaque;
- }
- detail;
- int canHighlight; /* Can this window ever be highlighted? */
- int isHighlighted; /* Is this window highlighted? */
+ struct tui_source_info sourceInfo;
+ struct tui_data_info dataDisplayInfo;
+ struct tui_command_info commandInfo;
+ Opaque opaque;
}
-TuiWinInfo, *TuiWinInfoPtr;
+ detail;
+ int canHighlight; /* Can this window ever be highlighted? */
+ int isHighlighted; /* Is this window highlighted? */
+};
/* MACROS (prefixed with m_) */
/* Testing macros */
#define m_genWinPtrIsNull(winInfo) \
- ((winInfo) == (TuiGenWinInfoPtr)NULL)
+ ((winInfo) == (struct tui_gen_win_info *)NULL)
#define m_genWinPtrNotNull(winInfo) \
- ((winInfo) != (TuiGenWinInfoPtr)NULL)
+ ((winInfo) != (struct tui_gen_win_info *)NULL)
#define m_winPtrIsNull(winInfo) \
- ((winInfo) == (TuiWinInfoPtr)NULL)
+ ((winInfo) == (struct tui_win_info *)NULL)
#define m_winPtrNotNull(winInfo) \
- ((winInfo) != (TuiWinInfoPtr)NULL)
+ ((winInfo) != (struct tui_win_info *)NULL)
#define m_winIsSourceType(type) \
(type == SRC_WIN || type == DISASSEM_WIN)
#define m_winIsAuxillary(winType) \
(winType > MAX_MAJOR_WINDOWS)
#define m_hasLocator(winInfo) \
- ( ((winInfo) != (TuiWinInfoPtr)NULL) ? \
+ ( ((winInfo) != (struct tui_win_info *)NULL) ? \
(winInfo->detail.sourceInfo.hasLocator) : \
FALSE )
#define m_setWinHighlightOn(winInfo) \
- if ((winInfo) != (TuiWinInfoPtr)NULL) \
+ if ((winInfo) != (struct tui_win_info *)NULL) \
(winInfo)->isHighlighted = TRUE
#define m_setWinHighlightOff(winInfo) \
- if ((winInfo) != (TuiWinInfoPtr)NULL) \
+ if ((winInfo) != (struct tui_win_info *)NULL) \
(winInfo)->isHighlighted = FALSE
/* Global Data */
-extern TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS];
+extern struct tui_win_info *(winList[MAX_MAJOR_WINDOWS]);
/* Macros */
#define srcWin winList[SRC_WIN]
@@ -344,19 +327,19 @@ extern struct tui_gen_win_info *tui_alloc_generic_win_info (void);
extern struct tui_win_info *tui_alloc_win_info (TuiWinType);
extern void tui_init_generic_part (struct tui_gen_win_info *);
extern void tui_init_win_info (struct tui_win_info *);
-extern TuiWinContent tui_alloc_content (int, enum tui_win_type);
+extern tui_win_content tui_alloc_content (int, enum tui_win_type);
extern int tui_add_content_elements (struct tui_gen_win_info *, int);
extern void tui_init_content_element (struct tui_win_element *, enum tui_win_type);
extern void tui_free_window (struct tui_win_info *);
extern void tui_free_win_content (struct tui_gen_win_info *);
-extern void tui_free_data_content (TuiWinContent, int);
+extern void tui_free_data_content (tui_win_content, int);
extern void tui_free_all_source_wins_content (void);
extern void tui_del_window (struct tui_win_info *);
-extern void tui_del_data_windows (TuiWinContent, int);
+extern void tui_del_data_windows (tui_win_content, int);
extern struct tui_win_info *tui_partial_win_by_name (char *);
extern char *tui_win_name (struct tui_gen_win_info *);
-extern TuiLayoutType tui_current_layout (void);
-extern void tui_set_current_layout_to (TuiLayoutType);
+extern enum tui_layout_type tui_current_layout (void);
+extern void tui_set_current_layout_to (enum tui_layout_type);
extern int tui_term_height (void);
extern void tui_set_term_height_to (int);
extern int tui_term_width (void);
@@ -365,7 +348,7 @@ extern void tui_set_gen_win_origin (struct tui_gen_win_info *, int, int);
extern struct tui_gen_win_info *tui_locator_win_info_ptr (void);
extern struct tui_gen_win_info *tui_source_exec_info_win_ptr (void);
extern struct tui_gen_win_info *tui_disassem_exec_info_win_ptr (void);
-extern TuiListPtr tui_source_windows (void);
+extern struct tui_list * tui_source_windows (void);
extern void tui_clear_source_windows (void);
extern void tui_clear_source_windows_detail (void);
extern void tui_clear_win_detail (struct tui_win_info * winInfo);
@@ -374,7 +357,7 @@ extern int tui_default_tab_len (void);
extern void tui_set_default_tab_len (int);
extern struct tui_win_info *tui_win_with_focus (void);
extern void tui_set_win_with_focus (struct tui_win_info *);
-extern TuiLayoutDefPtr tui_layout_def (void);
+extern struct tui_layout_def * tui_layout_def (void);
extern int tui_win_resized (void);
extern void tui_set_win_resized_to (int);
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 51da0f9..00c2a81 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -180,7 +180,7 @@ tui_set_disassem_content (CORE_ADDR pc)
register int offset = disassemWin->detail.sourceInfo.horizontalOffset;
register int lineWidth, maxLines;
CORE_ADDR cur_pc;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
int tab_len = tui_default_tab_len ();
struct tui_asm_line* lines;
int insn_pos;
@@ -196,7 +196,7 @@ tui_set_disassem_content (CORE_ADDR pc)
disassemWin->detail.sourceInfo.startLineOrAddr.addr = pc;
cur_pc = (CORE_ADDR)
- (((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr);
+ (((struct tui_win_element *) locator->content[0])->whichElement.locator.addr);
maxLines = disassemWin->generic.height - 2; /* account for hilite */
@@ -231,11 +231,11 @@ tui_set_disassem_content (CORE_ADDR pc)
/* Now construct each line */
for (i = 0; i < maxLines; i++)
{
- TuiWinElementPtr element;
- TuiSourceElement* src;
+ struct tui_win_element * element;
+ struct tui_source_element* src;
int curLen;
- element = (TuiWinElementPtr) disassemWin->generic.content[i];
+ element = (struct tui_win_element *) disassemWin->generic.content[i];
src = &element->whichElement.source;
strcpy (line, lines[i].addr_string);
curLen = strlen (line);
@@ -275,8 +275,8 @@ void
tui_show_disassem (CORE_ADDR startAddr)
{
struct symtab *s = find_pc_symtab (startAddr);
- TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
- TuiLineOrAddress val;
+ struct tui_win_info * winWithFocus = tui_win_with_focus ();
+ union tui_line_or_address val;
val.addr = startAddr;
tui_add_win_to_layout (DISASSEM_WIN);
@@ -301,7 +301,7 @@ tui_show_disassem_and_update_source (CORE_ADDR startAddr)
tui_show_disassem (startAddr);
if (tui_current_layout () == SRC_DISASSEM_COMMAND)
{
- TuiLineOrAddress val;
+ union tui_line_or_address val;
/*
** Update what is in the source window if it is displayed too,
@@ -325,12 +325,12 @@ tui_show_disassem_and_update_source (CORE_ADDR startAddr)
CORE_ADDR
tui_get_begin_asm_address (void)
{
- TuiGenWinInfoPtr locator;
- TuiLocatorElementPtr element;
+ struct tui_gen_win_info * locator;
+ struct tui_locator_element * element;
CORE_ADDR addr;
locator = tui_locator_win_info_ptr ();
- element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
+ element = &((struct tui_win_element *) locator->content[0])->whichElement.locator;
if (element->addr == 0)
{
@@ -380,13 +380,13 @@ tui_vertical_disassem_scroll (enum tui_scroll_direction scrollDirection,
if (disassemWin->generic.content != (OpaquePtr) NULL)
{
CORE_ADDR pc;
- TuiWinContent content;
+ tui_win_content content;
struct symtab *s;
- TuiLineOrAddress val;
+ union tui_line_or_address val;
int maxLines, dir;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
- content = (TuiWinContent) disassemWin->generic.content;
+ content = (tui_win_content) disassemWin->generic.content;
if (cursal.symtab == (struct symtab *) NULL)
s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index d3621d8..e4a5d21 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -50,26 +50,26 @@
/*******************************
** Static Local Decls
********************************/
-static void showLayout (TuiLayoutType);
-static void _initGenWinInfo (TuiGenWinInfoPtr, TuiWinType, int, int, int, int);
+static void showLayout (enum tui_layout_type);
+static void _initGenWinInfo (struct tui_gen_win_info *, TuiWinType, int, int, int, int);
static void _initAndMakeWin (Opaque *, TuiWinType, int, int, int, int, int);
-static void _showSourceOrDisassemAndCommand (TuiLayoutType);
-static void _makeSourceOrDisassemWindow (TuiWinInfoPtr *, TuiWinType, int, int);
-static void _makeCommandWindow (TuiWinInfoPtr *, int, int);
-static void _makeSourceWindow (TuiWinInfoPtr *, int, int);
-static void _makeDisassemWindow (TuiWinInfoPtr *, int, int);
-static void _makeDataWindow (TuiWinInfoPtr *, int, int);
+static void _showSourceOrDisassemAndCommand (enum tui_layout_type);
+static void _makeSourceOrDisassemWindow (struct tui_win_info * *, TuiWinType, int, int);
+static void _makeCommandWindow (struct tui_win_info * *, int, int);
+static void _makeSourceWindow (struct tui_win_info * *, int, int);
+static void _makeDisassemWindow (struct tui_win_info * *, int, int);
+static void _makeDataWindow (struct tui_win_info * *, int, int);
static void _showSourceCommand (void);
static void _showDisassemCommand (void);
static void _showSourceDisassemCommand (void);
-static void _showData (TuiLayoutType);
-static TuiLayoutType _nextLayout (void);
-static TuiLayoutType _prevLayout (void);
+static void _showData (enum tui_layout_type);
+static enum tui_layout_type _nextLayout (void);
+static enum tui_layout_type _prevLayout (void);
static void _tuiLayout_command (char *, int);
static void _tuiToggleLayout_command (char *, int);
static void _tuiToggleSplitLayout_command (char *, int);
static CORE_ADDR _extractDisplayStartAddr (void);
-static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
+static void _tuiHandleXDBLayout (struct tui_layout_def *);
/***************************************
@@ -80,9 +80,9 @@ static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
/* Show the screen layout defined. */
static void
-showLayout (TuiLayoutType layout)
+showLayout (enum tui_layout_type layout)
{
- TuiLayoutType curLayout = tui_current_layout ();
+ enum tui_layout_type curLayout = tui_current_layout ();
if (layout != curLayout)
{
@@ -141,11 +141,12 @@ tui_set_layout (enum tui_layout_type layoutType,
if (layoutType != UNDEFINED_LAYOUT || regsDisplayType != TUI_UNDEFINED_REGS)
{
- TuiLayoutType curLayout = tui_current_layout (), newLayout = UNDEFINED_LAYOUT;
+ enum tui_layout_type curLayout = tui_current_layout (), newLayout = UNDEFINED_LAYOUT;
int regsPopulate = FALSE;
CORE_ADDR addr = _extractDisplayStartAddr ();
- TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tui_win_with_focus ();
- TuiLayoutDefPtr layoutDef = tui_layout_def ();
+ struct tui_win_info * newWinWithFocus = (struct tui_win_info *) NULL;
+ struct tui_win_info * winWithFocus = tui_win_with_focus ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
if (layoutType == UNDEFINED_LAYOUT &&
@@ -238,7 +239,7 @@ tui_set_layout (enum tui_layout_type layoutType,
break;
}
}
- if (newWinWithFocus != (TuiWinInfoPtr) NULL)
+ if (newWinWithFocus != (struct tui_win_info *) NULL)
tui_set_win_focus_to (newWinWithFocus);
/*
** Now update the window content
@@ -271,7 +272,7 @@ tui_set_layout (enum tui_layout_type layoutType,
void
tui_add_win_to_layout (enum tui_win_type type)
{
- TuiLayoutType curLayout = tui_current_layout ();
+ enum tui_layout_type curLayout = tui_current_layout ();
switch (type)
{
@@ -324,11 +325,11 @@ tui_add_win_to_layout (enum tui_win_type type)
** type and the layout.
*/
int
-tuiDefaultWinHeight (TuiWinType type, TuiLayoutType layout)
+tuiDefaultWinHeight (TuiWinType type, enum tui_layout_type layout)
{
int h;
- if (winList[type] != (TuiWinInfoPtr) NULL)
+ if (winList[type] != (struct tui_win_info *) NULL)
h = winList[type]->generic.height;
else
{
@@ -430,9 +431,9 @@ tui_set_layout_for_display_command (const char *layoutName)
{
register int i;
register char *bufPtr;
- TuiLayoutType newLayout = UNDEFINED_LAYOUT;
- TuiRegisterDisplayType dpyType = TUI_UNDEFINED_REGS;
- TuiLayoutType curLayout = tui_current_layout ();
+ enum tui_layout_type newLayout = UNDEFINED_LAYOUT;
+ enum tui_register_display_type dpyType = TUI_UNDEFINED_REGS;
+ enum tui_layout_type curLayout = tui_current_layout ();
bufPtr = (char *) xstrdup (layoutName);
for (i = 0; (i < strlen (layoutName)); i++)
@@ -527,7 +528,7 @@ tui_set_layout_for_display_command (const char *layoutName)
static CORE_ADDR
_extractDisplayStartAddr (void)
{
- TuiLayoutType curLayout = tui_current_layout ();
+ enum tui_layout_type curLayout = tui_current_layout ();
CORE_ADDR addr;
CORE_ADDR pc;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
@@ -556,7 +557,7 @@ _extractDisplayStartAddr (void)
static void
-_tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
+_tuiHandleXDBLayout (struct tui_layout_def * layoutDef)
{
if (layoutDef->split)
{
@@ -579,7 +580,7 @@ _tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
static void
_tuiToggleLayout_command (char *arg, int fromTTY)
{
- TuiLayoutDefPtr layoutDef = tui_layout_def ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -597,7 +598,7 @@ _tuiToggleLayout_command (char *arg, int fromTTY)
static void
_tuiToggleSplitLayout_command (char *arg, int fromTTY)
{
- TuiLayoutDefPtr layoutDef = tui_layout_def ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -623,10 +624,10 @@ _tuiLayout_command (char *arg, int fromTTY)
** _nextLayout().
** Answer the previous layout to cycle to.
*/
-static TuiLayoutType
+static enum tui_layout_type
_nextLayout (void)
{
- TuiLayoutType newLayout;
+ enum tui_layout_type newLayout;
newLayout = tui_current_layout ();
if (newLayout == UNDEFINED_LAYOUT)
@@ -646,10 +647,10 @@ _nextLayout (void)
** _prevLayout().
** Answer the next layout to cycle to.
*/
-static TuiLayoutType
+static enum tui_layout_type
_prevLayout (void)
{
- TuiLayoutType newLayout;
+ enum tui_layout_type newLayout;
newLayout = tui_current_layout ();
if (newLayout == SRC_COMMAND)
@@ -670,7 +671,7 @@ _prevLayout (void)
** _makeCommandWindow().
*/
static void
-_makeCommandWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
+_makeCommandWindow (struct tui_win_info * * winInfoPtr, int height, int originY)
{
_initAndMakeWin ((Opaque *) winInfoPtr,
CMD_WIN,
@@ -690,7 +691,7 @@ _makeCommandWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
** _makeSourceWindow().
*/
static void
-_makeSourceWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
+_makeSourceWindow (struct tui_win_info * * winInfoPtr, int height, int originY)
{
_makeSourceOrDisassemWindow (winInfoPtr, SRC_WIN, height, originY);
@@ -702,7 +703,7 @@ _makeSourceWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
** _makeDisassemWindow().
*/
static void
-_makeDisassemWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
+_makeDisassemWindow (struct tui_win_info * * winInfoPtr, int height, int originY)
{
_makeSourceOrDisassemWindow (winInfoPtr, DISASSEM_WIN, height, originY);
@@ -714,7 +715,7 @@ _makeDisassemWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
** _makeDataWindow().
*/
static void
-_makeDataWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY)
+_makeDataWindow (struct tui_win_info * * winInfoPtr, int height, int originY)
{
_initAndMakeWin ((Opaque *) winInfoPtr,
DATA_WIN,
@@ -797,7 +798,7 @@ _showSourceDisassemCommand (void)
}
if (m_winPtrNotNull (srcWin))
{
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
tui_show_source_content (srcWin);
if (m_winPtrIsNull (disassemWin))
@@ -876,12 +877,12 @@ _showSourceDisassemCommand (void)
** Show the Source/Data/Command or the Dissassembly/Data/Command layout
*/
static void
-_showData (TuiLayoutType newLayout)
+_showData (enum tui_layout_type newLayout)
{
int totalHeight = (tui_term_height () - cmdWin->generic.height);
int srcHeight, dataHeight;
TuiWinType winType;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
dataHeight = totalHeight / 2;
@@ -944,7 +945,7 @@ _showData (TuiLayoutType newLayout)
** _initGenWinInfo().
*/
static void
-_initGenWinInfo (TuiGenWinInfoPtr winInfo, TuiWinType type,
+_initGenWinInfo (struct tui_gen_win_info * winInfo, TuiWinType type,
int height, int width, int originX, int originY)
{
int h = height;
@@ -974,7 +975,7 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType,
int height, int width, int originX, int originY, int boxIt)
{
Opaque opaqueWinInfo = *winInfoPtr;
- TuiGenWinInfoPtr generic;
+ struct tui_gen_win_info * generic;
if (opaqueWinInfo == (Opaque) NULL)
{
@@ -984,9 +985,9 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType,
opaqueWinInfo = (Opaque) tui_alloc_win_info (winType);
}
if (m_winIsAuxillary (winType))
- generic = (TuiGenWinInfoPtr) opaqueWinInfo;
+ generic = (struct tui_gen_win_info *) opaqueWinInfo;
else
- generic = &((TuiWinInfoPtr) opaqueWinInfo)->generic;
+ generic = &((struct tui_win_info *) opaqueWinInfo)->generic;
if (opaqueWinInfo != (Opaque) NULL)
{
@@ -994,9 +995,9 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType,
if (!m_winIsAuxillary (winType))
{
if (generic->type == CMD_WIN)
- ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = FALSE;
+ ((struct tui_win_info *) opaqueWinInfo)->canHighlight = FALSE;
else
- ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE;
+ ((struct tui_win_info *) opaqueWinInfo)->canHighlight = TRUE;
}
tui_make_window (generic, boxIt);
}
@@ -1008,10 +1009,10 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType,
** _makeSourceOrDisassemWindow().
*/
static void
-_makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type,
+_makeSourceOrDisassemWindow (struct tui_win_info * * winInfoPtr, TuiWinType type,
int height, int originY)
{
- TuiGenWinInfoPtr executionInfo = (TuiGenWinInfoPtr) NULL;
+ struct tui_gen_win_info * executionInfo = (struct tui_gen_win_info *) NULL;
/*
** Create the exeuction info window.
@@ -1049,13 +1050,13 @@ _makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type,
** Show the Source/Command or the Disassem layout
*/
static void
-_showSourceOrDisassemAndCommand (TuiLayoutType layoutType)
+_showSourceOrDisassemAndCommand (enum tui_layout_type layoutType)
{
if (tui_current_layout () != layoutType)
{
- TuiWinInfoPtr *winInfoPtr;
+ struct tui_win_info * *winInfoPtr;
int srcHeight, cmdHeight;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
if (m_winPtrNotNull (cmdWin))
cmdHeight = cmdWin->generic.height;
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index bf925de..94fa914 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -77,24 +77,24 @@
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
******************************************/
static TuiStatus _tuiSetRegsContent
- (int, int, struct frame_info *, TuiRegisterDisplayType, int);
+ (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 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);
+ (char *, int, int, struct tui_data_element *, enum precision_type);
static TuiStatus _tuiSetGeneralRegsContent (int);
static TuiStatus _tuiSetSpecialRegsContent (int);
static TuiStatus _tuiSetGeneralAndSpecialRegsContent (int);
-static TuiStatus _tuiSetFloatRegsContent (TuiRegisterDisplayType, int);
+static TuiStatus _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);
@@ -186,7 +186,7 @@ tuiLastRegElementNoInLine (int lineNo)
/* 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;
@@ -209,7 +209,7 @@ tui_calculate_regs_column_count (TuiRegisterDisplayType dpyType)
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;
int refreshValuesOnly = FALSE;
@@ -258,11 +258,11 @@ tui_show_registers (TuiRegisterDisplayType dpyType)
/* 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;
@@ -281,7 +281,7 @@ tui_show_registers (TuiRegisterDisplayType dpyType)
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;
@@ -323,13 +323,13 @@ tui_display_registers_from (int 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)
{
@@ -370,7 +370,7 @@ tui_display_registers_from (int startElementNo)
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;
@@ -461,13 +461,13 @@ tui_check_register_values (struct frame_info *frame)
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 =
@@ -509,7 +509,7 @@ tui_check_register_values (struct frame_info *frame)
void
tuiToggleFloatRegs (void)
{
- TuiLayoutDefPtr layoutDef = tui_layout_def ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
@@ -583,7 +583,7 @@ tui_restore_gdbout (void *ui)
*/
static void
_tuiRegisterFormat (char *buf, int bufLen, int regNum,
- TuiDataElementPtr dataElement,
+ struct tui_data_element * dataElement,
enum precision_type precision)
{
struct ui_file *stream;
@@ -702,7 +702,7 @@ _tuiSetGeneralAndSpecialRegsContent (int refreshValuesOnly)
** Set the content of the data window to consist of the float registers.
*/
static TuiStatus
-_tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, int refreshValuesOnly)
+_tuiSetFloatRegsContent (enum tui_register_display_type dpyType, int refreshValuesOnly)
{
TuiStatus ret = TUI_FAILURE;
int startRegNum;
@@ -724,7 +724,7 @@ _tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, int refreshValuesOnly)
** 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)
{
@@ -785,10 +785,10 @@ _tuiGetRegisterRawValue (int regNum, char *regValue, struct frame_info *frame)
*/
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)
{
@@ -815,7 +815,7 @@ _tuiSetRegisterElement (int regNum, struct frame_info *frame,
static TuiStatus
_tuiSetRegsContent (int startRegNum, int endRegNum,
struct frame_info *frame,
- TuiRegisterDisplayType dpyType,
+ enum tui_register_display_type dpyType,
int refreshValuesOnly)
{
TuiStatus ret = TUI_FAILURE;
@@ -836,7 +836,7 @@ _tuiSetRegsContent (int startRegNum, int endRegNum,
allocatedHere = TRUE;
}
- if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL)
+ if (dataWin->detail.dataDisplayInfo.regsContent != (tui_win_content) NULL)
{
int i;
@@ -846,7 +846,7 @@ _tuiSetRegsContent (int startRegNum, int endRegNum,
dataWin->generic.contentSize = 0;
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;
}
/*
@@ -854,14 +854,14 @@ _tuiSetRegsContent (int startRegNum, int endRegNum,
*/
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 =
@@ -891,7 +891,7 @@ _tuiSetRegsContent (int startRegNum, int endRegNum,
*/
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)
@@ -899,7 +899,7 @@ _tuiDisplayRegister (int regNum,
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 ||
@@ -948,7 +948,7 @@ _tuiDisplayRegister (int regNum,
static void
-_tui_vShowRegisters_commandSupport (TuiRegisterDisplayType dpyType)
+_tui_vShowRegisters_commandSupport (enum tui_register_display_type dpyType)
{
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
@@ -996,7 +996,7 @@ _tuiToggleFloatRegs_command (char *arg, int fromTTY)
tuiToggleFloatRegs ();
else
{
- TuiLayoutDefPtr layoutDef = tui_layout_def ();
+ struct tui_layout_def * layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 54ce302..8d68c7e 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -93,8 +93,8 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror)
else
{
register int offset, curLineNo, curLine, curLen, threshold;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
- TuiSourceInfoPtr src = &srcWin->detail.sourceInfo;
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
+ struct tui_source_info * src = &srcWin->detail.sourceInfo;
if (srcWin->generic.title)
xfree (srcWin->generic.title);
@@ -117,14 +117,14 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror)
(threshold + 1) * sizeof (char));
while (curLine < nlines)
{
- TuiWinElementPtr element = (TuiWinElementPtr)
+ struct tui_win_element * element = (struct tui_win_element *)
srcWin->generic.content[curLine];
/* get the first character in the line */
c = fgetc (stream);
if (offset == 0)
- srcLine = ((TuiWinElementPtr)
+ srcLine = ((struct tui_win_element *)
srcWin->generic.content[
curLine])->whichElement.source.line;
/* Init the line with the line number */
@@ -145,10 +145,10 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror)
element->whichElement.source.lineOrAddr.lineNo =
curLineNo;
element->whichElement.source.isExecPoint =
- (strcmp (((TuiWinElementPtr)
+ (strcmp (((struct tui_win_element *)
locator->content[0])->whichElement.locator.fileName,
s->filename) == 0
- && curLineNo == ((TuiWinElementPtr)
+ && curLineNo == ((struct tui_win_element *)
locator->content[0])->whichElement.locator.lineNo);
if (c != EOF)
{
@@ -203,11 +203,11 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror)
}
/* Now copy the line taking the offset into account */
if (strlen (srcLine) > offset)
- strcpy (((TuiWinElementPtr) srcWin->generic.content[
+ strcpy (((struct tui_win_element *) srcWin->generic.content[
curLine])->whichElement.source.line,
&srcLine[offset]);
else
- ((TuiWinElementPtr)
+ ((struct tui_win_element *)
srcWin->generic.content[
curLine])->whichElement.source.line[0] = (char) 0;
curLine++;
@@ -233,7 +233,7 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror)
files cannot be accessed. */
void
-tui_set_source_content_nil (TuiWinInfoPtr winInfo, char *warning_string)
+tui_set_source_content_nil (struct tui_win_info * winInfo, char *warning_string)
{
int lineWidth;
int nLines;
@@ -250,8 +250,8 @@ tui_set_source_content_nil (TuiWinInfoPtr winInfo, char *warning_string)
to null: i.e. the line number is 0, there is no bp,
it is not where the program is stopped */
- TuiWinElementPtr element =
- (TuiWinElementPtr) winInfo->generic.content[curr_line];
+ struct tui_win_element * element =
+ (struct tui_win_element *) winInfo->generic.content[curr_line];
element->whichElement.source.lineOrAddr.lineNo = 0;
element->whichElement.source.isExecPoint = FALSE;
element->whichElement.source.hasBreak = FALSE;
@@ -300,7 +300,7 @@ tui_set_source_content_nil (TuiWinInfoPtr winInfo, char *warning_string)
/* Function to display source in the source window. This function
initializes the horizontal scroll to 0. */
void
-tui_show_symtab_source (struct symtab *s, TuiLineOrAddress line, int noerror)
+tui_show_symtab_source (struct symtab *s, union tui_line_or_address line, int noerror)
{
srcWin->detail.sourceInfo.horizontalOffset = 0;
tui_update_source_window_as_is (srcWin, s, line, noerror);
@@ -313,21 +313,21 @@ int
tui_source_is_displayed (char *fname)
{
return (srcWin->generic.contentInUse &&
- (strcmp (((TuiWinElementPtr) (tui_locator_win_info_ptr ())->
+ (strcmp (((struct tui_win_element *) (tui_locator_win_info_ptr ())->
content[0])->whichElement.locator.fileName, fname) == 0));
}
/* Scroll the source forward or backward vertically. */
void
-tui_vertical_source_scroll (TuiScrollDirection scrollDirection,
+tui_vertical_source_scroll (enum tui_scroll_direction scrollDirection,
int numToScroll)
{
if (srcWin->generic.content != (OpaquePtr) NULL)
{
- TuiLineOrAddress l;
+ union tui_line_or_address l;
struct symtab *s;
- TuiWinContent content = (TuiWinContent) srcWin->generic.content;
+ tui_win_content content = (tui_win_content) srcWin->generic.content;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index 54e3ab3..e2f996e 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -66,7 +66,7 @@ static void tui_update_command (char *, int);
can on this single line: target name, process number, current
function, current line, current PC, SingleKey mode. */
static char*
-tui_make_status_line (TuiLocatorElement* loc)
+tui_make_status_line (struct tui_locator_element* loc)
{
char* string;
char line_buf[50], *pname;
@@ -249,15 +249,15 @@ void
tui_show_locator_content (void)
{
char *string;
- TuiGenWinInfoPtr locator;
+ struct tui_gen_win_info * locator;
locator = tui_locator_win_info_ptr ();
if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL)
{
- TuiWinElementPtr element;
+ struct tui_win_element * element;
- element = (TuiWinElementPtr) locator->content[0];
+ element = (struct tui_win_element *) locator->content[0];
string = tui_make_status_line (&element->whichElement.locator);
wmove (locator->handle, 0, 0);
@@ -277,8 +277,8 @@ tui_show_locator_content (void)
static void
tui_set_locator_filename (const char *filename)
{
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
- TuiLocatorElementPtr element;
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
+ struct tui_locator_element * element;
if (locator->content[0] == (Opaque) NULL)
{
@@ -286,7 +286,7 @@ tui_set_locator_filename (const char *filename)
return;
}
- element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
+ element = &((struct tui_win_element *) locator->content[0])->whichElement.locator;
element->fileName[0] = 0;
strcat_to_buf (element->fileName, MAX_LOCATOR_ELEMENT_LEN, filename);
}
@@ -296,8 +296,8 @@ static void
tui_set_locator_info (const char *filename, const char *procname, int lineno,
CORE_ADDR addr)
{
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
- TuiLocatorElementPtr element;
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
+ struct tui_locator_element * element;
/* Allocate the locator content if necessary. */
if (locator->contentSize <= 0)
@@ -306,7 +306,7 @@ tui_set_locator_info (const char *filename, const char *procname, int lineno,
locator->contentSize = 1;
}
- element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
+ element = &((struct tui_win_element *) locator->content[0])->whichElement.locator;
element->procName[0] = (char) 0;
strcat_to_buf (element->procName, MAX_LOCATOR_ELEMENT_LEN, procname);
element->lineNo = lineno;
@@ -326,14 +326,14 @@ tui_update_locator_filename (const char *filename)
void
tui_show_frame_info (struct frame_info *fi)
{
- TuiWinInfoPtr winInfo;
+ struct tui_win_info * winInfo;
register int i;
if (fi)
{
register int startLine, i;
CORE_ADDR low;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
int sourceAlreadyDisplayed;
struct symtab_and_line sal;
@@ -349,10 +349,10 @@ tui_show_frame_info (struct frame_info *fi)
startLine = 0;
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- TuiWhichElement *item;
- winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
+ union tui_which_element *item;
+ winInfo = (struct tui_win_info *) (tui_source_windows ())->list[i];
- item = &((TuiWinElementPtr) locator->content[0])->whichElement;
+ item = &((struct tui_win_element *) locator->content[0])->whichElement;
if (winInfo == srcWin)
{
startLine = (item->locator.lineNo -
@@ -371,7 +371,7 @@ tui_show_frame_info (struct frame_info *fi)
if (winInfo == srcWin)
{
- TuiLineOrAddress l;
+ union tui_line_or_address l;
l.lineNo = startLine;
if (!(sourceAlreadyDisplayed
&& tui_line_is_displayed (item->locator.lineNo, winInfo, TRUE)))
@@ -386,7 +386,7 @@ tui_show_frame_info (struct frame_info *fi)
{
if (winInfo == disassemWin)
{
- TuiLineOrAddress a;
+ union tui_line_or_address a;
a.addr = low;
if (!tui_addr_is_displayed (item->locator.addr, winInfo, TRUE))
tui_update_source_window (winInfo, sal.symtab, a, TRUE);
@@ -406,7 +406,7 @@ tui_show_frame_info (struct frame_info *fi)
tui_show_locator_content ();
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
+ winInfo = (struct tui_win_info *) (tui_source_windows ())->list[i];
tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
tui_update_exec_info (winInfo);
}
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 54e30ba..43e11bb 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -61,10 +61,10 @@
/*******************************
** Static Local Decls
********************************/
-static void _makeVisibleWithNewHeight (TuiWinInfoPtr);
-static void _makeInvisibleAndSetNewHeight (TuiWinInfoPtr, int);
-static TuiStatus _tuiAdjustWinHeights (TuiWinInfoPtr, int);
-static int _newHeightOk (TuiWinInfoPtr, int);
+static void _makeVisibleWithNewHeight (struct tui_win_info *);
+static void _makeInvisibleAndSetNewHeight (struct tui_win_info *, int);
+static TuiStatus _tuiAdjustWinHeights (struct tui_win_info *, int);
+static int _newHeightOk (struct tui_win_info *, int);
static void _tuiSetTabWidth_command (char *, int);
static void _tuiRefreshAll_command (char *, int);
static void _tuiSetWinHeight_command (char *, int);
@@ -75,7 +75,7 @@ static void _tuiScrollForward_command (char *, int);
static void _tuiScrollBackward_command (char *, int);
static void _tuiScrollLeft_command (char *, int);
static void _tuiScrollRight_command (char *, int);
-static void _parseScrollingArgs (char *, TuiWinInfoPtr *, int *);
+static void _parseScrollingArgs (char *, struct tui_win_info * *, int *);
/***************************************
@@ -425,11 +425,11 @@ tui_update_gdb_sizes ()
/* Set the logical focus to winInfo. */
void
-tui_set_win_focus_to (TuiWinInfoPtr winInfo)
+tui_set_win_focus_to (struct tui_win_info * winInfo)
{
if (m_winPtrNotNull (winInfo))
{
- TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
+ struct tui_win_info * winWithFocus = tui_win_with_focus ();
if (m_winPtrNotNull (winWithFocus) &&
winWithFocus->generic.type != CMD_WIN)
@@ -444,7 +444,7 @@ tui_set_win_focus_to (TuiWinInfoPtr winInfo)
void
-tui_scroll_forward (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_forward (struct tui_win_info * winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
@@ -468,7 +468,7 @@ tui_scroll_forward (TuiWinInfoPtr winToScroll, int numToScroll)
}
void
-tui_scroll_backward (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_backward (struct tui_win_info * winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
@@ -493,7 +493,7 @@ tui_scroll_backward (TuiWinInfoPtr winToScroll, int numToScroll)
void
-tui_scroll_left (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_left (struct tui_win_info * winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
@@ -514,7 +514,7 @@ tui_scroll_left (TuiWinInfoPtr winToScroll, int numToScroll)
void
-tui_scroll_right (TuiWinInfoPtr winToScroll, int numToScroll)
+tui_scroll_right (struct tui_win_info * winToScroll, int numToScroll)
{
if (winToScroll != cmdWin)
{
@@ -536,8 +536,8 @@ tui_scroll_right (TuiWinInfoPtr winToScroll, int numToScroll)
/* Scroll a window. Arguments are passed through a va_list. */
void
-tui_scroll (TuiScrollDirection direction,
- TuiWinInfoPtr winToScroll,
+tui_scroll (enum tui_scroll_direction direction,
+ struct tui_win_info * winToScroll,
int numToScroll)
{
switch (direction)
@@ -608,10 +608,11 @@ tuiResizeAll (void)
heightDiff = screenheight - tui_term_height ();
if (heightDiff || widthDiff)
{
- TuiLayoutType curLayout = tui_current_layout ();
- TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
- TuiWinInfoPtr firstWin, secondWin;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ enum tui_layout_type curLayout = tui_current_layout ();
+ struct tui_win_info * winWithFocus = tui_win_with_focus ();
+ struct tui_win_info *firstWin;
+ struct tui_win_info *secondWin;
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
TuiWinType winType;
int newHeight, splitDiff, cmdSplitDiff, numWinsDisplayed = 2;
@@ -640,7 +641,7 @@ tuiResizeAll (void)
{
case SRC_COMMAND:
case DISASSEM_COMMAND:
- firstWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ firstWin = (struct tui_win_info *) (tui_source_windows ())->list[0];
firstWin->generic.width += widthDiff;
locator->width += widthDiff;
/* check for invalid heights */
@@ -676,7 +677,7 @@ tuiResizeAll (void)
{
firstWin = dataWin;
firstWin->generic.width += widthDiff;
- secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ secondWin = (struct tui_win_info *) (tui_source_windows ())->list[0];
secondWin->generic.width += widthDiff;
}
/* Change the first window's height/width */
@@ -743,7 +744,7 @@ tuiResizeAll (void)
!winList[winType]->generic.isVisible)
{
tui_free_window (winList[winType]);
- winList[winType] = (TuiWinInfoPtr) NULL;
+ winList[winType] = (struct tui_win_info *) NULL;
}
}
tui_set_win_resized_to (TRUE);
@@ -787,7 +788,7 @@ static void
_tuiScrollForward_command (char *arg, int fromTTY)
{
int numToScroll = 1;
- TuiWinInfoPtr winToScroll;
+ struct tui_win_info * winToScroll;
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -806,7 +807,7 @@ static void
_tuiScrollBackward_command (char *arg, int fromTTY)
{
int numToScroll = 1;
- TuiWinInfoPtr winToScroll;
+ struct tui_win_info * winToScroll;
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -825,7 +826,7 @@ static void
_tuiScrollLeft_command (char *arg, int fromTTY)
{
int numToScroll;
- TuiWinInfoPtr winToScroll;
+ struct tui_win_info * winToScroll;
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -841,7 +842,7 @@ static void
_tuiScrollRight_command (char *arg, int fromTTY)
{
int numToScroll;
- TuiWinInfoPtr winToScroll;
+ struct tui_win_info * winToScroll;
/* Make sure the curses mode is enabled. */
tui_enable ();
@@ -861,7 +862,7 @@ _tuiSetFocus (char *arg, int fromTTY)
{
char *bufPtr = (char *) xstrdup (arg);
int i;
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
+ struct tui_win_info * winInfo = (struct tui_win_info *) NULL;
for (i = 0; (i < strlen (bufPtr)); i++)
bufPtr[i] = toupper (arg[i]);
@@ -873,7 +874,7 @@ _tuiSetFocus (char *arg, int fromTTY)
else
winInfo = tui_partial_win_by_name (bufPtr);
- if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
+ if (winInfo == (struct tui_win_info *) NULL || !winInfo->generic.isVisible)
warning ("Invalid window specified. \n\
The window name specified must be valid and visible.\n");
else
@@ -886,7 +887,7 @@ The window name specified must be valid and visible.\n");
tui_refresh_data_win ();
tuiFree (bufPtr);
printf_filtered ("Focus set to %s window.\n",
- tui_win_name ((TuiGenWinInfoPtr) tui_win_with_focus ()));
+ tui_win_name ((struct tui_gen_win_info *) tui_win_with_focus ()));
}
else
warning ("Incorrect Number of Arguments.\n%s", FOCUS_USAGE);
@@ -913,7 +914,7 @@ static void
_tuiAllWindowsInfo (char *arg, int fromTTY)
{
TuiWinType type;
- TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
+ struct tui_win_info * winWithFocus = tui_win_with_focus ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
if (winList[type] && winList[type]->generic.isVisible)
@@ -984,7 +985,7 @@ _tuiSetWinHeight (char *arg, int fromTTY)
char *bufPtr = buf;
char *wname = (char *) NULL;
int newHeight, i;
- TuiWinInfoPtr winInfo;
+ struct tui_win_info * winInfo;
wname = bufPtr;
bufPtr = strchr (bufPtr, ' ');
@@ -999,7 +1000,7 @@ _tuiSetWinHeight (char *arg, int fromTTY)
wname[i] = toupper (wname[i]);
winInfo = tui_partial_win_by_name (wname);
- if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
+ if (winInfo == (struct tui_win_info *) NULL || !winInfo->generic.isVisible)
warning ("Invalid window specified. \n\
The window name specified must be valid and visible.\n");
else
@@ -1122,7 +1123,7 @@ _tuiXDBsetWinHeight_command (char *arg, int fromTTY)
** Function to adjust all window heights around the primary
*/
static TuiStatus
-_tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
+_tuiAdjustWinHeights (struct tui_win_info * primaryWinInfo, int newHeight)
{
TuiStatus status = TUI_FAILURE;
@@ -1132,19 +1133,19 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
if (newHeight != primaryWinInfo->generic.height)
{
int diff;
- TuiWinInfoPtr winInfo;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
- TuiLayoutType curLayout = tui_current_layout ();
+ struct tui_win_info * winInfo;
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
+ enum tui_layout_type curLayout = tui_current_layout ();
diff = (newHeight - primaryWinInfo->generic.height) * (-1);
if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
{
- TuiWinInfoPtr srcWinInfo;
+ struct tui_win_info * srcWinInfo;
_makeInvisibleAndSetNewHeight (primaryWinInfo, newHeight);
if (primaryWinInfo->generic.type == CMD_WIN)
{
- winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ winInfo = (struct tui_win_info *) (tui_source_windows ())->list[0];
srcWinInfo = winInfo;
}
else
@@ -1162,7 +1163,8 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
}
else
{
- TuiWinInfoPtr firstWin, secondWin;
+ struct tui_win_info *firstWin;
+ struct tui_win_info *secondWin;
if (curLayout == SRC_DISASSEM_COMMAND)
{
@@ -1172,7 +1174,7 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
else
{
firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ secondWin = (struct tui_win_info *) (tui_source_windows ())->list[0];
}
if (primaryWinInfo == cmdWin)
{ /*
@@ -1276,10 +1278,10 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight)
** with the targer) invisible, and set the new height and location.
*/
static void
-_makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height)
+_makeInvisibleAndSetNewHeight (struct tui_win_info * winInfo, int height)
{
int i;
- TuiGenWinInfoPtr genWinInfo;
+ struct tui_gen_win_info * genWinInfo;
tui_make_invisible (&winInfo->generic);
winInfo->generic.height = height;
@@ -1317,7 +1319,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height)
/* delete all data item windows */
for (i = 0; i < winInfo->generic.contentSize; i++)
{
- genWinInfo = (TuiGenWinInfoPtr) & ((TuiWinElementPtr)
+ genWinInfo = (struct tui_gen_win_info *) & ((struct tui_win_element *)
winInfo->generic.content[i])->whichElement.dataWindow;
tui_delete_win (genWinInfo->handle);
genWinInfo->handle = (WINDOW *) NULL;
@@ -1336,7 +1338,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height)
** had to be destroyed to be made invisible.
*/
static void
-_makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
+_makeVisibleWithNewHeight (struct tui_win_info * winInfo)
{
struct symtab *s;
@@ -1350,7 +1352,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
tui_make_visible (winInfo->detail.sourceInfo.executionInfo);
if (winInfo->generic.content != (OpaquePtr) NULL)
{
- TuiLineOrAddress lineOrAddr;
+ union tui_line_or_address lineOrAddr;
struct symtab_and_line cursal
= get_current_source_symtab_and_line ();
@@ -1365,7 +1367,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
}
else if (deprecated_selected_frame != (struct frame_info *) NULL)
{
- TuiLineOrAddress line;
+ union tui_line_or_address line;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
@@ -1403,14 +1405,14 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
static int
-_newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
+_newHeightOk (struct tui_win_info * primaryWinInfo, int newHeight)
{
int ok = (newHeight < tui_term_height ());
if (ok)
{
int diff;
- TuiLayoutType curLayout = tui_current_layout ();
+ enum tui_layout_type curLayout = tui_current_layout ();
diff = (newHeight - primaryWinInfo->generic.height) * (-1);
if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
@@ -1423,10 +1425,10 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
newHeight >= MIN_WIN_HEIGHT));
if (ok)
{ /* check the total height */
- TuiWinInfoPtr winInfo;
+ struct tui_win_info * winInfo;
if (primaryWinInfo == cmdWin)
- winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ winInfo = (struct tui_win_info *) (tui_source_windows ())->list[0];
else
winInfo = cmdWin;
ok = ((newHeight +
@@ -1436,7 +1438,8 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
else
{
int curTotalHeight, totalHeight, minHeight = 0;
- TuiWinInfoPtr firstWin, secondWin;
+ struct tui_win_info *firstWin;
+ struct tui_win_info *secondWin;
if (curLayout == SRC_DISASSEM_COMMAND)
{
@@ -1446,7 +1449,7 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
else
{
firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ secondWin = (struct tui_win_info *) (tui_source_windows ())->list[0];
}
/*
** We could simply add all the heights to obtain the same result
@@ -1519,7 +1522,7 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
** _parseScrollingArgs().
*/
static void
-_parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll)
+_parseScrollingArgs (char *arg, struct tui_win_info * * winToScroll, int *numToScroll)
{
if (numToScroll)
*numToScroll = 0;
@@ -1572,12 +1575,12 @@ _parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll)
wname[i] = toupper (wname[i]);
*winToScroll = tui_partial_win_by_name (wname);
- if (*winToScroll == (TuiWinInfoPtr) NULL ||
+ if (*winToScroll == (struct tui_win_info *) NULL ||
!(*winToScroll)->generic.isVisible)
warning ("Invalid window specified. \n\
The window name specified must be valid and visible.\n");
else if (*winToScroll == cmdWin)
- *winToScroll = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
+ *winToScroll = (struct tui_win_info *) (tui_source_windows ())->list[0];
}
tuiFree (buf);
}
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index facea77..93993af 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -61,9 +61,9 @@ tuiFirstDataItemDisplayed (void)
for (i = 0; (i < dataWin->generic.contentSize && elementNo < 0); i++)
{
- TuiGenWinInfoPtr dataItemWin;
+ struct tui_gen_win_info * dataItemWin;
- dataItemWin = &((TuiWinContent)
+ dataItemWin = &((tui_win_content)
dataWin->generic.content)[i]->whichElement.dataWindow;
if (dataItemWin->handle != (WINDOW *) NULL && dataItemWin->isVisible)
elementNo = i;
@@ -106,11 +106,11 @@ void
tuiDeleteDataContentWindows (void)
{
int i;
- TuiGenWinInfoPtr dataItemWinPtr;
+ struct tui_gen_win_info * dataItemWinPtr;
for (i = 0; (i < dataWin->generic.contentSize); i++)
{
- dataItemWinPtr = &((TuiWinContent)
+ dataItemWinPtr = &((tui_win_content)
dataWin->generic.content)[i]->whichElement.dataWindow;
tui_delete_win (dataItemWinPtr->handle);
dataItemWinPtr->handle = (WINDOW *) NULL;
@@ -161,7 +161,7 @@ tui_display_all_data (void)
** Then display the other data
*/
if (dataWin->detail.dataDisplayInfo.dataContent !=
- (TuiWinContent) NULL &&
+ (tui_win_content) NULL &&
dataWin->detail.dataDisplayInfo.dataContentCount > 0)
{
}
@@ -275,12 +275,12 @@ tui_check_data_values (struct frame_info *frame)
{
#ifdef LATER
TuiDataElementPtr dataElementPtr;
- TuiGenWinInfoPtr dataItemWinPtr;
+ struct tui_gen_win_info * dataItemWinPtr;
Opaque newValue;
dataItemPtr = &dataWin->detail.dataDisplayInfo.
dataContent[i]->whichElement.dataWindow;
- dataElementPtr = &((TuiWinContent)
+ dataElementPtr = &((tui_win_content)
dataItemWinPtr->content)[0]->whichElement.data;
if value
has changed (dataElementPtr, frame, &newValue)
@@ -296,7 +296,7 @@ tui_check_data_values (struct frame_info *frame)
/* Scroll the data window vertically forward or backward. */
void
-tui_vertical_data_scroll (TuiScrollDirection scrollDirection, int numToScroll)
+tui_vertical_data_scroll (enum tui_scroll_direction scrollDirection, int numToScroll)
{
int firstElementNo;
int firstLine = (-1);
diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c
index cad7b9a..da3aaa6 100644
--- a/gdb/tui/tui-wingeneral.c
+++ b/gdb/tui/tui-wingeneral.c
@@ -42,7 +42,7 @@
/* Refresh the window. */
void
-tui_refresh_win (TuiGenWinInfoPtr winInfo)
+tui_refresh_win (struct tui_gen_win_info * winInfo)
{
if (winInfo->type == DATA_WIN && winInfo->contentSize > 0)
{
@@ -50,9 +50,9 @@ tui_refresh_win (TuiGenWinInfoPtr winInfo)
for (i = 0; (i < winInfo->contentSize); i++)
{
- TuiGenWinInfoPtr dataItemWinPtr;
+ struct tui_gen_win_info * dataItemWinPtr;
- dataItemWinPtr = &((TuiWinContent)
+ dataItemWinPtr = &((tui_win_content)
winInfo->content)[i]->whichElement.dataWindow;
if (m_genWinPtrNotNull (dataItemWinPtr) &&
dataItemWinPtr->handle != (WINDOW *) NULL)
@@ -86,7 +86,7 @@ tui_delete_win (WINDOW * window)
/* Draw a border arround the window. */
void
-boxWin (TuiGenWinInfoPtr winInfo, int highlightFlag)
+boxWin (struct tui_gen_win_info * winInfo, int highlightFlag)
{
if (winInfo && winInfo->handle)
{
@@ -112,11 +112,11 @@ boxWin (TuiGenWinInfoPtr winInfo, int highlightFlag)
void
-tui_unhighlight_win (TuiWinInfoPtr winInfo)
+tui_unhighlight_win (struct tui_win_info * winInfo)
{
if (m_winPtrNotNull (winInfo) && winInfo->generic.handle != (WINDOW *) NULL)
{
- boxWin ((TuiGenWinInfoPtr) winInfo, NO_HILITE);
+ boxWin ((struct tui_gen_win_info *) winInfo, NO_HILITE);
wrefresh (winInfo->generic.handle);
m_setWinHighlightOff (winInfo);
}
@@ -124,19 +124,19 @@ tui_unhighlight_win (TuiWinInfoPtr winInfo)
void
-tui_highlight_win (TuiWinInfoPtr winInfo)
+tui_highlight_win (struct tui_win_info * winInfo)
{
if (m_winPtrNotNull (winInfo) &&
winInfo->canHighlight && winInfo->generic.handle != (WINDOW *) NULL)
{
- boxWin ((TuiGenWinInfoPtr) winInfo, HILITE);
+ boxWin ((struct tui_gen_win_info *) winInfo, HILITE);
wrefresh (winInfo->generic.handle);
m_setWinHighlightOn (winInfo);
}
}
void
-tui_check_and_display_highlight_if_needed (TuiWinInfoPtr winInfo)
+tui_check_and_display_highlight_if_needed (struct tui_win_info * winInfo)
{
if (m_winPtrNotNull (winInfo) && winInfo->generic.type != CMD_WIN)
{
@@ -151,7 +151,7 @@ tui_check_and_display_highlight_if_needed (TuiWinInfoPtr winInfo)
void
-tui_make_window (TuiGenWinInfoPtr winInfo, int boxIt)
+tui_make_window (struct tui_gen_win_info * winInfo, int boxIt)
{
WINDOW *handle;
@@ -228,7 +228,7 @@ make_all_visible (int visible)
if (m_winIsSourceType ((winList[i])->generic.type))
make_visible ((winList[i])->detail.sourceInfo.executionInfo,
visible);
- make_visible ((TuiGenWinInfoPtr) winList[i], visible);
+ make_visible ((struct tui_gen_win_info *) winList[i], visible);
}
}
@@ -250,10 +250,10 @@ tui_make_all_invisible (void)
/* Function to refresh all the windows currently displayed. */
void
-tui_refresh_all (TuiWinInfoPtr * list)
+tui_refresh_all (struct tui_win_info * * list)
{
TuiWinType type;
- TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
{
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index 96279b7..5c145fc 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -75,8 +75,8 @@ tui_display_main (void)
/* Function to display source in the source window. This function
initializes the horizontal scroll to 0. */
void
-tui_update_source_window (TuiWinInfoPtr winInfo, struct symtab *s,
- TuiLineOrAddress lineOrAddr, int noerror)
+tui_update_source_window (struct tui_win_info * winInfo, struct symtab *s,
+ union tui_line_or_address lineOrAddr, int noerror)
{
winInfo->detail.sourceInfo.horizontalOffset = 0;
tui_update_source_window_as_is (winInfo, s, lineOrAddr, noerror);
@@ -88,8 +88,8 @@ tui_update_source_window (TuiWinInfoPtr winInfo, struct symtab *s,
/* Function to display source in the source/asm window. This function
shows the source as specified by the horizontal offset. */
void
-tui_update_source_window_as_is (TuiWinInfoPtr winInfo, struct symtab *s,
- TuiLineOrAddress lineOrAddr, int noerror)
+tui_update_source_window_as_is (struct tui_win_info * winInfo, struct symtab *s,
+ union tui_line_or_address lineOrAddr, int noerror)
{
TuiStatus ret;
@@ -139,7 +139,7 @@ tui_update_source_windows_with_addr (CORE_ADDR addr)
if (addr != 0)
{
struct symtab_and_line sal;
- TuiLineOrAddress l;
+ union tui_line_or_address l;
switch (tui_current_layout ())
{
@@ -163,7 +163,7 @@ tui_update_source_windows_with_addr (CORE_ADDR addr)
for (i = 0; i < (tui_source_windows ())->count; i++)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
+ struct tui_win_info * winInfo = (struct tui_win_info *) (tui_source_windows ())->list[i];
tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
tui_clear_exec_info_content (winInfo);
@@ -179,7 +179,7 @@ void
tui_update_source_windows_with_line (struct symtab *s, int line)
{
CORE_ADDR pc;
- TuiLineOrAddress l;
+ union tui_line_or_address l;
switch (tui_current_layout ())
{
@@ -203,7 +203,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
}
void
-tui_clear_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
+tui_clear_source_content (struct tui_win_info * winInfo, int displayPrompt)
{
if (m_winPtrNotNull (winInfo))
{
@@ -213,8 +213,8 @@ tui_clear_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
tui_erase_source_content (winInfo, displayPrompt);
for (i = 0; i < winInfo->generic.contentSize; i++)
{
- TuiWinElementPtr element =
- (TuiWinElementPtr) winInfo->generic.content[i];
+ struct tui_win_element * element =
+ (struct tui_win_element *) winInfo->generic.content[i];
element->whichElement.source.hasBreak = FALSE;
element->whichElement.source.isExecPoint = FALSE;
}
@@ -225,7 +225,7 @@ tui_clear_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
void
-tui_erase_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
+tui_erase_source_content (struct tui_win_info * winInfo, int displayPrompt)
{
int xPos;
int halfWidth = (winInfo->generic.width - 2) / 2;
@@ -266,12 +266,12 @@ tui_erase_source_content (TuiWinInfoPtr winInfo, int displayPrompt)
/* Redraw the complete line of a source or disassembly window. */
static void
-tui_show_source_line (TuiWinInfoPtr winInfo, int lineno)
+tui_show_source_line (struct tui_win_info * winInfo, int lineno)
{
- TuiWinElementPtr line;
+ struct tui_win_element * line;
int x, y;
- line = (TuiWinElementPtr) winInfo->generic.content[lineno - 1];
+ line = (struct tui_win_element *) winInfo->generic.content[lineno - 1];
if (line->whichElement.source.isExecPoint)
wattron (winInfo->generic.handle, A_STANDOUT);
@@ -290,7 +290,7 @@ tui_show_source_line (TuiWinInfoPtr winInfo, int lineno)
}
void
-tui_show_source_content (TuiWinInfoPtr winInfo)
+tui_show_source_content (struct tui_win_info * winInfo)
{
if (winInfo->generic.contentSize > 0)
{
@@ -310,8 +310,8 @@ tui_show_source_content (TuiWinInfoPtr winInfo)
/* Scroll the source forward or backward horizontally. */
void
-tui_horizontal_source_scroll (TuiWinInfoPtr winInfo,
- TuiScrollDirection direction,
+tui_horizontal_source_scroll (struct tui_win_info * winInfo,
+ enum tui_scroll_direction direction,
int numToScroll)
{
if (winInfo->generic.content != (OpaquePtr) NULL)
@@ -335,7 +335,7 @@ tui_horizontal_source_scroll (TuiWinInfoPtr winInfo,
}
winInfo->detail.sourceInfo.horizontalOffset = offset;
tui_update_source_window_as_is (winInfo, s,
- ((TuiWinElementPtr)
+ ((struct tui_win_element *)
winInfo->generic.content[0])->whichElement.source.lineOrAddr,
FALSE);
}
@@ -346,11 +346,11 @@ tui_horizontal_source_scroll (TuiWinInfoPtr winInfo,
/* Set or clear the hasBreak flag in the line whose line is lineNo. */
void
-tui_set_is_exec_point_at (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
+tui_set_is_exec_point_at (union tui_line_or_address l, struct tui_win_info * winInfo)
{
int changed = 0;
int i;
- TuiWinContent content = (TuiWinContent) winInfo->generic.content;
+ tui_win_content content = (tui_win_content) winInfo->generic.content;
i = 0;
while (i < winInfo->generic.contentSize)
@@ -379,12 +379,12 @@ tui_set_is_exec_point_at (TuiLineOrAddress l, TuiWinInfoPtr winInfo)
void
tui_update_all_breakpoint_info ()
{
- TuiList* list = tui_source_windows ();
+ struct tui_list *list = tui_source_windows ();
int i;
for (i = 0; i < list->count; i++)
{
- TuiWinInfoPtr win = (TuiWinInfoPtr) list->list[i];
+ struct tui_win_info * win = (struct tui_win_info *) list->list[i];
if (tui_update_breakpoint_info (win, FALSE))
{
@@ -399,20 +399,20 @@ tui_update_all_breakpoint_info ()
Returns 1 if something changed and the execution window
must be refreshed. */
int
-tui_update_breakpoint_info (TuiWinInfoPtr win, int current_only)
+tui_update_breakpoint_info (struct tui_win_info * win, int current_only)
{
int i;
int need_refresh = 0;
- TuiSourceInfoPtr src = &win->detail.sourceInfo;
+ struct tui_source_info * src = &win->detail.sourceInfo;
for (i = 0; i < win->generic.contentSize; i++)
{
struct breakpoint *bp;
extern struct breakpoint *breakpoint_chain;
int mode;
- TuiSourceElement* line;
+ struct tui_source_element* line;
- line = &((TuiWinElementPtr) win->generic.content[i])->whichElement.source;
+ line = &((struct tui_win_element *) win->generic.content[i])->whichElement.source;
if (current_only && !line->isExecPoint)
continue;
@@ -460,13 +460,13 @@ tui_update_breakpoint_info (TuiWinInfoPtr win, int current_only)
** disassembly window.
*/
TuiStatus
-tuiSetExecInfoContent (TuiWinInfoPtr winInfo)
+tuiSetExecInfoContent (struct tui_win_info * winInfo)
{
TuiStatus ret = TUI_SUCCESS;
- if (winInfo->detail.sourceInfo.executionInfo != (TuiGenWinInfoPtr) NULL)
+ if (winInfo->detail.sourceInfo.executionInfo != (struct tui_gen_win_info *) NULL)
{
- TuiGenWinInfoPtr execInfoPtr = winInfo->detail.sourceInfo.executionInfo;
+ struct tui_gen_win_info * execInfoPtr = winInfo->detail.sourceInfo.executionInfo;
if (execInfoPtr->content == (OpaquePtr) NULL)
execInfoPtr->content =
@@ -479,12 +479,12 @@ tuiSetExecInfoContent (TuiWinInfoPtr winInfo)
tui_update_breakpoint_info (winInfo, 1);
for (i = 0; i < winInfo->generic.contentSize; i++)
{
- TuiWinElementPtr element;
- TuiWinElementPtr srcElement;
+ struct tui_win_element * element;
+ struct tui_win_element * srcElement;
int mode;
- element = (TuiWinElementPtr) execInfoPtr->content[i];
- srcElement = (TuiWinElementPtr) winInfo->generic.content[i];
+ element = (struct tui_win_element *) execInfoPtr->content[i];
+ srcElement = (struct tui_win_element *) winInfo->generic.content[i];
memset(element->whichElement.simpleString, ' ',
sizeof(element->whichElement.simpleString));
@@ -522,9 +522,9 @@ tuiSetExecInfoContent (TuiWinInfoPtr winInfo)
** tuiShowExecInfoContent().
*/
void
-tuiShowExecInfoContent (TuiWinInfoPtr winInfo)
+tuiShowExecInfoContent (struct tui_win_info * winInfo)
{
- TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo;
+ struct tui_gen_win_info * execInfo = winInfo->detail.sourceInfo.executionInfo;
int curLine;
werase (execInfo->handle);
@@ -533,7 +533,7 @@ tuiShowExecInfoContent (TuiWinInfoPtr winInfo)
mvwaddstr (execInfo->handle,
curLine,
0,
- ((TuiWinElementPtr)
+ ((struct tui_win_element *)
execInfo->content[curLine - 1])->whichElement.simpleString);
tui_refresh_win (execInfo);
execInfo->contentInUse = TRUE;
@@ -543,9 +543,9 @@ tuiShowExecInfoContent (TuiWinInfoPtr winInfo)
void
-tui_erase_exec_info_content (TuiWinInfoPtr winInfo)
+tui_erase_exec_info_content (struct tui_win_info * winInfo)
{
- TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo;
+ struct tui_gen_win_info * execInfo = winInfo->detail.sourceInfo.executionInfo;
werase (execInfo->handle);
tui_refresh_win (execInfo);
@@ -554,7 +554,7 @@ tui_erase_exec_info_content (TuiWinInfoPtr winInfo)
}
void
-tui_clear_exec_info_content (TuiWinInfoPtr winInfo)
+tui_clear_exec_info_content (struct tui_win_info * winInfo)
{
winInfo->detail.sourceInfo.executionInfo->contentInUse = FALSE;
tui_erase_exec_info_content (winInfo);
@@ -564,7 +564,7 @@ tui_clear_exec_info_content (TuiWinInfoPtr winInfo)
/* Function to update the execution info window. */
void
-tui_update_exec_info (TuiWinInfoPtr winInfo)
+tui_update_exec_info (struct tui_win_info * winInfo)
{
tuiSetExecInfoContent (winInfo);
tuiShowExecInfoContent (winInfo);
@@ -605,7 +605,7 @@ tui_alloc_source_buffer (struct tui_win_info *winInfo)
}
}
for (i = 0; i < maxLines; i++)
- ((TuiWinElementPtr)
+ ((struct tui_win_element *)
winInfo->generic.content[i])->whichElement.source.line =
srcLineBuf + (lineWidth * i);
ret = TUI_SUCCESS;
@@ -620,7 +620,7 @@ tui_alloc_source_buffer (struct tui_win_info *winInfo)
/* Answer whether the a particular line number or address is displayed
in the current source window. */
int
-tui_line_is_displayed (int line, TuiWinInfoPtr winInfo,
+tui_line_is_displayed (int line, struct tui_win_info * winInfo,
int checkThreshold)
{
int isDisplayed = FALSE;
@@ -633,7 +633,7 @@ tui_line_is_displayed (int line, TuiWinInfoPtr winInfo,
i = 0;
while (i < winInfo->generic.contentSize - threshold && !isDisplayed)
{
- isDisplayed = (((TuiWinElementPtr)
+ isDisplayed = (((struct tui_win_element *)
winInfo->generic.content[i])->whichElement.source.lineOrAddr.lineNo
== (int) line);
i++;
@@ -646,7 +646,7 @@ tui_line_is_displayed (int line, TuiWinInfoPtr winInfo,
/* Answer whether the a particular line number or address is displayed
in the current source window. */
int
-tui_addr_is_displayed (CORE_ADDR addr, TuiWinInfoPtr winInfo,
+tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info * winInfo,
int checkThreshold)
{
int isDisplayed = FALSE;
@@ -659,7 +659,7 @@ tui_addr_is_displayed (CORE_ADDR addr, TuiWinInfoPtr winInfo,
i = 0;
while (i < winInfo->generic.contentSize - threshold && !isDisplayed)
{
- isDisplayed = (((TuiWinElementPtr)
+ isDisplayed = (((struct tui_win_element *)
winInfo->generic.content[i])->whichElement.source.lineOrAddr.addr
== addr);
i++;
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 596198f..038401c 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -137,8 +137,8 @@ tui_rl_change_windows (int notused1, int notused2)
if (tui_active)
{
- TuiLayoutType new_layout;
- TuiRegisterDisplayType regs_type = TUI_UNDEFINED_REGS;
+ enum tui_layout_type new_layout;
+ enum tui_register_display_type regs_type = TUI_UNDEFINED_REGS;
new_layout = tui_current_layout ();
@@ -185,8 +185,8 @@ tui_rl_delete_other_windows (int notused1, int notused2)
if (tui_active)
{
- TuiLayoutType new_layout;
- TuiRegisterDisplayType regs_type = TUI_UNDEFINED_REGS;
+ enum tui_layout_type new_layout;
+ enum tui_register_display_type regs_type = TUI_UNDEFINED_REGS;
new_layout = tui_current_layout ();
@@ -215,7 +215,7 @@ tui_rl_delete_other_windows (int notused1, int notused2)
static int
tui_rl_other_window (int count, int key)
{
- TuiWinInfoPtr winInfo;
+ struct tui_win_info * winInfo;
if (!tui_active)
tui_rl_switch_mode (0/*notused*/, 0/*notused*/);