diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-06 23:55:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-06 23:55:34 +0000 |
commit | ec7d9e561ff8a802a917d05e2c294436cb07e19f (patch) | |
tree | 14b3cfa7d526a87f11fa4c0868f53fafa2531e9b /gdb | |
parent | 5cbf0477c55c298309273f6873f88e1ac6d19b64 (diff) | |
download | gdb-ec7d9e561ff8a802a917d05e2c294436cb07e19f.zip gdb-ec7d9e561ff8a802a917d05e2c294436cb07e19f.tar.gz gdb-ec7d9e561ff8a802a917d05e2c294436cb07e19f.tar.bz2 |
2004-02-06 Andrew Cagney <cagney@redhat.com>
* tui/tui-wingeneral.h: Update copyright.
(m_allBeVisible): Delete macro.
(m_allBeInvisible): Delete macro.
(struct tui_gen_win_info): Declare.
(struct tui_win_info): Declare.
(tui_unhighlight_win): Rename unhighlightWin.
(tui_make_visible, tui_make_invisible): Replace makeVisible.
(tui_make_all_visible, tui_make_all_invisible): Replace makeAllVisible.
(tui_make_window): Rename makeWindow.
(tui_copy_win): Rename copyWin.
(tui_box_win): Rename boxWin.
(tui_highlight_win): Rename highlightWin.
(tui_check_and_display_highlight_if_needed): Rename
checkAndDisplayHighlightIfNeeded.
(tui_refresh_all): Rename refreshAll.
(tui_delete_win): Rename tuiDelwin.
(tui_refresh_win): Rename tuiRefreshWin.
* tui/tui-wingeneral.c (make_visible): Rename makeVisible.
(tui_make_visible, tui_make_invisible): New functions.
(tui_make_all_visible, tui_make_all_invisible): New functions.
(make_all_visible): Rename makeAllVisible.
* tui/tui-winsource.c, tui/tui-windata.c: Update references.
* tui/tui-data.c, tui/tui-winsource.c: Update references.
* tui/tui-windata.c, tui/tui-win.c: Update references.
* tui/tui-regs.c, tui/tui-layout.c: Update references.
* tui/tui-data.h (struct tui_gen_win_info): Rename _TuiGenWinInfo.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 29 | ||||
-rw-r--r-- | gdb/tui/tui-data.c | 16 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 2 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 42 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 4 | ||||
-rw-r--r-- | gdb/tui/tui-stack.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 25 | ||||
-rw-r--r-- | gdb/tui/tui-windata.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 138 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.h | 49 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 16 |
11 files changed, 180 insertions, 151 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d56797e..13de0f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,32 @@ +2004-02-06 Andrew Cagney <cagney@redhat.com> + + * tui/tui-wingeneral.h: Update copyright. + (m_allBeVisible): Delete macro. + (m_allBeInvisible): Delete macro. + (struct tui_gen_win_info): Declare. + (struct tui_win_info): Declare. + (tui_unhighlight_win): Rename unhighlightWin. + (tui_make_visible, tui_make_invisible): Replace makeVisible. + (tui_make_all_visible, tui_make_all_invisible): Replace makeAllVisible. + (tui_make_window): Rename makeWindow. + (tui_copy_win): Rename copyWin. + (tui_box_win): Rename boxWin. + (tui_highlight_win): Rename highlightWin. + (tui_check_and_display_highlight_if_needed): Rename + checkAndDisplayHighlightIfNeeded. + (tui_refresh_all): Rename refreshAll. + (tui_delete_win): Rename tuiDelwin. + (tui_refresh_win): Rename tuiRefreshWin. + * tui/tui-wingeneral.c (make_visible): Rename makeVisible. + (tui_make_visible, tui_make_invisible): New functions. + (tui_make_all_visible, tui_make_all_invisible): New functions. + (make_all_visible): Rename makeAllVisible. + * tui/tui-winsource.c, tui/tui-windata.c: Update references. + * tui/tui-data.c, tui/tui-winsource.c: Update references. + * tui/tui-windata.c, tui/tui-win.c: Update references. + * tui/tui-regs.c, tui/tui-layout.c: Update references. + * tui/tui-data.h (struct tui_gen_win_info): Rename _TuiGenWinInfo. + 2004-02-06 Mark Kettenis <kettenis@gnu.org> * proc-api.c (write_with_trace): Initialize local variable to diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index c6f4fb5..f992483 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -773,7 +773,7 @@ tuiDelWindow (TuiWinInfoPtr winInfo) genericWin = locatorWinInfoPtr (); if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; genericWin->isVisible = FALSE; } @@ -785,7 +785,7 @@ tuiDelWindow (TuiWinInfoPtr winInfo) genericWin = winInfo->detail.sourceInfo.executionInfo; if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; genericWin->isVisible = FALSE; } @@ -804,7 +804,7 @@ tuiDelWindow (TuiWinInfoPtr winInfo) } if (winInfo->generic.handle != (WINDOW *) NULL) { - tuiDelwin (winInfo->generic.handle); + tui_delete_win (winInfo->generic.handle); winInfo->generic.handle = (WINDOW *) NULL; winInfo->generic.isVisible = FALSE; } @@ -826,7 +826,7 @@ freeWindow (TuiWinInfoPtr winInfo) genericWin = locatorWinInfoPtr (); if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; } freeWinContent (genericWin); @@ -838,7 +838,7 @@ freeWindow (TuiWinInfoPtr winInfo) genericWin = winInfo->detail.sourceInfo.executionInfo; if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; freeWinContent (genericWin); } @@ -871,7 +871,7 @@ freeWindow (TuiWinInfoPtr winInfo) } if (winInfo->generic.handle != (WINDOW *) NULL) { - tuiDelwin (winInfo->generic.handle); + tui_delete_win (winInfo->generic.handle); winInfo->generic.handle = (WINDOW *) NULL; freeWinContent (&winInfo->generic); } @@ -938,7 +938,7 @@ tuiDelDataWindows (TuiWinContent content, int contentSize) if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; genericWin->isVisible = FALSE; } @@ -963,7 +963,7 @@ freeDataContent (TuiWinContent content, int contentSize) if (genericWin != (TuiGenWinInfoPtr) NULL) { - tuiDelwin (genericWin->handle); + tui_delete_win (genericWin->handle); genericWin->handle = (WINDOW *) NULL; freeWinContent (genericWin); } diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index ba37acf..cad1102 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -32,7 +32,7 @@ #endif /* Generic window information */ - typedef struct _TuiGenWinInfo + typedef struct tui_gen_win_info { WINDOW *handle; /* window handle */ TuiWinType type; /* type of window */ diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index fad4e37..815758d 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -96,13 +96,13 @@ showLayout (TuiLayoutType layout) if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND) { _showData (layout); - refreshAll (winList); + tui_refresh_all (winList); } else { /* First make the current layout be invisible */ - m_allBeInvisible (); - m_beInvisible (locatorWinInfoPtr ()); + tui_make_all_invisible (); + tui_make_invisible (locatorWinInfoPtr ()); switch (layout) { @@ -791,8 +791,8 @@ _showSourceDisassemCommand (void) 3, 0, 0); - m_beVisible (srcWin); - m_beVisible (srcWin->detail.sourceInfo.executionInfo); + tui_make_visible (&srcWin->generic); + tui_make_visible (srcWin->detail.sourceInfo.executionInfo); srcWin->detail.sourceInfo.hasLocator = FALSE;; } if (m_winPtrNotNull (srcWin)) @@ -834,14 +834,14 @@ _showSourceDisassemCommand (void) 0, srcHeight - 1); disassemWin->canHighlight = TRUE; - m_beVisible (disassemWin); - m_beVisible (disassemWin->detail.sourceInfo.executionInfo); + tui_make_visible (&disassemWin->generic); + tui_make_visible (disassemWin->detail.sourceInfo.executionInfo); } if (m_winPtrNotNull (disassemWin)) { srcWin->detail.sourceInfo.hasLocator = FALSE; disassemWin->detail.sourceInfo.hasLocator = TRUE; - m_beVisible (locator); + tui_make_visible (locator); tui_show_locator_content (); tui_show_source_content (disassemWin); @@ -858,10 +858,10 @@ _showSourceDisassemCommand (void) 0, cmdWin->generic.origin.y); cmdWin->canHighlight = FALSE; - m_beVisible (cmdWin); + tui_make_visible (&cmdWin->generic); } if (m_winPtrNotNull (cmdWin)) - tuiRefreshWin (&cmdWin->generic); + tui_refresh_win (&cmdWin->generic); } } setCurrentLayoutTo (SRC_DISASSEM_COMMAND); @@ -886,8 +886,8 @@ _showData (TuiLayoutType newLayout) dataHeight = totalHeight / 2; srcHeight = totalHeight - dataHeight; - m_allBeInvisible (); - m_beInvisible (locator); + tui_make_all_invisible (); + tui_make_invisible (locator); _makeDataWindow (&dataWin, dataHeight, 0); dataWin->canHighlight = TRUE; if (newLayout == SRC_DATA_COMMAND) @@ -922,8 +922,8 @@ _showData (TuiLayoutType newLayout) 3, 0, dataHeight - 1); - m_beVisible (winList[winType]); - m_beVisible (winList[winType]->detail.sourceInfo.executionInfo); + tui_make_visible (&winList[winType]->generic); + tui_make_visible (winList[winType]->detail.sourceInfo.executionInfo); _initGenWinInfo (locator, LOCATOR_WIN, 2 /* 1 */ , @@ -932,7 +932,7 @@ _showData (TuiLayoutType newLayout) totalHeight - 1); } winList[winType]->detail.sourceInfo.hasLocator = TRUE; - m_beVisible (locator); + tui_make_visible (locator); tui_show_locator_content (); addToSourceWindows (winList[winType]); setCurrentLayoutTo (newLayout); @@ -998,7 +998,7 @@ _initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType, else ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE; } - makeWindow (generic, boxIt); + tui_make_window (generic, boxIt); } *winInfoPtr = opaqueWinInfo; } @@ -1106,20 +1106,20 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType) 0, 0); (*winInfoPtr)->canHighlight = TRUE; - m_beVisible (*winInfoPtr); - m_beVisible ((*winInfoPtr)->detail.sourceInfo.executionInfo); + tui_make_visible (&(*winInfoPtr)->generic); + tui_make_visible ((*winInfoPtr)->detail.sourceInfo.executionInfo); } if (m_winPtrNotNull (*winInfoPtr)) { (*winInfoPtr)->detail.sourceInfo.hasLocator = TRUE; - m_beVisible (locator); + tui_make_visible (locator); tui_show_locator_content (); tui_show_source_content (*winInfoPtr); if (m_winPtrIsNull (cmdWin)) { _makeCommandWindow (&cmdWin, cmdHeight, srcHeight); - tuiRefreshWin (&cmdWin->generic); + tui_refresh_win (&cmdWin->generic); } else { @@ -1130,7 +1130,7 @@ _showSourceOrDisassemAndCommand (TuiLayoutType layoutType) cmdWin->generic.origin.x, cmdWin->generic.origin.y); cmdWin->canHighlight = FALSE; - m_beVisible (cmdWin); + tui_make_visible (&cmdWin->generic); } } setCurrentLayoutTo (layoutType); diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 68520b9..ad42b9e 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -338,7 +338,7 @@ tui_display_registers_from (int startElementNo) itemWinWidth + 2 : itemWinWidth + 1; dataItemWin->origin.x = (itemWinWidth * j) + 1; dataItemWin->origin.y = curY; - makeWindow (dataItemWin, DONT_BOX_WINDOW); + tui_make_window (dataItemWin, DONT_BOX_WINDOW); scrollok (dataItemWin->handle, FALSE); } touchwin (dataItemWin->handle); @@ -941,7 +941,7 @@ _tuiDisplayRegister (int regNum, if (dataElementPtr->highlight) wstandend (winInfo->handle); - tuiRefreshWin (winInfo); + tui_refresh_win (winInfo); } return; } /* _tuiDisplayRegister */ diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 7fac047..77de7bc 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -265,7 +265,7 @@ tui_show_locator_content (void) waddstr (locator->handle, string); wclrtoeol (locator->handle); wstandend (locator->handle); - tuiRefreshWin (locator); + tui_refresh_win (locator); wmove (locator->handle, 0, 0); xfree (string); locator->contentInUse = TRUE; diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 4af9e8a..83286b3 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -436,10 +436,10 @@ tuiSetWinFocusTo (TuiWinInfoPtr winInfo) if (m_winPtrNotNull (winWithFocus) && winWithFocus->generic.type != CMD_WIN) - unhighlightWin (winWithFocus); + tui_unhighlight_win (winWithFocus); tuiSetWinWithFocus (winInfo); if (winInfo->generic.type != CMD_WIN) - highlightWin (winInfo); + tui_highlight_win (winInfo); } return; @@ -593,7 +593,7 @@ tuiRefreshAll (void) TuiWinType type; clearok (curscr, TRUE); - refreshAll (winList); + tui_refresh_all (winList); for (type = SRC_WIN; type < MAX_MAJOR_WINDOWS; type++) { if (winList[type] && winList[type]->generic.isVisible) @@ -603,7 +603,7 @@ tuiRefreshAll (void) case SRC_WIN: case DISASSEM_WIN: tui_show_source_content (winList[type]); - checkAndDisplayHighlightIfNeeded (winList[type]); + tui_check_and_display_highlight_if_needed (winList[type]); tui_erase_exec_info_content (winList[type]); tui_update_exec_info (winList[type]); break; @@ -1308,8 +1308,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) int i; TuiGenWinInfoPtr genWinInfo; - - m_beInvisible (&winInfo->generic); + tui_make_invisible (&winInfo->generic); winInfo->generic.height = height; if (height > 1) winInfo->generic.viewportHeight = height - 1; @@ -1324,7 +1323,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) case SRC_WIN: case DISASSEM_WIN: genWinInfo = winInfo->detail.sourceInfo.executionInfo; - m_beInvisible (genWinInfo); + tui_make_invisible (genWinInfo); genWinInfo->height = height; genWinInfo->origin.y = winInfo->generic.origin.y; if (height > 1) @@ -1337,7 +1336,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) if (m_hasLocator (winInfo)) { genWinInfo = locatorWinInfoPtr (); - m_beInvisible (genWinInfo); + tui_make_invisible (genWinInfo); genWinInfo->origin.y = winInfo->generic.origin.y + height; } break; @@ -1347,7 +1346,7 @@ _makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) { genWinInfo = (TuiGenWinInfoPtr) & ((TuiWinElementPtr) winInfo->generic.content[i])->whichElement.dataWindow; - tuiDelwin (genWinInfo->handle); + tui_delete_win (genWinInfo->handle); genWinInfo->handle = (WINDOW *) NULL; } break; @@ -1368,14 +1367,14 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) { struct symtab *s; - m_beVisible (&winInfo->generic); - checkAndDisplayHighlightIfNeeded (winInfo); + tui_make_visible (&winInfo->generic); + tui_check_and_display_highlight_if_needed (winInfo); switch (winInfo->generic.type) { case SRC_WIN: case DISASSEM_WIN: freeWinContent (winInfo->detail.sourceInfo.executionInfo); - m_beVisible (winInfo->detail.sourceInfo.executionInfo); + tui_make_visible (winInfo->detail.sourceInfo.executionInfo); if (winInfo->generic.content != (OpaquePtr) NULL) { TuiLineOrAddress lineOrAddr; @@ -1408,7 +1407,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) } if (m_hasLocator (winInfo)) { - m_beVisible (locatorWinInfoPtr ()); + tui_make_visible (locatorWinInfoPtr ()); tui_show_locator_content (); } break; diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c index f504f7f..42775de 100644 --- a/gdb/tui/tui-windata.c +++ b/gdb/tui/tui-windata.c @@ -112,7 +112,7 @@ tuiDeleteDataContentWindows (void) { dataItemWinPtr = &((TuiWinContent) dataWin->generic.content)[i]->whichElement.dataWindow; - tuiDelwin (dataItemWinPtr->handle); + tui_delete_win (dataItemWinPtr->handle); dataItemWinPtr->handle = (WINDOW *) NULL; dataItemWinPtr->isVisible = FALSE; } @@ -125,7 +125,7 @@ void tuiEraseDataContent (char *prompt) { werase (dataWin->generic.handle); - checkAndDisplayHighlightIfNeeded (dataWin); + tui_check_and_display_highlight_if_needed (dataWin); if (prompt != (char *) NULL) { int halfWidth = (dataWin->generic.width - 2) / 2; @@ -160,7 +160,7 @@ tuiDisplayAllData (void) { tuiEraseDataContent ((char *) NULL); tuiDeleteDataContentWindows (); - checkAndDisplayHighlightIfNeeded (dataWin); + tui_check_and_display_highlight_if_needed (dataWin); tui_display_registers_from (0); /* ** Then display the other data @@ -188,7 +188,7 @@ tuiDisplayDataFromLine (int lineNo) if (lineNo < 0) _lineNo = 0; - checkAndDisplayHighlightIfNeeded (dataWin); + tui_check_and_display_highlight_if_needed (dataWin); /* there is no general data, force regs to display (if there are any) */ if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0) diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 2f32f64..d293539 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -39,12 +39,10 @@ /*********************** ** PUBLIC FUNCTIONS ***********************/ -/* - ** tuiRefreshWin() - ** Refresh the window - */ + +/* Refresh the window. */ void -tuiRefreshWin (TuiGenWinInfoPtr winInfo) +tui_refresh_win (TuiGenWinInfoPtr winInfo) { if (winInfo->type == DATA_WIN && winInfo->contentSize > 0) { @@ -72,21 +70,18 @@ tuiRefreshWin (TuiGenWinInfoPtr winInfo) } return; -} /* tuiRefreshWin */ +} -/* - ** tuiDelwin() - ** Function to delete the curses window, checking for null - */ +/* Function to delete the curses window, checking for NULL. */ void -tuiDelwin (WINDOW * window) +tui_delete_win (WINDOW * window) { if (window != (WINDOW *) NULL) delwin (window); return; -} /* tuiDelwin */ +} /* Draw a border arround the window. */ @@ -116,11 +111,8 @@ boxWin (TuiGenWinInfoPtr winInfo, int highlightFlag) } -/* - ** unhighlightWin(). - */ void -unhighlightWin (TuiWinInfoPtr winInfo) +tui_unhighlight_win (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->generic.handle != (WINDOW *) NULL) { @@ -128,14 +120,11 @@ unhighlightWin (TuiWinInfoPtr winInfo) wrefresh (winInfo->generic.handle); m_setWinHighlightOff (winInfo); } -} /* unhighlightWin */ +} -/* - ** highlightWin(). - */ void -highlightWin (TuiWinInfoPtr winInfo) +tui_highlight_win (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->canHighlight && winInfo->generic.handle != (WINDOW *) NULL) @@ -144,32 +133,25 @@ highlightWin (TuiWinInfoPtr winInfo) wrefresh (winInfo->generic.handle); m_setWinHighlightOn (winInfo); } -} /* highlightWin */ - +} -/* - ** checkAndDisplayHighlightIfNecessay - */ void -checkAndDisplayHighlightIfNeeded (TuiWinInfoPtr winInfo) +tui_check_and_display_highlight_if_needed (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->generic.type != CMD_WIN) { if (winInfo->isHighlighted) - highlightWin (winInfo); + tui_highlight_win (winInfo); else - unhighlightWin (winInfo); + tui_unhighlight_win (winInfo); } return; -} /* checkAndDisplayHighlightIfNeeded */ +} -/* - ** makeWindow(). - */ void -makeWindow (TuiGenWinInfoPtr winInfo, int boxIt) +tui_make_window (TuiGenWinInfoPtr winInfo, int boxIt) { WINDOW *handle; @@ -188,47 +170,53 @@ makeWindow (TuiGenWinInfoPtr winInfo, int boxIt) } -/* - ** makeVisible(). - ** We can't really make windows visible, or invisible. So we - ** have to delete the entire window when making it visible, - ** and create it again when making it visible. - */ -void -makeVisible (TuiGenWinInfoPtr winInfo, int visible) +/* We can't really make windows visible, or invisible. So we have to + delete the entire window when making it visible, and create it + again when making it visible. */ +static void +make_visible (struct tui_gen_win_info *win_info, int visible) { /* Don't tear down/recreate command window */ - if (winInfo->type == CMD_WIN) + if (win_info->type == CMD_WIN) return; if (visible) { - if (!winInfo->isVisible) + if (!win_info->isVisible) { - makeWindow ( - winInfo, - (winInfo->type != CMD_WIN && !m_winIsAuxillary (winInfo->type))); - winInfo->isVisible = TRUE; + tui_make_window (win_info, + (win_info->type != CMD_WIN + && !m_winIsAuxillary (win_info->type))); + win_info->isVisible = TRUE; } } else if (!visible && - winInfo->isVisible && winInfo->handle != (WINDOW *) NULL) + win_info->isVisible && win_info->handle != (WINDOW *) NULL) { - winInfo->isVisible = FALSE; - tuiDelwin (winInfo->handle); - winInfo->handle = (WINDOW *) NULL; + win_info->isVisible = FALSE; + tui_delete_win (win_info->handle); + win_info->handle = (WINDOW *) NULL; } return; -} /* makeVisible */ +} +void +tui_make_visible (struct tui_gen_win_info *win_info) +{ + make_visible (win_info, 1); +} -/* - ** makeAllVisible(). - ** Makes all windows invisible (except the command and locator windows) - */ void -makeAllVisible (int visible) +tui_make_invisible (struct tui_gen_win_info *win_info) +{ + make_visible (win_info, 0); +} + + +/* Makes all windows invisible (except the command and locator windows). */ +static void +make_all_visible (int visible) { int i; @@ -238,21 +226,31 @@ makeAllVisible (int visible) ((winList[i])->generic.type) != CMD_WIN) { if (m_winIsSourceType ((winList[i])->generic.type)) - makeVisible ((winList[i])->detail.sourceInfo.executionInfo, - visible); - makeVisible ((TuiGenWinInfoPtr) winList[i], visible); + make_visible ((winList[i])->detail.sourceInfo.executionInfo, + visible); + make_visible ((TuiGenWinInfoPtr) winList[i], visible); } } return; -} /* makeAllVisible */ +} + +void +tui_make_all_visible (void) +{ + make_all_visible (1); +} + +void +tui_make_all_invisible (void) +{ + make_all_visible (0); +} + +/* Function to refresh all the windows currently displayed. */ -/* - ** refreshAll(). - ** Function to refresh all the windows currently displayed - */ void -refreshAll (TuiWinInfoPtr * list) +tui_refresh_all (TuiWinInfoPtr * list) { TuiWinType type; TuiGenWinInfoPtr locator = locatorWinInfoPtr (); @@ -264,16 +262,16 @@ refreshAll (TuiWinInfoPtr * list) if (type == SRC_WIN || type == DISASSEM_WIN) { touchwin (list[type]->detail.sourceInfo.executionInfo->handle); - tuiRefreshWin (list[type]->detail.sourceInfo.executionInfo); + tui_refresh_win (list[type]->detail.sourceInfo.executionInfo); } touchwin (list[type]->generic.handle); - tuiRefreshWin (&list[type]->generic); + tui_refresh_win (&list[type]->generic); } } if (locator->isVisible) { touchwin (locator->handle); - tuiRefreshWin (locator); + tui_refresh_win (locator); } return; diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h index 42d1ce4..22ec251 100644 --- a/gdb/tui/tui-wingeneral.h +++ b/gdb/tui/tui-wingeneral.h @@ -1,5 +1,8 @@ /* General window behavior. - Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + + Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software + Foundation, Inc. + Contributed by Hewlett-Packard Company. This file is part of GDB. @@ -19,31 +22,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef TUI_GENERAL_WIN_H -#define TUI_GENERAL_WIN_H - -/* - ** Functions - */ -extern void unhighlightWin (TuiWinInfoPtr); -extern void makeVisible (TuiGenWinInfoPtr, int); -extern void makeAllVisible (int); -extern void makeWindow (TuiGenWinInfoPtr, int); -extern TuiWinInfoPtr copyWin (TuiWinInfoPtr); -extern void boxWin (TuiGenWinInfoPtr, int); -extern void highlightWin (TuiWinInfoPtr); -extern void checkAndDisplayHighlightIfNeeded (TuiWinInfoPtr); -extern void refreshAll (TuiWinInfoPtr *); -extern void tuiDelwin (WINDOW * window); -extern void tuiRefreshWin (TuiGenWinInfoPtr); +#ifndef TUI_WINGENERAL_H +#define TUI_WINGENERAL_H + +struct tui_win_info; +struct tui_gen_win_info; + +extern void tui_unhighlight_win (struct tui_win_info *); +extern void tui_make_visible (struct tui_gen_win_info *); +extern void tui_make_invisible (struct tui_gen_win_info *); +extern void tui_make_all_visible (void); +extern void tui_make_all_invisible (void); +extern void tui_make_window (struct tui_gen_win_info *, int); +extern struct tui_win_info *tui_copy_win (struct tui_win_info *); +extern void tui_box_win (struct tui_gen_win_info *, int); +extern void tui_highlight_win (struct tui_win_info *); +extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *); +extern void tui_refresh_all (struct tui_win_info * *); +extern void tui_delete_win (WINDOW * window); +extern void tui_refresh_win (struct tui_gen_win_info *); /* ** Macros */ -#define m_beVisible(winInfo) makeVisible((TuiGenWinInfoPtr)(winInfo), TRUE) +#define m_beVisible(winInfo) makeVisible((struct tui_gen_win_info *)(winInfo), TRUE) #define m_beInvisible(winInfo) \ - makeVisible((TuiGenWinInfoPtr)(winInfo), FALSE) -#define m_allBeVisible() makeAllVisible(TRUE) -#define m_allBeInvisible() makeAllVisible(FALSE) + makeVisible((struct tui_gen_win_info *)(winInfo), FALSE) -#endif /*TUI_GENERAL_WIN_H */ +#endif diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 29a92c7..4b1957d 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -233,7 +233,7 @@ tui_erase_source_content (TuiWinInfoPtr winInfo, int displayPrompt) if (winInfo->generic.handle != (WINDOW *) NULL) { werase (winInfo->generic.handle); - checkAndDisplayHighlightIfNeeded (winInfo); + tui_check_and_display_highlight_if_needed (winInfo); if (displayPrompt == EMPTY_SOURCE_PROMPT) { char *noSrcStr; @@ -258,7 +258,7 @@ tui_erase_source_content (TuiWinInfoPtr winInfo, int displayPrompt) tui_set_source_content_nil (winInfo, noSrcStr); } - tuiRefreshWin (&winInfo->generic); + tui_refresh_win (&winInfo->generic); } return; } /* tuiEraseSourceContent */ @@ -302,8 +302,8 @@ tui_show_source_content (TuiWinInfoPtr winInfo) else tui_erase_source_content (winInfo, TRUE); - checkAndDisplayHighlightIfNeeded (winInfo); - tuiRefreshWin (&winInfo->generic); + tui_check_and_display_highlight_if_needed (winInfo); + tui_refresh_win (&winInfo->generic); winInfo->generic.contentInUse = TRUE; } @@ -370,7 +370,7 @@ tui_set_is_exec_point_at (TuiLineOrAddress l, TuiWinInfoPtr winInfo) i++; } if (changed) - tuiRefreshWin (&winInfo->generic); + tui_refresh_win (&winInfo->generic); } /* Update the execution windows to show the active breakpoints. @@ -528,14 +528,14 @@ tuiShowExecInfoContent (TuiWinInfoPtr winInfo) int curLine; werase (execInfo->handle); - tuiRefreshWin (execInfo); + tui_refresh_win (execInfo); for (curLine = 1; (curLine <= execInfo->contentSize); curLine++) mvwaddstr (execInfo->handle, curLine, 0, ((TuiWinElementPtr) execInfo->content[curLine - 1])->whichElement.simpleString); - tuiRefreshWin (execInfo); + tui_refresh_win (execInfo); execInfo->contentInUse = TRUE; return; @@ -548,7 +548,7 @@ tui_erase_exec_info_content (TuiWinInfoPtr winInfo) TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo; werase (execInfo->handle); - tuiRefreshWin (execInfo); + tui_refresh_win (execInfo); return; } |