summaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-data.h2
-rw-r--r--gdb/tui/tui-disasm.c4
-rw-r--r--gdb/tui/tui-layout.c54
-rw-r--r--gdb/tui/tui-layout.h18
-rw-r--r--gdb/tui/tui.c10
-rw-r--r--gdb/tui/tui.h4
6 files changed, 46 insertions, 46 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index ea7c7860a77..6657fcdbda1 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -116,7 +116,7 @@ TuiList, *TuiListPtr;
/* The kinds of layouts available */
-typedef enum
+typedef enum tui_layout_type
{
SRC_COMMAND,
DISASSEM_COMMAND,
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 99143a4ed64..493c00ded68 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -279,7 +279,7 @@ tui_show_disassem (CORE_ADDR startAddr)
TuiLineOrAddress val;
val.addr = startAddr;
- tuiAddWinToLayout (DISASSEM_WIN);
+ tui_add_win_to_layout (DISASSEM_WIN);
tuiUpdateSourceWindow (disassemWin, s, val, FALSE);
/*
** if the focus was in the src win, put it in the asm win, if the
@@ -364,7 +364,7 @@ tuiGetLowDisassemblyAddress (CORE_ADDR low, CORE_ADDR pc)
/* Determine where to start the disassembly so that the pc is about in the
middle of the viewport. */
- pos = tuiDefaultWinViewportHeight (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
+ pos = tui_default_win_viewport_height (DISASSEM_WIN, DISASSEM_COMMAND) / 2;
pc = tui_find_disassembly_address (pc, -pos);
if (pc < low)
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index e4093c14365..38d8de57a00 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -128,17 +128,14 @@ showLayout (TuiLayoutType layout)
}
-/*
- ** 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
-tuiSetLayout (TuiLayoutType layoutType,
- TuiRegisterDisplayType regsDisplayType)
+/* 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. */
+enum tui_status
+tui_set_layout (enum tui_layout_type layoutType,
+ enum tui_register_display_type regsDisplayType)
{
TuiStatus status = TUI_SUCCESS;
@@ -268,14 +265,11 @@ tuiSetLayout (TuiLayoutType layoutType,
return status;
}
-/*
- ** 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.
- */
+/* 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
-tuiAddWinToLayout (TuiWinType type)
+tui_add_win_to_layout (enum tui_win_type type)
{
TuiLayoutType curLayout = currentLayout ();
@@ -365,14 +359,12 @@ tuiDefaultWinHeight (TuiWinType type, TuiLayoutType layout)
} /* 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.
- */
+/* 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
-tuiDefaultWinViewportHeight (TuiWinType type, TuiLayoutType layout)
+tui_default_win_viewport_height (enum tui_win_type type,
+ enum tui_layout_type layout)
{
int h;
@@ -430,7 +422,7 @@ Source/Disassembly/Command layouts.\n");
** $REGS, $GREGS, $FREGS, $SREGS.
*/
TuiStatus
-tui_set_layout (const char *layoutName)
+tui_set_layout_for_display_command (const char *layoutName)
{
TuiStatus status = TUI_SUCCESS;
@@ -522,7 +514,7 @@ tui_set_layout (const char *layoutName)
status = TUI_FAILURE;
xfree (bufPtr);
- tuiSetLayout (newLayout, dpyType);
+ tui_set_layout (newLayout, dpyType);
}
}
else
@@ -568,15 +560,15 @@ _tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
{
if (layoutDef->split)
{
- tuiSetLayout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
+ tui_set_layout (SRC_DISASSEM_COMMAND, TUI_UNDEFINED_REGS);
tuiSetWinFocusTo (winList[layoutDef->displayMode]);
}
else
{
if (layoutDef->displayMode == SRC_WIN)
- tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
+ tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
else
- tuiSetLayout (DISASSEM_DATA_COMMAND, layoutDef->regsDisplayType);
+ tui_set_layout (DISASSEM_DATA_COMMAND, layoutDef->regsDisplayType);
}
@@ -622,7 +614,7 @@ _tuiLayout_command (char *arg, int fromTTY)
tui_enable ();
/* Switch to the selected layout. */
- if (tui_set_layout (arg) != TUI_SUCCESS)
+ if (tui_set_layout_for_display_command (arg) != TUI_SUCCESS)
warning ("Invalid layout specified.\n%s", LAYOUT_USAGE);
}
diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h
index f6b0ed79c68..5df1f0be9f1 100644
--- a/gdb/tui/tui-layout.h
+++ b/gdb/tui/tui-layout.h
@@ -1,5 +1,8 @@
/* TUI layout window management.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004 Free Software
+ Foundation, Inc.
+
Contributed by Hewlett-Packard Company.
This file is part of GDB.
@@ -22,9 +25,14 @@
#ifndef TUI_LAYOUT_H
#define TUI_LAYOUT_H
-extern void tuiAddWinToLayout (TuiWinType);
-extern int tuiDefaultWinHeight (TuiWinType, TuiLayoutType);
-extern int tuiDefaultWinViewportHeight (TuiWinType, TuiLayoutType);
-extern TuiStatus tuiSetLayout (TuiLayoutType, TuiRegisterDisplayType);
+#include "tui/tui.h"
+#include "tui/tui-data.h"
+
+extern void tui_add_win_to_layout (enum tui_win_type);
+extern int tui_default_win_height (enum tui_win_type, enum tui_layout_type);
+extern int tui_default_win_viewport_height (enum tui_win_type,
+ enum tui_layout_type);
+extern enum tui_status tui_set_layout (enum tui_layout_type,
+ enum tui_register_display_type);
#endif /*TUI_LAYOUT_H */
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 5b9cff0e8c8..74fd7ae51ea 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -170,7 +170,7 @@ tui_rl_change_windows (int notused1, int notused2)
new_layout = SRC_COMMAND;
break;
}
- tuiSetLayout (new_layout, regs_type);
+ tui_set_layout (new_layout, regs_type);
}
return 0;
}
@@ -205,7 +205,7 @@ tui_rl_delete_other_windows (int notused1, int notused2)
new_layout = DISASSEM_COMMAND;
break;
}
- tuiSetLayout (new_layout, regs_type);
+ tui_set_layout (new_layout, regs_type);
}
return 0;
}
@@ -389,7 +389,7 @@ tui_enable (void)
def_prog_mode ();
tuiShowFrameInfo (0);
- tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
+ tui_set_layout (SRC_COMMAND, TUI_UNDEFINED_REGS);
tuiSetWinFocusTo (srcWin);
keypad (cmdWin->generic.handle, TRUE);
wrefresh (cmdWin->generic.handle);
@@ -563,7 +563,7 @@ tui_show_source (const char *file, int line)
{
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
/* make sure that the source window is displayed */
- tuiAddWinToLayout (SRC_WIN);
+ tui_add_win_to_layout (SRC_WIN);
tuiUpdateSourceWindowsWithLine (cursal.symtab, line);
tuiUpdateLocatorFilename (file);
@@ -572,7 +572,7 @@ tui_show_source (const char *file, int line)
void
tui_show_assembly (CORE_ADDR addr)
{
- tuiAddWinToLayout (DISASSEM_WIN);
+ tui_add_win_to_layout (DISASSEM_WIN);
tuiUpdateSourceWindowsWithAddr (addr);
}
diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h
index 03d036da6cc..1aba29e8bd7 100644
--- a/gdb/tui/tui.h
+++ b/gdb/tui/tui.h
@@ -64,7 +64,7 @@ extern void strcat_to_buf (char *, int, const char *);
TuiStatus, *TuiStatusPtr;
/* Types of windows */
- typedef enum
+typedef enum tui_win_type
{
SRC_WIN = 0,
DISASSEM_WIN,
@@ -138,7 +138,7 @@ extern void tui_show_source (const char *file, int line);
extern struct ui_out *tui_out_new (struct ui_file *stream);
/* tuiLayout.c */
-extern TuiStatus tui_set_layout (const char *);
+extern enum tui_status tui_set_layout_for_display_command (const char *name);
/* tuiSourceWin.c */
extern void tuiUpdateAllExecInfos (void);