diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-07 04:40:36 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-07 04:40:36 +0000 |
commit | dd1abb8c9ec3fa79e36e4e14033f4309741442c1 (patch) | |
tree | 2e992623fe7c24cef553bd7f444285f462d0b231 | |
parent | c97b7ef6e65412b72fe1625654adf0dd20e29dc2 (diff) | |
download | gdb-dd1abb8c9ec3fa79e36e4e14033f4309741442c1.zip gdb-dd1abb8c9ec3fa79e36e4e14033f4309741442c1.tar.gz gdb-dd1abb8c9ec3fa79e36e4e14033f4309741442c1.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 62 | ||||
-rw-r--r-- | gdb/tui/tui-command.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-data.c | 346 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 110 | ||||
-rw-r--r-- | gdb/tui/tui-disasm.c | 12 | ||||
-rw-r--r-- | gdb/tui/tui-interp.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 4 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 106 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 20 | ||||
-rw-r--r-- | gdb/tui/tui-source.c | 10 | ||||
-rw-r--r-- | gdb/tui/tui-stack.c | 20 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 84 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 24 | ||||
-rw-r--r-- | gdb/tui/tui.c | 10 |
15 files changed, 383 insertions, 431 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ba2334..11f2ff6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,67 @@ 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. diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c index a771ff3..9b6a20d 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 = tuiWinWithFocus (); + TuiWinInfoPtr winInfo = tui_win_with_focus (); WINDOW *w = cmdWin->generic.handle; /* diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index f992483..5435b00 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -77,87 +77,60 @@ static void freeContentElements (TuiWinContent, int, TuiWinType); ** 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 */ +} /* @@ -167,67 +140,49 @@ tuiSetDefaultTabLen (int len) ** 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)) { @@ -268,7 +223,7 @@ clearWinDetail (TuiWinInfoPtr winInfo) ** Accessor for the source execution info ptr. */ TuiGenWinInfoPtr -sourceExecInfoWinPtr (void) +tui_source_exec_info_win_ptr (void) { return &_execInfo[0]; } /* sourceExecInfoWinPtr */ @@ -279,94 +234,67 @@ sourceExecInfoWinPtr (void) ** 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 */ +} /* @@ -388,13 +316,10 @@ setGenWinOrigin (TuiGenWinInfoPtr winInfo, int x, int y) *****************************/ -/* - ** 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; @@ -420,13 +345,10 @@ tuiNextWin (TuiWinInfoPtr curWin) } /* 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; @@ -452,12 +374,9 @@ tuiPrevWin (TuiWinInfoPtr curWin) } -/* - ** 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; @@ -469,7 +388,7 @@ partialWinByName (char *name) { 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]; @@ -487,7 +406,7 @@ partialWinByName (char *name) ** Answer the name of the window */ char * -winName (TuiGenWinInfoPtr winInfo) +tui_win_name (TuiGenWinInfoPtr winInfo) { char *name = (char *) NULL; @@ -514,31 +433,23 @@ winName (TuiGenWinInfoPtr winInfo) } /* 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 */ @@ -548,7 +459,7 @@ allocGenericWinInfo (void) ** initGenericPart(). */ void -initGenericPart (TuiGenWinInfoPtr win) +tui_init_generic_part (TuiGenWinInfoPtr win) { win->width = win->height = @@ -582,10 +493,10 @@ initContentElement (TuiWinElementPtr element, TuiWinType type) 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; @@ -621,7 +532,7 @@ initContentElement (TuiWinElementPtr element, TuiWinType type) void initWinInfo (TuiWinInfoPtr winInfo) { - initGenericPart (&winInfo->generic); + tui_init_generic_part (&winInfo->generic); winInfo->canHighlight = winInfo->isHighlighted = FALSE; switch (winInfo->generic.type) @@ -657,11 +568,8 @@ initWinInfo (TuiWinInfoPtr winInfo) } /* initWinInfo */ -/* - ** allocWinInfo(). - */ TuiWinInfoPtr -allocWinInfo (TuiWinType type) +tui_alloc_win_info (TuiWinType type) { TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL; @@ -681,7 +589,7 @@ allocWinInfo (TuiWinType type) ** 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; @@ -718,23 +626,20 @@ allocContent (int numElements, TuiWinType type) } /* 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 @@ -770,7 +675,7 @@ tuiDelWindow (TuiWinInfoPtr winInfo) { case SRC_WIN: case DISASSEM_WIN: - genericWin = locatorWinInfoPtr (); + genericWin = tui_locator_win_info_ptr (); if (genericWin != (TuiGenWinInfoPtr) NULL) { tui_delete_win (genericWin->handle); @@ -793,10 +698,10 @@ tuiDelWindow (TuiWinInfoPtr winInfo) 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: @@ -811,11 +716,8 @@ tuiDelWindow (TuiWinInfoPtr winInfo) } -/* - ** freeWindow(). - */ void -freeWindow (TuiWinInfoPtr winInfo) +tui_free_window (TuiWinInfoPtr winInfo) { TuiGenWinInfoPtr genericWin; @@ -823,13 +725,13 @@ freeWindow (TuiWinInfoPtr winInfo) { 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); @@ -840,21 +742,19 @@ freeWindow (TuiWinInfoPtr winInfo) { 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; @@ -873,7 +773,7 @@ freeWindow (TuiWinInfoPtr winInfo) { 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); @@ -881,34 +781,26 @@ freeWindow (TuiWinInfoPtr winInfo) } -/* - ** 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) { @@ -924,7 +816,7 @@ freeWinContent (TuiGenWinInfoPtr winInfo) void -tuiDelDataWindows (TuiWinContent content, int contentSize) +tui_del_data_windows (TuiWinContent content, int contentSize) { int i; @@ -943,13 +835,11 @@ tuiDelDataWindows (TuiWinContent content, int contentSize) genericWin->isVisible = FALSE; } } - - return; -} /* tuiDelDataWindows */ +} void -freeDataContent (TuiWinContent content, int contentSize) +tui_free_data_content (TuiWinContent content, int contentSize) { int i; @@ -965,7 +855,7 @@ freeDataContent (TuiWinContent content, int contentSize) { tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; - freeWinContent (genericWin); + tui_free_win_content (genericWin); } } freeContent (content, diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index cad1102..58b7e49 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -107,7 +107,7 @@ TuiScrollDirection, *TuiScrollDirectionPtr; /* General list struct */ -typedef struct _TuiList +typedef struct tui_list { OpaqueList list; int count; @@ -128,7 +128,7 @@ typedef enum tui_layout_type 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, @@ -158,7 +158,7 @@ typedef union tui_line_or_address TuiLineOrAddress, *TuiLineOrAddressPtr; /* Current Layout definition */ -typedef struct _TuiLayoutDef +typedef struct tui_layout_def { TuiWinType displayMode; int split; @@ -168,7 +168,7 @@ typedef struct _TuiLayoutDef TuiLayoutDef, *TuiLayoutDefPtr; /* Elements in the Source/Disassembly Window */ -typedef struct _TuiSourceElement +typedef struct tui_source_element { char *line; TuiLineOrAddress lineOrAddr; @@ -179,7 +179,7 @@ TuiSourceElement, *TuiSourceElementPtr; /* 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 */ @@ -191,7 +191,7 @@ TuiDataElement, *TuiDataElementPtr; /* Elements in the command window content */ -typedef struct _TuiCommandElement +typedef struct tui_command_element { char *line; } @@ -201,7 +201,7 @@ TuiCommandElement, *TuiCommandElementPtr; #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]; @@ -226,7 +226,7 @@ TuiLocatorElement, *TuiLocatorElementPtr; 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 */ @@ -237,7 +237,7 @@ typedef union } TuiWhichElement, *TuiWhichElementPtr; -typedef struct _TuiWinElement +typedef struct tui_win_element { int highlight; TuiWhichElement whichElement; @@ -250,7 +250,7 @@ typedef TuiWinElementPtr *TuiWinContent; /* 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; @@ -263,7 +263,7 @@ typedef struct _TuiDataInfo TuiDataInfo, *TuiDataInfoPtr; -typedef struct _TuiSourceInfo +typedef struct tui_source_info { int hasLocator; /* Does locator belongs to this window? */ TuiGenWinInfoPtr executionInfo; /* execution information window */ @@ -274,7 +274,7 @@ typedef struct _TuiSourceInfo TuiSourceInfo, *TuiSourceInfoPtr; -typedef struct _TuiCommandInfo +typedef struct tui_command_info { int curLine; /* The current line position */ int curch; /* The current cursor position */ @@ -339,48 +339,48 @@ extern TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS]; #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 */ diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 33ca965..51da0f9 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -180,8 +180,8 @@ tui_set_disassem_content (CORE_ADDR pc) 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; @@ -275,7 +275,7 @@ void 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; @@ -285,7 +285,7 @@ tui_show_disassem (CORE_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; @@ -299,7 +299,7 @@ tui_show_disassem_and_update_source (CORE_ADDR startAddr) struct symtab_and_line sal; tui_show_disassem (startAddr); - if (currentLayout () == SRC_DISASSEM_COMMAND) + if (tui_current_layout () == SRC_DISASSEM_COMMAND) { TuiLineOrAddress val; @@ -329,7 +329,7 @@ tui_get_begin_asm_address (void) TuiLocatorElementPtr element; CORE_ADDR addr; - locator = locatorWinInfoPtr (); + locator = tui_locator_win_info_ptr (); element = &((TuiWinElementPtr) locator->content[0])->whichElement.locator; if (element->addr == 0) diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 82b4dcd..1e1d643 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -53,7 +53,7 @@ tui_init (void) /* 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 (); diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index c7c619c..1a7d096 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -710,11 +710,11 @@ tui_getc (FILE *fp) 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 diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 6c7fc11..d3621d8 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -82,7 +82,7 @@ static void _tuiHandleXDBLayout (TuiLayoutDefPtr); static void showLayout (TuiLayoutType layout) { - TuiLayoutType curLayout = currentLayout (); + TuiLayoutType curLayout = tui_current_layout (); if (layout != curLayout) { @@ -91,8 +91,8 @@ showLayout (TuiLayoutType layout) ** 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); @@ -102,23 +102,23 @@ showLayout (TuiLayoutType 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; @@ -141,11 +141,11 @@ tui_set_layout (enum tui_layout_type layoutType, 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 && @@ -271,7 +271,7 @@ tui_set_layout (enum tui_layout_type layoutType, void tui_add_win_to_layout (enum tui_win_type type) { - TuiLayoutType curLayout = currentLayout (); + TuiLayoutType curLayout = tui_current_layout (); switch (type) { @@ -280,7 +280,7 @@ tui_add_win_to_layout (enum tui_win_type 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 @@ -292,7 +292,7 @@ tui_add_win_to_layout (enum tui_win_type type) curLayout != SRC_DISASSEM_COMMAND && curLayout != DISASSEM_DATA_COMMAND) { - clearSourceWindowsDetail (); + tui_clear_source_windows_detail (); if (curLayout == SRC_DATA_COMMAND) showLayout (DISASSEM_DATA_COMMAND); else @@ -337,17 +337,17 @@ tuiDefaultWinHeight (TuiWinType type, TuiLayoutType layout) 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; @@ -432,7 +432,7 @@ tui_set_layout_for_display_command (const char *layoutName) 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++) @@ -527,7 +527,7 @@ tui_set_layout_for_display_command (const char *layoutName) 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 (); @@ -579,7 +579,7 @@ _tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef) 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 (); @@ -597,7 +597,7 @@ _tuiToggleLayout_command (char *arg, int fromTTY) 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 (); @@ -628,7 +628,7 @@ _nextLayout (void) { TuiLayoutType newLayout; - newLayout = currentLayout (); + newLayout = tui_current_layout (); if (newLayout == UNDEFINED_LAYOUT) newLayout = SRC_COMMAND; else @@ -651,7 +651,7 @@ _prevLayout (void) { TuiLayoutType newLayout; - newLayout = currentLayout (); + newLayout = tui_current_layout (); if (newLayout == SRC_COMMAND) newLayout = DISASSEM_DATA_COMMAND; else @@ -675,7 +675,7 @@ _makeCommandWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) _initAndMakeWin ((Opaque *) winInfoPtr, CMD_WIN, height, - termWidth (), + tui_term_width (), 0, originY, DONT_BOX_WINDOW); @@ -719,7 +719,7 @@ _makeDataWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) _initAndMakeWin ((Opaque *) winInfoPtr, DATA_WIN, height, - termWidth (), + tui_term_width (), 0, originY, BOX_WINDOW); @@ -762,17 +762,17 @@ _showDisassemCommand (void) 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); @@ -797,7 +797,7 @@ _showSourceDisassemCommand (void) } if (m_winPtrNotNull (srcWin)) { - TuiGenWinInfoPtr locator = locatorWinInfoPtr (); + TuiGenWinInfoPtr locator = tui_locator_win_info_ptr (); tui_show_source_content (srcWin); if (m_winPtrIsNull (disassemWin)) @@ -806,7 +806,7 @@ _showSourceDisassemCommand (void) _initAndMakeWin ((Opaque *) & locator, LOCATOR_WIN, 2 /* 1 */ , - termWidth (), + tui_term_width (), 0, (srcHeight + asmHeight) - 1, DONT_BOX_WINDOW); @@ -816,7 +816,7 @@ _showSourceDisassemCommand (void) _initGenWinInfo (locator, LOCATOR_WIN, 2 /* 1 */ , - termWidth (), + tui_term_width (), 0, (srcHeight + asmHeight) - 1); disassemWin->detail.sourceInfo.hasLocator = TRUE; @@ -848,7 +848,7 @@ _showSourceDisassemCommand (void) if (m_winPtrIsNull (cmdWin)) _makeCommandWindow (&cmdWin, cmdHeight, - termHeight () - cmdHeight); + tui_term_height () - cmdHeight); else { _initGenWinInfo (&cmdWin->generic, @@ -864,7 +864,7 @@ _showSourceDisassemCommand (void) tui_refresh_win (&cmdWin->generic); } } - setCurrentLayoutTo (SRC_DISASSEM_COMMAND); + tui_set_current_layout_to (SRC_DISASSEM_COMMAND); } return; @@ -878,10 +878,10 @@ _showSourceDisassemCommand (void) 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; @@ -903,7 +903,7 @@ _showData (TuiLayoutType newLayout) _initAndMakeWin ((Opaque *) & locator, LOCATOR_WIN, 2 /* 1 */ , - termWidth (), + tui_term_width (), 0, totalHeight - 1, DONT_BOX_WINDOW); @@ -927,15 +927,15 @@ _showData (TuiLayoutType newLayout) _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 */ @@ -979,9 +979,9 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType, 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; @@ -1017,9 +1017,9 @@ _makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type, ** 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, @@ -1033,7 +1033,7 @@ _makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type, _initAndMakeWin ((Opaque *) winInfoPtr, type, height, - termWidth () - executionInfo->width, + tui_term_width () - executionInfo->width, executionInfo->width, originY, BOX_WINDOW); @@ -1051,17 +1051,17 @@ _makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type, 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) @@ -1078,7 +1078,7 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType) _initAndMakeWin ((Opaque *) & locator, LOCATOR_WIN, 2 /* 1 */ , - termWidth (), + tui_term_width (), 0, srcHeight - 1, DONT_BOX_WINDOW); @@ -1088,7 +1088,7 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType) _initGenWinInfo (locator, LOCATOR_WIN, 2 /* 1 */ , - termWidth (), + tui_term_width (), 0, srcHeight - 1); (*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE; @@ -1133,7 +1133,7 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType) tui_make_visible (&cmdWin->generic); } } - setCurrentLayoutTo (layoutType); + tui_set_current_layout_to (layoutType); } return; diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 4e0096e..bf925de 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -268,7 +268,7 @@ tui_show_registers (TuiRegisterDisplayType dpyType) dataWin->detail.dataDisplayInfo.regsDisplayType = dpyType; tui_display_all_data (); } - (tuiLayoutDef ())->regsDisplayType = dpyType; + (tui_layout_def ())->regsDisplayType = dpyType; return; } @@ -452,7 +452,7 @@ tui_check_register_values (struct frame_info *frame) { 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; @@ -509,7 +509,7 @@ tui_check_register_values (struct frame_info *frame) void tuiToggleFloatRegs (void) { - TuiLayoutDefPtr layoutDef = tuiLayoutDef (); + TuiLayoutDefPtr layoutDef = tui_layout_def (); if (layoutDef->floatRegsDisplayType == TUI_SFLOAT_REGS) layoutDef->floatRegsDisplayType = TUI_DFLOAT_REGS; @@ -825,14 +825,14 @@ _tuiSetRegsContent (int startRegNum, int endRegNum, 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; } @@ -844,7 +844,7 @@ _tuiSetRegsContent (int startRegNum, int endRegNum, { 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; @@ -957,7 +957,7 @@ _tui_vShowRegisters_commandSupport (TuiRegisterDisplayType dpyType) tui_show_registers (dpyType); } else - (tuiLayoutDef ())->regsDisplayType = dpyType; + (tui_layout_def ())->regsDisplayType = dpyType; return; } /* _tui_vShowRegisters_commandSupport */ @@ -969,7 +969,7 @@ _tuiShowFloat_command (char *arg, int fromTTY) 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 */ @@ -996,7 +996,7 @@ _tuiToggleFloatRegs_command (char *arg, int fromTTY) tuiToggleFloatRegs (); else { - TuiLayoutDefPtr layoutDef = tuiLayoutDef (); + TuiLayoutDefPtr 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 676c373..54ce302 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -93,7 +93,7 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror) 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) @@ -131,8 +131,8 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror) 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++; @@ -176,7 +176,7 @@ tui_set_source_content (struct symtab *s, int lineNo, int noerror) buffer. */ if (c == '\t') { - int j, maxTabLen = tuiDefaultTabLen (); + int j, maxTabLen = tui_default_tab_len (); for (j = i - ( (i / maxTabLen) * maxTabLen); @@ -313,7 +313,7 @@ int 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)); } diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 07357bb..54e3ab3 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -94,7 +94,7 @@ tui_make_status_line (TuiLocatorElement* loc) 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); @@ -251,7 +251,7 @@ tui_show_locator_content (void) char *string; TuiGenWinInfoPtr locator; - locator = locatorWinInfoPtr (); + locator = tui_locator_win_info_ptr (); if (m_genWinPtrNotNull (locator) && locator->handle != (WINDOW *) NULL) { @@ -277,7 +277,7 @@ tui_show_locator_content (void) 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) @@ -296,13 +296,13 @@ static void 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; } @@ -333,7 +333,7 @@ tui_show_frame_info (struct frame_info *fi) { register int startLine, i; CORE_ADDR low; - TuiGenWinInfoPtr locator = locatorWinInfoPtr (); + TuiGenWinInfoPtr locator = tui_locator_win_info_ptr (); int sourceAlreadyDisplayed; struct symtab_and_line sal; @@ -347,10 +347,10 @@ tui_show_frame_info (struct frame_info *fi) 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) @@ -404,9 +404,9 @@ tui_show_frame_info (struct frame_info *fi) { 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); } diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index ea4e5e3..54e30ba 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -429,12 +429,12 @@ tui_set_win_focus_to (TuiWinInfoPtr 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); } @@ -604,14 +604,14 @@ tuiResizeAll (void) 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; @@ -619,8 +619,8 @@ tuiResizeAll (void) 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++; @@ -640,7 +640,7 @@ tuiResizeAll (void) { 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 */ @@ -676,7 +676,7 @@ tuiResizeAll (void) { 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 */ @@ -742,11 +742,11 @@ tuiResizeAll (void) 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); @@ -768,7 +768,7 @@ tuiSigwinchHandler (int signal) ** 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 */ @@ -867,11 +867,11 @@ _tuiSetFocus (char *arg, int fromTTY) 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\ @@ -886,7 +886,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", - winName ((TuiGenWinInfoPtr) tuiWinWithFocus ())); + tui_win_name ((TuiGenWinInfoPtr) tui_win_with_focus ())); } else warning ("Incorrect Number of Arguments.\n%s", FOCUS_USAGE); @@ -913,18 +913,18 @@ static void _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); } @@ -960,7 +960,7 @@ _tuiSetTabWidth_command (char *arg, int fromTTY) 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"); } @@ -997,7 +997,7 @@ _tuiSetWinHeight (char *arg, int fromTTY) */ 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\ @@ -1088,7 +1088,7 @@ _tuiXDBsetWinHeight (char *arg, int fromTTY) 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], @@ -1133,8 +1133,8 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight) { 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) @@ -1144,7 +1144,7 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight) _makeInvisibleAndSetNewHeight (primaryWinInfo, newHeight); if (primaryWinInfo->generic.type == CMD_WIN) { - winInfo = (TuiWinInfoPtr) (sourceWindows ())->list[0]; + winInfo = (TuiWinInfoPtr) (tui_source_windows ())->list[0]; srcWinInfo = winInfo; } else @@ -1172,7 +1172,7 @@ _tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight) else { firstWin = dataWin; - secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0]; + secondWin = (TuiWinInfoPtr) (tui_source_windows ())->list[0]; } if (primaryWinInfo == cmdWin) { /* @@ -1308,7 +1308,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) if (m_hasLocator (winInfo)) { - genWinInfo = locatorWinInfoPtr (); + genWinInfo = tui_locator_win_info_ptr (); tui_make_invisible (genWinInfo); genWinInfo->origin.y = winInfo->generic.origin.y + height; } @@ -1346,7 +1346,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) { 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) { @@ -1360,7 +1360,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) 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) @@ -1380,7 +1380,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) } if (m_hasLocator (winInfo)) { - tui_make_visible (locatorWinInfoPtr ()); + tui_make_visible (tui_locator_win_info_ptr ()); tui_show_locator_content (); } break; @@ -1405,32 +1405,32 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) 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 @@ -1446,7 +1446,7 @@ _newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight) 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 @@ -1523,7 +1523,7 @@ _parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll) { if (numToScroll) *numToScroll = 0; - *winToScroll = tuiWinWithFocus (); + *winToScroll = tui_win_with_focus (); /* ** First set up the default window to scroll, in case there is no @@ -1570,14 +1570,14 @@ _parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll) /* 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); } diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index d293539..cad7b9a 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -253,7 +253,7 @@ void 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++) { diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 0499913..96279b7 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -51,7 +51,7 @@ void tui_display_main (void) { - if ((sourceWindows ())->count > 0) + if ((tui_source_windows ())->count > 0) { CORE_ADDR addr; @@ -120,8 +120,8 @@ tui_update_source_window_as_is (TuiWinInfoPtr winInfo, struct symtab *s, ** 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); } } @@ -141,7 +141,7 @@ tui_update_source_windows_with_addr (CORE_ADDR addr) struct symtab_and_line sal; TuiLineOrAddress l; - switch (currentLayout ()) + switch (tui_current_layout ()) { case DISASSEM_COMMAND: case DISASSEM_DATA_COMMAND: @@ -161,9 +161,9 @@ tui_update_source_windows_with_addr (CORE_ADDR addr) { 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); @@ -181,7 +181,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line) CORE_ADDR pc; TuiLineOrAddress l; - switch (currentLayout ()) + switch (tui_current_layout ()) { case DISASSEM_COMMAND: case DISASSEM_DATA_COMMAND: @@ -191,7 +191,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line) 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); @@ -379,7 +379,7 @@ tui_set_is_exec_point_at (TuiLineOrAddress l, TuiWinInfoPtr winInfo) void tui_update_all_breakpoint_info () { - TuiList* list = sourceWindows (); + TuiList* list = tui_source_windows (); int i; for (i = 0; i < list->count; i++) @@ -470,8 +470,8 @@ tuiSetExecInfoContent (TuiWinInfoPtr winInfo) 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; @@ -595,7 +595,7 @@ tui_alloc_source_buffer (struct tui_win_info *winInfo) { /* 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; diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index a61272c..596198f 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -140,7 +140,7 @@ tui_rl_change_windows (int notused1, int notused2) 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). */ @@ -188,7 +188,7 @@ tui_rl_delete_other_windows (int notused1, int notused2) TuiLayoutType new_layout; TuiRegisterDisplayType regs_type = TUI_UNDEFINED_REGS; - new_layout = currentLayout (); + new_layout = tui_current_layout (); /* Kill one window. */ switch (new_layout) @@ -220,7 +220,7 @@ tui_rl_other_window (int count, int key) 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); @@ -384,8 +384,8 @@ tui_enable (void) 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); |