aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tuiLayout.c
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/tui/tuiLayout.c
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/tui/tuiLayout.c')
-rw-r--r--gdb/tui/tuiLayout.c40
1 files changed, 10 insertions, 30 deletions
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().