From eca6576c1966fe3ced22c80a876f4f4665589bd2 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sat, 14 Jul 2001 19:31:09 +0000 Subject: * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype. tuiIO.c, tuiData.c: Likewise. tuiDataWin.c, tuiDisassem.c: Likewise. tuiGeneralWin.c, tuiLayout.c: Likewise. tuiRegs.c, tuiSource.c: Likewise. tuiSouceWin.c, tuiStack.c: Likewise. --- gdb/tui/ChangeLog | 9 ++ gdb/tui/tui.c | 190 ++----------------------- gdb/tui/tuiCommand.c | 36 +---- gdb/tui/tuiData.c | 368 ++++-------------------------------------------- gdb/tui/tuiDataWin.c | 76 +--------- gdb/tui/tuiDisassem.c | 57 +------- gdb/tui/tuiGeneralWin.c | 114 ++------------- gdb/tui/tuiIO.c | 95 ++----------- gdb/tui/tuiLayout.c | 268 ++++------------------------------- gdb/tui/tuiRegs.c | 289 ++++++------------------------------- gdb/tui/tuiSource.c | 62 +------- gdb/tui/tuiSourceWin.c | 259 ++++------------------------------ gdb/tui/tuiStack.c | 120 ++-------------- gdb/tui/tuiWin.c | 296 ++++---------------------------------- 14 files changed, 240 insertions(+), 1999 deletions(-) (limited to 'gdb') diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index ac6597b..e69b997 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,5 +1,14 @@ 2001-07-14 Stephane Carrez + * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype. + tuiIO.c, tuiData.c: Likewise. + tuiDataWin.c, tuiDisassem.c: Likewise. + tuiGeneralWin.c, tuiLayout.c: Likewise. + tuiRegs.c, tuiSource.c: Likewise. + tuiSouceWin.c, tuiStack.c: Likewise. + +2001-07-14 Stephane Carrez + * tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright. tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise. tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise. diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index d68f44a..4262d3a 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -75,12 +75,7 @@ static Opaque _tui_vDo (TuiOpaqueFuncPtr, va_list); ** tuiInit(). */ void -#ifdef __STDC__ tuiInit (char *argv0) -#else -tuiInit (argv0) - char *argv0; -#endif { extern void init_page_info (); extern void initialize_tui_files (void); @@ -113,11 +108,7 @@ extern void initialize_tui_files (void); ** tuiInitWindows(). */ void -#ifdef __STDC__ tuiInitWindows (void) -#else -tuiInitWindows () -#endif { TuiWinType type; @@ -138,11 +129,7 @@ tuiInitWindows () ** Kill signal handler and cleanup termination method */ void -#ifdef __STDC__ tuiResetScreen (void) -#else -tuiResetScreen () -#endif { TuiWinType type = SRC_WIN; @@ -170,11 +157,7 @@ tuiResetScreen () ** Kill signal handler and cleanup termination method */ void -#ifdef __STDC__ tuiCleanUp (void) -#else -tuiCleanUp () -#endif { char *buffer; extern char *term_cursor_move; @@ -196,15 +179,7 @@ tuiCleanUp () ** tuiError(). */ void -#ifdef __STDC__ -tuiError ( - char *string, - int exitGdb) -#else -tuiError (string, exitGdb) - char *string; - int exitGdb; -#endif +tuiError (char *string, int exitGdb) { puts_unfiltered (string); if (exitGdb) @@ -222,13 +197,7 @@ tuiError (string, exitGdb) ** tuiError with args in a va_list. */ void -#ifdef __STDC__ -tui_vError ( - va_list args) -#else -tui_vError (args) - va_list args; -#endif +tui_vError (va_list args) { char *string; int exitGdb; @@ -247,13 +216,7 @@ tui_vError (args) ** Wrapper on top of free() to ensure that input address is greater than 0x0 */ void -#ifdef __STDC__ -tuiFree ( - char *ptr) -#else -tuiFree (ptr) - char *ptr; -#endif +tuiFree (char *ptr) { if (ptr != (char *) NULL) { @@ -270,15 +233,7 @@ tuiFree (ptr) ** low address input. */ Opaque -#ifdef __STDC__ -tuiGetLowDisassemblyAddress ( - Opaque low, - Opaque pc) -#else -tuiGetLowDisassemblyAddress (low, pc) - Opaque low; - Opaque pc; -#endif +tuiGetLowDisassemblyAddress (Opaque low, Opaque pc) { int line; Opaque newLow; @@ -307,13 +262,7 @@ tuiGetLowDisassemblyAddress (low, pc) ** disassembly window with args in a va_list. */ Opaque -#ifdef __STDC__ -tui_vGetLowDisassemblyAddress ( - va_list args) -#else -tui_vGetLowDisassemblyAddress (args) - va_list args; -#endif +tui_vGetLowDisassemblyAddress (va_list args) { int line; Opaque newLow; @@ -344,14 +293,7 @@ tui_vGetLowDisassemblyAddress (args) ** be replaced by judicious use of QUIT. */ Opaque -#ifdef __STDC__ -tuiDo ( - TuiOpaqueFuncPtr func,...) -#else -tuiDo (func, va_alist) - TuiOpaqueFuncPtr func; - va_dcl -#endif +tuiDo (TuiOpaqueFuncPtr func, ...) { extern int terminal_is_ours; @@ -367,11 +309,7 @@ tuiDo (func, va_alist) { va_list args; -#ifdef __STDC__ va_start (args, func); -#else - va_start (args); -#endif ret = _tui_vDo (func, args); va_end (args); } @@ -398,14 +336,7 @@ tuiDo (func, va_alist) ** */ Opaque -#ifdef __STDC__ -tuiDoAndReturnToTop ( - TuiOpaqueFuncPtr func,...) -#else -tuiDoAndReturnToTop (func, va_alist) - TuiOpaqueFuncPtr func; - va_dcl -#endif +tuiDoAndReturnToTop (TuiOpaqueFuncPtr func, ...) { extern int terminal_is_ours; @@ -421,11 +352,7 @@ tuiDoAndReturnToTop (func, va_alist) { va_list args; -#ifdef __STDC__ va_start (args, func); -#else - va_start (args); -#endif ret = _tui_vDo (func, args); /* force a return to the top level */ @@ -437,13 +364,7 @@ tuiDoAndReturnToTop (func, va_alist) void -#ifdef __STDC__ -tui_vSelectSourceSymtab ( - va_list args) -#else -tui_vSelectSourceSymtab (args) - va_list args; -#endif +tui_vSelectSourceSymtab (va_list args) { struct symtab *s = va_arg (args, struct symtab *); @@ -499,15 +420,7 @@ Usage:\ttoggle $fregs\n\ttoggle breakpoints"; ** be replaced by judicious use of QUIT. */ Opaque -#ifdef __STDC__ -va_catch_errors ( - TuiOpaqueFuncPtr func, - va_list args) -#else -va_catch_errors (func, args) - TuiOpaqueFuncPtr func; - va_list args; -#endif +va_catch_errors (TuiOpaqueFuncPtr func, va_list args) { Opaque ret = (Opaque) NULL; @@ -557,32 +470,14 @@ va_catch_errors (func, args) ** argument list as well. */ Opaque -#ifdef __STDC__ -vcatch_errors ( - OpaqueFuncPtr func,...) -#else -vcatch_errors (va_alist) - va_dcl -/* - vcatch_errors(func, va_alist) - OpaqueFuncPtr func; - va_dcl - */ -#endif +vcatch_errors (OpaqueFuncPtr func, ...) { Opaque ret = (Opaque) NULL; va_list args; -#ifdef __STDC__ va_start (args, func); /* va_arg(args, OpaqueFuncPtr); */ -#else - OpaqueFuncPtr func; - - va_start (args); - func = va_arg (args, OpaqueFuncPtr); -#endif ret = va_catch_errors (func, args); va_end (args); @@ -591,17 +486,7 @@ vcatch_errors (va_alist) void -#ifdef __STDC__ -strcat_to_buf ( - char *buf, - int buflen, - char *itemToAdd) -#else -strcat_to_buf (buf, buflen, itemToAdd) - char *buf; - int buflen; - char *itemToAdd; -#endif +strcat_to_buf (char *buf, int buflen, char *itemToAdd) { if (itemToAdd != (char *) NULL && buf != (char *) NULL) { @@ -616,31 +501,12 @@ strcat_to_buf (buf, buflen, itemToAdd) /* VARARGS */ void -#ifdef ANSI_PROTOTYPES -strcat_to_buf_with_fmt ( - char *buf, - int bufLen, - char *format,...) -#else -strcat_to_buf_with_fmt (va_alist) - va_dcl -#endif +strcat_to_buf_with_fmt (char *buf, int bufLen, char *format, ...) { char *linebuffer; struct cleanup *old_cleanups; va_list args; -#ifdef ANSI_PROTOTYPES va_start (args, format); -#else - char *buf; - int bufLen; - char *format; - - va_start (args); - buf = va_arg (args, char *); - bufLen = va_arg (args, int); - format = va_arg (args, char *); -#endif vasprintf (&linebuffer, format, args); old_cleanups = make_cleanup (xfree, linebuffer); strcat_to_buf (buf, bufLen, linebuffer); @@ -673,15 +539,7 @@ strcat_to_buf_with_fmt (va_alist) ** be replaced by judicious use of QUIT. */ static Opaque -#ifdef __STDC__ -_tui_vDo ( - TuiOpaqueFuncPtr func, - va_list args) -#else -_tui_vDo (func, args) - TuiOpaqueFuncPtr func; - va_list args; -#endif +_tui_vDo (TuiOpaqueFuncPtr func, va_list args) { extern int terminal_is_ours; @@ -712,15 +570,7 @@ _tui_vDo (func, args) static void -#ifdef __STDC__ -_toggle_command ( - char *arg, - int fromTTY) -#else -_toggle_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_toggle_command (char *arg, int fromTTY) { printf_filtered ("Specify feature to toggle.\n%s\n", (tui_version) ? TUI_TOGGLE_USAGE : TOGGLE_USAGE); @@ -733,13 +583,7 @@ _toggle_command (arg, fromTTY) ** _tui_vToggle_command(). */ static void -#ifdef __STDC__ -_tui_vToggle_command ( - va_list args) -#else -_tui_vToggle_command (args) - va_list args; -#endif +_tui_vToggle_command (va_list args) { char *arg; int fromTTY; @@ -771,11 +615,7 @@ _tui_vToggle_command (args) static void -#ifdef __STDC__ _tuiReset (void) -#else -_tuiReset () -#endif { struct termio mode; diff --git a/gdb/tui/tuiCommand.c b/gdb/tui/tuiCommand.c index 5c79ad4..3611a4b 100644 --- a/gdb/tui/tuiCommand.c +++ b/gdb/tui/tuiCommand.c @@ -41,13 +41,7 @@ ** Dispatch the correct tui function based upon the control character. */ unsigned int -#ifdef __STDC__ -tuiDispatchCtrlChar ( - unsigned int ch) -#else -tuiDispatchCtrlChar (ch) - unsigned int ch; -#endif +tuiDispatchCtrlChar (unsigned int ch) { TuiWinInfoPtr winInfo = tuiWinWithFocus (); @@ -129,13 +123,7 @@ tuiDispatchCtrlChar (ch) ** checking for overflow. Returns the new value of the char count. */ int -#ifdef __STDC__ -tuiIncrCommandCharCountBy ( - int count) -#else -tuiIncrCommandCharCountBy (count) - int count; -#endif +tuiIncrCommandCharCountBy (int count) { if (tui_version) { @@ -156,13 +144,7 @@ tuiIncrCommandCharCountBy (count) ** checking for overflow. Returns the new value of the char count. */ int -#ifdef __STDC__ -tuiDecrCommandCharCountBy ( - int count) -#else -tuiDecrCommandCharCountBy (count) - int count; -#endif +tuiDecrCommandCharCountBy (int count) { if (tui_version) { @@ -182,13 +164,7 @@ tuiDecrCommandCharCountBy (count) ** Set the character count to count. */ int -#ifdef __STDC__ -tuiSetCommandCharCountTo ( - int count) -#else -tuiSetCommandCharCountTo (count) - int count; -#endif +tuiSetCommandCharCountTo (int count) { if (tui_version) { @@ -211,11 +187,7 @@ tuiSetCommandCharCountTo (count) ** Clear the character count to count. */ int -#ifdef __STDC__ tuiClearCommandCharCount (void) -#else -tuiClearCommandCharCount () -#endif { if (tui_version) cmdWin->detail.commandInfo.curch = 0; diff --git a/gdb/tui/tuiData.c b/gdb/tui/tuiData.c index 678d6ec..a4a6511 100644 --- a/gdb/tui/tuiData.c +++ b/gdb/tui/tuiData.c @@ -83,11 +83,7 @@ static void freeContentElements (TuiWinContent, int, TuiWinType); ** Answer a whether the terminal window has been resized or not */ int -#ifdef __STDC__ tuiWinResized (void) -#else -tuiWinResized () -#endif { return _winResized; } /* tuiWinResized */ @@ -98,13 +94,7 @@ tuiWinResized () ** Set a whether the terminal window has been resized or not */ void -#ifdef __STDC__ -tuiSetWinResizedTo ( - int resized) -#else -tuiSetWinResizedTo (resized) - int resized; -#endif +tuiSetWinResizedTo (int resized) { _winResized = resized; @@ -117,11 +107,7 @@ tuiSetWinResizedTo (resized) ** Answer a pointer to the current layout definition */ TuiLayoutDefPtr -#ifdef __STDC__ tuiLayoutDef (void) -#else -tuiLayoutDef () -#endif { return &_layoutDef; } /* tuiLayoutDef */ @@ -132,11 +118,7 @@ tuiLayoutDef () ** Answer the window with the logical focus */ TuiWinInfoPtr -#ifdef __STDC__ tuiWinWithFocus (void) -#else -tuiWinWithFocus () -#endif { return _winWithFocus; } /* tuiWinWithFocus */ @@ -147,13 +129,7 @@ tuiWinWithFocus () ** Set the window that has the logical focus */ void -#ifdef __STDC__ -tuiSetWinWithFocus ( - TuiWinInfoPtr winInfo) -#else -tuiSetWinWithFocus (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiSetWinWithFocus (TuiWinInfoPtr winInfo) { _winWithFocus = winInfo; @@ -166,11 +142,7 @@ tuiSetWinWithFocus (winInfo) ** Answer the length in chars, of tabs */ int -#ifdef __STDC__ tuiDefaultTabLen (void) -#else -tuiDefaultTabLen () -#endif { return _defaultTabLen; } /* tuiDefaultTabLen */ @@ -181,13 +153,7 @@ tuiDefaultTabLen () ** Set the length in chars, of tabs */ void -#ifdef __STDC__ -tuiSetDefaultTabLen ( - int len) -#else -tuiSetDefaultTabLen (len) - int len; -#endif +tuiSetDefaultTabLen (int len) { _defaultTabLen = len; @@ -202,11 +168,7 @@ tuiSetDefaultTabLen (len) ** be displayed at the same time. */ TuiListPtr -#ifdef __STDC__ sourceWindows (void) -#else -sourceWindows () -#endif { return &_sourceWindows; } /* currentSourceWindows */ @@ -219,11 +181,7 @@ sourceWindows () ** displayed at the same time. */ void -#ifdef __STDC__ clearSourceWindows (void) -#else -clearSourceWindows () -#endif { _sourceWindows.list[0] = (Opaque) NULL; _sourceWindows.list[1] = (Opaque) NULL; @@ -238,11 +196,7 @@ clearSourceWindows () ** Clear the pertinant detail in the source windows. */ void -#ifdef __STDC__ clearSourceWindowsDetail (void) -#else -clearSourceWindowsDetail () -#endif { int i; @@ -260,13 +214,7 @@ clearSourceWindowsDetail () ** both can be displayed at the same time. */ void -#ifdef __STDC__ -addToSourceWindows ( - TuiWinInfoPtr winInfo) -#else -addToSourceWindows (winInfo) - TuiWinInfoPtr winInfo; -#endif +addToSourceWindows (TuiWinInfoPtr winInfo) { if (_sourceWindows.count < 2) _sourceWindows.list[_sourceWindows.count++] = (Opaque) winInfo; @@ -280,13 +228,7 @@ addToSourceWindows (winInfo) ** Clear the pertinant detail in the windows. */ void -#ifdef __STDC__ -clearWinDetail ( - TuiWinInfoPtr winInfo) -#else -clearWinDetail (winInfo) - TuiWinInfoPtr winInfo; -#endif +clearWinDetail (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo)) { @@ -327,11 +269,7 @@ clearWinDetail (winInfo) ** Accessor for the blank string. */ char * -#ifdef __STDC__ blankStr (void) -#else -blankStr () -#endif { return _tuiBlankStr; } /* blankStr */ @@ -342,11 +280,7 @@ blankStr () ** Accessor for the location string. */ char * -#ifdef __STDC__ locationStr (void) -#else -locationStr () -#endif { return _tuiLocationStr; } /* locationStr */ @@ -357,11 +291,7 @@ locationStr () ** Accessor for the break string. */ char * -#ifdef __STDC__ breakStr (void) -#else -breakStr () -#endif { return _tuiBreakStr; } /* breakStr */ @@ -372,11 +302,7 @@ breakStr () ** Accessor for the breakLocation string. */ char * -#ifdef __STDC__ breakLocationStr (void) -#else -breakLocationStr () -#endif { return _tuiBreakLocationStr; } /* breakLocationStr */ @@ -387,11 +313,7 @@ breakLocationStr () ** Accessor for the null string. */ char * -#ifdef __STDC__ nullStr (void) -#else -nullStr () -#endif { return _tuiNullStr; } /* nullStr */ @@ -402,11 +324,7 @@ nullStr () ** Accessor for the source execution info ptr. */ TuiGenWinInfoPtr -#ifdef __STDC__ sourceExecInfoWinPtr (void) -#else -sourceExecInfoWinPtr () -#endif { return &_execInfo[0]; } /* sourceExecInfoWinPtr */ @@ -417,11 +335,7 @@ sourceExecInfoWinPtr () ** Accessor for the disassem execution info ptr. */ TuiGenWinInfoPtr -#ifdef __STDC__ disassemExecInfoWinPtr (void) -#else -disassemExecInfoWinPtr () -#endif { return &_execInfo[1]; } /* disassemExecInfoWinPtr */ @@ -433,11 +347,7 @@ disassemExecInfoWinPtr () ** static locator win info struct. */ TuiGenWinInfoPtr -#ifdef __STDC__ locatorWinInfoPtr (void) -#else -locatorWinInfoPtr () -#endif { return &_locator; } /* locatorWinInfoPtr */ @@ -448,11 +358,7 @@ locatorWinInfoPtr () ** Accessor for the history limit */ int -#ifdef __STDC__ historyLimit (void) -#else -historyLimit () -#endif { return _historyLimit; } /* historyLimit */ @@ -463,13 +369,7 @@ historyLimit () ** Mutator for the history limit */ void -#ifdef __STDC__ -setHistoryLimitTo ( - int h) -#else -setHistoryLimitTo (h) - int h; -#endif +setHistoryLimitTo (int h) { _historyLimit = h; @@ -481,11 +381,7 @@ setHistoryLimitTo (h) ** Accessor for the termHeight */ int -#ifdef __STDC__ termHeight (void) -#else -termHeight () -#endif { return _termHeight; } /* termHeight */ @@ -496,13 +392,7 @@ termHeight () ** Mutator for the term height */ void -#ifdef __STDC__ -setTermHeightTo ( - int h) -#else -setTermHeightTo (h) - int h; -#endif +setTermHeightTo (int h) { _termHeight = h; @@ -515,11 +405,7 @@ setTermHeightTo (h) ** Accessor for the termWidth */ int -#ifdef __STDC__ termWidth (void) -#else -termWidth () -#endif { return _termWidth; } /* termWidth */ @@ -530,13 +416,7 @@ termWidth () ** Mutator for the termWidth */ void -#ifdef __STDC__ -setTermWidthTo ( - int w) -#else -setTermWidthTo (w) - int w; -#endif +setTermWidthTo (int w) { _termWidth = w; @@ -549,11 +429,7 @@ setTermWidthTo (w) ** Accessor for the current layout */ TuiLayoutType -#ifdef __STDC__ currentLayout (void) -#else -currentLayout () -#endif { return _currentLayout; } /* currentLayout */ @@ -564,13 +440,7 @@ currentLayout () ** Mutator for the current layout */ void -#ifdef __STDC__ -setCurrentLayoutTo ( - TuiLayoutType newLayout) -#else -setCurrentLayoutTo (newLayout) - TuiLayoutType newLayout; -#endif +setCurrentLayoutTo (TuiLayoutType newLayout) { _currentLayout = newLayout; @@ -583,17 +453,7 @@ setCurrentLayoutTo (newLayout) ** Set the origin of the window */ void -#ifdef __STDC__ -setGenWinOrigin ( - TuiGenWinInfoPtr winInfo, - int x, - int y) -#else -setGenWinOrigin (winInfo, x, y) - TuiGenWinInfoPtr winInfo; - int x; - int y; -#endif +setGenWinOrigin (TuiGenWinInfoPtr winInfo, int x, int y) { winInfo->origin.x = x; winInfo->origin.y = y; @@ -613,13 +473,7 @@ setGenWinOrigin (winInfo, x, y) ** if necessary */ TuiWinInfoPtr -#ifdef __STDC__ -tuiNextWin ( - TuiWinInfoPtr curWin) -#else -tuiNextWin (curWin) - TuiWinInfoPtr curWin; -#endif +tuiNextWin (TuiWinInfoPtr curWin) { TuiWinType type = curWin->generic.type; TuiWinInfoPtr nextWin = (TuiWinInfoPtr) NULL; @@ -651,13 +505,7 @@ tuiNextWin (curWin) ** if necessary */ TuiWinInfoPtr -#ifdef __STDC__ -tuiPrevWin ( - TuiWinInfoPtr curWin) -#else -tuiPrevWin (curWin) - TuiWinInfoPtr curWin; -#endif +tuiPrevWin (TuiWinInfoPtr curWin) { TuiWinType type = curWin->generic.type; TuiWinInfoPtr prev = (TuiWinInfoPtr) NULL; @@ -690,15 +538,7 @@ tuiPrevWin (curWin) ** freed after use. */ char * -#ifdef __STDC__ -displayableWinContentOf ( - TuiGenWinInfoPtr winInfo, - TuiWinElementPtr elementPtr) -#else -displayableWinContentOf (winInfo, elementPtr) - TuiGenWinInfoPtr winInfo; - TuiWinElementPtr elementPtr; -#endif +displayableWinContentOf (TuiGenWinInfoPtr winInfo, TuiWinElementPtr elementPtr) { char *string = nullStr (); @@ -827,15 +667,7 @@ displayableWinContentOf (winInfo, elementPtr) ** Answer a the content at the location indicated by index */ char * -#ifdef __STDC__ -displayableWinContentAt ( - TuiGenWinInfoPtr winInfo, - int index) -#else -displayableWinContentAt (winInfo, index) - TuiGenWinInfoPtr winInfo; - int index; -#endif +displayableWinContentAt (TuiGenWinInfoPtr winInfo, int index) { return (displayableWinContentOf (winInfo, (TuiWinElementPtr) winInfo->content[index])); } /* winContentAt */ @@ -846,15 +678,7 @@ displayableWinContentAt (winInfo, index) ** Answer the height of the element in lines */ int -#ifdef __STDC__ -winElementHeight ( - TuiGenWinInfoPtr winInfo, - TuiWinElementPtr element) -#else -winElementHeight (winInfo, element) - TuiGenWinInfoPtr winInfo; - TuiWinElementPtr element; -#endif +winElementHeight (TuiGenWinInfoPtr winInfo, TuiWinElementPtr element) { int h; @@ -873,13 +697,7 @@ winElementHeight (winInfo, element) ** Answer the window represented by name */ TuiWinInfoPtr -#ifdef __STDC__ -winByName ( - char *name) -#else -winByName (name) - char *name; -#endif +winByName (char *name) { TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL; int i = 0; @@ -900,13 +718,7 @@ winByName (name) ** Answer the window represented by name */ TuiWinInfoPtr -#ifdef __STDC__ -partialWinByName ( - char *name) -#else -partialWinByName (name) - char *name; -#endif +partialWinByName (char *name) { TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL; @@ -933,13 +745,7 @@ partialWinByName (name) ** Answer the name of the window */ char * -#ifdef __STDC__ -winName ( - TuiGenWinInfoPtr winInfo) -#else -winName (winInfo) - TuiGenWinInfoPtr winInfo; -#endif +winName (TuiGenWinInfoPtr winInfo) { char *name = (char *) NULL; @@ -970,11 +776,7 @@ winName (winInfo) ** initializeStaticData */ void -#ifdef __STDC__ initializeStaticData (void) -#else -initializeStaticData () -#endif { initGenericPart (sourceExecInfoWinPtr ()); initGenericPart (disassemExecInfoWinPtr ()); @@ -988,11 +790,7 @@ initializeStaticData () ** allocGenericWinInfo(). */ TuiGenWinInfoPtr -#ifdef __STDC__ allocGenericWinInfo (void) -#else -allocGenericWinInfo () -#endif { TuiGenWinInfoPtr win; @@ -1008,13 +806,7 @@ allocGenericWinInfo () ** initGenericPart(). */ void -#ifdef __STDC__ -initGenericPart ( - TuiGenWinInfoPtr win) -#else -initGenericPart (win) - TuiGenWinInfoPtr win; -#endif +initGenericPart (TuiGenWinInfoPtr win) { win->width = win->height = @@ -1036,15 +828,7 @@ initGenericPart (win) ** initContentElement(). */ void -#ifdef __STDC__ -initContentElement ( - TuiWinElementPtr element, - TuiWinType type) -#else -initContentElement (element, type) - TuiWinElementPtr element; - TuiWinType type; -#endif +initContentElement (TuiWinElementPtr element, TuiWinType type) { element->highlight = FALSE; switch (type) @@ -1093,13 +877,7 @@ initContentElement (element, type) ** initWinInfo(). */ void -#ifdef __STDC__ -initWinInfo ( - TuiWinInfoPtr winInfo) -#else -initWinInfo (winInfo) - TuiWinInfoPtr winInfo; -#endif +initWinInfo (TuiWinInfoPtr winInfo) { initGenericPart (&winInfo->generic); winInfo->canHighlight = @@ -1140,13 +918,7 @@ initWinInfo (winInfo) ** allocWinInfo(). */ TuiWinInfoPtr -#ifdef __STDC__ -allocWinInfo ( - TuiWinType type) -#else -allocWinInfo (type) - TuiWinType type; -#endif +allocWinInfo (TuiWinType type) { TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL; @@ -1166,15 +938,7 @@ allocWinInfo (type) ** Allocates the content and elements in a block. */ TuiWinContent -#ifdef __STDC__ -allocContent ( - int numElements, - TuiWinType type) -#else -allocContent (numElements, type) - int numElements; - TuiWinType type; -#endif +allocContent (int numElements, TuiWinType type) { TuiWinContent content = (TuiWinContent) NULL; char *elementBlockPtr = (char *) NULL; @@ -1220,15 +984,7 @@ allocContent (numElements, type) ** is returned. */ int -#ifdef __STDC__ -addContentElements ( - TuiGenWinInfoPtr winInfo, - int numElements) -#else -addContentElements (winInfo, numElements) - TuiGenWinInfoPtr winInfo; - int numElements; -#endif +addContentElements (TuiGenWinInfoPtr winInfo, int numElements) { TuiWinElementPtr elementPtr; int i, indexStart; @@ -1266,13 +1022,7 @@ addContentElements (winInfo, numElements) ** else in tact. */ void -#ifdef __STDC__ -tuiDelWindow ( - TuiWinInfoPtr winInfo) -#else -tuiDelWindow (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiDelWindow (TuiWinInfoPtr winInfo) { Opaque detail; int i; @@ -1329,13 +1079,7 @@ tuiDelWindow (winInfo) ** freeWindow(). */ void -#ifdef __STDC__ -freeWindow ( - TuiWinInfoPtr winInfo) -#else -freeWindow (winInfo) - TuiWinInfoPtr winInfo; -#endif +freeWindow (TuiWinInfoPtr winInfo) { Opaque detail; int i; @@ -1403,11 +1147,7 @@ freeWindow (winInfo) ** freeAllSourceWinsContent(). */ void -#ifdef __STDC__ freeAllSourceWinsContent (void) -#else -freeAllSourceWinsContent () -#endif { int i; @@ -1430,13 +1170,7 @@ freeAllSourceWinsContent () ** freeWinContent(). */ void -#ifdef __STDC__ -freeWinContent ( - TuiGenWinInfoPtr winInfo) -#else -freeWinContent (winInfo) - TuiGenWinInfoPtr winInfo; -#endif +freeWinContent (TuiGenWinInfoPtr winInfo) { if (winInfo->content != (OpaquePtr) NULL) { @@ -1455,11 +1189,7 @@ freeWinContent (winInfo) ** freeAllWindows(). */ void -#ifdef __STDC__ freeAllWindows (void) -#else -freeAllWindows () -#endif { TuiWinType type = SRC_WIN; @@ -1472,15 +1202,7 @@ freeAllWindows () void -#ifdef __STDC__ -tuiDelDataWindows ( - TuiWinContent content, - int contentSize) -#else -tuiDelDataWindows (content, contentSize) - TuiWinContent content; - int contentSize; -#endif +tuiDelDataWindows (TuiWinContent content, int contentSize) { int i; @@ -1505,15 +1227,7 @@ tuiDelDataWindows (content, contentSize) void -#ifdef __STDC__ -freeDataContent ( - TuiWinContent content, - int contentSize) -#else -freeDataContent (content, contentSize) - TuiWinContent content; - int contentSize; -#endif +freeDataContent (TuiWinContent content, int contentSize) { int i; @@ -1549,17 +1263,7 @@ freeDataContent (content, contentSize) ** freeContent(). */ static void -#ifdef __STDC__ -freeContent ( - TuiWinContent content, - int contentSize, - TuiWinType winType) -#else -freeContent (content, contentSize, winType) - TuiWinContent content; - int contentSize; - TuiWinType winType; -#endif +freeContent (TuiWinContent content, int contentSize, TuiWinType winType) { if (content != (TuiWinContent) NULL) { @@ -1575,17 +1279,7 @@ freeContent (content, contentSize, winType) ** freeContentElements(). */ static void -#ifdef __STDC__ -freeContentElements ( - TuiWinContent content, - int contentSize, - TuiWinType type) -#else -freeContentElements (content, contentSize, type) - TuiWinContent content; - int contentSize; - TuiWinType type; -#endif +freeContentElements (TuiWinContent content, int contentSize, TuiWinType type) { if (content != (TuiWinContent) NULL) { diff --git a/gdb/tui/tuiDataWin.c b/gdb/tui/tuiDataWin.c index 8cebb36..d7ad6b4 100644 --- a/gdb/tui/tuiDataWin.c +++ b/gdb/tui/tuiDataWin.c @@ -42,11 +42,7 @@ ** If none are displayed, then return (-1). */ int -#ifdef __STDC__ tuiFirstDataItemDisplayed (void) -#else -tuiFirstDataItemDisplayed () -#endif { int elementNo = (-1); int i; @@ -71,13 +67,7 @@ tuiFirstDataItemDisplayed () ** past the data area (-1) is returned. */ int -#ifdef __STDC__ -tuiFirstDataElementNoInLine ( - int lineNo) -#else -tuiFirstDataElementNoInLine (lineNo) - int lineNo; -#endif +tuiFirstDataElementNoInLine (int lineNo) { int firstElementNo = (-1); @@ -101,11 +91,7 @@ tuiFirstDataElementNoInLine (lineNo) ** This is usually done when the data window is scrolled. */ void -#ifdef __STDC__ tuiDeleteDataContentWindows (void) -#else -tuiDeleteDataContentWindows () -#endif { int i; TuiGenWinInfoPtr dataItemWinPtr; @@ -124,13 +110,7 @@ tuiDeleteDataContentWindows () void -#ifdef __STDC__ -tuiEraseDataContent ( - char *prompt) -#else -tuiEraseDataContent (prompt) - char *prompt; -#endif +tuiEraseDataContent (char *prompt) { werase (dataWin->generic.handle); checkAndDisplayHighlightIfNeeded (dataWin); @@ -160,11 +140,7 @@ tuiEraseDataContent (prompt) ** content. It does not set the content. */ void -#ifdef __STDC__ tuiDisplayAllData (void) -#else -tuiDisplayAllData () -#endif { if (dataWin->generic.contentSize <= 0) tuiEraseDataContent (NO_DATA_STRING); @@ -193,13 +169,7 @@ tuiDisplayAllData () ** data window. */ void -#ifdef __STDC__ -tuiDisplayDataFromLine ( - int lineNo) -#else -tuiDisplayDataFromLine (lineNo) - int lineNo; -#endif +tuiDisplayDataFromLine (int lineNo) { int _lineNo = lineNo; @@ -247,15 +217,7 @@ tuiDisplayDataFromLine (lineNo) ** Display data starting at element elementNo */ void -#ifdef __STDC__ -tuiDisplayDataFrom ( - int elementNo, - int reuseWindows) -#else -tuiDisplayDataFrom (elementNo, reuseWindows) - int elementNo; - int reuseWindows; -#endif +tuiDisplayDataFrom (int elementNo, int reuseWindows) { int firstLine = (-1); @@ -282,11 +244,7 @@ tuiDisplayDataFrom (elementNo, reuseWindows) ** Function to redisplay the contents of the data window. */ void -#ifdef __STDC__ tuiRefreshDataWin (void) -#else -tuiRefreshDataWin () -#endif { tuiEraseDataContent ((char *) NULL); if (dataWin->generic.contentSize > 0) @@ -306,13 +264,7 @@ tuiRefreshDataWin () ** Function to check the data values and hilite any that have changed */ void -#ifdef __STDC__ -tuiCheckDataValues ( - struct frame_info *frame) -#else -tuiCheckDataValues (frame) - struct frame_info *frame; -#endif +tuiCheckDataValues (struct frame_info *frame) { tuiCheckRegisterValues (frame); @@ -350,13 +302,7 @@ tuiCheckDataValues (frame) ** changed with args in a va_list */ void -#ifdef __STDC__ -tui_vCheckDataValues ( - va_list args) -#else -tui_vCheckDataValues (args) - va_list args; -#endif +tui_vCheckDataValues (va_list args) { struct frame_info *frame = va_arg (args, struct frame_info *); @@ -371,15 +317,7 @@ tui_vCheckDataValues (args) ** Scroll the data window vertically forward or backward. */ void -#ifdef __STDC__ -tuiVerticalDataScroll ( - TuiScrollDirection scrollDirection, - int numToScroll) -#else -tuiVerticalDataScroll (scrollDirection, numToScroll) - TuiScrollDirection scrollDirection; - int numToScroll; -#endif +tuiVerticalDataScroll (TuiScrollDirection scrollDirection, int numToScroll) { int firstElementNo; int firstLine = (-1); diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c index c0227f8..55c0157 100644 --- a/gdb/tui/tuiDisassem.c +++ b/gdb/tui/tuiDisassem.c @@ -47,15 +47,7 @@ static struct breakpoint *_hasBreak (CORE_ADDR); ** Function to set the disassembly window's content. */ TuiStatus -#ifdef __STDC__ -tuiSetDisassemContent ( - struct symtab *s, - Opaque startAddr) -#else -tuiSetDisassemContent (s, startAddr) - struct symtab *s; - Opaque startAddr; -#endif +tuiSetDisassemContent (struct symtab *s, Opaque startAddr) { TuiStatus ret = TUI_FAILURE; struct ui_file *gdb_dis_out; @@ -149,13 +141,7 @@ extern void strcat_address_numeric (CORE_ADDR, int, char *, int); ** Function to display the disassembly window with disassembled code. */ void -#ifdef __STDC__ -tuiShowDisassem ( - Opaque startAddr) -#else -tuiShowDisassem (startAddr) - Opaque startAddr; -#endif +tuiShowDisassem (Opaque startAddr) { struct symtab *s = find_pc_symtab ((CORE_ADDR) startAddr); TuiWinInfoPtr winWithFocus = tuiWinWithFocus (); @@ -178,13 +164,7 @@ tuiShowDisassem (startAddr) ** Function to display the disassembly window. */ void -#ifdef __STDC__ -tuiShowDisassemAndUpdateSource ( - Opaque startAddr) -#else -tuiShowDisassemAndUpdateSource (startAddr) - Opaque startAddr; -#endif +tuiShowDisassemAndUpdateSource (Opaque startAddr) { struct symtab_and_line sal; @@ -212,13 +192,7 @@ tuiShowDisassemAndUpdateSource (startAddr) ** the disassembly as specified by the horizontal offset. */ void -#ifdef __STDC__ -tuiShowDisassemAsIs ( - Opaque addr) -#else -tuiShowDisassemAsIs (addr) - Opaque addr; -#endif +tuiShowDisassemAsIs (Opaque addr) { tuiAddWinToLayout (DISASSEM_WIN); tuiUpdateSourceWindowAsIs (disassemWin, (struct symtab *) NULL, addr, FALSE); @@ -237,11 +211,7 @@ tuiShowDisassemAsIs (addr) ** tuiGetBeginAsmAddress(). */ Opaque -#ifdef __STDC__ tuiGetBeginAsmAddress (void) -#else -tuiGetBeginAsmAddress () -#endif { TuiGenWinInfoPtr locator; TuiLocatorElementPtr element; @@ -272,15 +242,8 @@ tuiGetBeginAsmAddress () ** Scroll the disassembly forward or backward vertically */ void -#ifdef __STDC__ -tuiVerticalDisassemScroll ( - TuiScrollDirection scrollDirection, - int numToScroll) -#else -tuiVerticalDisassemScroll (scrollDirection, numToScroll) - TuiScrollDirection scrollDirection; - int numToScroll; -#endif +tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection, + int numToScroll) { if (disassemWin->generic.content != (OpaquePtr) NULL) { @@ -335,13 +298,7 @@ tuiVerticalDisassemScroll (scrollDirection, numToScroll) ** source file indicated */ static struct breakpoint * -#ifdef __STDC__ -_hasBreak ( - CORE_ADDR addr) -#else -_hasBreak (addr) - CORE_ADDR addr; -#endif +_hasBreak (CORE_ADDR addr) { struct breakpoint *bpWithBreak = (struct breakpoint *) NULL; struct breakpoint *bp; diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c index ca9c14d..0fe3529 100644 --- a/gdb/tui/tuiGeneralWin.c +++ b/gdb/tui/tuiGeneralWin.c @@ -39,13 +39,7 @@ static void _winResize (void); ** Refresh the window */ void -#ifdef __STDC__ -tuiRefreshWin ( - TuiGenWinInfoPtr winInfo) -#else -tuiRefreshWin (winInfo) - TuiGenWinInfoPtr winInfo; -#endif +tuiRefreshWin (TuiGenWinInfoPtr winInfo) { if (winInfo->type == DATA_WIN && winInfo->contentSize > 0) { @@ -81,13 +75,7 @@ tuiRefreshWin (winInfo) ** Function to delete the curses window, checking for null */ void -#ifdef __STDC__ -tuiDelwin ( - WINDOW * window) -#else -tuiDelwin (window) - WINDOW *window; -#endif +tuiDelwin (WINDOW * window) { if (window != (WINDOW *) NULL) delwin (window); @@ -100,15 +88,7 @@ tuiDelwin (window) ** boxWin(). */ void -#ifdef __STDC__ -boxWin ( - TuiGenWinInfoPtr winInfo, - int highlightFlag) -#else -boxWin (winInfo, highlightFlag) - TuiGenWinInfoPtr winInfo; - int highlightFlag; -#endif +boxWin (TuiGenWinInfoPtr winInfo, int highlightFlag) { if (m_genWinPtrNotNull (winInfo) && winInfo->handle != (WINDOW *) NULL) { @@ -130,13 +110,7 @@ boxWin (winInfo, highlightFlag) ** unhighlightWin(). */ void -#ifdef __STDC__ -unhighlightWin ( - TuiWinInfoPtr winInfo) -#else -unhighlightWin (winInfo) - TuiWinInfoPtr winInfo; -#endif +unhighlightWin (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->generic.handle != (WINDOW *) NULL) { @@ -151,13 +125,7 @@ unhighlightWin (winInfo) ** highlightWin(). */ void -#ifdef __STDC__ -highlightWin ( - TuiWinInfoPtr winInfo) -#else -highlightWin (winInfo) - TuiWinInfoPtr winInfo; -#endif +highlightWin (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->canHighlight && winInfo->generic.handle != (WINDOW *) NULL) @@ -173,13 +141,7 @@ highlightWin (winInfo) ** checkAndDisplayHighlightIfNecessay */ void -#ifdef __STDC__ -checkAndDisplayHighlightIfNeeded ( - TuiWinInfoPtr winInfo) -#else -checkAndDisplayHighlightIfNeeded (winInfo) - TuiWinInfoPtr winInfo; -#endif +checkAndDisplayHighlightIfNeeded (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo) && winInfo->generic.type != CMD_WIN) { @@ -197,15 +159,7 @@ checkAndDisplayHighlightIfNeeded (winInfo) ** makeWindow(). */ void -#ifdef __STDC__ -makeWindow ( - TuiGenWinInfoPtr winInfo, - int boxIt) -#else -makeWindow (winInfo, boxIt) - TuiGenWinInfoPtr winInfo; - int boxIt; -#endif +makeWindow (TuiGenWinInfoPtr winInfo, int boxIt) { WINDOW *handle; @@ -242,13 +196,7 @@ makeWindow (winInfo, boxIt) ** Clear the window of all contents without calling wclear. */ void -#ifdef __STDC__ -tuiClearWin ( - TuiGenWinInfoPtr winInfo) -#else -tuiClearWin (winInfo) - TuiGenWinInfoPtr winInfo; -#endif +tuiClearWin (TuiGenWinInfoPtr winInfo) { if (m_genWinPtrNotNull (winInfo) && winInfo->handle != (WINDOW *) NULL) { @@ -272,15 +220,7 @@ tuiClearWin (winInfo) ** and create it again when making it visible. */ void -#ifdef __STDC__ -makeVisible ( - TuiGenWinInfoPtr winInfo, - int visible) -#else -makeVisible (winInfo, visible) - TuiGenWinInfoPtr winInfo; - int visible; -#endif +makeVisible (TuiGenWinInfoPtr winInfo, int visible) { /* Don't tear down/recreate command window */ if (winInfo->type == CMD_WIN) @@ -315,13 +255,7 @@ makeVisible (winInfo, visible) ** Makes all windows invisible (except the command and locator windows) */ void -#ifdef __STDC__ -makeAllVisible ( - int visible) -#else -makeAllVisible (visible) - int visible; -#endif +makeAllVisible (int visible) { int i; @@ -345,15 +279,7 @@ makeAllVisible (visible) ** scrollWinForward */ void -#ifdef __STDC__ -scrollWinForward ( - TuiGenWinInfoPtr winInfo, - int numLines) -#else -scrollWinForward (winInfo, numLines) - TuiGenWinInfoPtr winInfo; - int numLines; -#endif +scrollWinForward (TuiGenWinInfoPtr winInfo, int numLines) { if (winInfo->content != (OpaquePtr) NULL && winInfo->lastVisibleLine < winInfo->contentSize - 1) @@ -395,15 +321,7 @@ scrollWinForward (winInfo, numLines) ** scrollWinBackward */ void -#ifdef __STDC__ -scrollWinBackward ( - TuiGenWinInfoPtr winInfo, - int numLines) -#else -scrollWinBackward (winInfo, numLines) - TuiGenWinInfoPtr winInfo; - int numLines; -#endif +scrollWinBackward (TuiGenWinInfoPtr winInfo, int numLines) { if (winInfo->content != (OpaquePtr) NULL && (winInfo->lastVisibleLine - winInfo->viewportHeight) > 0) @@ -445,13 +363,7 @@ scrollWinBackward (winInfo, numLines) ** Function to refresh all the windows currently displayed */ void -#ifdef __STDC__ -refreshAll ( - TuiWinInfoPtr * list) -#else -refreshAll (list) - TuiWinInfoPtr *list; -#endif +refreshAll (TuiWinInfoPtr * list) { TuiWinType type; TuiGenWinInfoPtr locator = locatorWinInfoPtr (); diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c index fa1769f..0471572 100644 --- a/gdb/tui/tuiIO.c +++ b/gdb/tui/tuiIO.c @@ -28,11 +28,7 @@ #include "tuiCommand.h" #include "tuiWin.h" -#ifdef ANSI_PROTOTYPES #include -#else -#include -#endif /* The Solaris header files seem to provide no declaration for this at all when __STDC__ is defined. This shouldn't conflict with @@ -62,15 +58,7 @@ static unsigned int _tuiHandleResizeDuringIO (unsigned int); ** mode), calls tuiPuts_unfiltered(). */ void -#ifdef __STDC__ -tuiPuts_unfiltered ( - const char *string, - struct ui_file * stream) -#else -tuiPuts_unfiltered (string, stream) - char *string; - struct ui_file *stream; -#endif +tuiPuts_unfiltered (const char *string, struct ui_file * stream) { int len = strlen (string); int i, linech; @@ -277,12 +265,7 @@ tui_tputs (str, affcnt, putfunc) ** Wrapper around wgetch with the window in a va_list */ unsigned int -#ifdef __STDC__ tui_vwgetch (va_list args) -#else -tui_vwgetch (args) - va_list args; -#endif { unsigned int ch; WINDOW *window; @@ -298,12 +281,7 @@ tui_vwgetch (args) ** Wrapper around read() with paramets in a va_list */ unsigned int -#ifdef __STDC__ tui_vread (va_list args) -#else -tui_vread (args) - va_list args; -#endif { int result = 0; int filedes = va_arg (args, int); @@ -320,17 +298,7 @@ tui_vread (args) ** Function to perform a read() catching resize events */ int -#ifdef __STDC__ -tuiRead ( - int filedes, - char *buf, - int nbytes) -#else -tuiRead (filedes, buf, nbytes) - int filedes; - char *buf; - int nbytes; -#endif +tuiRead (int filedes, char *buf, int nbytes) { int result = 0; @@ -351,11 +319,7 @@ tuiRead (filedes, buf, nbytes) ** command_line_input() in top.c */ unsigned int -#ifdef __STDC__ tuiGetc (void) -#else -tuiGetc () -#endif { unsigned int ch; extern char *rl_prompt; @@ -399,11 +363,7 @@ tuiGetc () utils.c */ unsigned int -#ifdef __STDC__ tuiBufferGetc (void) -#else -tuiBufferGetc () -#endif { unsigned int ch; static unsigned char _ibuffer[512]; @@ -452,13 +412,7 @@ tuiBufferGetc () ** tuiStartNewLines(). */ void -#ifdef __STDC__ -tuiStartNewLines ( - int numLines) -#else -tuiStartNewLines (numLines) - int numLines; -#endif +tuiStartNewLines (int numLines) { if (numLines > 0) { @@ -483,13 +437,7 @@ tuiStartNewLines (numLines) ** With numLines in a va_list */ void -#ifdef __STDC__ -tui_vStartNewLines ( - va_list args) -#else -tui_vStartNewLines (args) - va_list args; -#endif +tui_vStartNewLines (va_list args) { int numLines = va_arg (args, int); @@ -511,13 +459,8 @@ tui_vStartNewLines (args) ** to return from getc or read. */ static unsigned int -#ifdef __STDC__ -_tuiHandleResizeDuringIO ( - unsigned int originalCh) /* the char just read */ -#else -_tuiHandleResizeDuringIO (originalCh) - unsigned int originalCh; -#endif +_tuiHandleResizeDuringIO (unsigned int originalCh) + /* the char just read */ { if (tuiWinResized ()) { @@ -537,13 +480,7 @@ _tuiHandleResizeDuringIO (originalCh) ** Function to update the command window information. */ static void -#ifdef __STDC__ -_updateCommandInfo ( - int sizeOfString) -#else -_updateCommandInfo (sizeOfString) - int sizeOfString; -#endif +_updateCommandInfo (int sizeOfString) { if ((sizeOfString + @@ -573,13 +510,7 @@ int tui_owns_terminal = 0; */ void -#ifdef __STDC__ -tuiTermSetup ( - int turn_off_echo) -#else -tuiTermSetup (turn_off_echo) - int turn_off_echo; -#endif +tuiTermSetup (int turn_off_echo) { char *buffer; int start; @@ -668,15 +599,7 @@ tuiTermSetup (turn_off_echo) * way out of tuiDo, thus setting up the terminal this way for * debugger command I/O. */ void -#ifdef __STDC__ -tuiTermUnsetup ( - int turn_on_echo, - int to_column) -#else -tuiTermUnsetup (turn_on_echo, to_column) - int turn_on_echo; - int to_column; -#endif +tuiTermUnsetup (int turn_on_echo, int to_column) { int start; int end; diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c index de3e841..2b435b4 100644 --- a/gdb/tui/tuiLayout.c +++ b/gdb/tui/tuiLayout.c @@ -79,13 +79,7 @@ static TuiLayoutType lastLayout = UNDEFINED_LAYOUT; ** Show the screen layout defined */ void -#ifdef __STDC__ -showLayout ( - TuiLayoutType layout) -#else -showLayout (layout) - TuiLayoutType layout; -#endif +showLayout (TuiLayoutType layout) { TuiLayoutType curLayout = currentLayout (); @@ -145,15 +139,8 @@ showLayout (layout) ** to regsDisplayType. */ TuiStatus -#ifdef __STDC__ -tuiSetLayout ( - TuiLayoutType layoutType, - TuiRegisterDisplayType regsDisplayType) -#else -tuiSetLayout (layoutType, regsDisplayType) - TuiLayoutType layoutType; - TuiRegisterDisplayType regsDisplayType; -#endif +tuiSetLayout (TuiLayoutType layoutType, + TuiRegisterDisplayType regsDisplayType) { TuiStatus status = TUI_SUCCESS; @@ -295,13 +282,7 @@ tuiSetLayout (layoutType, regsDisplayType) ** REGS, $REGS, $GREGS, $FREGS, $SREGS with arguments in a va_list */ TuiStatus -#ifdef __STDC__ -tui_vSetLayoutTo ( - va_list args) -#else -tui_vSetLayoutTo (args) - va_list args; -#endif +tui_vSetLayoutTo (va_list args) { char *layoutName; @@ -318,13 +299,7 @@ tui_vSetLayoutTo (args) ** window to be added. */ void -#ifdef __STDC__ -tuiAddWinToLayout ( - TuiWinType type) -#else -tuiAddWinToLayout (type) - TuiWinType type; -#endif +tuiAddWinToLayout (TuiWinType type) { TuiLayoutType curLayout = currentLayout (); @@ -378,13 +353,7 @@ tuiAddWinToLayout (type) ** with arguments in a va_list. */ void -#ifdef __STDC__ -tui_vAddWinToLayout ( - va_list args) -#else -tui_vAddWinToLayout (args) - va_list args; -#endif +tui_vAddWinToLayout (va_list args) { TuiWinType type = va_arg (args, TuiWinType); @@ -401,15 +370,7 @@ tui_vAddWinToLayout (args) ** type and the layout. */ int -#ifdef __STDC__ -tuiDefaultWinHeight ( - TuiWinType type, - TuiLayoutType layout) -#else -tuiDefaultWinHeight (type, layout) - TuiWinType type; - TuiLayoutType layout; -#endif +tuiDefaultWinHeight (TuiWinType type, TuiLayoutType layout) { int h; @@ -451,15 +412,7 @@ tuiDefaultWinHeight (type, layout) ** type and the layout. */ int -#ifdef __STDC__ -tuiDefaultWinViewportHeight ( - TuiWinType type, - TuiLayoutType layout) -#else -tuiDefaultWinViewportHeight (type, layout) - TuiWinType type; - TuiLayoutType layout; -#endif +tuiDefaultWinViewportHeight (TuiWinType type, TuiLayoutType layout) { int h; @@ -522,13 +475,7 @@ Source/Disassembly/Command layouts.\n"); ** $REGS, $GREGS, $FREGS, $SREGS. */ static TuiStatus -#ifdef __STDC__ -_tuiSetLayoutTo ( - char *layoutName) -#else -_tuiSetLayoutTo (layoutName) - char *layoutName; -#endif +_tuiSetLayoutTo (char *layoutName) { TuiStatus status = TUI_SUCCESS; @@ -631,11 +578,7 @@ _tuiSetLayoutTo (layoutName) static Opaque -#ifdef __STDC__ _extractDisplayStartAddr (void) -#else -_extractDisplayStartAddr () -#endif { TuiLayoutType curLayout = currentLayout (); Opaque addr; @@ -663,13 +606,7 @@ _extractDisplayStartAddr () static void -#ifdef __STDC__ -_tuiHandleXDBLayout ( - TuiLayoutDefPtr layoutDef) -#else -_tuiHandleXDBLayout (layoutDef) - TuiLayoutDefPtr layoutDef; -#endif +_tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef) { if (layoutDef->split) { @@ -690,27 +627,13 @@ _tuiHandleXDBLayout (layoutDef) static void -#ifdef __STDC__ -_tuiToggleLayout_command ( - char *arg, - int fromTTY) -#else -_tuiToggleLayout_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiToggleLayout_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleLayout_command, arg, fromTTY); } static void -#ifdef __STDC__ -_tui_vToggleLayout_command ( - va_list args) -#else -_tui_vToggleLayout_command (args) - va_list args; -#endif +_tui_vToggleLayout_command (va_list args) { TuiLayoutDefPtr layoutDef = tuiLayoutDef (); @@ -727,27 +650,13 @@ _tui_vToggleLayout_command (args) static void -#ifdef __STDC__ -_tuiToggleSplitLayout_command ( - char *arg, - int fromTTY) -#else -_tuiToggleSplitLayout_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiToggleSplitLayout_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleSplitLayout_command, arg, fromTTY); } static void -#ifdef __STDC__ -_tui_vToggleSplitLayout_command ( - va_list args) -#else -_tui_vToggleSplitLayout_command (args) - va_list args; -#endif +_tui_vToggleSplitLayout_command (va_list args) { TuiLayoutDefPtr layoutDef = tuiLayoutDef (); @@ -759,15 +668,7 @@ _tui_vToggleSplitLayout_command (args) static void -#ifdef __STDC__ -_tuiLayout_command ( - char *arg, - int fromTTY) -#else -_tuiLayout_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiLayout_command (char *arg, int fromTTY) { if ((TuiStatus) tuiDo ( (TuiOpaqueFuncPtr) tui_vSetLayoutTo, arg) != TUI_SUCCESS) @@ -781,11 +682,7 @@ _tuiLayout_command (arg, fromTTY) ** Answer the previous layout to cycle to. */ static TuiLayoutType -#ifdef __STDC__ _nextLayout (void) -#else -_nextLayout () -#endif { TuiLayoutType newLayout; @@ -808,11 +705,7 @@ _nextLayout () ** Answer the next layout to cycle to. */ static TuiLayoutType -#ifdef __STDC__ _prevLayout (void) -#else -_prevLayout () -#endif { TuiLayoutType newLayout; @@ -835,17 +728,7 @@ _prevLayout () ** _makeCommandWindow(). */ static void -#ifdef __STDC__ -_makeCommandWindow ( - TuiWinInfoPtr * winInfoPtr, - int height, - int originY) -#else -_makeCommandWindow (winInfoPtr, height, originY) - TuiWinInfoPtr *winInfoPtr; - int height; - int originY; -#endif +_makeCommandWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) { _initAndMakeWin ((Opaque *) winInfoPtr, CMD_WIN, @@ -865,17 +748,7 @@ _makeCommandWindow (winInfoPtr, height, originY) ** _makeSourceWindow(). */ static void -#ifdef __STDC__ -_makeSourceWindow ( - TuiWinInfoPtr * winInfoPtr, - int height, - int originY) -#else -_makeSourceWindow (winInfoPtr, height, originY) - TuiWinInfoPtr *winInfoPtr; - int height; - int originY; -#endif +_makeSourceWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) { _makeSourceOrDisassemWindow (winInfoPtr, SRC_WIN, height, originY); @@ -887,17 +760,7 @@ _makeSourceWindow (winInfoPtr, height, originY) ** _makeDisassemWindow(). */ static void -#ifdef __STDC__ -_makeDisassemWindow ( - TuiWinInfoPtr * winInfoPtr, - int height, - int originY) -#else -_makeDisassemWindow (winInfoPtr, height, originY) - TuiWinInfoPtr *winInfoPtr; - int height; - int originY; -#endif +_makeDisassemWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) { _makeSourceOrDisassemWindow (winInfoPtr, DISASSEM_WIN, height, originY); @@ -909,17 +772,7 @@ _makeDisassemWindow (winInfoPtr, height, originY) ** _makeDataWindow(). */ static void -#ifdef __STDC__ -_makeDataWindow ( - TuiWinInfoPtr * winInfoPtr, - int height, - int originY) -#else -_makeDataWindow (winInfoPtr, height, originY) - TuiWinInfoPtr *winInfoPtr; - int height; - int originY; -#endif +_makeDataWindow (TuiWinInfoPtr * winInfoPtr, int height, int originY) { _initAndMakeWin ((Opaque *) winInfoPtr, DATA_WIN, @@ -939,11 +792,7 @@ _makeDataWindow (winInfoPtr, height, originY) ** Show the Source/Command layout */ static void -#ifdef __STDC__ _showSourceCommand (void) -#else -_showSourceCommand () -#endif { _showSourceOrDisassemAndCommand (SRC_COMMAND); @@ -956,11 +805,7 @@ _showSourceCommand () ** Show the Dissassem/Command layout */ static void -#ifdef __STDC__ _showDisassemCommand (void) -#else -_showDisassemCommand () -#endif { _showSourceOrDisassemAndCommand (DISASSEM_COMMAND); @@ -973,11 +818,7 @@ _showDisassemCommand () ** Show the Source/Disassem/Command layout */ static void -#ifdef __STDC__ _showSourceDisassemCommand (void) -#else -_showSourceDisassemCommand () -#endif { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); @@ -1095,13 +936,7 @@ _showSourceDisassemCommand () ** Show the Source/Data/Command or the Dissassembly/Data/Command layout */ static void -#ifdef __STDC__ -_showData ( - TuiLayoutType newLayout) -#else -_showData (newLayout) - TuiLayoutType newLayout; -#endif +_showData (TuiLayoutType newLayout) { int totalHeight = (termHeight () - cmdWin->generic.height); int srcHeight, dataHeight; @@ -1169,23 +1004,8 @@ _showData (newLayout) ** _initGenWinInfo(). */ static void -#ifdef __STDC__ -_initGenWinInfo ( - TuiGenWinInfoPtr winInfo, - TuiWinType type, - int height, - int width, - int originX, - int originY) -#else -_initGenWinInfo (winInfo, type, height, width, originX, originY) - TuiGenWinInfoPtr winInfo; - TuiWinType type; - int height; - int width; - int originX; - int originY; -#endif +_initGenWinInfo (TuiGenWinInfoPtr winInfo, TuiWinType type, + int height, int width, int originX, int originY) { int h = height; @@ -1210,25 +1030,8 @@ _initGenWinInfo (winInfo, type, height, width, originX, originY) ** _initAndMakeWin(). */ static void -#ifdef __STDC__ -_initAndMakeWin ( - Opaque * winInfoPtr, - TuiWinType winType, - int height, - int width, - int originX, - int originY, - int boxIt) -#else -_initAndMakeWin (winInfoPtr, winType, height, width, originX, originY, boxIt) - Opaque *winInfoPtr; - TuiWinType winType; - int height; - int width; - int originX; - int originY; - int boxIt; -#endif +_initAndMakeWin (Opaque * winInfoPtr, TuiWinType winType, + int height, int width, int originX, int originY, int boxIt) { Opaque opaqueWinInfo = *winInfoPtr; TuiGenWinInfoPtr generic; @@ -1270,19 +1073,8 @@ _initAndMakeWin (winInfoPtr, winType, height, width, originX, originY, boxIt) ** _makeSourceOrDisassemWindow(). */ static void -#ifdef __STDC__ -_makeSourceOrDisassemWindow ( - TuiWinInfoPtr * winInfoPtr, - TuiWinType type, - int height, - int originY) -#else -_makeSourceOrDisassemWindow (winInfoPtr, type, height, originY) - TuiWinInfoPtr *winInfoPtr; - TuiWinType type; - int height; - int originY; -#endif +_makeSourceOrDisassemWindow (TuiWinInfoPtr * winInfoPtr, TuiWinType type, + int height, int originY) { TuiGenWinInfoPtr executionInfo = (TuiGenWinInfoPtr) NULL; @@ -1322,13 +1114,7 @@ _makeSourceOrDisassemWindow (winInfoPtr, type, height, originY) ** Show the Source/Command or the Disassem layout */ static void -#ifdef __STDC__ -_showSourceOrDisassemAndCommand ( - TuiLayoutType layoutType) -#else -_showSourceOrDisassemAndCommand (layoutType) - TuiLayoutType layoutType; -#endif +_showSourceOrDisassemAndCommand (TuiLayoutType layoutType) { if (currentLayout () != layoutType) { diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c index ab78849..30cd8c4 100644 --- a/gdb/tui/tuiRegs.c +++ b/gdb/tui/tuiRegs.c @@ -98,11 +98,7 @@ static void _tui_vShowRegisters_commandSupport (va_list); ** If there are no registers (-1) is returned. */ int -#ifdef __STDC__ tuiLastRegsLineNo (void) -#else -tuiLastRegsLineNo () -#endif { register int numLines = (-1); @@ -125,13 +121,7 @@ tuiLastRegsLineNo () ** there are, -1 is returned. */ int -#ifdef __STDC__ -tuiLineFromRegElementNo ( - int elementNo) -#else -tuiLineFromRegElementNo (elementNo) - int elementNo; -#endif +tuiLineFromRegElementNo (int elementNo) { if (elementNo < dataWin->detail.dataDisplayInfo.regsContentCount) { @@ -160,13 +150,7 @@ tuiLineFromRegElementNo (elementNo) ** past the register area (-1) is returned. */ int -#ifdef __STDC__ -tuiFirstRegElementNoInLine ( - int lineNo) -#else -tuiFirstRegElementNoInLine (lineNo) - int lineNo; -#endif +tuiFirstRegElementNoInLine (int lineNo) { if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount) <= dataWin->detail.dataDisplayInfo.regsContentCount) @@ -184,13 +168,7 @@ tuiFirstRegElementNoInLine (lineNo) ** the register area (-1) is returned. */ int -#ifdef __STDC__ -tuiLastRegElementNoInLine ( - int lineNo) -#else -tuiLastRegElementNoInLine (lineNo) - int lineNo; -#endif +tuiLastRegElementNoInLine (int lineNo) { if ((lineNo * dataWin->detail.dataDisplayInfo.regsColumnCount) <= dataWin->detail.dataDisplayInfo.regsContentCount) @@ -207,13 +185,7 @@ tuiLastRegElementNoInLine (lineNo) ** the registers. */ int -#ifdef __STDC__ -tuiCalculateRegsColumnCount ( - TuiRegisterDisplayType dpyType) -#else -tuiCalculateRegsColumnCount (dpyType) - TuiRegisterDisplayType dpyType; -#endif +tuiCalculateRegsColumnCount (TuiRegisterDisplayType dpyType) { int colCount, colWidth; @@ -239,13 +211,7 @@ tuiCalculateRegsColumnCount (dpyType) ** cleared. What registers are displayed is dependent upon dpyType. */ void -#ifdef __STDC__ -tuiShowRegisters ( - TuiRegisterDisplayType dpyType) -#else -tuiShowRegisters (dpyType) - TuiRegisterDisplayType dpyType; -#endif +tuiShowRegisters (TuiRegisterDisplayType dpyType) { TuiStatus ret = TUI_FAILURE; int refreshValuesOnly = FALSE; @@ -318,13 +284,7 @@ tuiShowRegisters (dpyType) ** the end of the registers is done here. */ void -#ifdef __STDC__ -tuiDisplayRegistersFrom ( - int startElementNo) -#else -tuiDisplayRegistersFrom (startElementNo) - int startElementNo; -#endif +tuiDisplayRegistersFrom (int startElementNo) { if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL && dataWin->detail.dataDisplayInfo.regsContentCount > 0) @@ -410,15 +370,7 @@ tuiDisplayRegistersFrom (startElementNo) ** of the register display. */ void -#ifdef __STDC__ -tuiDisplayRegElementAtLine ( - int startElementNo, - int startLineNo) -#else -tuiDisplayRegElementAtLine (startElementNo, startLineNo) - int startElementNo; - int startLineNo; -#endif +tuiDisplayRegElementAtLine (int startElementNo, int startLineNo) { if (dataWin->detail.dataDisplayInfo.regsContent != (TuiWinContent) NULL && dataWin->detail.dataDisplayInfo.regsContentCount > 0) @@ -457,15 +409,7 @@ tuiDisplayRegElementAtLine (startElementNo, startLineNo) ** actually started from. If nothing is displayed (-1) is returned. */ int -#ifdef __STDC__ -tuiDisplayRegistersFromLine ( - int lineNo, - int forceDisplay) -#else -tuiDisplayRegistersFromLine (lineNo, forceDisplay) - int lineNo; - int forceDisplay; -#endif +tuiDisplayRegistersFromLine (int lineNo, int forceDisplay) { int elementNo; @@ -512,13 +456,7 @@ tuiDisplayRegistersFromLine (lineNo, forceDisplay) ** they are updated with the new value and highlighted. */ void -#ifdef __STDC__ -tuiCheckRegisterValues ( - struct frame_info *frame) -#else -tuiCheckRegisterValues (frame) - struct frame_info *frame; -#endif +tuiCheckRegisterValues (struct frame_info *frame) { if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible) { @@ -576,11 +514,7 @@ tuiCheckRegisterValues (frame) ** tuiToggleFloatRegs(). */ void -#ifdef __STDC__ tuiToggleFloatRegs (void) -#else -tuiToggleFloatRegs () -#endif { TuiLayoutDefPtr layoutDef = tuiLayoutDef (); @@ -637,13 +571,7 @@ registers.\n", ** Return the register name. */ static char * -#ifdef __STDC__ -_tuiRegisterName ( - int regNum) -#else -_tuiRegisterName (regNum) - int regNum; -#endif +_tuiRegisterName (int regNum) { if (reg_names[regNum] != (char *) NULL && *(reg_names[regNum]) != (char) 0) return reg_names[regNum]; @@ -658,21 +586,9 @@ _tuiRegisterName (regNum) ** suitable for printing or display */ static void -#ifdef __STDC__ -_tuiRegisterFormat ( - char *buf, - int bufLen, - int regNum, - TuiDataElementPtr dataElement, - enum precision_type precision) -#else -_tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision) - char *buf; - int bufLen; - int regNum; - TuiDataElementPtr dataElement; - enum precision_type precision; -#endif +_tuiRegisterFormat (char *buf, int bufLen, int regNum, + TuiDataElementPtr dataElement, + enum precision_type precision) { char tmpBuf[15]; char *fmt; @@ -693,13 +609,7 @@ _tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision) ** Set the content of the data window to consist of the general registers. */ static TuiStatus -#ifdef __STDC__ -_tuiSetGeneralRegsContent ( - int refreshValuesOnly) -#else -_tuiSetGeneralRegsContent (refreshValuesOnly) - int refreshValuesOnly; -#endif +_tuiSetGeneralRegsContent (int refreshValuesOnly) { return (_tuiSetRegsContent (0, NUM_GENERAL_REGS - 1, @@ -716,13 +626,7 @@ _tuiSetGeneralRegsContent (refreshValuesOnly) ** Set the content of the data window to consist of the special registers. */ static TuiStatus -#ifdef __STDC__ -_tuiSetSpecialRegsContent ( - int refreshValuesOnly) -#else -_tuiSetSpecialRegsContent (refreshValuesOnly) - int refreshValuesOnly; -#endif +_tuiSetSpecialRegsContent (int refreshValuesOnly) { TuiStatus ret = TUI_FAILURE; int i, endRegNum; @@ -749,13 +653,7 @@ _tuiSetSpecialRegsContent (refreshValuesOnly) ** Set the content of the data window to consist of the special registers. */ static TuiStatus -#ifdef __STDC__ -_tuiSetGeneralAndSpecialRegsContent ( - int refreshValuesOnly) -#else -_tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly) - int refreshValuesOnly; -#endif +_tuiSetGeneralAndSpecialRegsContent (int refreshValuesOnly) { TuiStatus ret = TUI_FAILURE; int i, endRegNum = (-1); @@ -778,15 +676,8 @@ _tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly) ** Set the content of the data window to consist of the float registers. */ static TuiStatus -#ifdef __STDC__ -_tuiSetFloatRegsContent ( - TuiRegisterDisplayType dpyType, - int refreshValuesOnly) -#else -_tuiSetFloatRegsContent (dpyType, refreshValuesOnly) - TuiRegisterDisplayType dpyType; - int refreshValuesOnly; -#endif +_tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, + int refreshValuesOnly) { TuiStatus ret = TUI_FAILURE; int i, startRegNum; @@ -814,17 +705,9 @@ _tuiSetFloatRegsContent (dpyType, refreshValuesOnly) ** If TRUE, newValue is filled in with the new value. */ static int -#ifdef __STDC__ -_tuiRegValueHasChanged ( - TuiDataElementPtr dataElement, - struct frame_info *frame, - char *newValue) -#else -_tuiRegValueHasChanged (dataElement, frame, newValue) - TuiDataElementPtr dataElement; - struct frame_info *frame; - char *newValue; -#endif +_tuiRegValueHasChanged (TuiDataElementPtr dataElement, + struct frame_info *frame, + char *newValue) { int hasChanged = FALSE; @@ -856,17 +739,8 @@ _tuiRegValueHasChanged (dataElement, frame, newValue) ** Get the register raw value. The raw value is returned in regValue. */ static TuiStatus -#ifdef __STDC__ -_tuiGetRegisterRawValue ( - int regNum, - char *regValue, - struct frame_info *frame) -#else -_tuiGetRegisterRawValue (regNum, regValue, frame) - int regNum; - char *regValue; - struct frame_info *frame; -#endif +_tuiGetRegisterRawValue (int regNum, char *regValue, + struct frame_info *frame) { TuiStatus ret = TUI_FAILURE; @@ -887,19 +761,9 @@ _tuiGetRegisterRawValue (regNum, regValue, frame) ** the register value. */ static void -#ifdef __STDC__ -_tuiSetRegisterElement ( - int regNum, - struct frame_info *frame, - TuiDataElementPtr dataElement, - int refreshValueOnly) -#else -_tuiSetRegisterElement (regNum, frame, dataElement, refreshValueOnly) - int regNum; - struct frame_info *frame; - TuiDataElementPtr dataElement; - int refreshValueOnly; -#endif +_tuiSetRegisterElement (int regNum, struct frame_info *frame, + TuiDataElementPtr dataElement, + int refreshValueOnly) { if (dataElement != (TuiDataElementPtr) NULL) { @@ -926,21 +790,10 @@ _tuiSetRegisterElement (regNum, frame, dataElement, refreshValueOnly) ** refreshValuesOnly is TRUE, startRegNum and endRegNum are ignored. */ static TuiStatus -#ifdef __STDC__ -_tuiSetRegsContent ( - int startRegNum, - int endRegNum, - struct frame_info *frame, - TuiRegisterDisplayType dpyType, - int refreshValuesOnly) -#else -_tuiSetRegsContent (startRegNum, endRegNum, frame, dpyType, refreshValuesOnly) - int startRegNum; - int endRegNum; - struct frame_info *frame; - TuiRegisterDisplayType dpyType; - int refreshValuesOnly; -#endif +_tuiSetRegsContent (int startRegNum, int endRegNum, + struct frame_info *frame, + TuiRegisterDisplayType dpyType, + int refreshValuesOnly) { TuiStatus ret = TUI_FAILURE; int numRegs = endRegNum - startRegNum + 1; @@ -1014,17 +867,9 @@ _tuiSetRegsContent (startRegNum, endRegNum, frame, dpyType, refreshValuesOnly) ** than the value will be displayed in reverse video */ static void -#ifdef __STDC__ -_tuiDisplayRegister ( - int regNum, - TuiGenWinInfoPtr winInfo, /* the data item window */ - enum precision_type precision) -#else -_tuiDisplayRegister (regNum, winInfo, precision) - int regNum; - TuiGenWinInfoPtr winInfo; /* the data item window */ - enum precision_type precision; -#endif +_tuiDisplayRegister (int regNum, + TuiGenWinInfoPtr winInfo, /* the data item window */ + enum precision_type precision) { if (winInfo->handle != (WINDOW *) NULL) { @@ -1076,13 +921,7 @@ _tuiDisplayRegister (regNum, winInfo, precision) static void -#ifdef __STDC__ -_tui_vShowRegisters_commandSupport ( - va_list args) -#else -_tui_vShowRegisters_commandSupport (args) - va_list args; -#endif +_tui_vShowRegisters_commandSupport (va_list args) { TuiRegisterDisplayType dpyType = va_arg (args, TuiRegisterDisplayType); @@ -1099,15 +938,7 @@ _tui_vShowRegisters_commandSupport (args) static void -#ifdef __STDC__ -_tuiShowFloat_command ( - char *arg, - int fromTTY) -#else -_tuiShowFloat_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiShowFloat_command (char *arg, int fromTTY) { if (m_winPtrIsNull (dataWin) || !dataWin->generic.isVisible || (dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_SFLOAT_REGS && @@ -1120,15 +951,7 @@ _tuiShowFloat_command (arg, fromTTY) static void -#ifdef __STDC__ -_tuiShowGeneral_command ( - char *arg, - int fromTTY) -#else -_tuiShowGeneral_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiShowGeneral_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport, TUI_GENERAL_REGS); @@ -1138,15 +961,7 @@ _tuiShowGeneral_command (arg, fromTTY) static void -#ifdef __STDC__ -_tuiShowSpecial_command ( - char *arg, - int fromTTY) -#else -_tuiShowSpecial_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiShowSpecial_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport, TUI_SPECIAL_REGS); @@ -1156,15 +971,7 @@ _tuiShowSpecial_command (arg, fromTTY) static void -#ifdef __STDC__ -_tuiToggleFloatRegs_command ( - char *arg, - int fromTTY) -#else -_tuiToggleFloatRegs_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiToggleFloatRegs_command (char *arg, int fromTTY) { if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible) tuiDo ((TuiOpaqueFuncPtr) tuiToggleFloatRegs); @@ -1184,15 +991,7 @@ _tuiToggleFloatRegs_command (arg, fromTTY) static void -#ifdef __STDC__ -_tuiScrollRegsForward_command ( - char *arg, - int fromTTY) -#else -_tuiScrollRegsForward_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollRegsForward_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, FORWARD_SCROLL, dataWin, 1); @@ -1201,15 +1000,7 @@ _tuiScrollRegsForward_command (arg, fromTTY) static void -#ifdef __STDC__ -_tuiScrollRegsBackward_command ( - char *arg, - int fromTTY) -#else -_tuiScrollRegsBackward_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollRegsBackward_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, BACKWARD_SCROLL, dataWin, 1); diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c index e7bdf17..4a39e0a 100644 --- a/gdb/tui/tuiSource.c +++ b/gdb/tui/tuiSource.c @@ -65,17 +65,7 @@ static struct breakpoint *_hasBreak (char *, int); ** Function to display source in the source window. */ TuiStatus -#ifdef __STDC__ -tuiSetSourceContent ( - struct symtab *s, - int lineNo, - int noerror) -#else -tuiSetSourceContent (s, lineNo, noerror) - struct symtab *s; - int lineNo; - int noerror; -#endif +tuiSetSourceContent (struct symtab *s, int lineNo, int noerror) { TuiStatus ret = TUI_FAILURE; @@ -269,15 +259,7 @@ tuiSetSourceContent (s, lineNo, noerror) cannot be accessed */ void -#ifdef __STDC__ -tuiSetSourceContentNil ( - TuiWinInfoPtr winInfo, - char *warning_string) -#else -tuiSetSourceContentNil (winInfo, warning_string) - TuiWinInfoPtr winInfo; - char *warning_string; -#endif +tuiSetSourceContentNil (TuiWinInfoPtr winInfo, char *warning_string) { int lineWidth; int nLines; @@ -350,17 +332,7 @@ tuiSetSourceContentNil (winInfo, warning_string) ** initializes the horizontal scroll to 0. */ void -#ifdef __STDC__ -tuiShowSource ( - struct symtab *s, - Opaque line, - int noerror) -#else -tuiShowSource (s, line, noerror) - struct symtab *s; - Opaque line; - int noerror; -#endif +tuiShowSource (struct symtab *s, Opaque line, int noerror) { srcWin->detail.sourceInfo.horizontalOffset = 0; m_tuiShowSourceAsIs (s, line, noerror); @@ -374,13 +346,7 @@ tuiShowSource (s, line, noerror) ** Answer whether the source is currently displayed in the source window. */ int -#ifdef __STDC__ -tuiSourceIsDisplayed ( - char *fname) -#else -tuiSourceIsDisplayed (fname) - char *fname; -#endif +tuiSourceIsDisplayed (char *fname) { return (srcWin->generic.contentInUse && (strcmp (((TuiWinElementPtr) (locatorWinInfoPtr ())-> @@ -393,15 +359,7 @@ tuiSourceIsDisplayed (fname) ** Scroll the source forward or backward vertically */ void -#ifdef __STDC__ -tuiVerticalSourceScroll ( - TuiScrollDirection scrollDirection, - int numToScroll) -#else -tuiVerticalSourceScroll (scrollDirection, numToScroll) - TuiScrollDirection scrollDirection; - int numToScroll; -#endif +tuiVerticalSourceScroll (TuiScrollDirection scrollDirection, int numToScroll) { if (srcWin->generic.content != (OpaquePtr) NULL) { @@ -448,15 +406,7 @@ tuiVerticalSourceScroll (scrollDirection, numToScroll) ** the source file indicated */ static struct breakpoint * -#ifdef __STDC__ -_hasBreak ( - char *sourceFileName, - int lineNo) -#else -_hasBreak (sourceFileName, lineNo) - char *sourceFileName; - int lineNo; -#endif +_hasBreak (char *sourceFileName, int lineNo) { struct breakpoint *bpWithBreak = (struct breakpoint *) NULL; struct breakpoint *bp; diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c index 4097bb2..60c55a6 100644 --- a/gdb/tui/tuiSourceWin.c +++ b/gdb/tui/tuiSourceWin.c @@ -65,11 +65,7 @@ extern struct symtab *current_source_symtab; ** tuiSrcWinIsDisplayed(). */ int -#ifdef __STDC__ tuiSrcWinIsDisplayed (void) -#else -tuiSrcWinIsDisplayed () -#endif { return (m_winPtrNotNull (srcWin) && srcWin->generic.isVisible); } /* tuiSrcWinIsDisplayed */ @@ -79,11 +75,7 @@ tuiSrcWinIsDisplayed () ** tuiAsmWinIsDisplayed(). */ int -#ifdef __STDC__ tuiAsmWinIsDisplayed (void) -#else -tuiAsmWinIsDisplayed () -#endif { return (m_winPtrNotNull (disassemWin) && disassemWin->generic.isVisible); } /* tuiAsmWinIsDisplayed */ @@ -94,11 +86,7 @@ tuiAsmWinIsDisplayed () ** Function to display the "main" routine" */ void -#ifdef __STDC__ tuiDisplayMainFunction (void) -#else -tuiDisplayMainFunction () -#endif { if ((sourceWindows ())->count > 0) { @@ -128,19 +116,8 @@ tuiDisplayMainFunction () ** initializes the horizontal scroll to 0. */ void -#ifdef __STDC__ -tuiUpdateSourceWindow ( - TuiWinInfoPtr winInfo, - struct symtab *s, - Opaque lineOrAddr, - int noerror) -#else -tuiUpdateSourceWindow (winInfo, s, lineOrAddr, noerror) - TuiWinInfoPtr winInfo; - struct symtab *s; - Opaque lineOrAddr; - int noerror; -#endif +tuiUpdateSourceWindow (TuiWinInfoPtr winInfo, struct symtab *s, + Opaque lineOrAddr, int noerror) { winInfo->detail.sourceInfo.horizontalOffset = 0; tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror); @@ -155,19 +132,8 @@ tuiUpdateSourceWindow (winInfo, s, lineOrAddr, noerror) ** function shows the source as specified by the horizontal offset. */ void -#ifdef __STDC__ -tuiUpdateSourceWindowAsIs ( - TuiWinInfoPtr winInfo, - struct symtab *s, - Opaque lineOrAddr, - int noerror) -#else -tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror) - TuiWinInfoPtr winInfo; - struct symtab *s; - Opaque lineOrAddr; - int noerror; -#endif +tuiUpdateSourceWindowAsIs (TuiWinInfoPtr winInfo, struct symtab *s, + Opaque lineOrAddr, int noerror) { TuiStatus ret; @@ -212,13 +178,7 @@ tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror) ** reflect the input address. */ void -#ifdef __STDC__ -tuiUpdateSourceWindowsWithAddr ( - Opaque addr) -#else -tuiUpdateSourceWindowsWithAddr (addr) - Opaque addr; -#endif +tuiUpdateSourceWindowsWithAddr (Opaque addr) { if (addr > (Opaque) NULL) { @@ -263,13 +223,7 @@ tuiUpdateSourceWindowsWithAddr (addr) ** Update the source window with the address in a va_list */ void -#ifdef __STDC__ -tui_vUpdateSourceWindowsWithAddr ( - va_list args) -#else -tui_vUpdateSourceWindowsWithAddr (args) - va_list args; -#endif +tui_vUpdateSourceWindowsWithAddr (va_list args) { Opaque addr = va_arg (args, Opaque); @@ -285,15 +239,7 @@ tui_vUpdateSourceWindowsWithAddr (args) ** reflect the input address. */ void -#ifdef __STDC__ -tuiUpdateSourceWindowsWithLine ( - struct symtab *s, - int line) -#else -tuiUpdateSourceWindowsWithLine (s, line) - struct symtab *s; - int line; -#endif +tuiUpdateSourceWindowsWithLine (struct symtab *s, int line) { switch (currentLayout ()) { @@ -317,13 +263,7 @@ tuiUpdateSourceWindowsWithLine (s, line) ** Update the source window with the line number in a va_list */ void -#ifdef __STDC__ -tui_vUpdateSourceWindowsWithLine ( - va_list args) -#else -tui_vUpdateSourceWindowsWithLine (args) - va_list args; -#endif +tui_vUpdateSourceWindowsWithLine (va_list args) { struct symtab *s = va_arg (args, struct symtab *); int line = va_arg (args, int); @@ -338,15 +278,7 @@ tui_vUpdateSourceWindowsWithLine (args) ** tuiClearSourceContent(). */ void -#ifdef __STDC__ -tuiClearSourceContent ( - TuiWinInfoPtr winInfo, - int displayPrompt) -#else -tuiClearSourceContent (winInfo, displayPrompt) - TuiWinInfoPtr winInfo; - int displayPrompt; -#endif +tuiClearSourceContent (TuiWinInfoPtr winInfo, int displayPrompt) { if (m_winPtrNotNull (winInfo)) { @@ -371,13 +303,7 @@ tuiClearSourceContent (winInfo, displayPrompt) ** tuiClearAllSourceWinsContent(). */ void -#ifdef __STDC__ -tuiClearAllSourceWinsContent ( - int displayPrompt) -#else -tuiClearAllSourceWinsContent (displayPrompt) - int displayPrompt; -#endif +tuiClearAllSourceWinsContent (int displayPrompt) { int i; @@ -393,15 +319,7 @@ tuiClearAllSourceWinsContent (displayPrompt) ** tuiEraseSourceContent(). */ void -#ifdef __STDC__ -tuiEraseSourceContent ( - TuiWinInfoPtr winInfo, - int displayPrompt) -#else -tuiEraseSourceContent (winInfo, displayPrompt) - TuiWinInfoPtr winInfo; - int displayPrompt; -#endif +tuiEraseSourceContent (TuiWinInfoPtr winInfo, int displayPrompt) { int xPos; int halfWidth = (winInfo->generic.width - 2) / 2; @@ -444,13 +362,7 @@ tuiEraseSourceContent (winInfo, displayPrompt) ** tuiEraseAllSourceContent(). */ void -#ifdef __STDC__ -tuiEraseAllSourceWinsContent ( - int displayPrompt) -#else -tuiEraseAllSourceWinsContent (displayPrompt) - int displayPrompt; -#endif +tuiEraseAllSourceWinsContent (int displayPrompt) { int i; @@ -466,13 +378,7 @@ tuiEraseAllSourceWinsContent (displayPrompt) ** tuiShowSourceContent(). */ void -#ifdef __STDC__ -tuiShowSourceContent ( - TuiWinInfoPtr winInfo) -#else -tuiShowSourceContent (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiShowSourceContent (TuiWinInfoPtr winInfo) { int curLine, i, curX; @@ -501,11 +407,7 @@ tuiShowSourceContent (winInfo) ** tuiShowAllSourceWinsContent() */ void -#ifdef __STDC__ tuiShowAllSourceWinsContent (void) -#else -tuiShowAllSourceWinsContent () -#endif { int i; @@ -521,17 +423,9 @@ tuiShowAllSourceWinsContent () ** Scroll the source forward or backward horizontally */ void -#ifdef __STDC__ -tuiHorizontalSourceScroll ( - TuiWinInfoPtr winInfo, - TuiScrollDirection direction, - int numToScroll) -#else -tuiHorizontalSourceScroll (winInfo, direction, numToScroll) - TuiWinInfoPtr winInfo; - TuiScrollDirection direction; - int numToScroll; -#endif +tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo, + TuiScrollDirection direction, + int numToScroll) { if (winInfo->generic.content != (OpaquePtr) NULL) { @@ -572,15 +466,7 @@ tuiHorizontalSourceScroll (winInfo, direction, numToScroll) ** Set or clear the hasBreak flag in the line whose line is lineNo. */ void -#ifdef __STDC__ -tuiSetIsExecPointAt ( - Opaque lineOrAddr, - TuiWinInfoPtr winInfo) -#else -tuiSetIsExecPointAt (lineOrAddr, winInfo) - Opaque lineOrAddr; - TuiWinInfoPtr winInfo; -#endif +tuiSetIsExecPointAt (Opaque lineOrAddr, TuiWinInfoPtr winInfo) { int i; TuiWinContent content = (TuiWinContent) winInfo->generic.content; @@ -604,17 +490,7 @@ tuiSetIsExecPointAt (lineOrAddr, winInfo) ** Set or clear the hasBreak flag in the line whose line is lineNo. */ void -#ifdef __STDC__ -tuiSetHasBreakAt ( - struct breakpoint *bp, - TuiWinInfoPtr winInfo, - int hasBreak) -#else -tuiSetHasBreakAt (bp, winInfo, hasBreak) - struct breakpoint *bp; - TuiWinInfoPtr winInfo; - int hasBreak; -#endif +tuiSetHasBreakAt (struct breakpoint *bp, TuiWinInfoPtr winInfo, int hasBreak) { int i; TuiWinContent content = (TuiWinContent) winInfo->generic.content; @@ -662,15 +538,7 @@ tuiSetHasBreakAt (bp, winInfo, hasBreak) ** Set or clear the hasBreak flag in all displayed source windows. */ void -#ifdef __STDC__ -tuiAllSetHasBreakAt ( - struct breakpoint *bp, - int hasBreak) -#else -tuiAllSetHasBreakAt (bp, hasBreak) - struct breakpoint *bp; - int hasBreak; -#endif +tuiAllSetHasBreakAt (struct breakpoint *bp, int hasBreak) { int i; @@ -688,13 +556,7 @@ tuiAllSetHasBreakAt (bp, hasBreak) ** with params in a va_list */ void -#ifdef __STDC__ -tui_vAllSetHasBreakAt ( - va_list args) -#else -tui_vAllSetHasBreakAt (args) - va_list args; -#endif +tui_vAllSetHasBreakAt (va_list args) { struct breakpoint *bp = va_arg (args, struct breakpoint *); int hasBreak = va_arg (args, int); @@ -717,13 +579,7 @@ tui_vAllSetHasBreakAt (args) ** disassembly window. */ TuiStatus -#ifdef __STDC__ -tuiSetExecInfoContent ( - TuiWinInfoPtr winInfo) -#else -tuiSetExecInfoContent (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiSetExecInfoContent (TuiWinInfoPtr winInfo) { TuiStatus ret = TUI_SUCCESS; @@ -804,13 +660,7 @@ tuiSetExecInfoContent (winInfo) ** tuiShowExecInfoContent(). */ void -#ifdef __STDC__ -tuiShowExecInfoContent ( - TuiWinInfoPtr winInfo) -#else -tuiShowExecInfoContent (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiShowExecInfoContent (TuiWinInfoPtr winInfo) { TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo; int curLine; @@ -834,11 +684,7 @@ tuiShowExecInfoContent (winInfo) ** tuiShowAllExecInfosContent() */ void -#ifdef __STDC__ tuiShowAllExecInfosContent (void) -#else -tuiShowAllExecInfosContent () -#endif { int i; @@ -853,13 +699,7 @@ tuiShowAllExecInfosContent () ** tuiEraseExecInfoContent(). */ void -#ifdef __STDC__ -tuiEraseExecInfoContent ( - TuiWinInfoPtr winInfo) -#else -tuiEraseExecInfoContent (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiEraseExecInfoContent (TuiWinInfoPtr winInfo) { TuiGenWinInfoPtr execInfo = winInfo->detail.sourceInfo.executionInfo; @@ -874,11 +714,7 @@ tuiEraseExecInfoContent (winInfo) ** tuiEraseAllExecInfosContent() */ void -#ifdef __STDC__ tuiEraseAllExecInfosContent (void) -#else -tuiEraseAllExecInfosContent () -#endif { int i; @@ -893,13 +729,7 @@ tuiEraseAllExecInfosContent () ** tuiClearExecInfoContent(). */ void -#ifdef __STDC__ -tuiClearExecInfoContent ( - TuiWinInfoPtr winInfo) -#else -tuiClearExecInfoContent (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiClearExecInfoContent (TuiWinInfoPtr winInfo) { winInfo->detail.sourceInfo.executionInfo->contentInUse = FALSE; tuiEraseExecInfoContent (winInfo); @@ -912,11 +742,7 @@ tuiClearExecInfoContent (winInfo) ** tuiClearAllExecInfosContent() */ void -#ifdef __STDC__ tuiClearAllExecInfosContent (void) -#else -tuiClearAllExecInfosContent () -#endif { int i; @@ -932,13 +758,7 @@ tuiClearAllExecInfosContent () ** Function to update the execution info window */ void -#ifdef __STDC__ -tuiUpdateExecInfo ( - TuiWinInfoPtr winInfo) -#else -tuiUpdateExecInfo (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiUpdateExecInfo (TuiWinInfoPtr winInfo) { tuiSetExecInfoContent (winInfo); tuiShowExecInfoContent (winInfo); @@ -949,11 +769,7 @@ tuiUpdateExecInfo (winInfo) ** tuiUpdateAllExecInfos() */ void -#ifdef __STDC__ tuiUpdateAllExecInfos (void) -#else -tuiUpdateAllExecInfos () -#endif { int i; @@ -972,11 +788,7 @@ tuiUpdateAllExecInfos () ** is called then the target terminates execution */ void -#ifdef __STDC__ tuiUpdateOnEnd (void) -#else -tuiUpdateOnEnd () -#endif { int i; TuiGenWinInfoPtr locator; @@ -1013,13 +825,7 @@ tuiUpdateOnEnd () TuiStatus -#ifdef __STDC__ -tuiAllocSourceBuffer ( - TuiWinInfoPtr winInfo) -#else -tuiAllocSourceBuffer (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiAllocSourceBuffer (TuiWinInfoPtr winInfo) { register char *srcLine, *srcLineBuf; register int i, lineWidth, c, maxLines; @@ -1071,17 +877,8 @@ tuiAllocSourceBuffer (winInfo) ** in the current source window. */ int -#ifdef __STDC__ -tuiLineIsDisplayed ( - Opaque lineNoOrAddr, - TuiWinInfoPtr winInfo, - int checkThreshold) -#else -tuiLineIsDisplayed (lineNoOrAddr, winInfo, checkThreshold) - Opaque lineNoOrAddr; - TuiWinInfoPtr winInfo; - int checkThreshold; -#endif +tuiLineIsDisplayed (Opaque lineNoOrAddr, TuiWinInfoPtr winInfo, + int checkThreshold) { int isDisplayed = FALSE; int i, threshold; diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c index d891539..47a0cd0 100644 --- a/gdb/tui/tuiStack.c +++ b/gdb/tui/tuiStack.c @@ -47,11 +47,7 @@ static void _tuiUpdateLocation_command (char *, int); ** tuiClearLocatorDisplay() */ void -#ifdef __STDC__ tuiClearLocatorDisplay (void) -#else -tuiClearLocatorDisplay () -#endif { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); int i; @@ -80,11 +76,7 @@ tuiClearLocatorDisplay () ** tuiShowLocatorContent() */ void -#ifdef __STDC__ tuiShowLocatorContent (void) -#else -tuiShowLocatorContent () -#endif { char *string; TuiGenWinInfoPtr locator; @@ -117,21 +109,8 @@ tuiShowLocatorContent () ** Function to update the locator, with the provided arguments. */ void -#ifdef __STDC__ -tuiSetLocatorInfo ( - char *fname, - char *procname, - int lineNo, - Opaque addr, - TuiLocatorElementPtr element) -#else -tuiSetLocatorInfo (fname, procname, lineNo, addr, element) - char *fname; - char *procname; - int lineNo; - Opaque addr; - TuiLocatorElementPtr element; -#endif +tuiSetLocatorInfo (char *fname, char *procname, int lineNo, + Opaque addr, TuiLocatorElementPtr element) { #ifdef COMMENT /* first free the old info */ @@ -166,13 +145,7 @@ tuiSetLocatorInfo (fname, procname, lineNo, addr, element) ** Update only the filename portion of the locator. */ void -#ifdef __STDC__ -tuiUpdateLocatorFilename ( - char *fileName) -#else -tuiUpdateLocatorFilename (fileName) - char *fileName; -#endif +tuiUpdateLocatorFilename (char *fileName) { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); @@ -194,13 +167,7 @@ tuiUpdateLocatorFilename (fileName) ** Update only the filename portion of the locator with args in a va_list. */ void -#ifdef __STDC__ -tui_vUpdateLocatorFilename ( - va_list args) -#else -tui_vUpdateLocatorFilename (args) - va_list args; -#endif +tui_vUpdateLocatorFilename (va_list args) { char *fileName; @@ -217,13 +184,7 @@ tui_vUpdateLocatorFilename (args) ** (elz) */ void -#ifdef __STDC__ -tuiSwitchFilename ( - char *fileName) -#else -tuiSwitchFilename (fileName) - char *fileName; -#endif +tuiSwitchFilename (char *fileName) { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); @@ -249,15 +210,7 @@ tuiSwitchFilename (fileName) ** (elz) */ void -#ifdef __STDC__ -tuiGetLocatorFilename ( - TuiGenWinInfoPtr locator, - char **filename) -#else -tuiGetLocatorFilename (locator, filename) - TuiGenWinInfoPtr locator; - char **filename; -#endif +tuiGetLocatorFilename (TuiGenWinInfoPtr locator, char **filename) { /* the current filename could be non known, in which case the xmalloc would @@ -281,15 +234,8 @@ tuiGetLocatorFilename (locator, filename) ** Function to update the locator, with the information extracted from frameInfo */ void -#ifdef __STDC__ -tuiUpdateLocatorInfoFromFrame ( - struct frame_info *frameInfo, - TuiLocatorElementPtr element) -#else -tuiUpdateLocatorInfoFromFrame (frameInfo, element) - struct frame_info *frameInfo; - TuiLocatorElementPtr element; -#endif +tuiUpdateLocatorInfoFromFrame (struct frame_info *frameInfo, + TuiLocatorElementPtr element) { struct symtab_and_line symtabAndLine; @@ -320,13 +266,7 @@ tuiUpdateLocatorInfoFromFrame (frameInfo, element) ** Function to set the content of the locator */ void -#ifdef __STDC__ -tuiSetLocatorContent ( - struct frame_info *frameInfo) -#else -tuiSetLocatorContent (frameInfo) - struct frame_info *frameInfo; -#endif +tuiSetLocatorContent (struct frame_info *frameInfo) { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); TuiWinElementPtr element; @@ -360,13 +300,7 @@ tuiSetLocatorContent (frameInfo) ** Function to update the locator display */ void -#ifdef __STDC__ -tuiUpdateLocatorDisplay ( - struct frame_info *frameInfo) -#else -tuiUpdateLocatorDisplay (frameInfo) - struct frame_info *frameInfo; -#endif +tuiUpdateLocatorDisplay (struct frame_info *frameInfo) { tuiClearLocatorDisplay (); tuiSetLocatorContent (frameInfo); @@ -381,13 +315,7 @@ tuiUpdateLocatorDisplay (frameInfo) ** Function to print the frame inforrmation for the TUI. */ void -#ifdef __STDC__ -tuiShowFrameInfo ( - struct frame_info *fi) -#else -tuiShowFrameInfo (fi) - struct frame_info *fi; -#endif +tuiShowFrameInfo (struct frame_info *fi) { TuiWinInfoPtr winInfo; register int i; @@ -470,13 +398,7 @@ tuiShowFrameInfo (fi) ** Function to print the frame inforrmation for the TUI with args in a va_list. */ void -#ifdef __STDC__ -tui_vShowFrameInfo ( - va_list args) -#else -tui_vShowFrameInfo (args) - va_list args; -#endif +tui_vShowFrameInfo (va_list args) { struct frame_info *fi; @@ -512,13 +434,7 @@ _initialize_tuiStack (void) ** _getFuncNameFromFrame(). */ static char * -#ifdef __STDC__ -_getFuncNameFromFrame ( - struct frame_info *frameInfo) -#else -_getFuncNameFromFrame (frameInfo) - struct frame_info *frameInfo; -#endif +_getFuncNameFromFrame (struct frame_info *frameInfo) { char *funcName = (char *) NULL; @@ -535,15 +451,7 @@ _getFuncNameFromFrame (frameInfo) ** Command to update the display with the current execution point */ static void -#ifdef __STDC__ -_tuiUpdateLocation_command ( - char *arg, - int fromTTY) -#else -_tuiUpdateLocation_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiUpdateLocation_command (char *arg, int fromTTY) { #ifndef TRY extern void frame_command (char *, int); diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c index 0908ffc..333a8a6 100644 --- a/gdb/tui/tuiWin.c +++ b/gdb/tui/tuiWin.c @@ -133,13 +133,7 @@ Usage: w <#lines>\n"); ** Clear the logical focus from winInfo */ void -#ifdef __STDC__ -tuiClearWinFocusFrom ( - TuiWinInfoPtr winInfo) -#else -tuiClearWinFocusFrom (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiClearWinFocusFrom (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo)) { @@ -157,11 +151,7 @@ tuiClearWinFocusFrom (winInfo) ** Clear the window that has focus. */ void -#ifdef __STDC__ tuiClearWinFocus (void) -#else -tuiClearWinFocus () -#endif { tuiClearWinFocusFrom (tuiWinWithFocus ()); @@ -174,13 +164,7 @@ tuiClearWinFocus () ** Set the logical focus to winInfo */ void -#ifdef __STDC__ -tuiSetWinFocusTo ( - TuiWinInfoPtr winInfo) -#else -tuiSetWinFocusTo (winInfo) - TuiWinInfoPtr winInfo; -#endif +tuiSetWinFocusTo (TuiWinInfoPtr winInfo) { if (m_winPtrNotNull (winInfo)) { @@ -199,13 +183,7 @@ tuiSetWinFocusTo (winInfo) char * -#ifdef __STDC__ -tuiStrDup ( - char *str) -#else -tuiStrDup (str) - char *str; -#endif +tuiStrDup (char *str) { char *newStr = (char *) NULL; @@ -223,15 +201,7 @@ tuiStrDup (str) ** tuiScrollForward(). */ void -#ifdef __STDC__ -tuiScrollForward ( - TuiWinInfoPtr winToScroll, - int numToScroll) -#else -tuiScrollForward (winToScroll, numToScroll) - TuiWinInfoPtr winToScroll; - int numToScroll; -#endif +tuiScrollForward (TuiWinInfoPtr winToScroll, int numToScroll) { if (winToScroll != cmdWin) { @@ -261,15 +231,7 @@ tuiScrollForward (winToScroll, numToScroll) ** tuiScrollBackward(). */ void -#ifdef __STDC__ -tuiScrollBackward ( - TuiWinInfoPtr winToScroll, - int numToScroll) -#else -tuiScrollBackward (winToScroll, numToScroll) - TuiWinInfoPtr winToScroll; - int numToScroll; -#endif +tuiScrollBackward (TuiWinInfoPtr winToScroll, int numToScroll) { if (winToScroll != cmdWin) { @@ -298,15 +260,7 @@ tuiScrollBackward (winToScroll, numToScroll) ** tuiScrollLeft(). */ void -#ifdef __STDC__ -tuiScrollLeft ( - TuiWinInfoPtr winToScroll, - int numToScroll) -#else -tuiScrollLeft (winToScroll, numToScroll) - TuiWinInfoPtr winToScroll; - int numToScroll; -#endif +tuiScrollLeft (TuiWinInfoPtr winToScroll, int numToScroll) { if (winToScroll != cmdWin) { @@ -331,15 +285,7 @@ tuiScrollLeft (winToScroll, numToScroll) ** tuiScrollRight(). */ void -#ifdef __STDC__ -tuiScrollRight ( - TuiWinInfoPtr winToScroll, - int numToScroll) -#else -tuiScrollRight (winToScroll, numToScroll) - TuiWinInfoPtr winToScroll; - int numToScroll; -#endif +tuiScrollRight (TuiWinInfoPtr winToScroll, int numToScroll) { if (winToScroll != cmdWin) { @@ -365,13 +311,7 @@ tuiScrollRight (winToScroll, numToScroll) ** Scroll a window. Arguments are passed through a va_list. */ void -#ifdef __STDC__ -tui_vScroll ( - va_list args) -#else -tui_vScroll (args) - va_list args; -#endif +tui_vScroll (va_list args) { TuiScrollDirection direction = va_arg (args, TuiScrollDirection); TuiWinInfoPtr winToScroll = va_arg (args, TuiWinInfoPtr); @@ -403,11 +343,7 @@ tui_vScroll (args) ** tuiRefreshAll(). */ void -#ifdef __STDC__ tuiRefreshAll (void) -#else -tuiRefreshAll () -#endif { TuiWinType type; @@ -449,11 +385,7 @@ tuiRefreshAll () ** function gets called from within the readline sinwinch handler. */ void -#ifdef __STDC__ tuiResizeAll (void) -#else -tuiResizeAll () -#endif { int heightDiff, widthDiff; extern int screenheight, screenwidth; /* in readline */ @@ -616,13 +548,7 @@ tuiResizeAll () ** because it is set as the old_sigwinch() (TUI only) */ void -#ifdef __STDC__ -tuiSigwinchHandler ( - int signal) -#else -tuiSigwinchHandler (signal) - int signal; -#endif +tuiSigwinchHandler (int signal) { /* ** Say that a resize was done so that the readline can do it @@ -644,15 +570,7 @@ tuiSigwinchHandler (signal) ** _tuiScrollForward_command(). */ static void -#ifdef __STDC__ -_tuiScrollForward_command ( - char *arg, - int fromTTY) -#else -_tuiScrollForward_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollForward_command (char *arg, int fromTTY) { int numToScroll = 1; TuiWinInfoPtr winToScroll; @@ -674,15 +592,7 @@ _tuiScrollForward_command (arg, fromTTY) ** _tuiScrollBackward_command(). */ static void -#ifdef __STDC__ -_tuiScrollBackward_command ( - char *arg, - int fromTTY) -#else -_tuiScrollBackward_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollBackward_command (char *arg, int fromTTY) { int numToScroll = 1; TuiWinInfoPtr winToScroll; @@ -704,15 +614,7 @@ _tuiScrollBackward_command (arg, fromTTY) ** _tuiScrollLeft_command(). */ static void -#ifdef __STDC__ -_tuiScrollLeft_command ( - char *arg, - int fromTTY) -#else -_tuiScrollLeft_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollLeft_command (char *arg, int fromTTY) { int numToScroll; TuiWinInfoPtr winToScroll; @@ -731,15 +633,7 @@ _tuiScrollLeft_command (arg, fromTTY) ** _tuiScrollRight_command(). */ static void -#ifdef __STDC__ -_tuiScrollRight_command ( - char *arg, - int fromTTY) -#else -_tuiScrollRight_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiScrollRight_command (char *arg, int fromTTY) { int numToScroll; TuiWinInfoPtr winToScroll; @@ -759,15 +653,7 @@ _tuiScrollRight_command (arg, fromTTY) ** Set focus to the window named by 'arg' */ static void -#ifdef __STDC__ -_tuiSetFocus ( - char *arg, - int fromTTY) -#else -_tuiSetFocus (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiSetFocus (char *arg, int fromTTY) { if (arg != (char *) NULL) { @@ -811,13 +697,7 @@ The window name specified must be valid and visible.\n"); ** _tui_vSetFocus() */ static void -#ifdef __STDC__ -_tui_vSetFocus ( - va_list args) -#else -_tui_vSetFocus (args) - va_list args; -#endif +_tui_vSetFocus (va_list args) { char *arg = va_arg (args, char *); int fromTTY = va_arg (args, int); @@ -832,15 +712,7 @@ _tui_vSetFocus (args) ** _tuiSetFocus_command() */ static void -#ifdef __STDC__ -_tuiSetFocus_command ( - char *arg, - int fromTTY) -#else -_tuiSetFocus_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiSetFocus_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vSetFocus, arg, fromTTY); @@ -852,15 +724,7 @@ _tuiSetFocus_command (arg, fromTTY) ** _tuiAllWindowsInfo(). */ static void -#ifdef __STDC__ -_tuiAllWindowsInfo ( - char *arg, - int fromTTY) -#else -_tuiAllWindowsInfo (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiAllWindowsInfo (char *arg, int fromTTY) { TuiWinType type; TuiWinInfoPtr winWithFocus = tuiWinWithFocus (); @@ -886,15 +750,7 @@ _tuiAllWindowsInfo (arg, fromTTY) ** _tuiRefreshAll_command(). */ static void -#ifdef __STDC__ -_tuiRefreshAll_command ( - char *arg, - int fromTTY) -#else -_tuiRefreshAll_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiRefreshAll_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll); } @@ -905,15 +761,7 @@ _tuiRefreshAll_command (arg, fromTTY) ** Set the height of the specified window. */ static void -#ifdef __STDC__ -_tuiSetTabWidth_command ( - char *arg, - int fromTTY) -#else -_tuiSetTabWidth_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiSetTabWidth_command (char *arg, int fromTTY) { if (arg != (char *) NULL) { @@ -935,15 +783,7 @@ _tuiSetTabWidth_command (arg, fromTTY) ** Set the height of the specified window. */ static void -#ifdef __STDC__ -_tuiSetWinHeight ( - char *arg, - int fromTTY) -#else -_tuiSetWinHeight (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiSetWinHeight (char *arg, int fromTTY) { if (arg != (char *) NULL) { @@ -1032,13 +872,7 @@ The window name specified must be valid and visible.\n"); ** Set the height of the specified window, with va_list. */ static void -#ifdef __STDC__ -_tui_vSetWinHeight ( - va_list args) -#else -_tui_vSetWinHeight (args) - va_list args; -#endif +_tui_vSetWinHeight (va_list args) { char *arg = va_arg (args, char *); int fromTTY = va_arg (args, int); @@ -1054,15 +888,7 @@ _tui_vSetWinHeight (args) ** Set the height of the specified window, with va_list. */ static void -#ifdef __STDC__ -_tuiSetWinHeight_command ( - char *arg, - int fromTTY) -#else -_tuiSetWinHeight_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiSetWinHeight_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vSetWinHeight, arg, fromTTY); @@ -1076,15 +902,7 @@ _tuiSetWinHeight_command (arg, fromTTY) ** increase or decrease the command window by the specified amount. */ static void -#ifdef __STDC__ -_tuiXDBsetWinHeight ( - char *arg, - int fromTTY) -#else -_tuiXDBsetWinHeight (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiXDBsetWinHeight (char *arg, int fromTTY) { if (arg != (char *) NULL) { @@ -1116,13 +934,7 @@ _tuiXDBsetWinHeight (arg, fromTTY) ** Set the height of the specified window, with va_list. */ static void -#ifdef __STDC__ -_tui_vXDBsetWinHeight ( - va_list args) -#else -_tui_vXDBsetWinHeight (args) - va_list args; -#endif +_tui_vXDBsetWinHeight (va_list args) { char *arg = va_arg (args, char *); int fromTTY = va_arg (args, int); @@ -1138,15 +950,7 @@ _tui_vXDBsetWinHeight (args) ** Set the height of the specified window, with va_list. */ static void -#ifdef __STDC__ -_tuiXDBsetWinHeight_command ( - char *arg, - int fromTTY) -#else -_tuiXDBsetWinHeight_command (arg, fromTTY) - char *arg; - int fromTTY; -#endif +_tuiXDBsetWinHeight_command (char *arg, int fromTTY) { tuiDo ((TuiOpaqueFuncPtr) _tui_vXDBsetWinHeight, arg, fromTTY); @@ -1159,15 +963,7 @@ _tuiXDBsetWinHeight_command (arg, fromTTY) ** Function to adjust all window heights around the primary */ static TuiStatus -#ifdef __STDC__ -_tuiAdjustWinHeights ( - TuiWinInfoPtr primaryWinInfo, - int newHeight) -#else -_tuiAdjustWinHeights (primaryWinInfo, newHeight) - TuiWinInfoPtr primaryWinInfo; - int newHeight; -#endif +_tuiAdjustWinHeights (TuiWinInfoPtr primaryWinInfo, int newHeight) { TuiStatus status = TUI_FAILURE; @@ -1321,15 +1117,7 @@ _tuiAdjustWinHeights (primaryWinInfo, newHeight) ** with the targer) invisible, and set the new height and location. */ static void -#ifdef __STDC__ -_makeInvisibleAndSetNewHeight ( - TuiWinInfoPtr winInfo, - int height) -#else -_makeInvisibleAndSetNewHeight (winInfo, height) - TuiWinInfoPtr winInfo; - int height; -#endif +_makeInvisibleAndSetNewHeight (TuiWinInfoPtr winInfo, int height) { int i; struct symtab *s; @@ -1393,13 +1181,7 @@ _makeInvisibleAndSetNewHeight (winInfo, height) ** had to be destroyed to be made invisible. */ static void -#ifdef __STDC__ -_makeVisibleWithNewHeight ( - TuiWinInfoPtr winInfo) -#else -_makeVisibleWithNewHeight (winInfo) - TuiWinInfoPtr winInfo; -#endif +_makeVisibleWithNewHeight (TuiWinInfoPtr winInfo) { int i; struct symtab *s; @@ -1468,15 +1250,7 @@ _makeVisibleWithNewHeight (winInfo) static int -#ifdef __STDC__ -_newHeightOk ( - TuiWinInfoPtr primaryWinInfo, - int newHeight) -#else -_newHeightOk (primaryWinInfo, newHeight) - TuiWinInfoPtr primaryWinInfo; - int newHeight; -#endif +_newHeightOk (TuiWinInfoPtr primaryWinInfo, int newHeight) { int ok = (newHeight < termHeight ()); @@ -1592,17 +1366,7 @@ _newHeightOk (primaryWinInfo, newHeight) ** _parseScrollingArgs(). */ static void -#ifdef __STDC__ -_parseScrollingArgs ( - char *arg, - TuiWinInfoPtr * winToScroll, - int *numToScroll) -#else -_parseScrollingArgs (arg, winToScroll, numToScroll) - char *arg; - TuiWinInfoPtr *winToScroll; - int *numToScroll; -#endif +_parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll) { if (numToScroll) *numToScroll = 0; -- cgit v1.1