/*
-** tuiLayout.c
-** This module contains procedures for handling the layout of the windows.
-*/
+ ** tuiLayout.c
+ ** This module contains procedures for handling the layout of the windows.
+ */
#include "defs.h"
***************************************/
/*
-** showLayout().
-** Show the screen layout defined
-*/
+ ** showLayout().
+ ** Show the screen layout defined
+ */
void
#ifdef __STDC__
showLayout (
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
- */
+ ** 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);
freeAllSourceWinsContent ();
clearSourceWindows ();
/*
-** 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 (
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!
- */
+ ** 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);
tuiSetWinFocusTo (disassemWin);
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!
- */
+ ** 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);
if (winWithFocus == srcWin)
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!
- */
+ ** 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);
if (winWithFocus != dataWin)
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))
/*
-** 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
-*/
+ ** 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 (
/*
-** 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 (
/*
-** tui_vAddWinToLayout().
-** Add the specified window to the layout in a logical way,
-** with arguments in a va_list.
-*/
+ ** tui_vAddWinToLayout().
+ ** Add the specified window to the layout in a logical way,
+ ** with arguments in a va_list.
+ */
void
#ifdef __STDC__
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 (
/*
-** 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 (
/*
-** _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 ()
{
/*
-** _tuiSetLayoutTo()
-** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
-** $REGS, $GREGS, $FREGS, $SREGS.
-*/
+ ** _tuiSetLayoutTo()
+ ** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS,
+ ** $REGS, $GREGS, $FREGS, $SREGS.
+ */
static TuiStatus
#ifdef __STDC__
_tuiSetLayoutTo (
} /* _tuiLayout_command */
/*
-** _nextLayout().
-** Answer the previous layout to cycle to.
-*/
+ ** _nextLayout().
+ ** Answer the previous layout to cycle to.
+ */
static TuiLayoutType
#ifdef __STDC__
_nextLayout (void)
/*
-** _prevLayout().
-** Answer the next layout to cycle to.
-*/
+ ** _prevLayout().
+ ** Answer the next layout to cycle to.
+ */
static TuiLayoutType
#ifdef __STDC__
_prevLayout (void)
/*
-** _makeCommandWindow().
-*/
+ ** _makeCommandWindow().
+ */
static void
#ifdef __STDC__
_makeCommandWindow (
/*
-** _makeSourceWindow().
-*/
+ ** _makeSourceWindow().
+ */
static void
#ifdef __STDC__
_makeSourceWindow (
/*
-** _makeDisassemWindow().
-*/
+ ** _makeDisassemWindow().
+ */
static void
#ifdef __STDC__
_makeDisassemWindow (
/*
-** _makeDataWindow().
-*/
+ ** _makeDataWindow().
+ */
static void
#ifdef __STDC__
_makeDataWindow (
/*
-** _showSourceCommand().
-** Show the Source/Command layout
-*/
+ ** _showSourceCommand().
+ ** Show the Source/Command layout
+ */
static void
#ifdef __STDC__
_showSourceCommand (void)
/*
-** _showDisassemCommand().
-** Show the Dissassem/Command layout
-*/
+ ** _showDisassemCommand().
+ ** Show the Dissassem/Command layout
+ */
static void
#ifdef __STDC__
_showDisassemCommand (void)
/*
-** _showSourceDisassemCommand().
-** Show the Source/Disassem/Command layout
-*/
+ ** _showSourceDisassemCommand().
+ ** Show the Source/Disassem/Command layout
+ */
static void
#ifdef __STDC__
_showSourceDisassemCommand (void)
/*
-** _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 (
} /* _showData */
/*
-** _initGenWinInfo().
-*/
+ ** _initGenWinInfo().
+ */
static void
#ifdef __STDC__
_initGenWinInfo (
} /* _initGenWinInfo */
/*
-** _initAndMakeWin().
-*/
+ ** _initAndMakeWin().
+ */
static void
#ifdef __STDC__
_initAndMakeWin (
/*
-** _makeSourceOrDisassemWindow().
-*/
+ ** _makeSourceOrDisassemWindow().
+ */
static void
#ifdef __STDC__
_makeSourceOrDisassemWindow (
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 (