aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-07-18 22:03:22 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-07-18 22:03:22 +0000
commite8b915dc073aef16009a8f3b15768183bf64bfb3 (patch)
tree89f8fd85b272b72cf91daca2d476f700c9e7cadb /gdb
parentc774cec6a71cec1932152c9838d0a7142409d8ce (diff)
downloadgdb-e8b915dc073aef16009a8f3b15768183bf64bfb3.zip
gdb-e8b915dc073aef16009a8f3b15768183bf64bfb3.tar.gz
gdb-e8b915dc073aef16009a8f3b15768183bf64bfb3.tar.bz2
* tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
(tuiRead, tui_vread): Remove. * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove. (vcatch_errors, _tui_vDo): Remove. * tui.h (tuiDo, tuiDoAndReturnToTop): Remove. * tuiLayout.c (tuiSetLayout): Remove vcatch_errors. (tui_set_layout): Rename of _tuiSetLayoutTo, public. (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command. (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command. (_tuiLayout_command): Call tui_set_layout. * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll. (_tuiScrollRegsForward_command): Likewise. (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport. (_tuiShowGeneral_command): Likewise. (_tuiShowSpecial_command): Likewise. (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs. * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters. (_tuiScrollForward_command): Call tui_scroll. (_tuiScrollBackward_command): Likewise. (_tuiScrollLeft_command): Likewise. (_tuiScrollRight_command): Likewise. (_tuiSetFocus_command): Call _tuiSetFocus. (_tuiRefreshAll_command): Call tuiRefreshAll. (_tuiSetWinHeight_command): Call _tuiSetWinHeight. (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight. * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/tui/ChangeLog32
-rw-r--r--gdb/tui/tui.c210
-rw-r--r--gdb/tui/tui.h2
-rw-r--r--gdb/tui/tuiIO.c35
-rw-r--r--gdb/tui/tuiLayout.c40
-rw-r--r--gdb/tui/tuiRegs.c39
-rw-r--r--gdb/tui/tuiWin.c70
-rw-r--r--gdb/tui/tuiWin.h2
8 files changed, 78 insertions, 352 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index fd2b9cb..376f8b7 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,5 +1,37 @@
2001-07-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
+ (tuiRead, tui_vread): Remove.
+
+ * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove.
+ (vcatch_errors, _tui_vDo): Remove.
+ * tui.h (tuiDo, tuiDoAndReturnToTop): Remove.
+
+ * tuiLayout.c (tuiSetLayout): Remove vcatch_errors.
+ (tui_set_layout): Rename of _tuiSetLayoutTo, public.
+ (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command.
+ (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command.
+ (_tuiLayout_command): Call tui_set_layout.
+
+ * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll.
+ (_tuiScrollRegsForward_command): Likewise.
+ (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport.
+ (_tuiShowGeneral_command): Likewise.
+ (_tuiShowSpecial_command): Likewise.
+ (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs.
+ * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters.
+ (_tuiScrollForward_command): Call tui_scroll.
+ (_tuiScrollBackward_command): Likewise.
+ (_tuiScrollLeft_command): Likewise.
+ (_tuiScrollRight_command): Likewise.
+ (_tuiSetFocus_command): Call _tuiSetFocus.
+ (_tuiRefreshAll_command): Call tuiRefreshAll.
+ (_tuiSetWinHeight_command): Call _tuiSetWinHeight.
+ (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight.
+ * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
+
+2001-07-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
* tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
(TuiLineOrAddress): Likewise.
* tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index e51e1b9..806430d 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -63,7 +63,6 @@ extern char *tgoto ();
static void _tuiReset (void);
static void _toggle_command (char *, int);
static void _tui_vToggle_command (va_list);
-static Opaque _tui_vDo (TuiOpaqueFuncPtr, va_list);
@@ -277,92 +276,6 @@ tui_vGetLowDisassemblyAddress (va_list args)
} /* tui_vGetLowDisassemblyAddress */
-/*
- ** tuiDo().
- ** General purpose function to execute a tui function. Transitions
- ** between curses and the are handled here. This function is called
- ** by non-tui gdb functions.
- **
- ** Errors are caught here.
- ** If there is no error, the value returned by 'func' is returned.
- ** If there is an error, then zero is returned.
- **
- ** Must not be called with immediate_quit in effect (bad things might
- ** happen, say we got a signal in the middle of a memcpy to quit_return).
- ** This is an OK restriction; with very few exceptions immediate_quit can
- ** be replaced by judicious use of QUIT.
- */
-Opaque
-tuiDo (TuiOpaqueFuncPtr func, ...)
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- va_list args;
-
- va_start (args, func);
- ret = _tui_vDo (func, args);
- va_end (args);
- }
-
- return ret;
-} /* tuiDo */
-
-
-/*
- ** tuiDoAndReturnToTop().
- ** General purpose function to execute a tui function. Transitions
- ** between curses and the are handled here. This function is called
- ** by non-tui gdb functions who wish to reset gdb to the top level.
- ** After the tuiDo is performed, a return to the top level occurs.
- **
- ** Errors are caught here.
- ** If there is no error, the value returned by 'func' is returned.
- ** If there is an error, then zero is returned.
- **
- ** Must not be called with immediate_quit in effect (bad things might
- ** happen, say we got a signal in the middle of a memcpy to quit_return).
- ** This is an OK restriction; with very few exceptions immediate_quit can
- ** be replaced by judicious use of QUIT.
- **
- */
-Opaque
-tuiDoAndReturnToTop (TuiOpaqueFuncPtr func, ...)
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- va_list args;
-
- va_start (args, func);
- ret = _tui_vDo (func, args);
-
- /* force a return to the top level */
- return_to_top_level (RETURN_ERROR);
- }
-
- return ret;
-} /* tuiDoAndReturnToTop */
-
-
void
tui_vSelectSourceSymtab (va_list args)
{
@@ -407,84 +320,6 @@ Usage:\ttoggle $fregs\n\ttoggle breakpoints";
} /* _initialize_tui */
-/*
- ** va_catch_errors().
- ** General purpose function to execute a function, catching errors.
- ** If there is no error, the value returned by 'func' is returned.
- ** If there is error, then zero is returned.
- ** Note that 'func' must take a variable argument list as well.
- **
- ** Must not be called with immediate_quit in effect (bad things might
- ** happen, say we got a signal in the middle of a memcpy to quit_return).
- ** This is an OK restriction; with very few exceptions immediate_quit can
- ** be replaced by judicious use of QUIT.
- */
-Opaque
-va_catch_errors (TuiOpaqueFuncPtr func, va_list args)
-{
- Opaque ret = (Opaque) NULL;
-
- /*
- ** We could have used catch_errors(), but it doesn't handle variable args.
- ** Also, for the tui, we always want to catch all errors, so we don't
- ** need to pass a mask, or an error string.
- */
- jmp_buf saved_error;
- jmp_buf saved_quit;
- jmp_buf tmp_jmp;
- struct cleanup *saved_cleanup_chain;
- char *saved_error_pre_print;
- char *saved_quit_pre_print;
- extern jmp_buf error_return;
- extern jmp_buf quit_return;
-
- saved_cleanup_chain = save_cleanups ();
- saved_error_pre_print = error_pre_print;
- saved_quit_pre_print = quit_pre_print;
-
- memcpy ((char *) saved_error, (char *) error_return, sizeof (jmp_buf));
- error_pre_print = "";
- memcpy (saved_quit, quit_return, sizeof (jmp_buf));
- quit_pre_print = "";
-
- if (setjmp (tmp_jmp) == 0)
- {
- va_list argList = args;
- memcpy (error_return, tmp_jmp, sizeof (jmp_buf));
- memcpy (quit_return, tmp_jmp, sizeof (jmp_buf));
- ret = func (argList);
- }
- restore_cleanups (saved_cleanup_chain);
- memcpy (error_return, saved_error, sizeof (jmp_buf));
- error_pre_print = saved_error_pre_print;
- memcpy (quit_return, saved_quit, sizeof (jmp_buf));
- quit_pre_print = saved_quit_pre_print;
-
- return ret;
-}
-
-/*
- ** vcatch_errors().
- ** Catch errors occurring in tui or non tui function, handling
- ** variable param lists. Note that 'func' must take a variable
- ** argument list as well.
- */
-Opaque
-vcatch_errors (OpaqueFuncPtr func, ...)
-{
- Opaque ret = (Opaque) NULL;
- va_list args;
- va_start (args, func);
-/*
- va_arg(args, OpaqueFuncPtr);
- */
- ret = va_catch_errors (func, args);
- va_end (args);
-
- return ret;
-}
-
-
void
strcat_to_buf (char *buf, int buflen, char *itemToAdd)
{
@@ -523,51 +358,6 @@ strcat_to_buf_with_fmt (char *buf, int bufLen, char *format, ...)
************************/
-/*
- ** _tui_vDo().
- ** General purpose function to execute a tui function. Transitions
- ** between curses and the are handled here. This function is called
- ** by non-tui gdb functions.
- **
- ** Errors are caught here.
- ** If there is no error, the value returned by 'func' is returned.
- ** If there is an error, then zero is returned.
- **
- ** Must not be called with immediate_quit in effect (bad things might
- ** happen, say we got a signal in the middle of a memcpy to quit_return).
- ** This is an OK restriction; with very few exceptions immediate_quit can
- ** be replaced by judicious use of QUIT.
- */
-static Opaque
-_tui_vDo (TuiOpaqueFuncPtr func, va_list args)
-{
- extern int terminal_is_ours;
-
- Opaque ret = (Opaque) NULL;
-
- /* It is an error to be tuiDo'ing if we
- * don't own the terminal.
- */
- if (!terminal_is_ours)
- return ret;
-
- if (tui_version)
- {
- /* If doing command window the "XDB way" (command window
- * is unmanaged by curses...
- */
- /* Set up terminal for TUI */
- tuiTermSetup (1);
-
- ret = va_catch_errors (func, args);
-
- /* Set up terminal for command window */
- tuiTermUnsetup (1, cmdWin->detail.commandInfo.curch);
- }
-
- return ret;
-} /* _tui_vDo */
-
static void
_toggle_command (char *arg, int fromTTY)
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 8af18e9..e074754 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -97,8 +97,6 @@ extern void tuiCleanUp (void);
extern void tuiError (char *, int);
extern void tui_vError (va_list);
extern void tuiFree (char *);
-extern Opaque tuiDo (TuiOpaqueFuncPtr, ...);
-extern Opaque tuiDoAndReturnToTop (TuiOpaqueFuncPtr, ...);
extern Opaque tuiGetLowDisassemblyAddress (Opaque, Opaque);
extern Opaque tui_vGetLowDisassemblyAddress (va_list);
extern void tui_vSelectSourceSymtab (va_list);
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index 0471572..138eec5 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -277,39 +277,6 @@ tui_vwgetch (va_list args)
/*
- ** tui_vread()
- ** Wrapper around read() with paramets in a va_list
- */
-unsigned int
-tui_vread (va_list args)
-{
- int result = 0;
- int filedes = va_arg (args, int);
- char *buf = va_arg (args, char *);
- int nbytes = va_arg (args, int);
-
- result = read (filedes, buf, nbytes);
-
- return result;
-} /* tui_vread() */
-
-/*
- ** tuiRead()
- ** Function to perform a read() catching resize events
- */
-int
-tuiRead (int filedes, char *buf, int nbytes)
-{
- int result = 0;
-
- result = (int) vcatch_errors ((OpaqueFuncPtr) tui_vread, filedes, buf, nbytes);
- *buf = _tuiHandleResizeDuringIO (*buf);
-
- return result;
-} /* tuiRead */
-
-
-/*
** tuiGetc().
** Get a character from the command window.
** This is called from the readline package,
@@ -464,7 +431,7 @@ _tuiHandleResizeDuringIO (unsigned int originalCh)
{
if (tuiWinResized ())
{
- tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll);
+ tuiRefreshAll ();
dont_repeat ();
tuiSetWinResizedTo (FALSE);
rl_reset ();
diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c
index 3a0d0ce..18fda58 100644
--- a/gdb/tui/tuiLayout.c
+++ b/gdb/tui/tuiLayout.c
@@ -60,7 +60,6 @@ static void _tuiToggleSplitLayout_command (char *, int);
static void _tui_vToggleSplitLayout_command (va_list);
static CORE_ADDR _extractDisplayStartAddr (void);
static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
-static TuiStatus _tuiSetLayoutTo (char *);
/***************************************
@@ -201,8 +200,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ addr = tuiGetBeginAsmAddress ();
tuiSetWinFocusTo (disassemWin);
layoutDef->displayMode = DISASSEM_WIN;
layoutDef->split = FALSE;
@@ -215,8 +213,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ addr = tuiGetBeginAsmAddress ();
if (winWithFocus == srcWin)
tuiSetWinFocusTo (srcWin);
else
@@ -239,8 +236,7 @@ tuiSetLayout (TuiLayoutType layoutType,
** 2. if target was compiled without -g
** We still want to show the assembly though!
*/
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ addr = tuiGetBeginAsmAddress ();
if (winWithFocus != dataWin)
tuiSetWinFocusTo (disassemWin);
else
@@ -478,8 +474,8 @@ Source/Disassembly/Command layouts.\n");
** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
** $REGS, $GREGS, $FREGS, $SREGS.
*/
-static TuiStatus
-_tuiSetLayoutTo (char *layoutName)
+TuiStatus
+tui_set_layout (const char *layoutName)
{
TuiStatus status = TUI_SUCCESS;
@@ -578,7 +574,7 @@ _tuiSetLayoutTo (char *layoutName)
status = TUI_FAILURE;
return status;
-} /* _tuiSetLayoutTo */
+}
static CORE_ADDR
@@ -635,12 +631,6 @@ _tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
static void
_tuiToggleLayout_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleLayout_command, arg, fromTTY);
-}
-
-static void
-_tui_vToggleLayout_command (va_list args)
-{
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
if (layoutDef->displayMode == SRC_WIN)
@@ -651,37 +641,27 @@ _tui_vToggleLayout_command (va_list args)
if (!layoutDef->split)
_tuiHandleXDBLayout (layoutDef);
- return;
-} /* _tuiToggleLayout_command */
+}
static void
_tuiToggleSplitLayout_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vToggleSplitLayout_command, arg, fromTTY);
-}
-
-static void
-_tui_vToggleSplitLayout_command (va_list args)
-{
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
layoutDef->split = (!layoutDef->split);
_tuiHandleXDBLayout (layoutDef);
- return;
-} /* _tui_vToggleSplitLayout_command */
+}
static void
_tuiLayout_command (char *arg, int fromTTY)
{
- if ((TuiStatus) tuiDo (
- (TuiOpaqueFuncPtr) tui_vSetLayoutTo, arg) != TUI_SUCCESS)
+ if (tui_set_layout (arg) != TUI_SUCCESS)
warning ("Invalid layout specified.\n%s", LAYOUT_USAGE);
- return;
-} /* _tuiLayout_command */
+}
/*
** _nextLayout().
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index cb58710..6dc6eed 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -30,6 +30,8 @@
#include "target.h"
#include "tuiLayout.h"
#include "tuiWin.h"
+#include "tuiDataWin.h"
+#include "tuiGeneralWin.h"
#include "tui-file.h"
/*****************************************
@@ -80,11 +82,10 @@ static int _tuiRegValueHasChanged
static void _tuiShowFloat_command (char *, int);
static void _tuiShowGeneral_command (char *, int);
static void _tuiShowSpecial_command (char *, int);
-static void _tui_vShowRegisters_commandSupport (va_list);
+static void _tui_vShowRegisters_commandSupport (TuiRegisterDisplayType);
static void _tuiToggleFloatRegs_command (char *, int);
static void _tuiScrollRegsForward_command (char *, int);
static void _tuiScrollRegsBackward_command (char *, int);
-static void _tui_vShowRegisters_commandSupport (va_list);
@@ -961,9 +962,8 @@ _tuiDisplayRegister (int regNum,
static void
-_tui_vShowRegisters_commandSupport (va_list args)
+_tui_vShowRegisters_commandSupport (TuiRegisterDisplayType dpyType)
{
- TuiRegisterDisplayType dpyType = va_arg (args, TuiRegisterDisplayType);
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
{ /* Data window already displayed, show the registers */
@@ -983,8 +983,7 @@ _tuiShowFloat_command (char *arg, int fromTTY)
if (m_winPtrIsNull (dataWin) || !dataWin->generic.isVisible ||
(dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_SFLOAT_REGS &&
dataWin->detail.dataDisplayInfo.regsDisplayType != TUI_DFLOAT_REGS))
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- (tuiLayoutDef ())->floatRegsDisplayType);
+ _tui_vShowRegisters_commandSupport ((tuiLayoutDef ())->floatRegsDisplayType);
return;
} /* _tuiShowFloat_command */
@@ -993,28 +992,22 @@ _tuiShowFloat_command (char *arg, int fromTTY)
static void
_tuiShowGeneral_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- TUI_GENERAL_REGS);
-
- return;
-} /* _tuiShowGeneral_command */
+ _tui_vShowRegisters_commandSupport (TUI_GENERAL_REGS);
+}
static void
_tuiShowSpecial_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vShowRegisters_commandSupport,
- TUI_SPECIAL_REGS);
-
- return;
-} /* _tuiShowSpecial_command */
+ _tui_vShowRegisters_commandSupport (TUI_SPECIAL_REGS);
+}
static void
_tuiToggleFloatRegs_command (char *arg, int fromTTY)
{
if (m_winPtrNotNull (dataWin) && dataWin->generic.isVisible)
- tuiDo ((TuiOpaqueFuncPtr) tuiToggleFloatRegs);
+ tuiToggleFloatRegs ();
else
{
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
@@ -1033,16 +1026,12 @@ _tuiToggleFloatRegs_command (char *arg, int fromTTY)
static void
_tuiScrollRegsForward_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, FORWARD_SCROLL, dataWin, 1);
-
- return;
-} /* _tuiScrollRegsForward_command */
+ tui_scroll (FORWARD_SCROLL, dataWin, 1);
+}
static void
_tuiScrollRegsBackward_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll, BACKWARD_SCROLL, dataWin, 1);
-
- return;
-} /* _tuiScrollRegsBackward_command */
+ tui_scroll (BACKWARD_SCROLL, dataWin, 1);
+}
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 4c3acd2..7b8c0e3 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -311,16 +311,14 @@ tuiScrollRight (TuiWinInfoPtr winToScroll, int numToScroll)
/*
- ** tui_vScroll().
+ ** tui_scroll().
** Scroll a window. Arguments are passed through a va_list.
*/
void
-tui_vScroll (va_list args)
+tui_scroll (TuiScrollDirection direction,
+ TuiWinInfoPtr winToScroll,
+ int numToScroll)
{
- TuiScrollDirection direction = va_arg (args, TuiScrollDirection);
- TuiWinInfoPtr winToScroll = va_arg (args, TuiWinInfoPtr);
- int numToScroll = va_arg (args, int);
-
switch (direction)
{
case FORWARD_SCROLL:
@@ -338,9 +336,7 @@ tui_vScroll (va_list args)
default:
break;
}
-
- return;
-} /* tui_vScroll */
+}
/*
@@ -583,13 +579,8 @@ _tuiScrollForward_command (char *arg, int fromTTY)
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
else
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- FORWARD_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollForward_command */
+ tui_scroll (FORWARD_SCROLL, winToScroll, numToScroll);
+}
/*
@@ -605,13 +596,8 @@ _tuiScrollBackward_command (char *arg, int fromTTY)
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
else
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- BACKWARD_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollBackward_command */
+ tui_scroll (BACKWARD_SCROLL, winToScroll, numToScroll);
+}
/*
@@ -624,13 +610,8 @@ _tuiScrollLeft_command (char *arg, int fromTTY)
TuiWinInfoPtr winToScroll;
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- LEFT_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollLeft_command */
+ tui_scroll (LEFT_SCROLL, winToScroll, numToScroll);
+}
/*
@@ -643,13 +624,8 @@ _tuiScrollRight_command (char *arg, int fromTTY)
TuiWinInfoPtr winToScroll;
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
- tuiDo ((TuiOpaqueFuncPtr) tui_vScroll,
- RIGHT_SCROLL,
- winToScroll,
- numToScroll);
-
- return;
-} /* _tuiScrollRight_command */
+ tui_scroll (RIGHT_SCROLL, winToScroll, numToScroll);
+}
/*
@@ -718,10 +694,8 @@ _tui_vSetFocus (va_list args)
static void
_tuiSetFocus_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vSetFocus, arg, fromTTY);
-
- return;
-} /* tui_SetFocus */
+ _tuiSetFocus (arg, fromTTY);
+}
/*
@@ -756,7 +730,7 @@ _tuiAllWindowsInfo (char *arg, int fromTTY)
static void
_tuiRefreshAll_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll);
+ tuiRefreshAll ();
}
@@ -894,10 +868,8 @@ _tui_vSetWinHeight (va_list args)
static void
_tuiSetWinHeight_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vSetWinHeight, arg, fromTTY);
-
- return;
-} /* _tuiSetWinHeight_command */
+ _tuiSetWinHeight (arg, fromTTY);
+}
/*
@@ -956,10 +928,8 @@ _tui_vXDBsetWinHeight (va_list args)
static void
_tuiXDBsetWinHeight_command (char *arg, int fromTTY)
{
- tuiDo ((TuiOpaqueFuncPtr) _tui_vXDBsetWinHeight, arg, fromTTY);
-
- return;
-} /* _tuiXDBsetWinHeight_command */
+ _tuiXDBsetWinHeight (arg, fromTTY);
+}
/*
diff --git a/gdb/tui/tuiWin.h b/gdb/tui/tuiWin.h
index 97bfb85..55a3bd1 100644
--- a/gdb/tui/tuiWin.h
+++ b/gdb/tui/tuiWin.h
@@ -35,7 +35,7 @@ extern void tuiScrollForward (TuiWinInfoPtr, int);
extern void tuiScrollBackward (TuiWinInfoPtr, int);
extern void tuiScrollLeft (TuiWinInfoPtr, int);
extern void tuiScrollRight (TuiWinInfoPtr, int);
-extern void tui_vScroll (va_list);
+extern void tui_scroll (TuiScrollDirection, TuiWinInfoPtr, int);
extern void tuiSetWinFocusTo (TuiWinInfoPtr);
extern void tuiClearWinFocusFrom (TuiWinInfoPtr);
extern void tuiClearWinFocus (void);