-/*
-** tuiLayout.c
-** This module contains procedures for handling the layout of the windows.
-*/
+/* TUI layout window management.
+
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Inc.
+
+ Contributed by Hewlett-Packard Company.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+ "defs.h" should be included first. Unfortunatly some systems
+ (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+ and they clash with "bfd.h"'s definiton of true/false. The correct
+ fix is to remove true/false from "bfd.h", however, until that
+ happens, hack around it by including "config.h" and <curses.h>
+ first. */
+
+#include "config.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
#include "defs.h"
#include "command.h"
#include "symtab.h"
#include "frame.h"
+#include "source.h"
+#include <ctype.h>
#include "tui.h"
#include "tuiData.h"
+#include "tuiDataWin.h"
#include "tuiGeneralWin.h"
#include "tuiStack.h"
#include "tuiRegs.h"
+#include "tuiWin.h"
+#include "tuiSourceWin.h"
#include "tuiDisassem.h"
/*******************************
** Static Local Decls
********************************/
-
-static void _initGenWinInfo PARAMS
- ((TuiGenWinInfoPtr, TuiWinType, int, int, int, int));
-static void _initAndMakeWin PARAMS
- ((Opaque *, TuiWinType, int, int, int, int, int));
-static void _showSourceOrDisassemAndCommand PARAMS
- ((TuiLayoutType));
-static void _makeSourceOrDisassemWindow PARAMS
- ((TuiWinInfoPtr *, TuiWinType, int, int));
-static void _makeCommandWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _makeSourceWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _makeDisassemWindow PARAMS
- ((TuiWinInfoPtr *, int, int));
-static void _makeDataWindow PARAMS ((TuiWinInfoPtr *, int, int));
-static void _showSourceCommand PARAMS ((void));
-static void _showDisassemCommand PARAMS ((void));
-static void _showSourceDisassemCommand PARAMS ((void));
-static void _showData PARAMS ((TuiLayoutType));
-static TuiLayoutType _nextLayout PARAMS ((void));
-static TuiLayoutType _prevLayout PARAMS ((void));
-static void _tuiLayout_command PARAMS ((char *, int));
-static void _tuiToggleLayout_command PARAMS ((char *, int));
-static void _tui_vToggleLayout_command PARAMS ((va_list));
-static void _tuiToggleSplitLayout_command PARAMS ((char *, int));
-static void _tui_vToggleSplitLayout_command PARAMS ((va_list));
-static Opaque _extractDisplayStartAddr PARAMS ((void));
-static void _tuiHandleXDBLayout PARAMS ((TuiLayoutDefPtr));
-static TuiStatus _tuiSetLayoutTo PARAMS ((char *));
+static void showLayout (TuiLayoutType);
+static void _initGenWinInfo (TuiGenWinInfoPtr, TuiWinType, int, int, int, int);
+static void _initAndMakeWin (Opaque *, TuiWinType, int, int, int, int, int);
+static void _showSourceOrDisassemAndCommand (TuiLayoutType);
+static void _makeSourceOrDisassemWindow (TuiWinInfoPtr *, TuiWinType, int, int);
+static void _makeCommandWindow (TuiWinInfoPtr *, int, int);
+static void _makeSourceWindow (TuiWinInfoPtr *, int, int);
+static void _makeDisassemWindow (TuiWinInfoPtr *, int, int);
+static void _makeDataWindow (TuiWinInfoPtr *, int, int);
+static void _showSourceCommand (void);
+static void _showDisassemCommand (void);
+static void _showSourceDisassemCommand (void);
+static void _showData (TuiLayoutType);
+static TuiLayoutType _nextLayout (void);
+static TuiLayoutType _prevLayout (void);
+static void _tuiLayout_command (char *, int);
+static void _tuiToggleLayout_command (char *, int);
+static void _tuiToggleSplitLayout_command (char *, int);
+static CORE_ADDR _extractDisplayStartAddr (void);
+static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
/***************************************
#define LAYOUT_USAGE "Usage: layout prev | next | <layout_name> \n"
-/***************************************
-** Static Local Data
-***************************************/
-static TuiLayoutType lastLayout = UNDEFINED_LAYOUT;
-
-/***************************************
-** PUBLIC FUNCTIONS
-***************************************/
-
-/*
-** showLayout().
-** Show the screen layout defined
-*/
-void
-#ifdef __STDC__
-showLayout (
- TuiLayoutType layout)
-#else
-showLayout (layout)
- TuiLayoutType layout;
-#endif
+/* Show the screen layout defined. */
+static void
+showLayout (TuiLayoutType layout)
{
TuiLayoutType curLayout = currentLayout ();
if (layout != curLayout)
{
/*
- ** Since the new layout may cause changes in window size, we
- ** should free the content and reallocate on next display of
- ** source/asm
- */
- tuiClearAllSourceWinsContent (NO_EMPTY_SOURCE_PROMPT);
+ ** Since the new layout may cause changes in window size, we
+ ** should free the content and reallocate on next display of
+ ** source/asm
+ */
freeAllSourceWinsContent ();
clearSourceWindows ();
if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND)
}
}
}
-
- return;
-} /* showLayout */
+}
/*
-** tuiSetLayout()
-** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
-** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
-** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
-** UNDEFINED_LAYOUT, then the data window is populated according
-** to regsDisplayType.
-*/
+ ** tuiSetLayout()
+ ** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
+ ** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND.
+ ** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or
+ ** UNDEFINED_LAYOUT, then the data window is populated according
+ ** 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;
{
TuiLayoutType curLayout = currentLayout (), newLayout = UNDEFINED_LAYOUT;
int regsPopulate = FALSE;
- Opaque addr = _extractDisplayStartAddr ();
+ CORE_ADDR addr = _extractDisplayStartAddr ();
TuiWinInfoPtr newWinWithFocus = (TuiWinInfoPtr) NULL, winWithFocus = tuiWinWithFocus ();
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
{
if (newLayout != curLayout)
{
- if (winWithFocus != cmdWin)
- tuiClearWinFocus ();
showLayout (newLayout);
/*
- ** Now determine where focus should be
- */
+ ** Now determine where focus should be
+ */
if (winWithFocus != cmdWin)
{
switch (newLayout)
break;
case DISASSEM_COMMAND:
/* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ ** code. this can happen if there is no
+ ** source available:
+ ** 1. if the source file is in another dir OR
+ ** 2. if target was compiled without -g
+ ** We still want to show the assembly though!
+ */
+ addr = tuiGetBeginAsmAddress ();
tuiSetWinFocusTo (disassemWin);
layoutDef->displayMode = DISASSEM_WIN;
layoutDef->split = FALSE;
break;
case SRC_DISASSEM_COMMAND:
/* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ ** code. this can happen if there is no
+ ** source available:
+ ** 1. if the source file is in another dir OR
+ ** 2. if target was compiled without -g
+ ** We still want to show the assembly though!
+ */
+ addr = tuiGetBeginAsmAddress ();
if (winWithFocus == srcWin)
tuiSetWinFocusTo (srcWin);
else
break;
case DISASSEM_DATA_COMMAND:
/* the previous layout was not showing
- ** code. this can happen if there is no
- ** source available:
- ** 1. if the source file is in another dir OR
- ** 2. if target was compiled without -g
- ** We still want to show the assembly though!
- */
- addr = vcatch_errors ((OpaqueFuncPtr)
- tuiGetBeginAsmAddress);
+ ** code. this can happen if there is no
+ ** source available:
+ ** 1. if the source file is in another dir OR
+ ** 2. if target was compiled without -g
+ ** We still want to show the assembly though!
+ */
+ addr = tuiGetBeginAsmAddress ();
if (winWithFocus != dataWin)
tuiSetWinFocusTo (disassemWin);
else
if (newWinWithFocus != (TuiWinInfoPtr) NULL)
tuiSetWinFocusTo (newWinWithFocus);
/*
- ** Now update the window content
- */
+ ** Now update the window content
+ */
if (!regsPopulate &&
(newLayout == SRC_DATA_COMMAND ||
newLayout == DISASSEM_DATA_COMMAND))
status = TUI_FAILURE;
return status;
-} /* tuiSetLayout */
-
-
-/*
-** tui_vSetLayoutTo()
-** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA,
-** 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
-{
- char *layoutName;
-
- layoutName = va_arg (args, char *);
-
- return (_tuiSetLayoutTo (layoutName));
-} /* tui_vSetLayoutTo */
-
+}
/*
-** tuiAddWinToLayout().
-** Add the specified window to the layout in a logical way.
-** This means setting up the most logical layout given the
-** window to be added.
-*/
+ ** tuiAddWinToLayout().
+ ** Add the specified window to the layout in a logical way.
+ ** This means setting up the most logical layout given the
+ ** window to be added.
+ */
void
-#ifdef __STDC__
-tuiAddWinToLayout (
- TuiWinType type)
-#else
-tuiAddWinToLayout (type)
- TuiWinType type;
-#endif
+tuiAddWinToLayout (TuiWinType type)
{
TuiLayoutType curLayout = currentLayout ();
/*
-** tui_vAddWinToLayout().
-** Add the specified window to the layout in a logical way,
-** with arguments in a va_list.
-*/
-void
-#ifdef __STDC__
-tui_vAddWinToLayout (
- va_list args)
-#else
-tui_vAddWinToLayout (args)
- va_list args;
-#endif
-{
- TuiWinType type = va_arg (args, TuiWinType);
-
- tuiAddWinToLayout (type);
-
- return;
-} /* tui_vAddWinToLayout */
-
-
-/*
-** tuiDefaultWinHeight().
-** Answer the height of a window. If it hasn't been created yet,
-** answer what the height of a window would be based upon its
-** type and the layout.
-*/
+ ** tuiDefaultWinHeight().
+ ** Answer the height of a window. If it hasn't been created yet,
+ ** answer what the height of a window would be based upon its
+ ** 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;
/*
-** tuiDefaultWinViewportHeight().
-** Answer the height of a window. If it hasn't been created yet,
-** answer what the height of a window would be based upon its
-** type and the layout.
-*/
+ ** tuiDefaultWinViewportHeight().
+ ** Answer the height of a window. If it hasn't been created yet,
+ ** answer what the height of a window would be based upon its
+ ** 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;
/*
-** _initialize_tuiLayout().
-** Function to initialize gdb commands, for tui window layout
-** manipulation.
-*/
+ ** _initialize_tuiLayout().
+ ** Function to initialize gdb commands, for tui window layout
+ ** manipulation.
+ */
void
-_initialize_tuiLayout ()
+_initialize_tuiLayout (void)
{
- if (tui_version)
- {
- add_com ("layout", class_tui, _tuiLayout_command,
- "Change the layout of windows.\n\
+ add_com ("layout", class_tui, _tuiLayout_command,
+ "Change the layout of windows.\n\
Usage: layout prev | next | <layout_name> \n\
Layout names are:\n\
src : Displays source and command windows.\n\
source/assembly/command (split) is displayed, \n\
the register window is displayed with \n\
the window that has current logical focus.\n");
- if (xdb_commands)
- {
- add_com ("td", class_tui, _tuiToggleLayout_command,
- "Toggle between Source/Command and Disassembly/Command layouts.\n");
- add_com ("ts", class_tui, _tuiToggleSplitLayout_command,
- "Toggle between Source/Command or Disassembly/Command and \n\
+ if (xdb_commands)
+ {
+ add_com ("td", class_tui, _tuiToggleLayout_command,
+ "Toggle between Source/Command and Disassembly/Command layouts.\n");
+ add_com ("ts", class_tui, _tuiToggleSplitLayout_command,
+ "Toggle between Source/Command or Disassembly/Command and \n\
Source/Disassembly/Command layouts.\n");
- }
}
-
- return;
-} /* _intialize_tuiLayout */
+}
/*************************
/*
-** _tuiSetLayoutTo()
-** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
-** $REGS, $GREGS, $FREGS, $SREGS.
-*/
-static TuiStatus
-#ifdef __STDC__
-_tuiSetLayoutTo (
- char *layoutName)
-#else
-_tuiSetLayoutTo (layoutName)
- char *layoutName;
-#endif
+ ** _tuiSetLayoutTo()
+ ** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
+ ** $REGS, $GREGS, $FREGS, $SREGS.
+ */
+TuiStatus
+tui_set_layout (const char *layoutName)
{
TuiStatus status = TUI_SUCCESS;
TuiRegisterDisplayType dpyType = TUI_UNDEFINED_REGS;
TuiLayoutType curLayout = currentLayout ();
- bufPtr = (char *) tuiStrDup (layoutName);
+ bufPtr = (char *) xstrdup (layoutName);
for (i = 0; (i < strlen (layoutName)); i++)
bufPtr[i] = toupper (bufPtr[i]);
}
else
{
- if (subsetCompare (bufPtr, "SRC"))
+ if (subset_compare (bufPtr, "SRC"))
newLayout = SRC_COMMAND;
- else if (subsetCompare (bufPtr, "ASM"))
+ else if (subset_compare (bufPtr, "ASM"))
newLayout = DISASSEM_COMMAND;
- else if (subsetCompare (bufPtr, "SPLIT"))
+ else if (subset_compare (bufPtr, "SPLIT"))
newLayout = SRC_DISASSEM_COMMAND;
- else if (subsetCompare (bufPtr, "REGS") ||
- subsetCompare (bufPtr, TUI_GENERAL_SPECIAL_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_GENERAL_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_FLOAT_REGS_NAME) ||
- subsetCompare (bufPtr, TUI_SPECIAL_REGS_NAME))
+ else if (subset_compare (bufPtr, "REGS") ||
+ subset_compare (bufPtr, TUI_GENERAL_SPECIAL_REGS_NAME) ||
+ subset_compare (bufPtr, TUI_GENERAL_REGS_NAME) ||
+ subset_compare (bufPtr, TUI_FLOAT_REGS_NAME) ||
+ subset_compare (bufPtr, TUI_SPECIAL_REGS_NAME))
{
if (curLayout == SRC_COMMAND || curLayout == SRC_DATA_COMMAND)
newLayout = SRC_DATA_COMMAND;
layout command issued by the user. HP has asked us to hook up this code
- edie epstein
*/
- if (subsetCompare (bufPtr, TUI_FLOAT_REGS_NAME))
+ if (subset_compare (bufPtr, TUI_FLOAT_REGS_NAME))
{
if (dataWin->detail.dataDisplayInfo.regsDisplayType !=
TUI_SFLOAT_REGS &&
dpyType =
dataWin->detail.dataDisplayInfo.regsDisplayType;
}
- else if (subsetCompare (bufPtr,
+ else if (subset_compare (bufPtr,
TUI_GENERAL_SPECIAL_REGS_NAME))
dpyType = TUI_GENERAL_AND_SPECIAL_REGS;
- else if (subsetCompare (bufPtr, TUI_GENERAL_REGS_NAME))
+ else if (subset_compare (bufPtr, TUI_GENERAL_REGS_NAME))
dpyType = TUI_GENERAL_REGS;
- else if (subsetCompare (bufPtr, TUI_SPECIAL_REGS_NAME))
+ else if (subset_compare (bufPtr, TUI_SPECIAL_REGS_NAME))
dpyType = TUI_SPECIAL_REGS;
- else
+ else if (dataWin)
{
if (dataWin->detail.dataDisplayInfo.regsDisplayType !=
TUI_UNDEFINED_REGS)
/* dpyType = TUI_GENERAL_REGS;
*/
}
- else if (subsetCompare (bufPtr, "NEXT"))
+ else if (subset_compare (bufPtr, "NEXT"))
newLayout = _nextLayout ();
- else if (subsetCompare (bufPtr, "PREV"))
+ else if (subset_compare (bufPtr, "PREV"))
newLayout = _prevLayout ();
else
status = TUI_FAILURE;
- free (bufPtr);
+ xfree (bufPtr);
tuiSetLayout (newLayout, dpyType);
}
status = TUI_FAILURE;
return status;
-} /* _tuiSetLayoutTo */
+}
-static Opaque
-#ifdef __STDC__
+static CORE_ADDR
_extractDisplayStartAddr (void)
-#else
-_extractDisplayStartAddr ()
-#endif
{
TuiLayoutType curLayout = currentLayout ();
- Opaque addr;
+ CORE_ADDR addr;
+ CORE_ADDR pc;
+ struct symtab_and_line cursal = get_current_source_symtab_and_line ();
switch (curLayout)
{
case SRC_COMMAND:
case SRC_DATA_COMMAND:
- addr = (Opaque) find_line_pc (
- current_source_symtab,
- srcWin->detail.sourceInfo.startLineOrAddr.lineNo);
+ find_line_pc (cursal.symtab,
+ srcWin->detail.sourceInfo.startLineOrAddr.lineNo,
+ &pc);
+ addr = pc;
break;
case DISASSEM_COMMAND:
case SRC_DISASSEM_COMMAND:
addr = disassemWin->detail.sourceInfo.startLineOrAddr.addr;
break;
default:
- addr = (Opaque) NULL;
+ addr = 0;
break;
}
static void
-#ifdef __STDC__
-_tuiHandleXDBLayout (
- TuiLayoutDefPtr layoutDef)
-#else
-_tuiHandleXDBLayout (layoutDef)
- TuiLayoutDefPtr layoutDef;
-#endif
+_tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
{
if (layoutDef->split)
{
static void
-#ifdef __STDC__
-_tuiToggleLayout_command (
- char *arg,
- int fromTTY)
-#else
-_tuiToggleLayout_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- 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
+_tuiToggleLayout_command (char *arg, int fromTTY)
{
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (layoutDef->displayMode == SRC_WIN)
layoutDef->displayMode = DISASSEM_WIN;
else
if (!layoutDef->split)
_tuiHandleXDBLayout (layoutDef);
- return;
-} /* _tuiToggleLayout_command */
-
-
-static void
-#ifdef __STDC__
-_tuiToggleSplitLayout_command (
- char *arg,
- int fromTTY)
-#else
-_tuiToggleSplitLayout_command (arg, fromTTY)
- char *arg;
- int fromTTY;
-#endif
-{
- 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
+_tuiToggleSplitLayout_command (char *arg, int fromTTY)
{
TuiLayoutDefPtr layoutDef = tuiLayoutDef ();
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
layoutDef->split = (!layoutDef->split);
_tuiHandleXDBLayout (layoutDef);
- return;
-} /* _tui_vToggleSplitLayout_command */
+}
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)
- warning ("Invalid layout specified.\n%s" LAYOUT_USAGE);
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
- return;
-} /* _tuiLayout_command */
+ /* Switch to the selected layout. */
+ if (tui_set_layout (arg) != TUI_SUCCESS)
+ warning ("Invalid layout specified.\n%s", LAYOUT_USAGE);
+
+}
/*
-** _nextLayout().
-** Answer the previous layout to cycle to.
-*/
+ ** _nextLayout().
+ ** Answer the previous layout to cycle to.
+ */
static TuiLayoutType
-#ifdef __STDC__
_nextLayout (void)
-#else
-_nextLayout ()
-#endif
{
TuiLayoutType newLayout;
/*
-** _prevLayout().
-** Answer the next layout to cycle to.
-*/
+ ** _prevLayout().
+ ** Answer the next layout to cycle to.
+ */
static TuiLayoutType
-#ifdef __STDC__
_prevLayout (void)
-#else
-_prevLayout ()
-#endif
{
TuiLayoutType newLayout;
/*
-** _makeCommandWindow().
-*/
+ ** _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,
/*
-** _makeSourceWindow().
-*/
+ ** _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);
/*
-** _makeDisassemWindow().
-*/
+ ** _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);
/*
-** _makeDataWindow().
-*/
+ ** _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,
/*
-** _showSourceCommand().
-** Show the Source/Command layout
-*/
+ ** _showSourceCommand().
+ ** Show the Source/Command layout
+ */
static void
-#ifdef __STDC__
_showSourceCommand (void)
-#else
-_showSourceCommand ()
-#endif
{
_showSourceOrDisassemAndCommand (SRC_COMMAND);
/*
-** _showDisassemCommand().
-** Show the Dissassem/Command layout
-*/
+ ** _showDisassemCommand().
+ ** Show the Dissassem/Command layout
+ */
static void
-#ifdef __STDC__
_showDisassemCommand (void)
-#else
-_showDisassemCommand ()
-#endif
{
_showSourceOrDisassemAndCommand (DISASSEM_COMMAND);
/*
-** _showSourceDisassemCommand().
-** Show the Source/Disassem/Command layout
-*/
+ ** _showSourceDisassemCommand().
+ ** Show the Source/Disassem/Command layout
+ */
static void
-#ifdef __STDC__
_showSourceDisassemCommand (void)
-#else
-_showSourceDisassemCommand ()
-#endif
{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
if (currentLayout () != SRC_DISASSEM_COMMAND)
{
int cmdHeight, srcHeight, asmHeight;
/*
-** _showData().
-** Show the Source/Data/Command or the Dissassembly/Data/Command layout
-*/
+ ** _showData().
+ ** 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;
} /* _showData */
/*
-** _initGenWinInfo().
-*/
+ ** _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;
} /* _initGenWinInfo */
/*
-** _initAndMakeWin().
-*/
+ ** _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;
((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE;
}
makeWindow (generic, boxIt);
- if (winType == LOCATOR_WIN)
- tuiClearLocatorDisplay ();
- echo ();
}
*winInfoPtr = opaqueWinInfo;
-
- return;
-} /* _initAndMakeWin */
+}
/*
-** _makeSourceOrDisassemWindow().
-*/
+ ** _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;
/*
- ** Create the exeuction info window.
- */
+ ** Create the exeuction info window.
+ */
if (type == SRC_WIN)
executionInfo = sourceExecInfoWinPtr ();
else
originY,
DONT_BOX_WINDOW);
/*
- ** Now create the source window.
- */
+ ** Now create the source window.
+ */
_initAndMakeWin ((Opaque *) winInfoPtr,
type,
height,
/*
-** _showSourceOrDisassemAndCommand().
-** Show the Source/Command or the Disassem layout
-*/
+ ** _showSourceOrDisassemAndCommand().
+ ** 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)
{
TuiWinInfoPtr *winInfoPtr;
- int areaLeft;
int srcHeight, cmdHeight;
TuiGenWinInfoPtr locator = locatorWinInfoPtr ();