This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Some cleanup in tuiLayout.c


Hi!

Committed this cleanup patch for tui.

	Stephane

2002-08-24  Stephane Carrez  <stcarrez@nerim.fr>

	* tui.c (tui_enable): Use tuiSetLayout instead of showLayout and
	use tuiShowFrameInfo instead of tuiSetLocatorContent.
	* tuiLayout.h (showLayout): Remove.
	* tuiLayout.c (_showSourceOrDisassemAndCommand): Remove unused locals.
	(_showSourceDisassemCommand): Likewise.
	(showLayout): Make it static.
	(lastLayout): Remove.

Index: tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.17
diff -u -p -r1.17 tui.c
--- tui.c	18 Aug 2002 23:20:47 -0000	1.17
+++ tui.c	24 Aug 2002 15:21:06 -0000
@@ -237,8 +237,8 @@ tui_enable (void)
       setTermWidthTo (COLS);
       def_prog_mode ();
 
-      tuiSetLocatorContent (0);
-      showLayout (SRC_COMMAND);
+      tuiShowFrameInfo (0);
+      tuiSetLayout (SRC_COMMAND, TUI_UNDEFINED_REGS);
       tuiSetWinFocusTo (srcWin);
       keypad (cmdWin->generic.handle, TRUE);
       wrefresh (cmdWin->generic.handle);
Index: tuiLayout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiLayout.c,v
retrieving revision 1.16
diff -u -p -r1.16 tuiLayout.c
--- tuiLayout.c	24 Aug 2002 12:28:32 -0000	1.16
+++ tuiLayout.c	24 Aug 2002 15:21:06 -0000
@@ -58,7 +58,7 @@
 /*******************************
 ** 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);
@@ -86,20 +86,8 @@ static void _tuiHandleXDBLayout (TuiLayo
 
 #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 ();
@@ -789,8 +777,6 @@ _showDisassemCommand (void)
 static void
 _showSourceDisassemCommand (void)
 {
-  TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
-
   if (currentLayout () != SRC_DISASSEM_COMMAND)
     {
       int cmdHeight, srcHeight, asmHeight;
@@ -1083,7 +1069,6 @@ _showSourceOrDisassemAndCommand (TuiLayo
   if (currentLayout () != layoutType)
     {
       TuiWinInfoPtr *winInfoPtr;
-      int areaLeft;
       int srcHeight, cmdHeight;
       TuiGenWinInfoPtr locator = locatorWinInfoPtr ();
 
Index: tuiLayout.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiLayout.h,v
retrieving revision 1.5
diff -u -p -r1.5 tuiLayout.h
--- tuiLayout.h	28 Sep 2001 17:39:09 -0000	1.5
+++ tuiLayout.h	24 Aug 2002 15:21:06 -0000
@@ -1,5 +1,5 @@
 /* TUI layout window management.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -22,7 +22,6 @@
 #ifndef TUI_LAYOUT_H
 #define TUI_LAYOUT_H
 
-extern void showLayout (TuiLayoutType);
 extern void tuiAddWinToLayout (TuiWinType);
 extern int tuiDefaultWinHeight (TuiWinType, TuiLayoutType);
 extern int tuiDefaultWinViewportHeight (TuiWinType, TuiLayoutType);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]