* tui-hooks.c: Update include order.
[deliverable/binutils-gdb.git] / gdb / tui / tuiLayout.c
index f394205b7cdaf26020d10abf05161e65d21a4dec..b79bfcb8c286f1832805ad5ac76c70b90342d0fc 100644 (file)
@@ -1,25 +1,56 @@
-/*
-   ** tuiLayout.c
-   ** This module contains procedures for handling the layout of the windows.
- */
+/* TUI layout window management.
+
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003 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.  */
 
 #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"
 
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 /*******************************
 ** 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);
@@ -36,12 +67,9 @@ static TuiLayoutType _nextLayout (void);
 static TuiLayoutType _prevLayout (void);
 static void _tuiLayout_command (char *, int);
 static void _tuiToggleLayout_command (char *, int);
-static void _tui_vToggleLayout_command (va_list);
 static void _tuiToggleSplitLayout_command (char *, int);
-static void _tui_vToggleSplitLayout_command (va_list);
-static Opaque _extractDisplayStartAddr (void);
+static CORE_ADDR _extractDisplayStartAddr (void);
 static void _tuiHandleXDBLayout (TuiLayoutDefPtr);
-static TuiStatus _tuiSetLayoutTo (char *);
 
 
 /***************************************
@@ -50,27 +78,9 @@ static TuiStatus _tuiSetLayoutTo (char *);
 
 #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 ();
 
@@ -81,7 +91,6 @@ showLayout (layout)
          ** 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)
@@ -116,9 +125,7 @@ showLayout (layout)
            }
        }
     }
-
-  return;
-}                              /* showLayout */
+}
 
 
 /*
@@ -130,15 +137,8 @@ showLayout (layout)
    **    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;
 
@@ -146,7 +146,7 @@ tuiSetLayout (layoutType, regsDisplayType)
     {
       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 ();
 
@@ -172,8 +172,6 @@ tuiSetLayout (layoutType, regsDisplayType)
        {
          if (newLayout != curLayout)
            {
-             if (winWithFocus != cmdWin)
-               tuiClearWinFocus ();
              showLayout (newLayout);
              /*
                 ** Now determine where focus should be
@@ -195,8 +193,7 @@ tuiSetLayout (layoutType, regsDisplayType)
                         ** 2. if target was compiled without -g
                         ** We still want to show the assembly though!
                       */
-                     addr = vcatch_errors ((OpaqueFuncPtr)
-                                           tuiGetBeginAsmAddress);
+                     addr = tuiGetBeginAsmAddress ();
                      tuiSetWinFocusTo (disassemWin);
                      layoutDef->displayMode = DISASSEM_WIN;
                      layoutDef->split = FALSE;
@@ -209,8 +206,7 @@ tuiSetLayout (layoutType, regsDisplayType)
                         ** 2. if target was compiled without -g
                         ** We still want to show the assembly though!
                       */
-                     addr = vcatch_errors ((OpaqueFuncPtr)
-                                           tuiGetBeginAsmAddress);
+                     addr = tuiGetBeginAsmAddress ();
                      if (winWithFocus == srcWin)
                        tuiSetWinFocusTo (srcWin);
                      else
@@ -233,8 +229,7 @@ tuiSetLayout (layoutType, regsDisplayType)
                         ** 2. if target was compiled without -g
                         ** We still want to show the assembly though!
                       */
-                     addr = vcatch_errors ((OpaqueFuncPtr)
-                                           tuiGetBeginAsmAddress);
+                     addr = tuiGetBeginAsmAddress ();
                      if (winWithFocus != dataWin)
                        tuiSetWinFocusTo (disassemWin);
                      else
@@ -271,30 +266,7 @@ tuiSetLayout (layoutType, regsDisplayType)
     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().
@@ -303,13 +275,7 @@ tui_vSetLayoutTo (args)
    **        window to be added.
  */
 void
-#ifdef __STDC__
-tuiAddWinToLayout (
-                   TuiWinType type)
-#else
-tuiAddWinToLayout (type)
-     TuiWinType type;
-#endif
+tuiAddWinToLayout (TuiWinType type)
 {
   TuiLayoutType curLayout = currentLayout ();
 
@@ -357,28 +323,6 @@ tuiAddWinToLayout (type)
 }                              /* tuiAddWinToLayout */
 
 
