]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
authorStephane Carrez <stcarrez@nerim.fr>
Wed, 18 Jul 2001 22:03:22 +0000 (22:03 +0000)
committerStephane Carrez <stcarrez@nerim.fr>
Wed, 18 Jul 2001 22:03:22 +0000 (22:03 +0000)
(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.

gdb/tui/ChangeLog
gdb/tui/tui.c
gdb/tui/tui.h
gdb/tui/tuiIO.c
gdb/tui/tuiLayout.c
gdb/tui/tuiRegs.c
gdb/tui/tuiWin.c
gdb/tui/tuiWin.h

index fd2b9cbd8fa989259a49a29e629cd562df34384f..376f8b70cb370fbfdc6923874ee2b8a22f5bf68e 100644 (file)
@@ -1,3 +1,35 @@
+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.
index e51e1b9399714e477ef06c24e31f5c63d59ad3f4..806430d5e1eaa5ca986f910b98f963714725ca55 100644 (file)
@@ -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)
index 8af18e9b29f05bb97c26a37816615bb527236e56..e074754de5cd74e1c1169ba079ac7ebd5e6c1c6e 100644 (file)
@@ -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);
index 0471572a63bedfdd948f1d811ccb363dc797a4c8..138eec520a2d90e2610ad5d847393189ce6eea9c 100644 (file)
@@ -276,39 +276,6 @@ tui_vwgetch (va_list args)
 }                              /* tui_vwgetch */
 
 
-/*
-   ** 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.
@@ -464,7 +431,7 @@ _tuiHandleResizeDuringIO (unsigned int originalCh)
 {
   if (tuiWinResized ())
     {
-      tuiDo ((TuiOpaqueFuncPtr) tuiRefreshAll);
+      tuiRefreshAll ();
       dont_repeat ();
       tuiSetWinResizedTo (FALSE);
       rl_reset ();
index 3a0d0cef497a4ac002c64bff4306fceae8aa2ef1..18fda5877a5d4aca84eddf927743aa8e65214452 100644 (file)
@@ -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
@@ -634,12 +630,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 ();
 
@@ -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().
index cb587109c99a3e35b0436e40065f7fd8890e49ae..6dc6eed8947240cf429f479b65807d9a06d0b225 100644 (file)
@@ -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);
+}
index 4c3acd2e4724a8cec9bfec7fc5d0b0f1d6e9f6c3..7b8c0e32797cc0d1426709b4e8a8eb3991f95973 100644 (file)
@@ -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);
+}
 
 
 /*
index 97bfb859a88f8852e7e76f7735e3de62e5767f62..55a3bd1a4da041d356a9c5e5a84fea6475bfb5d4 100644 (file)
@@ -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);