* tui/tui-data.h (struct tui_list): Rename _TuiList.
(enum tui_data_type): Rename _TuiDataType.
(struct tui_layout_def): Rename _TuiLayoutDef.
(struct tui_source_element): Rename _TuiSourceElement.
(struct tui_data_element): Rename _TuiDataElement.
(struct tui_command_element): Rename _TuiCommandElement.
(struct tui_locator_element): Rename _TuiLocatorElement.
(union tui_which_element): Define.
(struct tui_win_element): Rename _TuiWinElement.
(struct tui_data_info): Rename _TuiDataInfo.
(struct tui_source_info): Rename _TuiSourceInfo.
(struct tui_command_info): Rename _TuiCommandInfo.
(tui_initialize_static_data): Rename initializeStaticData.
(tui_alloc_generic_win_info): Rename allocGenericWinInfo.
(tui_alloc_win_info): Rename allocWinInfo.
(tui_init_generic_part): Rename initGenericPart.
(tui_init_win_info): Rename initWinInfo.
(tui_alloc_content): Rename allocContent.
(tui_add_content_elements): Rename addContentElements.
(tui_init_content_element): Rename initContentElement.
(tui_free_window): Rename freeWindow.
(tui_free_win_content): Rename freeWinContent.
(tui_free_data_content): Rename freeDataContent.
(tui_free_all_source_wins_content): Rename
freeAllSourceWinsContent.
(tui_del_window): Rename tuiDelWindow.
(tui_del_data_windows): Rename tuiDelDataWindows.
(tui_partial_win_by_name): Rename partialWinByName.
(tui_win_name): Rename winName.
(tui_current_layout): Rename currentLayout.
(tui_set_current_layout_to): Rename setCurrentLayoutTo.
(tui_term_height): Rename termHeight.
(tui_set_term_height_to): Rename setTermHeightTo.
(tui_term_width): Rename termWidth.
(tui_set_term_width_to): Rename setTermWidthTo.
(tui_set_gen_win_origin): Rename setGenWinOrigin.
(tui_locator_win_info_ptr): Rename locatorWinInfoPtr.
(tui_source_exec_info_win_ptr): Rename tui_gen_win_info.
(tui_disassem_exec_info_win_ptr): Rename disassemExecInfoWinPtr.
(tui_source_windows): Rename sourceWindows.
(tui_clear_source_windows): Rename clearSourceWindows.
(tui_clear_source_windows_detail): Rename
clearSourceWindowsDetail.
(tui_clear_win_detail): Rename clearWinDetail.
(tui_add_to_source_windows): Rename tuiAddToSourceWindows.
(tui_default_tab_len): Rename tuiDefaultTabLen.
(tui_set_default_tab_len): Rename tuiSetDefaultTabLen.
(tui_win_with_focus): Rename tuiWinWithFocus.
(tui_set_win_with_focus): Rename tuiSetWinWithFocus.
(tui_layout_def): Rename tuiLayoutDef.
(tui_win_resized): Rename tuiWinResized.
(tui_set_win_resized_to): Rename tuiSetWinResizedTo.
(tui_next_win): Rename tuiNextWin.
(tui_prev_win): Rename tuiPrevWin.
(tui_add_to_source_windows): Rename addToSourceWindows.
* tui/tui-winsource.c, tui/tui-win.c: Update references.
* tui/tui-layout.c, tui/tui-source.c: Ditto.
* tui/tui-stack.c, tui/tui-io.c: Ditto.
* tui/tui.c, tui/tui-data.c: Ditto.
* tui/tui-interp.c, tui/tui-data.c: Ditto.
* tui/tui-disasm.c, tui/tui-command.c: Ditto.
2004-02-06 Andrew Cagney <cagney@redhat.com>
+ * tui/tui-data.h (struct tui_list): Rename _TuiList.
+ (enum tui_data_type): Rename _TuiDataType.
+ (struct tui_layout_def): Rename _TuiLayoutDef.
+ (struct tui_source_element): Rename _TuiSourceElement.
+ (struct tui_data_element): Rename _TuiDataElement.
+ (struct tui_command_element): Rename _TuiCommandElement.
+ (struct tui_locator_element): Rename _TuiLocatorElement.
+ (union tui_which_element): Define.
+ (struct tui_win_element): Rename _TuiWinElement.
+ (struct tui_data_info): Rename _TuiDataInfo.
+ (struct tui_source_info): Rename _TuiSourceInfo.
+ (struct tui_command_info): Rename _TuiCommandInfo.
+ (tui_initialize_static_data): Rename initializeStaticData.
+ (tui_alloc_generic_win_info): Rename allocGenericWinInfo.
+ (tui_alloc_win_info): Rename allocWinInfo.
+ (tui_init_generic_part): Rename initGenericPart.
+ (tui_init_win_info): Rename initWinInfo.
+ (tui_alloc_content): Rename allocContent.
+ (tui_add_content_elements): Rename addContentElements.
+ (tui_init_content_element): Rename initContentElement.
+ (tui_free_window): Rename freeWindow.
+ (tui_free_win_content): Rename freeWinContent.
+ (tui_free_data_content): Rename freeDataContent.
+ (tui_free_all_source_wins_content): Rename
+ freeAllSourceWinsContent.
+ (tui_del_window): Rename tuiDelWindow.
+ (tui_del_data_windows): Rename tuiDelDataWindows.
+ (tui_partial_win_by_name): Rename partialWinByName.
+ (tui_win_name): Rename winName.
+ (tui_current_layout): Rename currentLayout.
+ (tui_set_current_layout_to): Rename setCurrentLayoutTo.
+ (tui_term_height): Rename termHeight.
+ (tui_set_term_height_to): Rename setTermHeightTo.
+ (tui_term_width): Rename termWidth.
+ (tui_set_term_width_to): Rename setTermWidthTo.
+ (tui_set_gen_win_origin): Rename setGenWinOrigin.
+ (tui_locator_win_info_ptr): Rename locatorWinInfoPtr.
+ (tui_source_exec_info_win_ptr): Rename tui_gen_win_info.
+ (tui_disassem_exec_info_win_ptr): Rename disassemExecInfoWinPtr.
+ (tui_source_windows): Rename sourceWindows.
+ (tui_clear_source_windows): Rename clearSourceWindows.
+ (tui_clear_source_windows_detail): Rename
+ clearSourceWindowsDetail.
+ (tui_clear_win_detail): Rename clearWinDetail.
+ (tui_add_to_source_windows): Rename tuiAddToSourceWindows.
+ (tui_default_tab_len): Rename tuiDefaultTabLen.
+ (tui_set_default_tab_len): Rename tuiSetDefaultTabLen.
+ (tui_win_with_focus): Rename tuiWinWithFocus.
+ (tui_set_win_with_focus): Rename tuiSetWinWithFocus.
+ (tui_layout_def): Rename tuiLayoutDef.
+ (tui_win_resized): Rename tuiWinResized.
+ (tui_set_win_resized_to): Rename tuiSetWinResizedTo.
+ (tui_next_win): Rename tuiNextWin.
+ (tui_prev_win): Rename tuiPrevWin.
+ (tui_add_to_source_windows): Rename addToSourceWindows.
+ * tui/tui-winsource.c, tui/tui-win.c: Update references.
+ * tui/tui-layout.c, tui/tui-source.c: Ditto.
+ * tui/tui-stack.c, tui/tui-io.c: Ditto.
+ * tui/tui.c, tui/tui-data.c: Ditto.
+ * tui/tui-interp.c, tui/tui-data.c: Ditto.
+ * tui/tui-disasm.c, tui/tui-command.c: Ditto.
+
* tui/tui-source.h: Update copyright. Include "tui-data.h".
(struct symtab): Declare.
(tui_set_source_content): Rename tuiSetSourceContent.
unsigned int
tui_dispatch_ctrl_char (unsigned int ch)
{
- TuiWinInfoPtr winInfo = tuiWinWithFocus ();
+ TuiWinInfoPtr winInfo = tui_win_with_focus ();
WINDOW *w = cmdWin->generic.handle;
/*
** ACCESSORS & MUTATORS FOR PRIVATE DATA
******************************************/
-/*
- ** tuiWinResized().
- ** Answer a whether the terminal window has been resized or not
- */
+/* Answer a whether the terminal window has been resized or not. */
int
-tuiWinResized (void)
+tui_win_resized (void)
{
return _winResized;
-} /* tuiWinResized */
+}
-/*
- ** tuiSetWinResized().
- ** Set a whether the terminal window has been resized or not
- */
+/* Set a whether the terminal window has been resized or not. */
void
-tuiSetWinResizedTo (int resized)
+tui_set_win_resized_to (int resized)
{
_winResized = resized;
-
- return;
-} /* tuiSetWinResizedTo */
+}
-/*
- ** tuiLayoutDef().
- ** Answer a pointer to the current layout definition
- */
+/* Answer a pointer to the current layout definition. */
TuiLayoutDefPtr
-tuiLayoutDef (void)
+tui_layout_def (void)
{
return &_layoutDef;
-} /* tuiLayoutDef */
+}
-/*
- ** tuiWinWithFocus().
- ** Answer the window with the logical focus
- */
+/* Answer the window with the logical focus. */
TuiWinInfoPtr
-tuiWinWithFocus (void)
+tui_win_with_focus (void)
{
return _winWithFocus;
-} /* tuiWinWithFocus */
+}
-/*
- ** tuiSetWinWithFocus().
- ** Set the window that has the logical focus
- */
+/* Set the window that has the logical focus. */
void
-tuiSetWinWithFocus (TuiWinInfoPtr winInfo)
+tui_set_win_with_focus (TuiWinInfoPtr winInfo)
{
_winWithFocus = winInfo;
-
- return;
-} /* tuiSetWinWithFocus */
+}
-/*
- ** tuiDefaultTabLen().
- ** Answer the length in chars, of tabs
- */
+/* Answer the length in chars, of tabs. */
int
-tuiDefaultTabLen (void)
+tui_default_tab_len (void)
{
return _defaultTabLen;
-} /* tuiDefaultTabLen */
+}
-/*
- ** tuiSetDefaultTabLen().
- ** Set the length in chars, of tabs
- */
+/* Set the length in chars, of tabs. */
void
-tuiSetDefaultTabLen (int len)
+tui_set_default_tab_len (int len)
{
_defaultTabLen = len;
-
- return;
-} /* tuiSetDefaultTabLen */
+}
/*
** be displayed at the same time.
*/
TuiListPtr
-sourceWindows (void)
+tui_source_windows (void)
{
return &_sourceWindows;
-} /* currentSourceWindows */
+}
-/*
- ** clearSourceWindows()
- ** Clear the list of source windows. Usually there is only one
- ** source window (either source or disassembly), but both can be
- ** displayed at the same time.
- */
+/* Clear the list of source windows. Usually there is only one source
+ window (either source or disassembly), but both can be displayed at
+ the same time. */
void
-clearSourceWindows (void)
+tui_clear_source_windows (void)
{
_sourceWindows.list[0] = (Opaque) NULL;
_sourceWindows.list[1] = (Opaque) NULL;
_sourceWindows.count = 0;
-
- return;
-} /* currentSourceWindows */
+}
-/*
- ** clearSourceWindowsDetail()
- ** Clear the pertinant detail in the source windows.
- */
+/* Clear the pertinant detail in the source windows. */
void
-clearSourceWindowsDetail (void)
+tui_clear_source_windows_detail (void)
{
int i;
- for (i = 0; i < (sourceWindows ())->count; i++)
- clearWinDetail ((TuiWinInfoPtr) (sourceWindows ())->list[i]);
-
- return;
-} /* currentSourceWindows */
+ for (i = 0; i < (tui_source_windows ())->count; i++)
+ tui_clear_win_detail ((TuiWinInfoPtr) (tui_source_windows ())->list[i]);
+}
-/*
- ** addSourceWindowToList().
- ** Add a window to the list of source windows. Usually there is
- ** only one source window (either source or disassembly), but
- ** both can be displayed at the same time.
- */
+/* Add a window to the list of source windows. Usually there is only
+ one source window (either source or disassembly), but both can be
+ displayed at the same time. */
void
-addToSourceWindows (TuiWinInfoPtr winInfo)
+tui_add_to_source_windows (TuiWinInfoPtr winInfo)
{
if (_sourceWindows.count < 2)
_sourceWindows.list[_sourceWindows.count++] = (Opaque) winInfo;
-
- return;
-} /* addToSourceWindows */
+}
-/*
- ** clearWinDetail()
- ** Clear the pertinant detail in the windows.
- */
+/* Clear the pertinant detail in the windows. */
void
-clearWinDetail (TuiWinInfoPtr winInfo)
+tui_clear_win_detail (TuiWinInfoPtr winInfo)
{
if (m_winPtrNotNull (winInfo))
{
** Accessor for the source execution info ptr.
*/
TuiGenWinInfoPtr
-sourceExecInfoWinPtr (void)
+tui_source_exec_info_win_ptr (void)
{
return &_execInfo[0];
} /* sourceExecInfoWinPtr */
** Accessor for the disassem execution info ptr.
*/
TuiGenWinInfoPtr
-disassemExecInfoWinPtr (void)
+tui_disassem_exec_info_win_ptr (void)
{
return &_execInfo[1];
} /* disassemExecInfoWinPtr */
-/*
- ** locatorWinInfoPtr().
- ** Accessor for the locator win info. Answers a pointer to the
- ** static locator win info struct.
- */
+/* Accessor for the locator win info. Answers a pointer to the static
+ locator win info struct. */
TuiGenWinInfoPtr
-locatorWinInfoPtr (void)
+tui_locator_win_info_ptr (void)
{
return &_locator;
} /* locatorWinInfoPtr */
-/*
- ** termHeight().
- ** Accessor for the termHeight
- */
+/* Accessor for the termHeight. */
int
-termHeight (void)
+tui_term_height (void)
{
return _termHeight;
-} /* termHeight */
+}
-/*
- ** setTermHeightTo().
- ** Mutator for the term height
- */
+/* Mutator for the term height. */
void
-setTermHeightTo (int h)
+tui_set_term_height_to (int h)
{
_termHeight = h;
-
- return;
-} /* setTermHeightTo */
+}
-/*
- ** termWidth().
- ** Accessor for the termWidth
- */
+/* Accessor for the termWidth. */
int
-termWidth (void)
+tui_term_width (void)
{
return _termWidth;
-} /* termWidth */
+}
-/*
- ** setTermWidth().
- ** Mutator for the termWidth
- */
+/* Mutator for the termWidth. */
void
-setTermWidthTo (int w)
+tui_set_term_width_to (int w)
{
_termWidth = w;
-
- return;
-} /* setTermWidthTo */
+}
-/*
- ** currentLayout().
- ** Accessor for the current layout
- */
+/* Accessor for the current layout. */
TuiLayoutType
-currentLayout (void)
+tui_current_layout (void)
{
return _currentLayout;
-} /* currentLayout */
+}
-/*
- ** setCurrentLayoutTo().
- ** Mutator for the current layout
- */
+/* Mutator for the current layout. */
void
-setCurrentLayoutTo (TuiLayoutType newLayout)
+tui_set_current_layout_to (TuiLayoutType newLayout)
{
_currentLayout = newLayout;
-
- return;
-} /* setCurrentLayoutTo */
+}
/*
*****************************/
-/*
- ** tuiNextWin().
- ** Answer the next window in the list, cycling back to the top
- ** if necessary
- */
+/* Answer the next window in the list, cycling back to the top if
+ necessary. */
TuiWinInfoPtr
-tuiNextWin (TuiWinInfoPtr curWin)
+tui_next_win (TuiWinInfoPtr curWin)
{
TuiWinType type = curWin->generic.type;
TuiWinInfoPtr nextWin = (TuiWinInfoPtr) NULL;
} /* tuiNextWin */
-/*
- ** tuiPrevWin().
- ** Answer the prev window in the list, cycling back to the bottom
- ** if necessary
- */
+/* Answer the prev window in the list, cycling back to the bottom if
+ necessary. */
TuiWinInfoPtr
-tuiPrevWin (TuiWinInfoPtr curWin)
+tui_prev_win (TuiWinInfoPtr curWin)
{
TuiWinType type = curWin->generic.type;
TuiWinInfoPtr prev = (TuiWinInfoPtr) NULL;
}
-/*
- ** partialWinByName().
- ** Answer the window represented by name
- */
+/* Answer the window represented by name. */
TuiWinInfoPtr
-partialWinByName (char *name)
+tui_partial_win_by_name (char *name)
{
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
{
if (winList[i] != 0)
{
- char *curName = winName (&winList[i]->generic);
+ char *curName = tui_win_name (&winList[i]->generic);
if (strlen (name) <= strlen (curName) &&
strncmp (name, curName, strlen (name)) == 0)
winInfo = winList[i];
** Answer the name of the window
*/
char *
-winName (TuiGenWinInfoPtr winInfo)
+tui_win_name (TuiGenWinInfoPtr winInfo)
{
char *name = (char *) NULL;
} /* winName */
-/*
- ** initializeStaticData
- */
void
-initializeStaticData (void)
+tui_initialize_static_data (void)
{
- initGenericPart (sourceExecInfoWinPtr ());
- initGenericPart (disassemExecInfoWinPtr ());
- initGenericPart (locatorWinInfoPtr ());
-
- return;
-} /* initializeStaticData */
+ tui_init_generic_part (tui_source_exec_info_win_ptr ());
+ tui_init_generic_part (tui_disassem_exec_info_win_ptr ());
+ tui_init_generic_part (tui_locator_win_info_ptr ());
+}
-/*
- ** allocGenericWinInfo().
- */
TuiGenWinInfoPtr
-allocGenericWinInfo (void)
+tui_alloc_generic_win_info (void)
{
TuiGenWinInfoPtr win;
if ((win = (TuiGenWinInfoPtr) xmalloc (
sizeof (TuiGenWinInfoPtr))) != (TuiGenWinInfoPtr) NULL)
- initGenericPart (win);
+ tui_init_generic_part (win);
return win;
} /* allocGenericWinInfo */
** initGenericPart().
*/
void
-initGenericPart (TuiGenWinInfoPtr win)
+tui_init_generic_part (TuiGenWinInfoPtr win)
{
win->width =
win->height =
element->whichElement.source.hasBreak = FALSE;
break;
case DATA_WIN:
- initGenericPart (&element->whichElement.dataWindow);
+ tui_init_generic_part (&element->whichElement.dataWindow);
element->whichElement.dataWindow.type = DATA_ITEM_WIN;
((TuiGenWinInfoPtr) & element->whichElement.dataWindow)->content =
- (OpaquePtr) allocContent (1, DATA_ITEM_WIN);
+ (OpaquePtr) tui_alloc_content (1, DATA_ITEM_WIN);
((TuiGenWinInfoPtr)
& element->whichElement.dataWindow)->contentSize = 1;
break;
void
initWinInfo (TuiWinInfoPtr winInfo)
{
- initGenericPart (&winInfo->generic);
+ tui_init_generic_part (&winInfo->generic);
winInfo->canHighlight =
winInfo->isHighlighted = FALSE;
switch (winInfo->generic.type)
} /* initWinInfo */
-/*
- ** allocWinInfo().
- */
TuiWinInfoPtr
-allocWinInfo (TuiWinType type)
+tui_alloc_win_info (TuiWinType type)
{
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
** Allocates the content and elements in a block.
*/
TuiWinContent
-allocContent (int numElements, TuiWinType type)
+tui_alloc_content (int numElements, TuiWinType type)
{
TuiWinContent content = (TuiWinContent) NULL;
char *elementBlockPtr = (char *) NULL;
} /* allocContent */
-/*
- ** addContentElements().
- ** Adds the input number of elements to the windows's content. If
- ** no content has been allocated yet, allocContent() is called to
- ** do this. The index of the first element added is returned,
- ** unless there is a memory allocation error, in which case, (-1)
- ** is returned.
- */
+/* Adds the input number of elements to the windows's content. If no
+ content has been allocated yet, allocContent() is called to do
+ this. The index of the first element added is returned, unless
+ there is a memory allocation error, in which case, (-1) is
+ returned. */
int
-addContentElements (TuiGenWinInfoPtr winInfo, int numElements)
+tui_add_content_elements (TuiGenWinInfoPtr winInfo, int numElements)
{
TuiWinElementPtr elementPtr;
int i, indexStart;
if (winInfo->content == (OpaquePtr) NULL)
{
- winInfo->content = (OpaquePtr) allocContent (numElements, winInfo->type);
+ winInfo->content = (OpaquePtr) tui_alloc_content (numElements, winInfo->type);
indexStart = 0;
}
else
{
case SRC_WIN:
case DISASSEM_WIN:
- genericWin = locatorWinInfoPtr ();
+ genericWin = tui_locator_win_info_ptr ();
if (genericWin != (TuiGenWinInfoPtr) NULL)
{
tui_delete_win (genericWin->handle);
case DATA_WIN:
if (winInfo->generic.content != (OpaquePtr) NULL)
{
- tuiDelDataWindows (winInfo->detail.dataDisplayInfo.regsContent,
- winInfo->detail.dataDisplayInfo.regsContentCount);
- tuiDelDataWindows (winInfo->detail.dataDisplayInfo.dataContent,
- winInfo->detail.dataDisplayInfo.dataContentCount);
+ tui_del_data_windows (winInfo->detail.dataDisplayInfo.regsContent,
+ winInfo->detail.dataDisplayInfo.regsContentCount);
+ tui_del_data_windows (winInfo->detail.dataDisplayInfo.dataContent,
+ winInfo->detail.dataDisplayInfo.dataContentCount);
}
break;
default:
}
-/*
- ** freeWindow().
- */
void
-freeWindow (TuiWinInfoPtr winInfo)
+tui_free_window (TuiWinInfoPtr winInfo)
{
TuiGenWinInfoPtr genericWin;
{
case SRC_WIN:
case DISASSEM_WIN:
- genericWin = locatorWinInfoPtr ();
+ genericWin = tui_locator_win_info_ptr ();
if (genericWin != (TuiGenWinInfoPtr) NULL)
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
}
- freeWinContent (genericWin);
+ tui_free_win_content (genericWin);
if (winInfo->detail.sourceInfo.filename)
{
xfree (winInfo->detail.sourceInfo.filename);
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
- freeWinContent (genericWin);
+ tui_free_win_content (genericWin);
}
break;
case DATA_WIN:
if (winInfo->generic.content != (OpaquePtr) NULL)
{
- freeDataContent (
- winInfo->detail.dataDisplayInfo.regsContent,
- winInfo->detail.dataDisplayInfo.regsContentCount);
+ tui_free_data_content (winInfo->detail.dataDisplayInfo.regsContent,
+ winInfo->detail.dataDisplayInfo.regsContentCount);
winInfo->detail.dataDisplayInfo.regsContent =
(TuiWinContent) NULL;
winInfo->detail.dataDisplayInfo.regsContentCount = 0;
- freeDataContent (
- winInfo->detail.dataDisplayInfo.dataContent,
- winInfo->detail.dataDisplayInfo.dataContentCount);
+ tui_free_data_content (winInfo->detail.dataDisplayInfo.dataContent,
+ winInfo->detail.dataDisplayInfo.dataContentCount);
winInfo->detail.dataDisplayInfo.dataContent =
(TuiWinContent) NULL;
winInfo->detail.dataDisplayInfo.dataContentCount = 0;
{
tui_delete_win (winInfo->generic.handle);
winInfo->generic.handle = (WINDOW *) NULL;
- freeWinContent (&winInfo->generic);
+ tui_free_win_content (&winInfo->generic);
}
if (winInfo->generic.title)
xfree (winInfo->generic.title);
}
-/*
- ** freeAllSourceWinsContent().
- */
void
-freeAllSourceWinsContent (void)
+tui_free_all_source_wins_content (void)
{
int i;
- for (i = 0; i < (sourceWindows ())->count; i++)
+ for (i = 0; i < (tui_source_windows ())->count; i++)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
+ TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
if (m_winPtrNotNull (winInfo))
{
- freeWinContent (&(winInfo->generic));
- freeWinContent (winInfo->detail.sourceInfo.executionInfo);
+ tui_free_win_content (&(winInfo->generic));
+ tui_free_win_content (winInfo->detail.sourceInfo.executionInfo);
}
}
-
- return;
-} /* freeAllSourceWinsContent */
+}
-/*
- ** freeWinContent().
- */
void
-freeWinContent (TuiGenWinInfoPtr winInfo)
+tui_free_win_content (TuiGenWinInfoPtr winInfo)
{
if (winInfo->content != (OpaquePtr) NULL)
{
void
-tuiDelDataWindows (TuiWinContent content, int contentSize)
+tui_del_data_windows (TuiWinContent content, int contentSize)
{
int i;
genericWin->isVisible = FALSE;
}
}
-
- return;
-} /* tuiDelDataWindows */
+}
void
-freeDataContent (TuiWinContent content, int contentSize)
+tui_free_data_content (TuiWinContent content, int contentSize)
{
int i;
{
tui_delete_win (genericWin->handle);
genericWin->handle = (WINDOW *) NULL;
- freeWinContent (genericWin);
+ tui_free_win_content (genericWin);
}
}
freeContent (content,
/* General list struct */
-typedef struct _TuiList
+typedef struct tui_list
{
OpaqueList list;
int count;
TuiLayoutType, *TuiLayoutTypePtr;
/* Basic data types that can be displayed in the data window. */
-typedef enum _TuiDataType
+typedef enum tui_data_type
{
TUI_REGISTER,
TUI_SCALAR,
TuiLineOrAddress, *TuiLineOrAddressPtr;
/* Current Layout definition */
-typedef struct _TuiLayoutDef
+typedef struct tui_layout_def
{
TuiWinType displayMode;
int split;
TuiLayoutDef, *TuiLayoutDefPtr;
/* Elements in the Source/Disassembly Window */
-typedef struct _TuiSourceElement
+typedef struct tui_source_element
{
char *line;
TuiLineOrAddress lineOrAddr;
/* Elements in the data display window content */
-typedef struct _TuiDataElement
+typedef struct tui_data_element
{
const char *name;
int itemNo; /* the register number, or data display number */
/* Elements in the command window content */
-typedef struct _TuiCommandElement
+typedef struct tui_command_element
{
char *line;
}
#define MAX_LOCATOR_ELEMENT_LEN 100
/* Elements in the locator window content */
-typedef struct _TuiLocatorElement
+typedef struct tui_locator_element
{
char fileName[MAX_LOCATOR_ELEMENT_LEN];
char procName[MAX_LOCATOR_ELEMENT_LEN];
typedef char TuiExecInfoContent[TUI_EXECINFO_SIZE];
/* An content element in a window */
-typedef union
+typedef union tui_which_element
{
TuiSourceElement source; /* the source elements */
TuiGenWinInfo dataWindow; /* data display elements */
}
TuiWhichElement, *TuiWhichElementPtr;
-typedef struct _TuiWinElement
+typedef struct tui_win_element
{
int highlight;
TuiWhichElement whichElement;
/* This struct defines the specific information about a data display window */
-typedef struct _TuiDataInfo
+typedef struct tui_data_info
{
TuiWinContent dataContent; /* start of data display content */
int dataContentCount;
TuiDataInfo, *TuiDataInfoPtr;
-typedef struct _TuiSourceInfo
+typedef struct tui_source_info
{
int hasLocator; /* Does locator belongs to this window? */
TuiGenWinInfoPtr executionInfo; /* execution information window */
TuiSourceInfo, *TuiSourceInfoPtr;
-typedef struct _TuiCommandInfo
+typedef struct tui_command_info
{
int curLine; /* The current line position */
int curch; /* The current cursor position */
#define cmdWin winList[CMD_WIN]
/* Data Manipulation Functions */
-extern void initializeStaticData (void);
-extern TuiGenWinInfoPtr allocGenericWinInfo (void);
-extern TuiWinInfoPtr allocWinInfo (TuiWinType);
-extern void initGenericPart (TuiGenWinInfoPtr);
-extern void initWinInfo (TuiWinInfoPtr);
-extern TuiWinContent allocContent (int, TuiWinType);
-extern int addContentElements (TuiGenWinInfoPtr, int);
-extern void initContentElement (TuiWinElementPtr, TuiWinType);
-extern void freeWindow (TuiWinInfoPtr);
-extern void freeWinContent (TuiGenWinInfoPtr);
-extern void freeDataContent (TuiWinContent, int);
-extern void freeAllSourceWinsContent (void);
-extern void tuiDelWindow (TuiWinInfoPtr);
-extern void tuiDelDataWindows (TuiWinContent, int);
-extern TuiWinInfoPtr partialWinByName (char *);
-extern char *winName (TuiGenWinInfoPtr);
-extern TuiLayoutType currentLayout (void);
-extern void setCurrentLayoutTo (TuiLayoutType);
-extern int termHeight (void);
-extern void setTermHeightTo (int);
-extern int termWidth (void);
-extern void setTermWidthTo (int);
-extern void setGenWinOrigin (TuiGenWinInfoPtr, int, int);
-extern TuiGenWinInfoPtr locatorWinInfoPtr (void);
-extern TuiGenWinInfoPtr sourceExecInfoWinPtr (void);
-extern TuiGenWinInfoPtr disassemExecInfoWinPtr (void);
-extern TuiListPtr sourceWindows (void);
-extern void clearSourceWindows (void);
-extern void clearSourceWindowsDetail (void);
-extern void clearWinDetail (TuiWinInfoPtr winInfo);
-extern void tuiAddToSourceWindows (TuiWinInfoPtr);
-extern int tuiDefaultTabLen (void);
-extern void tuiSetDefaultTabLen (int);
-extern TuiWinInfoPtr tuiWinWithFocus (void);
-extern void tuiSetWinWithFocus (TuiWinInfoPtr);
-extern TuiLayoutDefPtr tuiLayoutDef (void);
-extern int tuiWinResized (void);
-extern void tuiSetWinResizedTo (int);
-
-extern TuiWinInfoPtr tuiNextWin (TuiWinInfoPtr);
-extern TuiWinInfoPtr tuiPrevWin (TuiWinInfoPtr);
-
-extern void addToSourceWindows (TuiWinInfoPtr winInfo);
+extern void tui_initialize_static_data (void);
+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 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_all_source_wins_content (void);
+extern void tui_del_window (struct tui_win_info *);
+extern void tui_del_data_windows (TuiWinContent, 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 int tui_term_height (void);
+extern void tui_set_term_height_to (int);
+extern int tui_term_width (void);
+extern void tui_set_term_width_to (int);
+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 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);
+extern void tui_add_to_source_windows (struct tui_win_info *);
+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 int tui_win_resized (void);
+extern void tui_set_win_resized_to (int);
+
+extern struct tui_win_info *tui_next_win (struct tui_win_info *);
+extern struct tui_win_info *tui_prev_win (struct tui_win_info *);
+
+extern void tui_add_to_source_windows (struct tui_win_info * winInfo);
#endif /* TUI_DATA_H */
register int offset = disassemWin->detail.sourceInfo.horizontalOffset;
register int lineWidth, maxLines;
CORE_ADDR cur_pc;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- int tab_len = tuiDefaultTabLen ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ int tab_len = tui_default_tab_len ();
struct tui_asm_line* lines;
int insn_pos;
int addr_size, max_size;
tui_show_disassem (CORE_ADDR startAddr)
{
struct symtab *s = find_pc_symtab (startAddr);
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
+ TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
TuiLineOrAddress val;
val.addr = startAddr;
** if the focus was in the src win, put it in the asm win, if the
** source view isn't split
*/
- if (currentLayout () != SRC_DISASSEM_COMMAND && winWithFocus == srcWin)
+ if (tui_current_layout () != SRC_DISASSEM_COMMAND && winWithFocus == srcWin)
tui_set_win_focus_to (disassemWin);
return;
struct symtab_and_line sal;
tui_show_disassem (startAddr);
- if (currentLayout () == SRC_DISASSEM_COMMAND)
+ if (tui_current_layout () == SRC_DISASSEM_COMMAND)
{
TuiLineOrAddress val;
TuiLocatorElementPtr element;
CORE_ADDR addr;
- locator = locatorWinInfoPtr ();
+ locator = tui_locator_win_info_ptr ();
element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator;
if (element->addr == 0)
/* Install exit handler to leave the screen in a good shape. */
atexit (tui_exit);
- initializeStaticData ();
+ tui_initialize_static_data ();
tui_initialize_io ();
tui_initialize_readline ();
static unsigned int
_tuiHandleResizeDuringIO (unsigned int originalCh)
{
- if (tuiWinResized ())
+ if (tui_win_resized ())
{
tui_refresh_all_win ();
dont_repeat ();
- tuiSetWinResizedTo (FALSE);
+ tui_set_win_resized_to (FALSE);
return '\n';
}
else
static void
showLayout (TuiLayoutType layout)
{
- TuiLayoutType curLayout = currentLayout ();
+ TuiLayoutType curLayout = tui_current_layout ();
if (layout != curLayout)
{
** should free the content and reallocate on next display of
** source/asm
*/
- freeAllSourceWinsContent ();
- clearSourceWindows ();
+ tui_free_all_source_wins_content ();
+ tui_clear_source_windows ();
if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND)
{
_showData (layout);
{
/* First make the current layout be invisible */
tui_make_all_invisible ();
- tui_make_invisible (locatorWinInfoPtr ());
+ tui_make_invisible (tui_locator_win_info_ptr ());
switch (layout)
{
/* Now show the new layout */
case SRC_COMMAND:
_showSourceCommand ();
- addToSourceWindows (srcWin);
+ tui_add_to_source_windows (srcWin);
break;
case DISASSEM_COMMAND:
_showDisassemCommand ();
- addToSourceWindows (disassemWin);
+ tui_add_to_source_windows (disassemWin);
break;
case SRC_DISASSEM_COMMAND:
_showSourceDisassemCommand ();
- addToSourceWindows (srcWin);
- addToSourceWindows (disassemWin);
+ tui_add_to_source_windows (srcWin);
+ tui_add_to_source_windows (disassemWin);
break;
default:
break;
if (layoutType != UNDEFINED_LAYOUT || regsDisplayType != TUI_UNDEFINED_REGS)
{
- TuiLayoutType curLayout = currentLayout (), newLayout = UNDEFINED_LAYOUT;
+ TuiLayoutType curLayout = tui_current_layout (), newLayout = UNDEFINED_LAYOUT;
int regsPopulate = FALSE;
CORE_ADDR addr = _extractDisplayStartAddr ();
- TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tuiWinWithFocus ();
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tui_win_with_focus ();
+ TuiLayoutDefPtr layoutDef = tui_layout_def ();
if (layoutType == UNDEFINED_LAYOUT &&
void
tui_add_win_to_layout (enum tui_win_type type)
{
- TuiLayoutType curLayout = currentLayout ();
+ TuiLayoutType curLayout = tui_current_layout ();
switch (type)
{
curLayout != SRC_DISASSEM_COMMAND &&
curLayout != SRC_DATA_COMMAND)
{
- clearSourceWindowsDetail ();
+ tui_clear_source_windows_detail ();
if (curLayout == DISASSEM_DATA_COMMAND)
showLayout (SRC_DATA_COMMAND);
else
curLayout != SRC_DISASSEM_COMMAND &&
curLayout != DISASSEM_DATA_COMMAND)
{
- clearSourceWindowsDetail ();
+ tui_clear_source_windows_detail ();
if (curLayout == SRC_DATA_COMMAND)
showLayout (DISASSEM_DATA_COMMAND);
else
case SRC_COMMAND:
case DISASSEM_COMMAND:
if (m_winPtrIsNull (cmdWin))
- h = termHeight () / 2;
+ h = tui_term_height () / 2;
else
- h = termHeight () - cmdWin->generic.height;
+ h = tui_term_height () - cmdWin->generic.height;
break;
case SRC_DISASSEM_COMMAND:
case SRC_DATA_COMMAND:
case DISASSEM_DATA_COMMAND:
if (m_winPtrIsNull (cmdWin))
- h = termHeight () / 3;
+ h = tui_term_height () / 3;
else
- h = (termHeight () - cmdWin->generic.height) / 2;
+ h = (tui_term_height () - cmdWin->generic.height) / 2;
break;
default:
h = 0;
register char *bufPtr;
TuiLayoutType newLayout = UNDEFINED_LAYOUT;
TuiRegisterDisplayType dpyType = TUI_UNDEFINED_REGS;
- TuiLayoutType curLayout = currentLayout ();
+ TuiLayoutType curLayout = tui_current_layout ();
bufPtr = (char *) xstrdup (layoutName);
for (i = 0; (i < strlen (layoutName)); i++)
static CORE_ADDR
_extractDisplayStartAddr (void)
{
- TuiLayoutType curLayout = currentLayout ();
+ TuiLayoutType curLayout = tui_current_layout ();
CORE_ADDR addr;
CORE_ADDR pc;
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
static void
_tuiToggleLayout_command (char *arg, int fromTTY)
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ TuiLayoutDefPtr layoutDef = tui_layout_def ();
/* Make sure the curses mode is enabled. */
tui_enable ();
static void
_tuiToggleSplitLayout_command (char *arg, int fromTTY)
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ TuiLayoutDefPtr layoutDef = tui_layout_def ();
/* Make sure the curses mode is enabled. */
tui_enable ();
{
TuiLayoutType newLayout;
- newLayout = currentLayout ();
+ newLayout = tui_current_layout ();
if (newLayout == UNDEFINED_LAYOUT)
newLayout = SRC_COMMAND;
else
{
TuiLayoutType newLayout;
- newLayout = currentLayout ();
+ newLayout = tui_current_layout ();
if (newLayout == SRC_COMMAND)
newLayout = DISASSEM_DATA_COMMAND;
else
_initAndMakeWin ((Opaque *) winInfoPtr,
CMD_WIN,
height,
- termWidth (),
+ tui_term_width (),
0,
originY,
DONT_BOX_WINDOW);
_initAndMakeWin ((Opaque *) winInfoPtr,
DATA_WIN,
height,
- termWidth (),
+ tui_term_width (),
0,
originY,
BOX_WINDOW);
static void
_showSourceDisassemCommand (void)
{
- if (currentLayout () != SRC_DISASSEM_COMMAND)
+ if (tui_current_layout () != SRC_DISASSEM_COMMAND)
{
int cmdHeight, srcHeight, asmHeight;
if (m_winPtrNotNull (cmdWin))
cmdHeight = cmdWin->generic.height;
else
- cmdHeight = termHeight () / 3;
+ cmdHeight = tui_term_height () / 3;
- srcHeight = (termHeight () - cmdHeight) / 2;
- asmHeight = termHeight () - (srcHeight + cmdHeight);
+ srcHeight = (tui_term_height () - cmdHeight) / 2;
+ asmHeight = tui_term_height () - (srcHeight + cmdHeight);
if (m_winPtrIsNull (srcWin))
_makeSourceWindow (&srcWin, srcHeight, 0);
}
if (m_winPtrNotNull (srcWin))
{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
tui_show_source_content (srcWin);
if (m_winPtrIsNull (disassemWin))
_initAndMakeWin ((Opaque *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
(srcHeight + asmHeight) - 1,
DONT_BOX_WINDOW);
_initGenWinInfo (locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
(srcHeight + asmHeight) - 1);
disassemWin->detail.sourceInfo.hasLocator = TRUE;
if (m_winPtrIsNull (cmdWin))
_makeCommandWindow (&cmdWin,
cmdHeight,
- termHeight () - cmdHeight);
+ tui_term_height () - cmdHeight);
else
{
_initGenWinInfo (&cmdWin->generic,
tui_refresh_win (&cmdWin->generic);
}
}
- setCurrentLayoutTo (SRC_DISASSEM_COMMAND);
+ tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
}
return;
static void
_showData (TuiLayoutType newLayout)
{
- int totalHeight = (termHeight () - cmdWin->generic.height);
+ int totalHeight = (tui_term_height () - cmdWin->generic.height);
int srcHeight, dataHeight;
TuiWinType winType;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
dataHeight = totalHeight / 2;
_initAndMakeWin ((Opaque *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
totalHeight - 1,
DONT_BOX_WINDOW);
_initGenWinInfo (locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
totalHeight - 1);
}
winList[winType]->detail.sourceInfo.hasLocator = TRUE;
tui_make_visible (locator);
tui_show_locator_content ();
- addToSourceWindows (winList[winType]);
- setCurrentLayoutTo (newLayout);
+ tui_add_to_source_windows (winList[winType]);
+ tui_set_current_layout_to (newLayout);
return;
} /* _showData */
if (opaqueWinInfo == (Opaque) NULL)
{
if (m_winIsAuxillary (winType))
- opaqueWinInfo = (Opaque) allocGenericWinInfo ();
+ opaqueWinInfo = (Opaque) tui_alloc_generic_win_info ();
else
- opaqueWinInfo = (Opaque) allocWinInfo (winType);
+ opaqueWinInfo = (Opaque) tui_alloc_win_info (winType);
}
if (m_winIsAuxillary (winType))
generic = (TuiGenWinInfoPtr) opaqueWinInfo;
** Create the exeuction info window.
*/
if (type == SRC_WIN)
- executionInfo = sourceExecInfoWinPtr ();
+ executionInfo = tui_source_exec_info_win_ptr ();
else
- executionInfo = disassemExecInfoWinPtr ();
+ executionInfo = tui_disassem_exec_info_win_ptr ();
_initAndMakeWin ((Opaque *) & executionInfo,
EXEC_INFO_WIN,
height,
_initAndMakeWin ((Opaque *) winInfoPtr,
type,
height,
- termWidth () - executionInfo->width,
+ tui_term_width () - executionInfo->width,
executionInfo->width,
originY,
BOX_WINDOW);
static void
_showSourceOrDisassemAndCommand (TuiLayoutType layoutType)
{
- if (currentLayout () != layoutType)
+ if (tui_current_layout () != layoutType)
{
TuiWinInfoPtr *winInfoPtr;
int srcHeight, cmdHeight;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
if (m_winPtrNotNull (cmdWin))
cmdHeight = cmdWin->generic.height;
else
- cmdHeight = termHeight () / 3;
- srcHeight = termHeight () - cmdHeight;
+ cmdHeight = tui_term_height () / 3;
+ srcHeight = tui_term_height () - cmdHeight;
if (layoutType == SRC_COMMAND)
_initAndMakeWin ((Opaque *) & locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
srcHeight - 1,
DONT_BOX_WINDOW);
_initGenWinInfo (locator,
LOCATOR_WIN,
2 /* 1 */ ,
- termWidth (),
+ tui_term_width (),
0,
srcHeight - 1);
(*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE;
tui_make_visible (&cmdWin->generic);
}
}
- setCurrentLayoutTo (layoutType);
+ tui_set_current_layout_to (layoutType);
}
return;
dataWin->detail.dataDisplayInfo.regsDisplayType = dpyType;
tui_display_all_data ();
}
- (tuiLayoutDef ())->regsDisplayType = dpyType;
+ (tui_layout_def ())->regsDisplayType = dpyType;
return;
}
{
if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0 &&
dataWin->detail.dataDisplayInfo.displayRegs)
- tui_show_registers ((tuiLayoutDef ())->regsDisplayType);
+ tui_show_registers ((tui_layout_def ())->regsDisplayType);
else
{
int i, j;
void
tuiToggleFloatRegs (void)
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ TuiLayoutDefPtr layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
if (dataWin->detail.dataDisplayInfo.regsContentCount > 0 &&
!refreshValuesOnly)
{
- freeDataContent (dataWin->detail.dataDisplayInfo.regsContent,
- dataWin->detail.dataDisplayInfo.regsContentCount);
+ tui_free_data_content (dataWin->detail.dataDisplayInfo.regsContent,
+ dataWin->detail.dataDisplayInfo.regsContentCount);
dataWin->detail.dataDisplayInfo.regsContentCount = 0;
}
if (dataWin->detail.dataDisplayInfo.regsContentCount <= 0)
{
dataWin->detail.dataDisplayInfo.regsContent =
- allocContent (numRegs, DATA_WIN);
+ tui_alloc_content (numRegs, DATA_WIN);
allocatedHere = TRUE;
}
{
dataWin->generic.content = (OpaquePtr) NULL;
dataWin->generic.contentSize = 0;
- addContentElements (&dataWin->generic, numRegs);
+ tui_add_content_elements (&dataWin->generic, numRegs);
dataWin->detail.dataDisplayInfo.regsContent =
(TuiWinContent) dataWin->generic.content;
dataWin->detail.dataDisplayInfo.regsContentCount = numRegs;
tui_show_registers (dpyType);
}
else
- (tuiLayoutDef ())->regsDisplayType = dpyType;
+ (tui_layout_def ())->regsDisplayType = dpyType;
return;
} /* _tui_vShowRegisters_commandSupport */
if (m_winPtrIsNull (dataWin) || !dataWin->generic.isVisible ||
(dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_SFLOAT_REGS &&
dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_DFLOAT_REGS))
- _tui_vShowRegisters_commandSupport ((tuiLayoutDef ())->floatRegsDisplayType);
+ _tui_vShowRegisters_commandSupport ((tui_layout_def ())->floatRegsDisplayType);
return;
} /* _tuiShowFloat_command */
tuiToggleFloatRegs ();
else
{
- TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ TuiLayoutDefPtr layoutDef = tui_layout_def ();
if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS)
layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS;
else
{
register int offset, curLineNo, curLine, curLen, threshold;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
TuiSourceInfoPtr src = &srcWin->detail.sourceInfo;
if (srcWin->generic.title)
sprintf (srcLine, "%-6d", curLineNo);
curLen = strlen (srcLine);
i = curLen -
- ((curLen / tuiDefaultTabLen ()) * tuiDefaultTabLen ());
- while (i < tuiDefaultTabLen ())
+ ((curLen / tui_default_tab_len ()) * tui_default_tab_len ());
+ while (i < tui_default_tab_len ())
{
srcLine[curLen] = ' ';
i++;
buffer. */
if (c == '\t')
{
- int j, maxTabLen = tuiDefaultTabLen ();
+ int j, maxTabLen = tui_default_tab_len ();
for (j = i - (
(i / maxTabLen) * maxTabLen);
tui_source_is_displayed (char *fname)
{
return (srcWin->generic.contentInUse &&
- (strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())->
+ (strcmp (((TuiWinElementPtr) (tui_locator_win_info_ptr ())->
content[0])->whichElement.locator.fileName, fname) == 0));
}
if (pid_width > MAX_PID_WIDTH)
pid_width = MAX_PID_WIDTH;
- status_size = termWidth ();
+ status_size = tui_term_width ();
string = (char *) xmalloc (status_size + 1);
buf = (char*) alloca (status_size + 1);
char *string;
TuiGenWinInfoPtr locator;
- locator = locatorWinInfoPtr ();
+ locator = tui_locator_win_info_ptr ();
if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL)
{
static void
tui_set_locator_filename (const char *filename)
{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
TuiLocatorElementPtr element;
if (locator->content[0] == (Opaque) NULL)
tui_set_locator_info (const char *filename, const char *procname, int lineno,
CORE_ADDR addr)
{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
TuiLocatorElementPtr element;
/* Allocate the locator content if necessary. */
if (locator->contentSize <= 0)
{
- locator->content = (OpaquePtr) allocContent (1, locator->type);
+ locator->content = (OpaquePtr) tui_alloc_content (1, locator->type);
locator->contentSize = 1;
}
{
register int startLine, i;
CORE_ADDR low;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
int sourceAlreadyDisplayed;
struct symtab_and_line sal;
get_frame_pc (fi));
tui_show_locator_content ();
startLine = 0;
- for (i = 0; i < (sourceWindows ())->count; i++)
+ for (i = 0; i < (tui_source_windows ())->count; i++)
{
TuiWhichElement *item;
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
+ winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
item = &((TuiWinElementPtr) locator->content[0])->whichElement;
if (winInfo == srcWin)
{
tui_set_locator_info (NULL, NULL, 0, (CORE_ADDR) 0);
tui_show_locator_content ();
- for (i = 0; i < (sourceWindows ())->count; i++)
+ for (i = 0; i < (tui_source_windows ())->count; i++)
{
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
+ winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
tui_update_exec_info (winInfo);
}
{
if (m_winPtrNotNull (winInfo))
{
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
+ TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
if (m_winPtrNotNull (winWithFocus) &&
winWithFocus->generic.type != CMD_WIN)
tui_unhighlight_win (winWithFocus);
- tuiSetWinWithFocus (winInfo);
+ tui_set_win_with_focus (winInfo);
if (winInfo->generic.type != CMD_WIN)
tui_highlight_win (winInfo);
}
int screenheight, screenwidth;
rl_get_screen_size (&screenheight, &screenwidth);
- widthDiff = screenwidth - termWidth ();
- heightDiff = screenheight - termHeight ();
+ widthDiff = screenwidth - tui_term_width ();
+ heightDiff = screenheight - tui_term_height ();
if (heightDiff || widthDiff)
{
- TuiLayoutType curLayout = currentLayout ();
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
+ TuiLayoutType curLayout = tui_current_layout ();
+ TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
TuiWinInfoPtr firstWin, secondWin;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
TuiWinType winType;
int newHeight, splitDiff, cmdSplitDiff, numWinsDisplayed = 2;
if (winWithFocus != cmdWin)
keypad (cmdWin->generic.handle, FALSE);
tui_update_gdb_sizes ();
- setTermHeightTo (screenheight);
- setTermWidthTo (screenwidth);
+ tui_set_term_height_to (screenheight);
+ tui_set_term_width_to (screenwidth);
if (curLayout == SRC_DISASSEM_COMMAND ||
curLayout == SRC_DATA_COMMAND || curLayout == DISASSEM_DATA_COMMAND)
numWinsDisplayed++;
{
case SRC_COMMAND:
case DISASSEM_COMMAND:
- firstWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ firstWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
firstWin->generic.width += widthDiff;
locator->width += widthDiff;
/* check for invalid heights */
{
firstWin = dataWin;
firstWin->generic.width += widthDiff;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
secondWin->generic.width += widthDiff;
}
/* Change the first window's height/width */
if (winType != CMD_WIN && m_winPtrNotNull (winList[winType]) &&
!winList[winType]->generic.isVisible)
{
- freeWindow (winList[winType]);
+ tui_free_window (winList[winType]);
winList[winType] = (TuiWinInfoPtr) NULL;
}
}
- tuiSetWinResizedTo (TRUE);
+ tui_set_win_resized_to (TRUE);
/* turn keypad back on, unless focus is in the command window */
if (winWithFocus != cmdWin)
keypad (cmdWin->generic.handle, TRUE);
** Say that a resize was done so that the readline can do it
** later when appropriate.
*/
- tuiSetWinResizedTo (TRUE);
+ tui_set_win_resized_to (TRUE);
return;
} /* tuiSigwinchHandler */
bufPtr[i] = toupper (arg[i]);
if (subset_compare (bufPtr, "NEXT"))
- winInfo = tuiNextWin (tuiWinWithFocus ());
+ winInfo = tui_next_win (tui_win_with_focus ());
else if (subset_compare (bufPtr, "PREV"))
- winInfo = tuiPrevWin (tuiWinWithFocus ());
+ winInfo = tui_prev_win (tui_win_with_focus ());
else
- winInfo = partialWinByName (bufPtr);
+ winInfo = tui_partial_win_by_name (bufPtr);
if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
warning ("Invalid window specified. \n\
tui_refresh_data_win ();
tuiFree (bufPtr);
printf_filtered ("Focus set to %s window.\n",
- winName ((TuiGenWinInfoPtr) tuiWinWithFocus ()));
+ tui_win_name ((TuiGenWinInfoPtr) tui_win_with_focus ()));
}
else
warning ("Incorrect Number of Arguments.\n%s", FOCUS_USAGE);
_tuiAllWindowsInfo (char *arg, int fromTTY)
{
TuiWinType type;
- TuiWinInfoPtr winWithFocus = tuiWinWithFocus ();
+ TuiWinInfoPtr winWithFocus = tui_win_with_focus ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
if (winList[type] && winList[type]->generic.isVisible)
{
if (winWithFocus == winList[type])
printf_filtered (" %s\t(%d lines) <has focus>\n",
- winName (&winList[type]->generic),
+ tui_win_name (&winList[type]->generic),
winList[type]->generic.height);
else
printf_filtered (" %s\t(%d lines)\n",
- winName (&winList[type]->generic),
+ tui_win_name (&winList[type]->generic),
winList[type]->generic.height);
}
ts = atoi (arg);
if (ts > 0)
- tuiSetDefaultTabLen (ts);
+ tui_set_default_tab_len (ts);
else
warning ("Tab widths greater than 0 must be specified.\n");
}
*/
for (i = 0; i < strlen (wname); i++)
wname[i] = toupper (wname[i]);
- winInfo = partialWinByName (wname);
+ winInfo = tui_partial_win_by_name (wname);
if (winInfo == (TuiWinInfoPtr) NULL || !winInfo->generic.isVisible)
warning ("Invalid window specified. \n\
if (inputNo > 0)
{ /* Add 1 for the locator */
- int newHeight = termHeight () - (inputNo + 1);
+ int newHeight = tui_term_height () - (inputNo + 1);
if (!_newHeightOk (winList[CMD_WIN], newHeight) ||
_tuiAdjustWinHeights (winList[CMD_WIN],
{
int diff;
TuiWinInfoPtr winInfo;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
- TuiLayoutType curLayout = currentLayout ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
+ TuiLayoutType curLayout = tui_current_layout ();
diff = (newHeight - primaryWinInfo->generic.height) * (-1);
if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
_makeInvisibleAndSetNewHeight (primaryWinInfo, newHeight);
if (primaryWinInfo->generic.type == CMD_WIN)
{
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
srcWinInfo = winInfo;
}
else
else
{
firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
}
if (primaryWinInfo == cmdWin)
{ /*
if (m_hasLocator (winInfo))
{
- genWinInfo = locatorWinInfoPtr ();
+ genWinInfo = tui_locator_win_info_ptr ();
tui_make_invisible (genWinInfo);
genWinInfo->origin.y = winInfo->generic.origin.y + height;
}
{
case SRC_WIN:
case DISASSEM_WIN:
- freeWinContent (winInfo->detail.sourceInfo.executionInfo);
+ tui_free_win_content (winInfo->detail.sourceInfo.executionInfo);
tui_make_visible (winInfo->detail.sourceInfo.executionInfo);
if (winInfo->generic.content != (OpaquePtr) NULL)
{
else
lineOrAddr.addr =
winInfo->detail.sourceInfo.startLineOrAddr.addr;
- freeWinContent (&winInfo->generic);
+ tui_free_win_content (&winInfo->generic);
tui_update_source_window (winInfo, cursal.symtab, lineOrAddr, TRUE);
}
else if (deprecated_selected_frame != (struct frame_info *) NULL)
}
if (m_hasLocator (winInfo))
{
- tui_make_visible (locatorWinInfoPtr ());
+ tui_make_visible (tui_locator_win_info_ptr ());
tui_show_locator_content ();
}
break;
static int
_newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight)
{
- int ok = (newHeight < termHeight ());
+ int ok = (newHeight < tui_term_height ());
if (ok)
{
int diff;
- TuiLayoutType curLayout = currentLayout ();
+ TuiLayoutType curLayout = tui_current_layout ();
diff = (newHeight - primaryWinInfo->generic.height) * (-1);
if (curLayout == SRC_COMMAND || curLayout == DISASSEM_COMMAND)
{
ok = ((primaryWinInfo->generic.type == CMD_WIN &&
- newHeight <= (termHeight () - 4) &&
+ newHeight <= (tui_term_height () - 4) &&
newHeight >= MIN_CMD_WIN_HEIGHT) ||
(primaryWinInfo->generic.type != CMD_WIN &&
- newHeight <= (termHeight () - 2) &&
+ newHeight <= (tui_term_height () - 2) &&
newHeight >= MIN_WIN_HEIGHT));
if (ok)
{ /* check the total height */
TuiWinInfoPtr winInfo;
if (primaryWinInfo == cmdWin)
- winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
else
winInfo = cmdWin;
ok = ((newHeight +
- (winInfo->generic.height + diff)) <= termHeight ());
+ (winInfo->generic.height + diff)) <= tui_term_height ());
}
}
else
else
{
firstWin = dataWin;
- secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0];
+ secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
}
/*
** We could simply add all the heights to obtain the same result
{
if (numToScroll)
*numToScroll = 0;
- *winToScroll = tuiWinWithFocus ();
+ *winToScroll = tui_win_with_focus ();
/*
** First set up the default window to scroll, in case there is no
/* Validate the window name */
for (i = 0; i < strlen (wname); i++)
wname[i] = toupper (wname[i]);
- *winToScroll = partialWinByName (wname);
+ *winToScroll = tui_partial_win_by_name (wname);
if (*winToScroll == (TuiWinInfoPtr) 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) (sourceWindows ())->list[0];
+ *winToScroll = (TuiWinInfoPtr) (tui_source_windows ())->list[0];
}
tuiFree (buf);
}
tui_refresh_all (TuiWinInfoPtr * list)
{
TuiWinType type;
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
+ TuiGenWinInfoPtr locator = tui_locator_win_info_ptr ();
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
{
void
tui_display_main (void)
{
- if ((sourceWindows ())->count > 0)
+ if ((tui_source_windows ())->count > 0)
{
CORE_ADDR addr;
** If the focus was in the asm win, put it in the src
** win if we don't have a split layout
*/
- if (tuiWinWithFocus () == disassemWin &&
- currentLayout () != SRC_DISASSEM_COMMAND)
+ if (tui_win_with_focus () == disassemWin &&
+ tui_current_layout () != SRC_DISASSEM_COMMAND)
tui_set_win_focus_to (srcWin);
}
}
struct symtab_and_line sal;
TuiLineOrAddress l;
- switch (currentLayout ())
+ switch (tui_current_layout ())
{
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
{
int i;
- for (i = 0; i < (sourceWindows ())->count; i++)
+ for (i = 0; i < (tui_source_windows ())->count; i++)
{
- TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[i];
+ TuiWinInfoPtr winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[i];
tui_clear_source_content (winInfo, EMPTY_SOURCE_PROMPT);
tui_clear_exec_info_content (winInfo);
CORE_ADDR pc;
TuiLineOrAddress l;
- switch (currentLayout ())
+ switch (tui_current_layout ())
{
case DISASSEM_COMMAND:
case DISASSEM_DATA_COMMAND:
default:
l.lineNo = line;
tui_show_symtab_source (s, l, FALSE);
- if (currentLayout () == SRC_DISASSEM_COMMAND)
+ if (tui_current_layout () == SRC_DISASSEM_COMMAND)
{
find_line_pc (s, line, &pc);
tui_show_disassem (pc);
void
tui_update_all_breakpoint_info ()
{
- TuiList* list = sourceWindows ();
+ TuiList* list = tui_source_windows ();
int i;
for (i = 0; i < list->count; i++)
if (execInfoPtr->content == (OpaquePtr) NULL)
execInfoPtr->content =
- (OpaquePtr) allocContent (winInfo->generic.height,
- execInfoPtr->type);
+ (OpaquePtr) tui_alloc_content (winInfo->generic.height,
+ execInfoPtr->type);
if (execInfoPtr->content != (OpaquePtr) NULL)
{
int i;
{
/* allocate the content list */
if ((winInfo->generic.content =
- (OpaquePtr) allocContent (maxLines, SRC_WIN)) == (OpaquePtr) NULL)
+ (OpaquePtr) tui_alloc_content (maxLines, SRC_WIN)) == (OpaquePtr) NULL)
{
tuiFree (srcLineBuf);
srcLineBuf = (char *) NULL;
TuiLayoutType new_layout;
TuiRegisterDisplayType regs_type = TUI_UNDEFINED_REGS;
- new_layout = currentLayout ();
+ new_layout = tui_current_layout ();
/* Select a new layout to have a rolling layout behavior
with always two windows (except when undefined). */
TuiLayoutType new_layout;
TuiRegisterDisplayType regs_type = TUI_UNDEFINED_REGS;
- new_layout = currentLayout ();
+ new_layout = tui_current_layout ();
/* Kill one window. */
switch (new_layout)
if (!tui_active)
tui_rl_switch_mode (0/*notused*/, 0/*notused*/);
- winInfo = tuiNextWin (tuiWinWithFocus ());
+ winInfo = tui_next_win (tui_win_with_focus ());
if (winInfo)
{
tui_set_win_focus_to (winInfo);
nl();
keypad (w, TRUE);
rl_initialize ();
- setTermHeightTo (LINES);
- setTermWidthTo (COLS);
+ tui_set_term_height_to (LINES);
+ tui_set_term_width_to (COLS);
def_prog_mode ();
tui_show_frame_info (0);