aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiWin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tuiWin.c')
-rw-r--r--gdb/tui/tuiWin.c296
1 files changed, 30 insertions, 266 deletions
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;