#include "command.h"
#include "symtab.h"
#include "frame.h"
+#include "source.h"
#include <ctype.h>
#include "tui.h"
/*******************************
** Static Local Decls
********************************/
-
+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);
#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
+/* Show the screen layout defined. */
+static void
showLayout (TuiLayoutType layout)
{
TuiLayoutType curLayout = currentLayout ();
** should free the content and reallocate on next display of
** source/asm
*/
- tuiClearAllSourceWinsContent (NO_EMPTY_SOURCE_PROMPT);
freeAllSourceWinsContent ();
clearSourceWindows ();
if (layout == SRC_DATA_COMMAND || layout == DISASSEM_DATA_COMMAND)
}
}
}
-
- return;
-} /* showLayout */
+}
/*
{
if (newLayout != curLayout)
{
- if (winWithFocus != cmdWin)
- tuiClearWinFocus ();
showLayout (newLayout);
/*
** Now determine where focus should be
status = TUI_FAILURE;
return status;
-} /* tuiSetLayout */
+}
/*
** tuiAddWinToLayout().
TuiLayoutType curLayout = currentLayout ();
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:
- find_line_pc (current_source_symtab,
+ find_line_pc (cursal.symtab,
srcWin->detail.sourceInfo.startLineOrAddr.lineNo,
&pc);
addr = pc;
static void
_showSourceDisassemCommand (void)
{
- TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
if (currentLayout () != SRC_DISASSEM_COMMAND)
{
int cmdHeight, srcHeight, asmHeight;
((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE;
}
makeWindow (generic, boxIt);
- if (winType == LOCATOR_WIN)
- tuiClearLocatorDisplay ();
}
*winInfoPtr = opaqueWinInfo;
-
- return;
-} /* _initAndMakeWin */
+}
/*
if (currentLayout () != layoutType)
{
TuiWinInfoPtr *winInfoPtr;
- int areaLeft;
int srcHeight, cmdHeight;
TuiGenWinInfoPtr locator = locatorWinInfoPtr ();