-/*
-   ** 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,
@@ -386,15 +330,7 @@ tui_vAddWinToLayout (args)
    **        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;
 
@@ -436,15 +372,7 @@ tuiDefaultWinHeight (type, layout)
    **        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;
 
@@ -467,10 +395,8 @@ tuiDefaultWinViewportHeight (type, layout)
 void
 _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\
@@ -482,18 +408,15 @@ Layout names are:\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 */
+}
 
 
 /*************************
@@ -506,14 +429,8 @@ Source/Disassembly/Command layouts.\n");
    **    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
+TuiStatus
+tui_set_layout (const char *layoutName)
 {
   TuiStatus status = TUI_SUCCESS;
 
@@ -525,7 +442,7 @@ _tuiSetLayoutTo (layoutName)
       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]);
 
@@ -537,17 +454,17 @@ _tuiSetLayoutTo (layoutName)
        }
       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;
@@ -559,7 +476,7 @@ _tuiSetLayoutTo (layoutName)
    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 &&
@@ -570,14 +487,14 @@ _tuiSetLayoutTo (layoutName)
                    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)
@@ -597,13 +514,13 @@ _tuiSetLayoutTo (layoutName)
 /*              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);
        }
@@ -612,26 +529,25 @@ _tuiSetLayoutTo (layoutName)
     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:
@@ -639,7 +555,7 @@ _extractDisplayStartAddr ()
       addr = disassemWin->detail.sourceInfo.startLineOrAddr.addr;
       break;
     default:
-      addr = (Opaque) NULL;
+      addr = 0;
       break;
     }
 
@@ -648,13 +564,7 @@ _extractDisplayStartAddr ()
 
 
 static void
-#ifdef __STDC__
-_tuiHandleXDBLayout (
-                     TuiLayoutDefPtr layoutDef)
-#else
-_tuiHandleXDBLayout (layoutDef)
-     TuiLayoutDefPtr layoutDef;
-#endif
+_tuiHandleXDBLayout (TuiLayoutDefPtr layoutDef)
 {
   if (layoutDef->split)
     {
@@ -675,30 +585,12 @@ _tuiHandleXDBLayout (layoutDef)
 
 
 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
@@ -707,70 +599,40 @@ _tui_vToggleLayout_command (args)
   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.
  */
 static TuiLayoutType
-#ifdef __STDC__
 _nextLayout (void)
-#else
-_nextLayout ()
-#endif
 {
   TuiLayoutType newLayout;
 
@@ -793,11 +655,7 @@ _nextLayout ()
    **        Answer the next layout to cycle to.
  */
 static TuiLayoutType
-#ifdef __STDC__
 _prevLayout (void)
-#else
-_prevLayout ()
-#endif
 {
   TuiLayoutType newLayout;
 
@@ -820,17 +678,7 @@ _prevLayout ()
    ** _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,
@@ -850,17 +698,7 @@ _makeCommandWindow (winInfoPtr, height, originY)
    ** _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);
 
@@ -872,17 +710,7 @@ _makeSourceWindow (winInfoPtr, height, originY)
    ** _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);
 
@@ -894,17 +722,7 @@ _makeDisassemWindow (winInfoPtr, height, originY)
    ** _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,
@@ -924,11 +742,7 @@ _makeDataWindow (winInfoPtr, height, originY)
    **        Show the Source/Command layout
  */
 static void
-#ifdef __STDC__
 _showSourceCommand (void)
-#else
-_showSourceCommand ()
-#endif
 {
   _showSourceOrDisassemAndCommand (SRC_COMMAND);
 
@@ -941,11 +755,7 @@ _showSourceCommand ()
    **        Show the Dissassem/Command layout
  */
 static void
-#ifdef __STDC__
 _showDisassemCommand (void)
-#else
-_showDisassemCommand ()
-#endif
 {
   _showSourceOrDisassemAndCommand (DISASSEM_COMMAND);
 
@@ -958,14 +768,8 @@ _showDisassemCommand ()
    **        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;
@@ -1080,13 +884,7 @@ _showSourceDisassemCommand ()
    **        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;
@@ -1154,23 +952,8 @@ _showData (newLayout)
    ** _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;
 
@@ -1195,25 +978,8 @@ _initGenWinInfo (winInfo, type, height, width, originX, originY)
    ** _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;
@@ -1241,33 +1007,17 @@ _initAndMakeWin (winInfoPtr, winType, height, width, originX, originY, boxIt)
            ((TuiWinInfoPtr) opaqueWinInfo)->canHighlight = TRUE;
        }
       makeWindow (generic, boxIt);
-      if (winType == LOCATOR_WIN)
-       tuiClearLocatorDisplay ();
-      echo ();
     }
   *winInfoPtr = opaqueWinInfo;
-
-  return;
-}                              /* _initAndMakeWin */
+}
 
 
 /*
    ** _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;
 
@@ -1307,18 +1057,11 @@ _makeSourceOrDisassemWindow (winInfoPtr, type, height, originY)
    **        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 ();
 
This page took 0.032363 seconds and 4 git commands to generate.