aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/NEWS1
-rw-r--r--gdb/TODO4
-rw-r--r--gdb/config/m68k/xm-mpw.h50
-rw-r--r--gdb/config/powerpc/xm-mpw.h46
-rw-r--r--gdb/config/xm-mpw.h156
-rw-r--r--gdb/event-top.c10
-rw-r--r--gdb/mac-gdb.r368
-rw-r--r--gdb/mac-xdep.c2164
-rw-r--r--gdb/mpw-config.in162
-rw-r--r--gdb/mpw-make.sed354
-rw-r--r--gdb/source.c64
-rw-r--r--gdb/top.c10
-rw-r--r--gdb/utils.c24
14 files changed, 1725 insertions, 1706 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f3024e2..46bdbe1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,21 @@
+2001-04-17 Andrew Cagney <ac131313@redhat.com>
+
+ * source.c (openp): Obsolete #ifdef MPW code.
+ (open_source_file): Ditto.
+ * event-top.c (display_gdb_prompt): Ditto.
+ * utils.c (query): Ditto.
+ (init_page_info): Ditto.
+ (init_page_info): Delete #ifndef MPW.
+ * top.c (gdb_readline): Ditto.
+ * mac-xdep.c: Obsolete.
+ * mac-gdb.r: Obsolete.
+ * config/powerpc/xm-mpw.h: Obsolete.
+ * config/xm-mpw.h: Obsolete.
+ * mpw-make.sed: Obsolete.
+ * mpw-config.in: Obsolete.
+ * TODO: Update
+ * NEWS: Update
+
2001-04-19 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_frameless_function_invocation): New function.
diff --git a/gdb/NEWS b/gdb/NEWS
index a652f9b..4840471 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -27,6 +27,7 @@ PowerPC Netware powerpc-*-netware*
SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
+Apple Macintosh (MPW) host N/A
stuff.c (Program to stuff files into a specially prepared space in kdb)
kdb-start.c (Main loop for the standalone kernel debugger)
diff --git a/gdb/TODO b/gdb/TODO
index 5835bc6..90697cc 100644
--- a/gdb/TODO
+++ b/gdb/TODO
@@ -160,8 +160,6 @@ MAINTAINERS file.
o arm-* vs NetBSD's lack of ``unix''
o arm-* vs IRIX (see below)
- o delete mpw?
-
-- 2001-03-15
Obsolete some targets.
@@ -201,6 +199,8 @@ Steps:
powerpc-*-netware* powerpc - ppc-nw yes
w65-*-* w65 - w65 yes
i[3456]86-*-sunos* i386 sun386 sun386 yes
+ mpw m68k mpw mpw yes
+ mpw powerpc mpw mpw yes
(DONE)
diff --git a/gdb/config/m68k/xm-mpw.h b/gdb/config/m68k/xm-mpw.h
index ea57afb..2d2d1c7 100644
--- a/gdb/config/m68k/xm-mpw.h
+++ b/gdb/config/m68k/xm-mpw.h
@@ -1,25 +1,25 @@
-/* Macro definitions for running GDB on Apple 68k-based Macintoshes.
- Copyright 1994, 1995 Free Software Foundation, Inc.
-
- 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. */
-
-#define HOST_BYTE_ORDER BIG_ENDIAN
-
-/* Use angle brackets so that the common xm-mpw.h is found. */
-
-#include <xm-mpw.h>
+/* OBSOLETE /* Macro definitions for running GDB on Apple 68k-based Macintoshes. */
+/* OBSOLETE Copyright 1994, 1995 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* OBSOLETE */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE (at your option) any later version. */
+/* OBSOLETE */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE */
+/* OBSOLETE You should have received a copy of the GNU General Public License */
+/* OBSOLETE along with this program; if not, write to the Free Software */
+/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE Boston, MA 02111-1307, USA. */ */
+/* OBSOLETE */
+/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
+/* OBSOLETE */
+/* OBSOLETE /* Use angle brackets so that the common xm-mpw.h is found. */ */
+/* OBSOLETE */
+/* OBSOLETE #include <xm-mpw.h> */
diff --git a/gdb/config/powerpc/xm-mpw.h b/gdb/config/powerpc/xm-mpw.h
index 2fac992..761bb34 100644
--- a/gdb/config/powerpc/xm-mpw.h
+++ b/gdb/config/powerpc/xm-mpw.h
@@ -1,23 +1,23 @@
-/* Macro definitions for running GDB on Apple Power Macintoshes.
- Copyright 1994, 1995 Free Software Foundation, Inc.
-
- 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. */
-
-#define HOST_BYTE_ORDER BIG_ENDIAN
-
-#include <xm-mpw.h>
+/* OBSOLETE /* Macro definitions for running GDB on Apple Power Macintoshes. */
+/* OBSOLETE Copyright 1994, 1995 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* OBSOLETE */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE (at your option) any later version. */
+/* OBSOLETE */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE */
+/* OBSOLETE You should have received a copy of the GNU General Public License */
+/* OBSOLETE along with this program; if not, write to the Free Software */
+/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE Boston, MA 02111-1307, USA. */ */
+/* OBSOLETE */
+/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
+/* OBSOLETE */
+/* OBSOLETE #include <xm-mpw.h> */
diff --git a/gdb/config/xm-mpw.h b/gdb/config/xm-mpw.h
index 2685d7a..51c4b7f 100644
--- a/gdb/config/xm-mpw.h
+++ b/gdb/config/xm-mpw.h
@@ -1,78 +1,78 @@
-/* Macro definitions for running GDB on Apple Macintoshes.
- Copyright 1994, 1995, 2001 Free Software Foundation, Inc.
-
- 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 "mpw.h"
-
-#include "fopen-bin.h"
-
-#include "spin.h"
-
-#define CANT_FORK
-
-/* Map these standard functions to versions that can do I/O in a console
- window. */
-
-#define printf hacked_printf
-#define fprintf hacked_fprintf
-#define vprintf hacked_vfprintf
-#define fputs hacked_fputs
-#define fputc hacked_fputc
-#undef putc
-#define putc hacked_putc
-#define fflush hacked_fflush
-
-#define fgetc hacked_fgetc
-
-#define POSIX_UTIME
-
-/* '.' indicates drivers on the Mac, so we need a different filename. */
-
-#define GDBINIT_FILENAME "_gdbinit"
-
-/* Commas are more common to separate dirnames in a path on Macs. */
-
-#define DIRNAME_SEPARATOR ','
-
-/* This is a real crufty hack. */
-
-#define HAVE_TERMIO
-
-/* Addons to the basic MPW-supported signal list. */
-
-#ifndef SIGQUIT
-#define SIGQUIT (1<<6)
-#endif
-#ifndef SIGHUP
-#define SIGHUP (1<<7)
-#endif
-
-/* If __STDC__ is on, then this definition will be missing. */
-
-#ifndef fileno
-#define fileno(p) (p)->_file
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#endif
-
-extern int StandAlone;
-
-extern int mac_app;
+/* OBSOLETE /* Macro definitions for running GDB on Apple Macintoshes. */
+/* OBSOLETE Copyright 1994, 1995, 2001 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* OBSOLETE */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE (at your option) any later version. */
+/* OBSOLETE */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE */
+/* OBSOLETE You should have received a copy of the GNU General Public License */
+/* OBSOLETE along with this program; if not, write to the Free Software */
+/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE Boston, MA 02111-1307, USA. */ */
+/* OBSOLETE */
+/* OBSOLETE #include "mpw.h" */
+/* OBSOLETE */
+/* OBSOLETE #include "fopen-bin.h" */
+/* OBSOLETE */
+/* OBSOLETE #include "spin.h" */
+/* OBSOLETE */
+/* OBSOLETE #define CANT_FORK */
+/* OBSOLETE */
+/* OBSOLETE /* Map these standard functions to versions that can do I/O in a console */
+/* OBSOLETE window. */ */
+/* OBSOLETE */
+/* OBSOLETE #define printf hacked_printf */
+/* OBSOLETE #define fprintf hacked_fprintf */
+/* OBSOLETE #define vprintf hacked_vfprintf */
+/* OBSOLETE #define fputs hacked_fputs */
+/* OBSOLETE #define fputc hacked_fputc */
+/* OBSOLETE #undef putc */
+/* OBSOLETE #define putc hacked_putc */
+/* OBSOLETE #define fflush hacked_fflush */
+/* OBSOLETE */
+/* OBSOLETE #define fgetc hacked_fgetc */
+/* OBSOLETE */
+/* OBSOLETE #define POSIX_UTIME */
+/* OBSOLETE */
+/* OBSOLETE /* '.' indicates drivers on the Mac, so we need a different filename. */ */
+/* OBSOLETE */
+/* OBSOLETE #define GDBINIT_FILENAME "_gdbinit" */
+/* OBSOLETE */
+/* OBSOLETE /* Commas are more common to separate dirnames in a path on Macs. */ */
+/* OBSOLETE */
+/* OBSOLETE #define DIRNAME_SEPARATOR ',' */
+/* OBSOLETE */
+/* OBSOLETE /* This is a real crufty hack. */ */
+/* OBSOLETE */
+/* OBSOLETE #define HAVE_TERMIO */
+/* OBSOLETE */
+/* OBSOLETE /* Addons to the basic MPW-supported signal list. */ */
+/* OBSOLETE */
+/* OBSOLETE #ifndef SIGQUIT */
+/* OBSOLETE #define SIGQUIT (1<<6) */
+/* OBSOLETE #endif */
+/* OBSOLETE #ifndef SIGHUP */
+/* OBSOLETE #define SIGHUP (1<<7) */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE /* If __STDC__ is on, then this definition will be missing. */ */
+/* OBSOLETE */
+/* OBSOLETE #ifndef fileno */
+/* OBSOLETE #define fileno(p) (p)->_file */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE #ifndef R_OK */
+/* OBSOLETE #define R_OK 4 */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE extern int StandAlone; */
+/* OBSOLETE */
+/* OBSOLETE extern int mac_app; */
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 59dbceb..40ef3ce 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -302,11 +302,11 @@ display_gdb_prompt (char *new_prompt)
the user is not accounted for. */
fputs_unfiltered (new_prompt, gdb_stdout);
-#ifdef MPW
- /* Move to a new line so the entered line doesn't have a prompt
- on the front of it. */
- fputs_unfiltered ("\n", gdb_stdout);
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE *//* Move to a new line so the entered line doesn't have a prompt */
+ /* OBSOLETE on the front of it. */
+ /* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
+ /* OBSOLETE #endif *//* MPW */
gdb_flush (gdb_stdout);
}
}
diff --git a/gdb/mac-gdb.r b/gdb/mac-gdb.r
index 3736dde..9128988 100644
--- a/gdb/mac-gdb.r
+++ b/gdb/mac-gdb.r
@@ -1,184 +1,184 @@
-/* Resource file for MacGDB. */
-
-#include "SysTypes.r"
-#include "Types.r"
-
-#include "mac-defs.h"
-
-/* Version resources. */
-
-resource 'vers' (1) {
- 0,
- 0,
- 0,
- 0,
- verUS,
- VERSION_STRING,
- VERSION_STRING " (C) 1986-95 FSF, Inc."
-};
-
-resource 'vers' (2, purgeable) {
- 0,
- 0,
- 0,
- 0,
- verUs,
- VERSION_STRING,
- "GDB " VERSION_STRING " for MPW"
-};
-
-#ifdef WANT_CFRG
-
-#include "CodeFragmentTypes.r"
-
-resource 'cfrg' (0) {
- {
- kPowerPC,
- kFullLib,
- kNoVersionNum, kNoVersionNum,
- 0, 0,
- kIsApp, kOnDiskFlat, kZeroOffset, kWholeFork,
- PROG_NAME
- }
-};
-
-#endif /* WANT_CFRG */
-
-#ifdef Macgdb /* Exclude the following from SIOWgdb which uses SIOW.r. */
-
-resource 'MBAR' (128) {
- { mApple, mFile, mEdit, mDebug };
-};
-
-resource 'MENU' (mApple, preload) {
- mApple,
- textMenuProc,
- 0x7FFFFFFD,
- enabled,
- apple,
- {
- "About...", noIcon, noKey, noMark, plain,
- "-", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'MENU' (mFile, preload) {
- mFile,
- textMenuProc,
- allEnabled,
- enabled,
- "File",
- {
- "New", noIcon, noKey, noMark, plain,
- "Open...", noIcon, "O", noMark, plain,
- "-", noIcon, noKey, noMark, plain,
- "Quit", noIcon, "Q", noMark, plain
- }
-};
-
-resource 'MENU' (mEdit, preload) {
- mEdit,
- textMenuProc,
- allEnabled,
- enabled,
- "Edit",
- {
- "Undo", noIcon, "Z", noMark, plain,
- "-", noIcon, noKey, noMark, plain,
- "Cut", noIcon, "X", noMark, plain,
- "Copy", noIcon, "C", noMark, plain,
- "Paste", noIcon, "V", noMark, plain,
- "Clear", noIcon, noKey, noMark, plain
- }
-};
-
-resource 'MENU' (mDebug, preload) {
- mDebug,
- textMenuProc,
- allEnabled,
- enabled,
- "Debug",
- {
- "Target", noIcon, "T", noMark, plain,
- "-", noIcon, noKey, noMark, plain,
- "Run", noIcon, "R", noMark, plain,
- "Continue", noIcon, "K", noMark, plain,
- "Step", noIcon, "S", noMark, plain,
- "Next", noIcon, "N", noMark, plain
- }
-};
-
-resource 'ALRT' (128) {
- {40, 40, 180, 420},
- 128,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, sound1,
- /* [2] */
- OK, visible, sound1,
- /* [3] */
- OK, visible, sound1,
- /* [4] */
- OK, visible, sound1
- }
-};
-
-resource 'DITL' (128) {
- { /* array DITLarray: 2 elements */
- /* [1] */
- {110, 150, 128, 200},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {10, 10, 100, 370},
- StaticText {
- disabled,
- "GDB 4.12.3\n"
- "Copyright © 1994 Free Software Foundation, Inc.\n"
- },
- }
-};
-
-resource 'WIND' (wConsole, preload, purgeable) {
- {40, 40, 310, 572},
- zoomDocProc,
- visible,
- goAway,
- 0x0,
- "GDB Console"
-};
-
-resource 'SIZE' (-1) {
- reserved,
- acceptSuspendResumeEvents,
- reserved,
- canBackground,
- multiFinderAware,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreChildDiedEvents,
- not32BitCompatible,
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- dontUseTextEditServices,
- reserved,
- reserved,
- reserved,
- 5000*1024,
- 2000*1024
-};
-
-resource 'DLOG' (128) {
- {40, 40, 240, 280},
- documentProc,
- visible,
- goAway,
- 0x0,
- 128,
- ""
-};
-
-#endif
+/* OBSOLETE /* Resource file for MacGDB. */ */
+/* OBSOLETE */
+/* OBSOLETE #include "SysTypes.r" */
+/* OBSOLETE #include "Types.r" */
+/* OBSOLETE */
+/* OBSOLETE #include "mac-defs.h" */
+/* OBSOLETE */
+/* OBSOLETE /* Version resources. */ */
+/* OBSOLETE */
+/* OBSOLETE resource 'vers' (1) { */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE verUS, */
+/* OBSOLETE VERSION_STRING, */
+/* OBSOLETE VERSION_STRING " (C) 1986-95 FSF, Inc." */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'vers' (2, purgeable) { */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE 0, */
+/* OBSOLETE verUs, */
+/* OBSOLETE VERSION_STRING, */
+/* OBSOLETE "GDB " VERSION_STRING " for MPW" */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE #ifdef WANT_CFRG */
+/* OBSOLETE */
+/* OBSOLETE #include "CodeFragmentTypes.r" */
+/* OBSOLETE */
+/* OBSOLETE resource 'cfrg' (0) { */
+/* OBSOLETE { */
+/* OBSOLETE kPowerPC, */
+/* OBSOLETE kFullLib, */
+/* OBSOLETE kNoVersionNum, kNoVersionNum, */
+/* OBSOLETE 0, 0, */
+/* OBSOLETE kIsApp, kOnDiskFlat, kZeroOffset, kWholeFork, */
+/* OBSOLETE PROG_NAME */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE #endif /* WANT_CFRG */ */
+/* OBSOLETE */
+/* OBSOLETE #ifdef Macgdb /* Exclude the following from SIOWgdb which uses SIOW.r. */ */
+/* OBSOLETE */
+/* OBSOLETE resource 'MBAR' (128) { */
+/* OBSOLETE { mApple, mFile, mEdit, mDebug }; */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'MENU' (mApple, preload) { */
+/* OBSOLETE mApple, */
+/* OBSOLETE textMenuProc, */
+/* OBSOLETE 0x7FFFFFFD, */
+/* OBSOLETE enabled, */
+/* OBSOLETE apple, */
+/* OBSOLETE { */
+/* OBSOLETE "About...", noIcon, noKey, noMark, plain, */
+/* OBSOLETE "-", noIcon, noKey, noMark, plain */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'MENU' (mFile, preload) { */
+/* OBSOLETE mFile, */
+/* OBSOLETE textMenuProc, */
+/* OBSOLETE allEnabled, */
+/* OBSOLETE enabled, */
+/* OBSOLETE "File", */
+/* OBSOLETE { */
+/* OBSOLETE "New", noIcon, noKey, noMark, plain, */
+/* OBSOLETE "Open...", noIcon, "O", noMark, plain, */
+/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
+/* OBSOLETE "Quit", noIcon, "Q", noMark, plain */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'MENU' (mEdit, preload) { */
+/* OBSOLETE mEdit, */
+/* OBSOLETE textMenuProc, */
+/* OBSOLETE allEnabled, */
+/* OBSOLETE enabled, */
+/* OBSOLETE "Edit", */
+/* OBSOLETE { */
+/* OBSOLETE "Undo", noIcon, "Z", noMark, plain, */
+/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
+/* OBSOLETE "Cut", noIcon, "X", noMark, plain, */
+/* OBSOLETE "Copy", noIcon, "C", noMark, plain, */
+/* OBSOLETE "Paste", noIcon, "V", noMark, plain, */
+/* OBSOLETE "Clear", noIcon, noKey, noMark, plain */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'MENU' (mDebug, preload) { */
+/* OBSOLETE mDebug, */
+/* OBSOLETE textMenuProc, */
+/* OBSOLETE allEnabled, */
+/* OBSOLETE enabled, */
+/* OBSOLETE "Debug", */
+/* OBSOLETE { */
+/* OBSOLETE "Target", noIcon, "T", noMark, plain, */
+/* OBSOLETE "-", noIcon, noKey, noMark, plain, */
+/* OBSOLETE "Run", noIcon, "R", noMark, plain, */
+/* OBSOLETE "Continue", noIcon, "K", noMark, plain, */
+/* OBSOLETE "Step", noIcon, "S", noMark, plain, */
+/* OBSOLETE "Next", noIcon, "N", noMark, plain */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'ALRT' (128) { */
+/* OBSOLETE {40, 40, 180, 420}, */
+/* OBSOLETE 128, */
+/* OBSOLETE { /* array: 4 elements */ */
+/* OBSOLETE /* [1] */ */
+/* OBSOLETE OK, visible, sound1, */
+/* OBSOLETE /* [2] */ */
+/* OBSOLETE OK, visible, sound1, */
+/* OBSOLETE /* [3] */ */
+/* OBSOLETE OK, visible, sound1, */
+/* OBSOLETE /* [4] */ */
+/* OBSOLETE OK, visible, sound1 */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'DITL' (128) { */
+/* OBSOLETE { /* array DITLarray: 2 elements */ */
+/* OBSOLETE /* [1] */ */
+/* OBSOLETE {110, 150, 128, 200}, */
+/* OBSOLETE Button { */
+/* OBSOLETE enabled, */
+/* OBSOLETE "OK" */
+/* OBSOLETE }, */
+/* OBSOLETE /* [2] */ */
+/* OBSOLETE {10, 10, 100, 370}, */
+/* OBSOLETE StaticText { */
+/* OBSOLETE disabled, */
+/* OBSOLETE "GDB 4.12.3\n" */
+/* OBSOLETE "Copyright © 1994 Free Software Foundation, Inc.\n" */
+/* OBSOLETE }, */
+/* OBSOLETE } */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'WIND' (wConsole, preload, purgeable) { */
+/* OBSOLETE {40, 40, 310, 572}, */
+/* OBSOLETE zoomDocProc, */
+/* OBSOLETE visible, */
+/* OBSOLETE goAway, */
+/* OBSOLETE 0x0, */
+/* OBSOLETE "GDB Console" */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'SIZE' (-1) { */
+/* OBSOLETE reserved, */
+/* OBSOLETE acceptSuspendResumeEvents, */
+/* OBSOLETE reserved, */
+/* OBSOLETE canBackground, */
+/* OBSOLETE multiFinderAware, */
+/* OBSOLETE backgroundAndForeground, */
+/* OBSOLETE dontGetFrontClicks, */
+/* OBSOLETE ignoreChildDiedEvents, */
+/* OBSOLETE not32BitCompatible, */
+/* OBSOLETE isHighLevelEventAware, */
+/* OBSOLETE localAndRemoteHLEvents, */
+/* OBSOLETE notStationeryAware, */
+/* OBSOLETE dontUseTextEditServices, */
+/* OBSOLETE reserved, */
+/* OBSOLETE reserved, */
+/* OBSOLETE reserved, */
+/* OBSOLETE 5000*1024, */
+/* OBSOLETE 2000*1024 */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE resource 'DLOG' (128) { */
+/* OBSOLETE {40, 40, 240, 280}, */
+/* OBSOLETE documentProc, */
+/* OBSOLETE visible, */
+/* OBSOLETE goAway, */
+/* OBSOLETE 0x0, */
+/* OBSOLETE 128, */
+/* OBSOLETE "" */
+/* OBSOLETE }; */
+/* OBSOLETE */
+/* OBSOLETE #endif */
diff --git a/gdb/mac-xdep.c b/gdb/mac-xdep.c
index fad42c1..f6bf35a 100644
--- a/gdb/mac-xdep.c
+++ b/gdb/mac-xdep.c
@@ -1,1082 +1,1082 @@
-/* Top level support for Mac interface to GDB, the GNU debugger.
- Copyright 1994, 1995, 1998, 2000, 2001 Free Software Foundation, Inc.
- Contributed by Cygnus Support. Written by Stan Shebs.
-
- 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 <readline/readline.h>
-#include <readline/history.h>
-
-#include <Types.h>
-#include <Resources.h>
-#include <QuickDraw.h>
-#include <Fonts.h>
-#include <Events.h>
-#include <Windows.h>
-#include <Menus.h>
-#include <TextEdit.h>
-#include <Dialogs.h>
-#include <Desk.h>
-#include <ToolUtils.h>
-#include <Memory.h>
-#include <SegLoad.h>
-#include <Files.h>
-#include <Folders.h>
-#include <OSUtils.h>
-#include <OSEvents.h>
-#include <DiskInit.h>
-#include <Packages.h>
-#include <Traps.h>
-#include <Lists.h>
-#include <Gestalt.h>
-#include <PPCToolbox.h>
-#include <AppleEvents.h>
-#include <StandardFile.h>
-#include <Sound.h>
-
-#ifdef MPW
-#define QD(whatever) (qd.##whatever)
-#define QDPat(whatever) (&(qd.##whatever))
-#endif /* MPW */
-
-#ifdef THINK_C
-#define QD(whatever) (whatever)
-#endif
-
-#define p2c(pstr,cbuf) \
- strncpy(cbuf, ((char *) (pstr) + 1), pstr[0]); \
- cbuf[pstr[0]] = '\0';
-
-#define pascalify(STR) \
- sprintf(tmpbuf, " %s", STR); \
- tmpbuf[0] = strlen(STR);
-
-#include "gdbcmd.h"
-#include "call-cmds.h"
-#include "symtab.h"
-#include "inferior.h"
-#include <signal.h>
-#include "target.h"
-#include "breakpoint.h"
-#include "gdbtypes.h"
-#include "expression.h"
-#include "language.h"
-
-#include "mac-defs.h"
-
-int debug_openp = 0;
-
-/* This is true if we are running as a standalone application. */
-
-int mac_app;
-
-/* This is true if we are using WaitNextEvent. */
-
-int use_wne;
-
-/* This is true if we have Color Quickdraw. */
-
-int has_color_qd;
-
-/* This is true if we are using Color Quickdraw. */
-
-int use_color_qd;
-
-int inbackground;
-
-Rect dragrect =
-{-32000, -32000, 32000, 32000};
-Rect sizerect;
-
-int sbarwid = 15;
-
-/* Globals for the console window. */
-
-WindowPtr console_window;
-
-ControlHandle console_v_scrollbar;
-
-Rect console_v_scroll_rect;
-
-TEHandle console_text;
-
-Rect console_text_rect;
-
-/* This will go away eventually. */
-gdb_has_a_terminal (void)
-{
- return 1;
-}
-
-mac_init (void)
-{
- SysEnvRec se;
- int eventloopdone = 0;
- char *str;
- Boolean gotevent;
- Point mouse;
- EventRecord event;
- WindowPtr win;
- RgnHandle cursorRgn;
- int i;
- Handle menubar;
- MenuHandle menu;
- Handle siow_resource;
-
- mac_app = 0;
-
- str = getenv ("DEBUG_GDB");
- if (str != NULL && str[0] != '\0')
- {
- if (strcmp (str, "openp") == 0)
- debug_openp = 1;
- }
-
- /* Don't do anything if we`re running under MPW. */
- if (!StandAlone)
- return;
-
- /* Don't do anything if we're using SIOW. */
- /* This test requires that the siow 0 resource, as defined in
- {RIncludes}siow.r, not be messed with. If it is, then the
- standard Mac setup below will step on SIOW's Mac setup and
- most likely crash the machine. */
- siow_resource = GetResource ('siow', 0);
- if (siow_resource != nil)
- return;
-
- mac_app = 1;
-
- /* Do the standard Mac environment setup. */
- InitGraf (&QD (thePort));
- InitFonts ();
- FlushEvents (everyEvent, 0);
- InitWindows ();
- InitMenus ();
- TEInit ();
- InitDialogs (NULL);
- InitCursor ();
-
- /* Color Quickdraw is different from Classic QD. */
- SysEnvirons (2, &se);
- has_color_qd = se.hasColorQD;
- /* Use it if we got it. */
- use_color_qd = has_color_qd;
-
- sizerect.top = 50;
- sizerect.left = 50;
- sizerect.bottom = 1000;
- sizerect.right = 1000;
-#if 0
- sizerect.bottom = screenBits.bounds.bottom - screenBits.bounds.top;
- sizerect.right = screenBits.bounds.right - screenBits.bounds.left;
-#endif
-
- /* Set up the menus. */
- menubar = GetNewMBar (mbMain);
- SetMenuBar (menubar);
- /* Add the DAs etc as usual. */
- menu = GetMHandle (mApple);
- if (menu != nil)
- {
- AddResMenu (menu, 'DRVR');
- }
- DrawMenuBar ();
-
- new_console_window ();
-}
-
-new_console_window (void)
-{
- /* Create the main window we're going to play in. */
- if (has_color_qd)
- console_window = GetNewCWindow (wConsole, NULL, (WindowPtr) - 1L);
- else
- console_window = GetNewWindow (wConsole, NULL, (WindowPtr) - 1L);
-
- SetPort (console_window);
- console_text_rect = console_window->portRect;
- /* Leave 8 pixels of blank space, for aesthetic reasons and to
- make it easier to select from the beginning of a line. */
- console_text_rect.left += 8;
- console_text_rect.bottom -= sbarwid - 1;
- console_text_rect.right -= sbarwid - 1;
- console_text = TENew (&console_text_rect, &console_text_rect);
- TESetSelect (0, 40000, console_text);
- TEDelete (console_text);
- TEAutoView (1, console_text);
-
- console_v_scroll_rect = console_window->portRect;
- console_v_scroll_rect.bottom -= sbarwid - 1;
- console_v_scroll_rect.left = console_v_scroll_rect.right - sbarwid;
- console_v_scrollbar =
- NewControl (console_window, &console_v_scroll_rect,
- "\p", 1, 0, 0, 0, scrollBarProc, 0L);
-
- ShowWindow (console_window);
- SelectWindow (console_window);
-}
-
-mac_command_loop (void)
-{
- SysEnvRec se;
- int eventloopdone = 0;
- Boolean gotevent;
- Point mouse;
- EventRecord event;
- WindowPtr win;
- RgnHandle cursorRgn;
- int i, tm;
- Handle menubar;
- MenuHandle menu;
-
- /* Figure out if the WaitNextEvent Trap is available. */
- use_wne =
- (NGetTrapAddress (0x60, ToolTrap) != NGetTrapAddress (0x9f, ToolTrap));
- /* Pass WaitNextEvent an empty region the first time through. */
- cursorRgn = NewRgn ();
- /* Go into the main event-handling loop. */
- while (!eventloopdone)
- {
- /* Use WaitNextEvent if it is available, otherwise GetNextEvent. */
- if (use_wne)
- {
- get_global_mouse (&mouse);
- adjust_cursor (mouse, cursorRgn);
- tm = GetCaretTime ();
- gotevent = WaitNextEvent (everyEvent, &event, tm, cursorRgn);
- }
- else
- {
- SystemTask ();
- gotevent = GetNextEvent (everyEvent, &event);
- }
- /* First decide if the event is for a dialog or is just any old event. */
- if (FrontWindow () != nil && IsDialogEvent (&event))
- {
- short itemhit;
- DialogPtr dialog;
-
- /* Handle all the modeless dialogs here. */
- if (DialogSelect (&event, &dialog, &itemhit))
- {
- }
- }
- else if (gotevent)
- {
- /* Make sure we have the right cursor before handling the event. */
- adjust_cursor (event.where, cursorRgn);
- do_event (&event);
- }
- else
- {
- do_idle ();
- }
- }
-}
-
-/* Collect the global coordinates of the mouse pointer. */
-
-get_global_mouse (Point *mouse)
-{
- EventRecord evt;
-
- OSEventAvail (0, &evt);
- *mouse = evt.where;
-}
-
-/* Change the cursor's appearance to be appropriate for the given mouse
- location. */
-
-adjust_cursor (Point mouse, RgnHandle region)
-{
-}
-
-/* Decipher an event, maybe do something with it. */
-
-do_event (EventRecord *evt)
-{
- short part, err, rslt = 0;
- WindowPtr win;
- Boolean hit;
- char key;
- Point pnt;
-
- switch (evt->what)
- {
- case mouseDown:
- /* See if the click happened in a special part of the screen. */
- part = FindWindow (evt->where, &win);
- switch (part)
- {
- case inMenuBar:
- adjust_menus ();
- do_menu_command (MenuSelect (evt->where));
- break;
- case inSysWindow:
- SystemClick (evt, win);
- break;
- case inContent:
- if (win != FrontWindow ())
- {
- /* Bring the clicked-on window to the front. */
- SelectWindow (win);
- /* Fix the menu to match the new front window. */
- adjust_menus ();
- /* We always want to discard the event now, since clicks in a
- windows are often irreversible actions. */
- }
- else
- /* Mouse clicks in the front window do something useful. */
- do_mouse_down (win, evt);
- break;
- case inDrag:
- /* Standard drag behavior, no tricks necessary. */
- DragWindow (win, evt->where, &dragrect);
- break;
- case inGrow:
- grow_window (win, evt->where);
- break;
- case inZoomIn:
- case inZoomOut:
- zoom_window (win, evt->where, part);
- break;
- case inGoAway:
- close_window (win);
- break;
- }
- break;
- case keyDown:
- case autoKey:
- key = evt->message & charCodeMask;
- /* Check for menukey equivalents. */
- if (evt->modifiers & cmdKey)
- {
- if (evt->what == keyDown)
- {
- adjust_menus ();
- do_menu_command (MenuKey (key));
- }
- }
- else
- {
- if (evt->what == keyDown)
- {
- /* Random keypress, interpret it. */
- do_keyboard_command (key);
- }
- }
- break;
- case activateEvt:
- activate_window ((WindowPtr) evt->message, evt->modifiers & activeFlag);
- break;
- case updateEvt:
- update_window ((WindowPtr) evt->message);
- break;
- case diskEvt:
- /* Call DIBadMount in response to a diskEvt, so that the user can format
- a floppy. (from DTS Sample) */
- if (HiWord (evt->message) != noErr)
- {
- SetPt (&pnt, 50, 50);
- err = DIBadMount (pnt, evt->message);
- }
- break;
- case app4Evt:
- /* Grab only a single byte. */
- switch ((evt->message >> 24) & 0xFF)
- {
- case 0xfa:
- break;
- case 1:
- inbackground = !(evt->message & 1);
- activate_window (FrontWindow (), !inbackground);
- break;
- }
- break;
- case kHighLevelEvent:
- AEProcessAppleEvent (evt);
- break;
- case nullEvent:
- do_idle ();
- rslt = 1;
- break;
- default:
- break;
- }
- return rslt;
-}
-
-/* Do any idle-time activities. */
-
-do_idle (void)
-{
- TEIdle (console_text);
-}
-
-grow_window (WindowPtr win, Point where)
-{
- long winsize;
- int h, v;
- GrafPtr oldport;
-
- winsize = GrowWindow (win, where, &sizerect);
- /* Only do anything if it actually changed size. */
- if (winsize != 0)
- {
- GetPort (&oldport);
- SetPort (win);
- if (win == console_window)
- {
- EraseRect (&win->portRect);
- h = LoWord (winsize);
- v = HiWord (winsize);
- SizeWindow (win, h, v, 1);
- resize_console_window ();
- }
- SetPort (oldport);
- }
-}
-
-zoom_window (WindowPtr win, Point where, short part)
-{
- ZoomWindow (win, part, (win == FrontWindow ()));
- if (win == console_window)
- {
- resize_console_window ();
- }
-}
-
-resize_console_window (void)
-{
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- InvalRect (&console_window->portRect);
-}
-
-close_window (WindowPtr win)
-{
-}
-
-pascal void
-v_scroll_proc (ControlHandle control, short part)
-{
- int oldval, amount = 0, newval;
- int pagesize = ((*console_text)->viewRect.bottom - (*console_text)->viewRect.top) / (*console_text)->lineHeight;
- if (part)
- {
- oldval = GetCtlValue (control);
- switch (part)
- {
- case inUpButton:
- amount = 1;
- break;
- case inDownButton:
- amount = -1;
- break;
- case inPageUp:
- amount = pagesize;
- break;
- case inPageDown:
- amount = -pagesize;
- break;
- default:
- /* (should freak out) */
- break;
- }
- SetCtlValue (control, oldval - amount);
- newval = GetCtlValue (control);
- amount = oldval - newval;
- if (amount)
- TEScroll (0, amount * (*console_text)->lineHeight, console_text);
- }
-}
-
-do_mouse_down (WindowPtr win, EventRecord * event)
-{
- short part, value;
- Point mouse;
- ControlHandle control;
-
- if (1 /*is_app_window(win) */ )
- {
- SetPort (win);
- mouse = event->where;
- GlobalToLocal (&mouse);
- part = FindControl (mouse, win, &control);
- if (control == console_v_scrollbar)
- {
- switch (part)
- {
- case inThumb:
- value = GetCtlValue (control);
- part = TrackControl (control, mouse, nil);
- if (part)
- {
- value -= GetCtlValue (control);
- if (value)
- TEScroll (0, value * (*console_text)->lineHeight,
- console_text);
- }
- break;
- default:
-#if 0 /* don't deal with right now */
-#if 1 /* universal headers */
- value = TrackControl (control, mouse, (ControlActionUPP) v_scroll_proc);
-#else
- value = TrackControl (control, mouse, (ProcPtr) v_scroll_proc);
-#endif
-#endif
- break;
- }
- }
- else
- {
- TEClick (mouse, 0, console_text);
- }
- }
-}
-
-scroll_text (int hlines, int vlines)
-{
-}
-
-activate_window (WindowPtr win, int activate)
-{
- Rect grow_rect;
-
- if (win == nil)
- return;
- /* It's convenient to make the activated window also be the
- current GrafPort. */
- if (activate)
- SetPort (win);
- /* Activate the console window's scrollbar. */
- if (win == console_window)
- {
- if (activate)
- {
- TEActivate (console_text);
- /* Cause the grow icon to be redrawn at the next update. */
- grow_rect = console_window->portRect;
- grow_rect.top = grow_rect.bottom - sbarwid;
- grow_rect.left = grow_rect.right - sbarwid;
- InvalRect (&grow_rect);
- }
- else
- {
- TEDeactivate (console_text);
- DrawGrowIcon (console_window);
- }
- HiliteControl (console_v_scrollbar, (activate ? 0 : 255));
- }
-}
-
-update_window (WindowPtr win)
-{
- int controls = 1, growbox = 0;
- GrafPtr oldport;
-
- /* Set the updating window to be the current grafport. */
- GetPort (&oldport);
- SetPort (win);
-/* recalc_depths(); */
- BeginUpdate (win);
- if (win == console_window)
- {
- draw_console ();
- controls = 1;
- growbox = 1;
- }
- if (controls)
- UpdateControls (win, win->visRgn);
- if (growbox)
- DrawGrowIcon (win);
- EndUpdate (win);
- SetPort (oldport);
-}
-
-adjust_menus (void)
-{
-}
-
-do_menu_command (long which)
-{
- short menuid, menuitem;
- short itemHit;
- Str255 daname;
- short daRefNum;
- Boolean handledbyda;
- WindowPtr win;
- short ditem;
- int i;
- char cmdbuf[300];
-
- cmdbuf[0] = '\0';
- menuid = HiWord (which);
- menuitem = LoWord (which);
- switch (menuid)
- {
- case mApple:
- switch (menuitem)
- {
- case miAbout:
- Alert (128, nil);
- break;
-#if 0
- case miHelp:
- /* (should pop up help info) */
- break;
-#endif
- default:
- GetItem (GetMHandle (mApple), menuitem, daname);
- daRefNum = OpenDeskAcc (daname);
- }
- break;
- case mFile:
- switch (menuitem)
- {
- case miFileNew:
- if (console_window == FrontWindow ())
- {
- close_window (console_window);
- }
- new_console_window ();
- break;
- case miFileOpen:
- SysBeep (20);
- break;
- case miFileQuit:
- ExitToShell ();
- break;
- }
- break;
- case mEdit:
- /* handledbyda = SystemEdit(menuitem-1); */
- switch (menuitem)
- {
- case miEditCut:
- TECut (console_text);
- break;
- case miEditCopy:
- TECopy (console_text);
- break;
- case miEditPaste:
- TEPaste (console_text);
- break;
- case miEditClear:
- TEDelete (console_text);
- break;
- }
- /* All of these operations need the same postprocessing. */
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- break;
- case mDebug:
- switch (menuitem)
- {
- case miDebugTarget:
- sprintf (cmdbuf, "target %s", "remote");
- break;
- case miDebugRun:
- sprintf (cmdbuf, "run");
- break;
- case miDebugContinue:
- sprintf (cmdbuf, "continue");
- break;
- case miDebugStep:
- sprintf (cmdbuf, "step");
- break;
- case miDebugNext:
- sprintf (cmdbuf, "next");
- break;
- }
- break;
- }
- HiliteMenu (0);
- /* Execute a command if one had been given. Do here because a command
- may longjmp before we get a chance to unhilite the menu. */
- if (strlen (cmdbuf) > 0)
- execute_command (cmdbuf, 0);
-}
-
-char commandbuf[1000];
-
-do_keyboard_command (int key)
-{
- int startpos, endpos, i, len;
- char *last_newline;
- char buf[10], *text_str, *command, *cmd_start;
- CharsHandle text;
-
- if (key == '\015' || key == '\003')
- {
- text = TEGetText (console_text);
- HLock ((Handle) text);
- text_str = *text;
- startpos = (*console_text)->selStart;
- endpos = (*console_text)->selEnd;
- if (startpos != endpos)
- {
- len = endpos - startpos;
- cmd_start = text_str + startpos;
- }
- else
- {
- for (i = startpos - 1; i >= 0; --i)
- if (text_str[i] == '\015')
- break;
- last_newline = text_str + i;
- len = (text_str + startpos) - 1 - last_newline;
- cmd_start = last_newline + 1;
- }
- if (len > 1000)
- len = 999;
- if (len < 0)
- len = 0;
- strncpy (commandbuf + 1, cmd_start, len);
- commandbuf[1 + len] = 0;
- command = commandbuf + 1;
- HUnlock ((Handle) text);
- commandbuf[0] = strlen (command);
-
- /* Insert a newline and recalculate before doing any command. */
- key = '\015';
- TEKey (key, console_text);
- TEInsert (buf, 1, console_text);
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
-
- if (strlen (command) > 0)
- {
- execute_command (command, 0);
- bpstat_do_actions (&stop_bpstat);
- }
- }
- else
- {
- /* A self-inserting character. This includes delete. */
- TEKey (key, console_text);
- }
-}
-
-/* Draw all graphical stuff in the console window. */
-
-draw_console (void)
-{
- SetPort (console_window);
- TEUpdate (&(console_window->portRect), console_text);
-}
-
-/* Cause an update of a given window's entire contents. */
-
-force_update (WindowPtr win)
-{
- GrafPtr oldport;
-
- if (win == nil)
- return;
- GetPort (&oldport);
- SetPort (win);
- EraseRect (&win->portRect);
- InvalRect (&win->portRect);
- SetPort (oldport);
-}
-
-adjust_console_sizes (void)
-{
- Rect tmprect;
-
- tmprect = console_window->portRect;
- /* Move and size the scrollbar. */
- MoveControl (console_v_scrollbar, tmprect.right - sbarwid, 0);
- SizeControl (console_v_scrollbar, sbarwid + 1, tmprect.bottom - sbarwid + 1);
- /* Move and size the text. */
- tmprect.left += 7;
- tmprect.right -= sbarwid;
- tmprect.bottom -= sbarwid;
- InsetRect (&tmprect, 1, 1);
- (*console_text)->destRect = tmprect;
- /* Fiddle bottom of viewrect to be even multiple of text lines. */
- tmprect.bottom = tmprect.top
- + ((tmprect.bottom - tmprect.top) / (*console_text)->lineHeight)
- * (*console_text)->lineHeight;
- (*console_text)->viewRect = tmprect;
-}
-
-adjust_console_scrollbars (void)
-{
- int lines, newmax, value;
-
- (*console_v_scrollbar)->contrlVis = 0;
- lines = (*console_text)->nLines;
- newmax = lines - (((*console_text)->viewRect.bottom
- - (*console_text)->viewRect.top)
- / (*console_text)->lineHeight);
- if (newmax < 0)
- newmax = 0;
- SetCtlMax (console_v_scrollbar, newmax);
- value = ((*console_text)->viewRect.top - (*console_text)->destRect.top)
- / (*console_text)->lineHeight;
- SetCtlValue (console_v_scrollbar, value);
- (*console_v_scrollbar)->contrlVis = 0xff;
- ShowControl (console_v_scrollbar);
-}
-
-/* Scroll the TE record so that it is consistent with the scrollbar(s). */
-
-adjust_console_text (void)
-{
- TEScroll (((*console_text)->viewRect.left
- - (*console_text)->destRect.left)
- - 0 /* get h scroll value */ ,
- ((((*console_text)->viewRect.top - (*console_text)->destRect.top)
- / (*console_text)->lineHeight)
- - GetCtlValue (console_v_scrollbar))
- * (*console_text)->lineHeight,
- console_text);
-}
-
-/* Readline substitute. */
-
-char *
-readline (char *prrompt)
-{
- return gdb_readline (prrompt);
-}
-
-char *rl_completer_word_break_characters;
-
-char *rl_completer_quote_characters;
-
-int (*rl_completion_entry_function) ();
-
-int rl_point;
-
-char *rl_line_buffer;
-
-char *rl_readline_name;
-
-/* History substitute. */
-
-void
-add_history (char *buf)
-{
-}
-
-void
-stifle_history (int n)
-{
-}
-
-int
-unstifle_history (void)
-{
-}
-
-int
-read_history (char *name)
-{
-}
-
-int
-write_history (char *name)
-{
-}
-
-int
-history_expand (char *x, char **y)
-{
-}
-
-extern HIST_ENTRY *
-history_get (int xxx)
-{
- return NULL;
-}
-
-int history_base;
-
-char *
-filename_completion_function (char *text, char *name)
-{
- return "?";
-}
-
-char *
-tilde_expand (char *str)
-{
- return xstrdup (str);
-}
-
-/* Modified versions of standard I/O. */
-
-#undef fprintf
-
-int
-hacked_fprintf (FILE * fp, const char *fmt,...)
-{
- int ret;
- va_list ap;
-
- va_start (ap, fmt);
- if (mac_app && (fp == stdout || fp == stderr))
- {
- char buf[1000];
-
- ret = vsprintf (buf, fmt, ap);
- TEInsert (buf, strlen (buf), console_text);
- }
- else
- ret = vfprintf (fp, fmt, ap);
- va_end (ap);
- return ret;
-}
-
-#undef printf
-
-int
-hacked_printf (const char *fmt,...)
-{
- int ret;
- va_list ap;
-
- va_start (ap, fmt);
- ret = hacked_vfprintf (stdout, fmt, ap);
- va_end (ap);
- return ret;
-}
-
-#undef vfprintf
-
-int
-hacked_vfprintf (FILE * fp, const char *format, va_list args)
-{
- if (mac_app && (fp == stdout || fp == stderr))
- {
- char buf[1000];
- int ret;
-
- ret = vsprintf (buf, format, args);
- TEInsert (buf, strlen (buf), console_text);
- if (strchr (buf, '\n'))
- {
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- }
- return ret;
- }
- else
- return vfprintf (fp, format, args);
-}
-
-#undef fputs
-
-hacked_fputs (const char *s, FILE * fp)
-{
- if (mac_app && (fp == stdout || fp == stderr))
- {
- TEInsert (s, strlen (s), console_text);
- if (strchr (s, '\n'))
- {
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- }
- return 0;
- }
- else
- return fputs (s, fp);
-}
-
-#undef fputc
-
-hacked_fputc (const char c, FILE * fp)
-{
- if (mac_app && (fp == stdout || fp == stderr))
- {
- char buf[1];
-
- buf[0] = c;
- TEInsert (buf, 1, console_text);
- if (c == '\n')
- {
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- }
- return c;
- }
- else
- return fputc (c, fp);
-}
-
-#undef putc
-
-hacked_putc (const char c, FILE * fp)
-{
- if (mac_app && (fp == stdout || fp == stderr))
- {
- char buf[1];
-
- buf[0] = c;
- TEInsert (buf, 1, console_text);
- if (c == '\n')
- {
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- }
- return c;
- }
- else
- return fputc (c, fp);
-}
-
-#undef fflush
-
-hacked_fflush (FILE * fp)
-{
- if (mac_app && (fp == stdout || fp == stderr))
- {
- adjust_console_sizes ();
- adjust_console_scrollbars ();
- adjust_console_text ();
- return 0;
- }
- return fflush (fp);
-}
-
-#undef fgetc
-
-hacked_fgetc (FILE * fp)
-{
- if (mac_app && (fp == stdin))
- {
- /* Catch any attempts to use this. */
- DebugStr ("\pShould not be reading from stdin!");
- return '\n';
- }
- return fgetc (fp);
-}
+/* OBSOLETE /* Top level support for Mac interface to GDB, the GNU debugger. */
+/* OBSOLETE Copyright 1994, 1995, 1998, 2000, 2001 Free Software Foundation, Inc. */
+/* OBSOLETE Contributed by Cygnus Support. Written by Stan Shebs. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* OBSOLETE */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE (at your option) any later version. */
+/* OBSOLETE */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE */
+/* OBSOLETE You should have received a copy of the GNU General Public License */
+/* OBSOLETE along with this program; if not, write to the Free Software */
+/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE Boston, MA 02111-1307, USA. */ */
+/* OBSOLETE */
+/* OBSOLETE #include "defs.h" */
+/* OBSOLETE */
+/* OBSOLETE #include <readline/readline.h> */
+/* OBSOLETE #include <readline/history.h> */
+/* OBSOLETE */
+/* OBSOLETE #include <Types.h> */
+/* OBSOLETE #include <Resources.h> */
+/* OBSOLETE #include <QuickDraw.h> */
+/* OBSOLETE #include <Fonts.h> */
+/* OBSOLETE #include <Events.h> */
+/* OBSOLETE #include <Windows.h> */
+/* OBSOLETE #include <Menus.h> */
+/* OBSOLETE #include <TextEdit.h> */
+/* OBSOLETE #include <Dialogs.h> */
+/* OBSOLETE #include <Desk.h> */
+/* OBSOLETE #include <ToolUtils.h> */
+/* OBSOLETE #include <Memory.h> */
+/* OBSOLETE #include <SegLoad.h> */
+/* OBSOLETE #include <Files.h> */
+/* OBSOLETE #include <Folders.h> */
+/* OBSOLETE #include <OSUtils.h> */
+/* OBSOLETE #include <OSEvents.h> */
+/* OBSOLETE #include <DiskInit.h> */
+/* OBSOLETE #include <Packages.h> */
+/* OBSOLETE #include <Traps.h> */
+/* OBSOLETE #include <Lists.h> */
+/* OBSOLETE #include <Gestalt.h> */
+/* OBSOLETE #include <PPCToolbox.h> */
+/* OBSOLETE #include <AppleEvents.h> */
+/* OBSOLETE #include <StandardFile.h> */
+/* OBSOLETE #include <Sound.h> */
+/* OBSOLETE */
+/* OBSOLETE #ifdef MPW */
+/* OBSOLETE #define QD(whatever) (qd.##whatever) */
+/* OBSOLETE #define QDPat(whatever) (&(qd.##whatever)) */
+/* OBSOLETE #endif /* MPW */ */
+/* OBSOLETE */
+/* OBSOLETE #ifdef THINK_C */
+/* OBSOLETE #define QD(whatever) (whatever) */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE #define p2c(pstr,cbuf) \ */
+/* OBSOLETE strncpy(cbuf, ((char *) (pstr) + 1), pstr[0]); \ */
+/* OBSOLETE cbuf[pstr[0]] = '\0'; */
+/* OBSOLETE */
+/* OBSOLETE #define pascalify(STR) \ */
+/* OBSOLETE sprintf(tmpbuf, " %s", STR); \ */
+/* OBSOLETE tmpbuf[0] = strlen(STR); */
+/* OBSOLETE */
+/* OBSOLETE #include "gdbcmd.h" */
+/* OBSOLETE #include "call-cmds.h" */
+/* OBSOLETE #include "symtab.h" */
+/* OBSOLETE #include "inferior.h" */
+/* OBSOLETE #include <signal.h> */
+/* OBSOLETE #include "target.h" */
+/* OBSOLETE #include "breakpoint.h" */
+/* OBSOLETE #include "gdbtypes.h" */
+/* OBSOLETE #include "expression.h" */
+/* OBSOLETE #include "language.h" */
+/* OBSOLETE */
+/* OBSOLETE #include "mac-defs.h" */
+/* OBSOLETE */
+/* OBSOLETE int debug_openp = 0; */
+/* OBSOLETE */
+/* OBSOLETE /* This is true if we are running as a standalone application. */ */
+/* OBSOLETE */
+/* OBSOLETE int mac_app; */
+/* OBSOLETE */
+/* OBSOLETE /* This is true if we are using WaitNextEvent. */ */
+/* OBSOLETE */
+/* OBSOLETE int use_wne; */
+/* OBSOLETE */
+/* OBSOLETE /* This is true if we have Color Quickdraw. */ */
+/* OBSOLETE */
+/* OBSOLETE int has_color_qd; */
+/* OBSOLETE */
+/* OBSOLETE /* This is true if we are using Color Quickdraw. */ */
+/* OBSOLETE */
+/* OBSOLETE int use_color_qd; */
+/* OBSOLETE */
+/* OBSOLETE int inbackground; */
+/* OBSOLETE */
+/* OBSOLETE Rect dragrect = */
+/* OBSOLETE {-32000, -32000, 32000, 32000}; */
+/* OBSOLETE Rect sizerect; */
+/* OBSOLETE */
+/* OBSOLETE int sbarwid = 15; */
+/* OBSOLETE */
+/* OBSOLETE /* Globals for the console window. */ */
+/* OBSOLETE */
+/* OBSOLETE WindowPtr console_window; */
+/* OBSOLETE */
+/* OBSOLETE ControlHandle console_v_scrollbar; */
+/* OBSOLETE */
+/* OBSOLETE Rect console_v_scroll_rect; */
+/* OBSOLETE */
+/* OBSOLETE TEHandle console_text; */
+/* OBSOLETE */
+/* OBSOLETE Rect console_text_rect; */
+/* OBSOLETE */
+/* OBSOLETE /* This will go away eventually. */ */
+/* OBSOLETE gdb_has_a_terminal (void) */
+/* OBSOLETE { */
+/* OBSOLETE return 1; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE mac_init (void) */
+/* OBSOLETE { */
+/* OBSOLETE SysEnvRec se; */
+/* OBSOLETE int eventloopdone = 0; */
+/* OBSOLETE char *str; */
+/* OBSOLETE Boolean gotevent; */
+/* OBSOLETE Point mouse; */
+/* OBSOLETE EventRecord event; */
+/* OBSOLETE WindowPtr win; */
+/* OBSOLETE RgnHandle cursorRgn; */
+/* OBSOLETE int i; */
+/* OBSOLETE Handle menubar; */
+/* OBSOLETE MenuHandle menu; */
+/* OBSOLETE Handle siow_resource; */
+/* OBSOLETE */
+/* OBSOLETE mac_app = 0; */
+/* OBSOLETE */
+/* OBSOLETE str = getenv ("DEBUG_GDB"); */
+/* OBSOLETE if (str != NULL && str[0] != '\0') */
+/* OBSOLETE { */
+/* OBSOLETE if (strcmp (str, "openp") == 0) */
+/* OBSOLETE debug_openp = 1; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Don't do anything if we`re running under MPW. */ */
+/* OBSOLETE if (!StandAlone) */
+/* OBSOLETE return; */
+/* OBSOLETE */
+/* OBSOLETE /* Don't do anything if we're using SIOW. */ */
+/* OBSOLETE /* This test requires that the siow 0 resource, as defined in */
+/* OBSOLETE {RIncludes}siow.r, not be messed with. If it is, then the */
+/* OBSOLETE standard Mac setup below will step on SIOW's Mac setup and */
+/* OBSOLETE most likely crash the machine. */ */
+/* OBSOLETE siow_resource = GetResource ('siow', 0); */
+/* OBSOLETE if (siow_resource != nil) */
+/* OBSOLETE return; */
+/* OBSOLETE */
+/* OBSOLETE mac_app = 1; */
+/* OBSOLETE */
+/* OBSOLETE /* Do the standard Mac environment setup. */ */
+/* OBSOLETE InitGraf (&QD (thePort)); */
+/* OBSOLETE InitFonts (); */
+/* OBSOLETE FlushEvents (everyEvent, 0); */
+/* OBSOLETE InitWindows (); */
+/* OBSOLETE InitMenus (); */
+/* OBSOLETE TEInit (); */
+/* OBSOLETE InitDialogs (NULL); */
+/* OBSOLETE InitCursor (); */
+/* OBSOLETE */
+/* OBSOLETE /* Color Quickdraw is different from Classic QD. */ */
+/* OBSOLETE SysEnvirons (2, &se); */
+/* OBSOLETE has_color_qd = se.hasColorQD; */
+/* OBSOLETE /* Use it if we got it. */ */
+/* OBSOLETE use_color_qd = has_color_qd; */
+/* OBSOLETE */
+/* OBSOLETE sizerect.top = 50; */
+/* OBSOLETE sizerect.left = 50; */
+/* OBSOLETE sizerect.bottom = 1000; */
+/* OBSOLETE sizerect.right = 1000; */
+/* OBSOLETE #if 0 */
+/* OBSOLETE sizerect.bottom = screenBits.bounds.bottom - screenBits.bounds.top; */
+/* OBSOLETE sizerect.right = screenBits.bounds.right - screenBits.bounds.left; */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE /* Set up the menus. */ */
+/* OBSOLETE menubar = GetNewMBar (mbMain); */
+/* OBSOLETE SetMenuBar (menubar); */
+/* OBSOLETE /* Add the DAs etc as usual. */ */
+/* OBSOLETE menu = GetMHandle (mApple); */
+/* OBSOLETE if (menu != nil) */
+/* OBSOLETE { */
+/* OBSOLETE AddResMenu (menu, 'DRVR'); */
+/* OBSOLETE } */
+/* OBSOLETE DrawMenuBar (); */
+/* OBSOLETE */
+/* OBSOLETE new_console_window (); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE new_console_window (void) */
+/* OBSOLETE { */
+/* OBSOLETE /* Create the main window we're going to play in. */ */
+/* OBSOLETE if (has_color_qd) */
+/* OBSOLETE console_window = GetNewCWindow (wConsole, NULL, (WindowPtr) - 1L); */
+/* OBSOLETE else */
+/* OBSOLETE console_window = GetNewWindow (wConsole, NULL, (WindowPtr) - 1L); */
+/* OBSOLETE */
+/* OBSOLETE SetPort (console_window); */
+/* OBSOLETE console_text_rect = console_window->portRect; */
+/* OBSOLETE /* Leave 8 pixels of blank space, for aesthetic reasons and to */
+/* OBSOLETE make it easier to select from the beginning of a line. */ */
+/* OBSOLETE console_text_rect.left += 8; */
+/* OBSOLETE console_text_rect.bottom -= sbarwid - 1; */
+/* OBSOLETE console_text_rect.right -= sbarwid - 1; */
+/* OBSOLETE console_text = TENew (&console_text_rect, &console_text_rect); */
+/* OBSOLETE TESetSelect (0, 40000, console_text); */
+/* OBSOLETE TEDelete (console_text); */
+/* OBSOLETE TEAutoView (1, console_text); */
+/* OBSOLETE */
+/* OBSOLETE console_v_scroll_rect = console_window->portRect; */
+/* OBSOLETE console_v_scroll_rect.bottom -= sbarwid - 1; */
+/* OBSOLETE console_v_scroll_rect.left = console_v_scroll_rect.right - sbarwid; */
+/* OBSOLETE console_v_scrollbar = */
+/* OBSOLETE NewControl (console_window, &console_v_scroll_rect, */
+/* OBSOLETE "\p", 1, 0, 0, 0, scrollBarProc, 0L); */
+/* OBSOLETE */
+/* OBSOLETE ShowWindow (console_window); */
+/* OBSOLETE SelectWindow (console_window); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE mac_command_loop (void) */
+/* OBSOLETE { */
+/* OBSOLETE SysEnvRec se; */
+/* OBSOLETE int eventloopdone = 0; */
+/* OBSOLETE Boolean gotevent; */
+/* OBSOLETE Point mouse; */
+/* OBSOLETE EventRecord event; */
+/* OBSOLETE WindowPtr win; */
+/* OBSOLETE RgnHandle cursorRgn; */
+/* OBSOLETE int i, tm; */
+/* OBSOLETE Handle menubar; */
+/* OBSOLETE MenuHandle menu; */
+/* OBSOLETE */
+/* OBSOLETE /* Figure out if the WaitNextEvent Trap is available. */ */
+/* OBSOLETE use_wne = */
+/* OBSOLETE (NGetTrapAddress (0x60, ToolTrap) != NGetTrapAddress (0x9f, ToolTrap)); */
+/* OBSOLETE /* Pass WaitNextEvent an empty region the first time through. */ */
+/* OBSOLETE cursorRgn = NewRgn (); */
+/* OBSOLETE /* Go into the main event-handling loop. */ */
+/* OBSOLETE while (!eventloopdone) */
+/* OBSOLETE { */
+/* OBSOLETE /* Use WaitNextEvent if it is available, otherwise GetNextEvent. */ */
+/* OBSOLETE if (use_wne) */
+/* OBSOLETE { */
+/* OBSOLETE get_global_mouse (&mouse); */
+/* OBSOLETE adjust_cursor (mouse, cursorRgn); */
+/* OBSOLETE tm = GetCaretTime (); */
+/* OBSOLETE gotevent = WaitNextEvent (everyEvent, &event, tm, cursorRgn); */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE SystemTask (); */
+/* OBSOLETE gotevent = GetNextEvent (everyEvent, &event); */
+/* OBSOLETE } */
+/* OBSOLETE /* First decide if the event is for a dialog or is just any old event. */ */
+/* OBSOLETE if (FrontWindow () != nil && IsDialogEvent (&event)) */
+/* OBSOLETE { */
+/* OBSOLETE short itemhit; */
+/* OBSOLETE DialogPtr dialog; */
+/* OBSOLETE */
+/* OBSOLETE /* Handle all the modeless dialogs here. */ */
+/* OBSOLETE if (DialogSelect (&event, &dialog, &itemhit)) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE else if (gotevent) */
+/* OBSOLETE { */
+/* OBSOLETE /* Make sure we have the right cursor before handling the event. */ */
+/* OBSOLETE adjust_cursor (event.where, cursorRgn); */
+/* OBSOLETE do_event (&event); */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE do_idle (); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Collect the global coordinates of the mouse pointer. */ */
+/* OBSOLETE */
+/* OBSOLETE get_global_mouse (Point *mouse) */
+/* OBSOLETE { */
+/* OBSOLETE EventRecord evt; */
+/* OBSOLETE */
+/* OBSOLETE OSEventAvail (0, &evt); */
+/* OBSOLETE *mouse = evt.where; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Change the cursor's appearance to be appropriate for the given mouse */
+/* OBSOLETE location. */ */
+/* OBSOLETE */
+/* OBSOLETE adjust_cursor (Point mouse, RgnHandle region) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Decipher an event, maybe do something with it. */ */
+/* OBSOLETE */
+/* OBSOLETE do_event (EventRecord *evt) */
+/* OBSOLETE { */
+/* OBSOLETE short part, err, rslt = 0; */
+/* OBSOLETE WindowPtr win; */
+/* OBSOLETE Boolean hit; */
+/* OBSOLETE char key; */
+/* OBSOLETE Point pnt; */
+/* OBSOLETE */
+/* OBSOLETE switch (evt->what) */
+/* OBSOLETE { */
+/* OBSOLETE case mouseDown: */
+/* OBSOLETE /* See if the click happened in a special part of the screen. */ */
+/* OBSOLETE part = FindWindow (evt->where, &win); */
+/* OBSOLETE switch (part) */
+/* OBSOLETE { */
+/* OBSOLETE case inMenuBar: */
+/* OBSOLETE adjust_menus (); */
+/* OBSOLETE do_menu_command (MenuSelect (evt->where)); */
+/* OBSOLETE break; */
+/* OBSOLETE case inSysWindow: */
+/* OBSOLETE SystemClick (evt, win); */
+/* OBSOLETE break; */
+/* OBSOLETE case inContent: */
+/* OBSOLETE if (win != FrontWindow ()) */
+/* OBSOLETE { */
+/* OBSOLETE /* Bring the clicked-on window to the front. */ */
+/* OBSOLETE SelectWindow (win); */
+/* OBSOLETE /* Fix the menu to match the new front window. */ */
+/* OBSOLETE adjust_menus (); */
+/* OBSOLETE /* We always want to discard the event now, since clicks in a */
+/* OBSOLETE windows are often irreversible actions. */ */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE /* Mouse clicks in the front window do something useful. */ */
+/* OBSOLETE do_mouse_down (win, evt); */
+/* OBSOLETE break; */
+/* OBSOLETE case inDrag: */
+/* OBSOLETE /* Standard drag behavior, no tricks necessary. */ */
+/* OBSOLETE DragWindow (win, evt->where, &dragrect); */
+/* OBSOLETE break; */
+/* OBSOLETE case inGrow: */
+/* OBSOLETE grow_window (win, evt->where); */
+/* OBSOLETE break; */
+/* OBSOLETE case inZoomIn: */
+/* OBSOLETE case inZoomOut: */
+/* OBSOLETE zoom_window (win, evt->where, part); */
+/* OBSOLETE break; */
+/* OBSOLETE case inGoAway: */
+/* OBSOLETE close_window (win); */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case keyDown: */
+/* OBSOLETE case autoKey: */
+/* OBSOLETE key = evt->message & charCodeMask; */
+/* OBSOLETE /* Check for menukey equivalents. */ */
+/* OBSOLETE if (evt->modifiers & cmdKey) */
+/* OBSOLETE { */
+/* OBSOLETE if (evt->what == keyDown) */
+/* OBSOLETE { */
+/* OBSOLETE adjust_menus (); */
+/* OBSOLETE do_menu_command (MenuKey (key)); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE if (evt->what == keyDown) */
+/* OBSOLETE { */
+/* OBSOLETE /* Random keypress, interpret it. */ */
+/* OBSOLETE do_keyboard_command (key); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case activateEvt: */
+/* OBSOLETE activate_window ((WindowPtr) evt->message, evt->modifiers & activeFlag); */
+/* OBSOLETE break; */
+/* OBSOLETE case updateEvt: */
+/* OBSOLETE update_window ((WindowPtr) evt->message); */
+/* OBSOLETE break; */
+/* OBSOLETE case diskEvt: */
+/* OBSOLETE /* Call DIBadMount in response to a diskEvt, so that the user can format */
+/* OBSOLETE a floppy. (from DTS Sample) */ */
+/* OBSOLETE if (HiWord (evt->message) != noErr) */
+/* OBSOLETE { */
+/* OBSOLETE SetPt (&pnt, 50, 50); */
+/* OBSOLETE err = DIBadMount (pnt, evt->message); */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case app4Evt: */
+/* OBSOLETE /* Grab only a single byte. */ */
+/* OBSOLETE switch ((evt->message >> 24) & 0xFF) */
+/* OBSOLETE { */
+/* OBSOLETE case 0xfa: */
+/* OBSOLETE break; */
+/* OBSOLETE case 1: */
+/* OBSOLETE inbackground = !(evt->message & 1); */
+/* OBSOLETE activate_window (FrontWindow (), !inbackground); */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case kHighLevelEvent: */
+/* OBSOLETE AEProcessAppleEvent (evt); */
+/* OBSOLETE break; */
+/* OBSOLETE case nullEvent: */
+/* OBSOLETE do_idle (); */
+/* OBSOLETE rslt = 1; */
+/* OBSOLETE break; */
+/* OBSOLETE default: */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE return rslt; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Do any idle-time activities. */ */
+/* OBSOLETE */
+/* OBSOLETE do_idle (void) */
+/* OBSOLETE { */
+/* OBSOLETE TEIdle (console_text); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE grow_window (WindowPtr win, Point where) */
+/* OBSOLETE { */
+/* OBSOLETE long winsize; */
+/* OBSOLETE int h, v; */
+/* OBSOLETE GrafPtr oldport; */
+/* OBSOLETE */
+/* OBSOLETE winsize = GrowWindow (win, where, &sizerect); */
+/* OBSOLETE /* Only do anything if it actually changed size. */ */
+/* OBSOLETE if (winsize != 0) */
+/* OBSOLETE { */
+/* OBSOLETE GetPort (&oldport); */
+/* OBSOLETE SetPort (win); */
+/* OBSOLETE if (win == console_window) */
+/* OBSOLETE { */
+/* OBSOLETE EraseRect (&win->portRect); */
+/* OBSOLETE h = LoWord (winsize); */
+/* OBSOLETE v = HiWord (winsize); */
+/* OBSOLETE SizeWindow (win, h, v, 1); */
+/* OBSOLETE resize_console_window (); */
+/* OBSOLETE } */
+/* OBSOLETE SetPort (oldport); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE zoom_window (WindowPtr win, Point where, short part) */
+/* OBSOLETE { */
+/* OBSOLETE ZoomWindow (win, part, (win == FrontWindow ())); */
+/* OBSOLETE if (win == console_window) */
+/* OBSOLETE { */
+/* OBSOLETE resize_console_window (); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE resize_console_window (void) */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE InvalRect (&console_window->portRect); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE close_window (WindowPtr win) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE pascal void */
+/* OBSOLETE v_scroll_proc (ControlHandle control, short part) */
+/* OBSOLETE { */
+/* OBSOLETE int oldval, amount = 0, newval; */
+/* OBSOLETE int pagesize = ((*console_text)->viewRect.bottom - (*console_text)->viewRect.top) / (*console_text)->lineHeight; */
+/* OBSOLETE if (part) */
+/* OBSOLETE { */
+/* OBSOLETE oldval = GetCtlValue (control); */
+/* OBSOLETE switch (part) */
+/* OBSOLETE { */
+/* OBSOLETE case inUpButton: */
+/* OBSOLETE amount = 1; */
+/* OBSOLETE break; */
+/* OBSOLETE case inDownButton: */
+/* OBSOLETE amount = -1; */
+/* OBSOLETE break; */
+/* OBSOLETE case inPageUp: */
+/* OBSOLETE amount = pagesize; */
+/* OBSOLETE break; */
+/* OBSOLETE case inPageDown: */
+/* OBSOLETE amount = -pagesize; */
+/* OBSOLETE break; */
+/* OBSOLETE default: */
+/* OBSOLETE /* (should freak out) */ */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE SetCtlValue (control, oldval - amount); */
+/* OBSOLETE newval = GetCtlValue (control); */
+/* OBSOLETE amount = oldval - newval; */
+/* OBSOLETE if (amount) */
+/* OBSOLETE TEScroll (0, amount * (*console_text)->lineHeight, console_text); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE do_mouse_down (WindowPtr win, EventRecord * event) */
+/* OBSOLETE { */
+/* OBSOLETE short part, value; */
+/* OBSOLETE Point mouse; */
+/* OBSOLETE ControlHandle control; */
+/* OBSOLETE */
+/* OBSOLETE if (1 /*is_app_window(win) */ ) */
+/* OBSOLETE { */
+/* OBSOLETE SetPort (win); */
+/* OBSOLETE mouse = event->where; */
+/* OBSOLETE GlobalToLocal (&mouse); */
+/* OBSOLETE part = FindControl (mouse, win, &control); */
+/* OBSOLETE if (control == console_v_scrollbar) */
+/* OBSOLETE { */
+/* OBSOLETE switch (part) */
+/* OBSOLETE { */
+/* OBSOLETE case inThumb: */
+/* OBSOLETE value = GetCtlValue (control); */
+/* OBSOLETE part = TrackControl (control, mouse, nil); */
+/* OBSOLETE if (part) */
+/* OBSOLETE { */
+/* OBSOLETE value -= GetCtlValue (control); */
+/* OBSOLETE if (value) */
+/* OBSOLETE TEScroll (0, value * (*console_text)->lineHeight, */
+/* OBSOLETE console_text); */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE default: */
+/* OBSOLETE #if 0 /* don't deal with right now */ */
+/* OBSOLETE #if 1 /* universal headers */ */
+/* OBSOLETE value = TrackControl (control, mouse, (ControlActionUPP) v_scroll_proc); */
+/* OBSOLETE #else */
+/* OBSOLETE value = TrackControl (control, mouse, (ProcPtr) v_scroll_proc); */
+/* OBSOLETE #endif */
+/* OBSOLETE #endif */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE TEClick (mouse, 0, console_text); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE scroll_text (int hlines, int vlines) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE activate_window (WindowPtr win, int activate) */
+/* OBSOLETE { */
+/* OBSOLETE Rect grow_rect; */
+/* OBSOLETE */
+/* OBSOLETE if (win == nil) */
+/* OBSOLETE return; */
+/* OBSOLETE /* It's convenient to make the activated window also be the */
+/* OBSOLETE current GrafPort. */ */
+/* OBSOLETE if (activate) */
+/* OBSOLETE SetPort (win); */
+/* OBSOLETE /* Activate the console window's scrollbar. */ */
+/* OBSOLETE if (win == console_window) */
+/* OBSOLETE { */
+/* OBSOLETE if (activate) */
+/* OBSOLETE { */
+/* OBSOLETE TEActivate (console_text); */
+/* OBSOLETE /* Cause the grow icon to be redrawn at the next update. */ */
+/* OBSOLETE grow_rect = console_window->portRect; */
+/* OBSOLETE grow_rect.top = grow_rect.bottom - sbarwid; */
+/* OBSOLETE grow_rect.left = grow_rect.right - sbarwid; */
+/* OBSOLETE InvalRect (&grow_rect); */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE TEDeactivate (console_text); */
+/* OBSOLETE DrawGrowIcon (console_window); */
+/* OBSOLETE } */
+/* OBSOLETE HiliteControl (console_v_scrollbar, (activate ? 0 : 255)); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE update_window (WindowPtr win) */
+/* OBSOLETE { */
+/* OBSOLETE int controls = 1, growbox = 0; */
+/* OBSOLETE GrafPtr oldport; */
+/* OBSOLETE */
+/* OBSOLETE /* Set the updating window to be the current grafport. */ */
+/* OBSOLETE GetPort (&oldport); */
+/* OBSOLETE SetPort (win); */
+/* OBSOLETE /* recalc_depths(); */ */
+/* OBSOLETE BeginUpdate (win); */
+/* OBSOLETE if (win == console_window) */
+/* OBSOLETE { */
+/* OBSOLETE draw_console (); */
+/* OBSOLETE controls = 1; */
+/* OBSOLETE growbox = 1; */
+/* OBSOLETE } */
+/* OBSOLETE if (controls) */
+/* OBSOLETE UpdateControls (win, win->visRgn); */
+/* OBSOLETE if (growbox) */
+/* OBSOLETE DrawGrowIcon (win); */
+/* OBSOLETE EndUpdate (win); */
+/* OBSOLETE SetPort (oldport); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE adjust_menus (void) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE do_menu_command (long which) */
+/* OBSOLETE { */
+/* OBSOLETE short menuid, menuitem; */
+/* OBSOLETE short itemHit; */
+/* OBSOLETE Str255 daname; */
+/* OBSOLETE short daRefNum; */
+/* OBSOLETE Boolean handledbyda; */
+/* OBSOLETE WindowPtr win; */
+/* OBSOLETE short ditem; */
+/* OBSOLETE int i; */
+/* OBSOLETE char cmdbuf[300]; */
+/* OBSOLETE */
+/* OBSOLETE cmdbuf[0] = '\0'; */
+/* OBSOLETE menuid = HiWord (which); */
+/* OBSOLETE menuitem = LoWord (which); */
+/* OBSOLETE switch (menuid) */
+/* OBSOLETE { */
+/* OBSOLETE case mApple: */
+/* OBSOLETE switch (menuitem) */
+/* OBSOLETE { */
+/* OBSOLETE case miAbout: */
+/* OBSOLETE Alert (128, nil); */
+/* OBSOLETE break; */
+/* OBSOLETE #if 0 */
+/* OBSOLETE case miHelp: */
+/* OBSOLETE /* (should pop up help info) */ */
+/* OBSOLETE break; */
+/* OBSOLETE #endif */
+/* OBSOLETE default: */
+/* OBSOLETE GetItem (GetMHandle (mApple), menuitem, daname); */
+/* OBSOLETE daRefNum = OpenDeskAcc (daname); */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case mFile: */
+/* OBSOLETE switch (menuitem) */
+/* OBSOLETE { */
+/* OBSOLETE case miFileNew: */
+/* OBSOLETE if (console_window == FrontWindow ()) */
+/* OBSOLETE { */
+/* OBSOLETE close_window (console_window); */
+/* OBSOLETE } */
+/* OBSOLETE new_console_window (); */
+/* OBSOLETE break; */
+/* OBSOLETE case miFileOpen: */
+/* OBSOLETE SysBeep (20); */
+/* OBSOLETE break; */
+/* OBSOLETE case miFileQuit: */
+/* OBSOLETE ExitToShell (); */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE case mEdit: */
+/* OBSOLETE /* handledbyda = SystemEdit(menuitem-1); */ */
+/* OBSOLETE switch (menuitem) */
+/* OBSOLETE { */
+/* OBSOLETE case miEditCut: */
+/* OBSOLETE TECut (console_text); */
+/* OBSOLETE break; */
+/* OBSOLETE case miEditCopy: */
+/* OBSOLETE TECopy (console_text); */
+/* OBSOLETE break; */
+/* OBSOLETE case miEditPaste: */
+/* OBSOLETE TEPaste (console_text); */
+/* OBSOLETE break; */
+/* OBSOLETE case miEditClear: */
+/* OBSOLETE TEDelete (console_text); */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE /* All of these operations need the same postprocessing. */ */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE break; */
+/* OBSOLETE case mDebug: */
+/* OBSOLETE switch (menuitem) */
+/* OBSOLETE { */
+/* OBSOLETE case miDebugTarget: */
+/* OBSOLETE sprintf (cmdbuf, "target %s", "remote"); */
+/* OBSOLETE break; */
+/* OBSOLETE case miDebugRun: */
+/* OBSOLETE sprintf (cmdbuf, "run"); */
+/* OBSOLETE break; */
+/* OBSOLETE case miDebugContinue: */
+/* OBSOLETE sprintf (cmdbuf, "continue"); */
+/* OBSOLETE break; */
+/* OBSOLETE case miDebugStep: */
+/* OBSOLETE sprintf (cmdbuf, "step"); */
+/* OBSOLETE break; */
+/* OBSOLETE case miDebugNext: */
+/* OBSOLETE sprintf (cmdbuf, "next"); */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE break; */
+/* OBSOLETE } */
+/* OBSOLETE HiliteMenu (0); */
+/* OBSOLETE /* Execute a command if one had been given. Do here because a command */
+/* OBSOLETE may longjmp before we get a chance to unhilite the menu. */ */
+/* OBSOLETE if (strlen (cmdbuf) > 0) */
+/* OBSOLETE execute_command (cmdbuf, 0); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE char commandbuf[1000]; */
+/* OBSOLETE */
+/* OBSOLETE do_keyboard_command (int key) */
+/* OBSOLETE { */
+/* OBSOLETE int startpos, endpos, i, len; */
+/* OBSOLETE char *last_newline; */
+/* OBSOLETE char buf[10], *text_str, *command, *cmd_start; */
+/* OBSOLETE CharsHandle text; */
+/* OBSOLETE */
+/* OBSOLETE if (key == '\015' || key == '\003') */
+/* OBSOLETE { */
+/* OBSOLETE text = TEGetText (console_text); */
+/* OBSOLETE HLock ((Handle) text); */
+/* OBSOLETE text_str = *text; */
+/* OBSOLETE startpos = (*console_text)->selStart; */
+/* OBSOLETE endpos = (*console_text)->selEnd; */
+/* OBSOLETE if (startpos != endpos) */
+/* OBSOLETE { */
+/* OBSOLETE len = endpos - startpos; */
+/* OBSOLETE cmd_start = text_str + startpos; */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE for (i = startpos - 1; i >= 0; --i) */
+/* OBSOLETE if (text_str[i] == '\015') */
+/* OBSOLETE break; */
+/* OBSOLETE last_newline = text_str + i; */
+/* OBSOLETE len = (text_str + startpos) - 1 - last_newline; */
+/* OBSOLETE cmd_start = last_newline + 1; */
+/* OBSOLETE } */
+/* OBSOLETE if (len > 1000) */
+/* OBSOLETE len = 999; */
+/* OBSOLETE if (len < 0) */
+/* OBSOLETE len = 0; */
+/* OBSOLETE strncpy (commandbuf + 1, cmd_start, len); */
+/* OBSOLETE commandbuf[1 + len] = 0; */
+/* OBSOLETE command = commandbuf + 1; */
+/* OBSOLETE HUnlock ((Handle) text); */
+/* OBSOLETE commandbuf[0] = strlen (command); */
+/* OBSOLETE */
+/* OBSOLETE /* Insert a newline and recalculate before doing any command. */ */
+/* OBSOLETE key = '\015'; */
+/* OBSOLETE TEKey (key, console_text); */
+/* OBSOLETE TEInsert (buf, 1, console_text); */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE */
+/* OBSOLETE if (strlen (command) > 0) */
+/* OBSOLETE { */
+/* OBSOLETE execute_command (command, 0); */
+/* OBSOLETE bpstat_do_actions (&stop_bpstat); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE /* A self-inserting character. This includes delete. */ */
+/* OBSOLETE TEKey (key, console_text); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Draw all graphical stuff in the console window. */ */
+/* OBSOLETE */
+/* OBSOLETE draw_console (void) */
+/* OBSOLETE { */
+/* OBSOLETE SetPort (console_window); */
+/* OBSOLETE TEUpdate (&(console_window->portRect), console_text); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Cause an update of a given window's entire contents. */ */
+/* OBSOLETE */
+/* OBSOLETE force_update (WindowPtr win) */
+/* OBSOLETE { */
+/* OBSOLETE GrafPtr oldport; */
+/* OBSOLETE */
+/* OBSOLETE if (win == nil) */
+/* OBSOLETE return; */
+/* OBSOLETE GetPort (&oldport); */
+/* OBSOLETE SetPort (win); */
+/* OBSOLETE EraseRect (&win->portRect); */
+/* OBSOLETE InvalRect (&win->portRect); */
+/* OBSOLETE SetPort (oldport); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE adjust_console_sizes (void) */
+/* OBSOLETE { */
+/* OBSOLETE Rect tmprect; */
+/* OBSOLETE */
+/* OBSOLETE tmprect = console_window->portRect; */
+/* OBSOLETE /* Move and size the scrollbar. */ */
+/* OBSOLETE MoveControl (console_v_scrollbar, tmprect.right - sbarwid, 0); */
+/* OBSOLETE SizeControl (console_v_scrollbar, sbarwid + 1, tmprect.bottom - sbarwid + 1); */
+/* OBSOLETE /* Move and size the text. */ */
+/* OBSOLETE tmprect.left += 7; */
+/* OBSOLETE tmprect.right -= sbarwid; */
+/* OBSOLETE tmprect.bottom -= sbarwid; */
+/* OBSOLETE InsetRect (&tmprect, 1, 1); */
+/* OBSOLETE (*console_text)->destRect = tmprect; */
+/* OBSOLETE /* Fiddle bottom of viewrect to be even multiple of text lines. */ */
+/* OBSOLETE tmprect.bottom = tmprect.top */
+/* OBSOLETE + ((tmprect.bottom - tmprect.top) / (*console_text)->lineHeight) */
+/* OBSOLETE * (*console_text)->lineHeight; */
+/* OBSOLETE (*console_text)->viewRect = tmprect; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE adjust_console_scrollbars (void) */
+/* OBSOLETE { */
+/* OBSOLETE int lines, newmax, value; */
+/* OBSOLETE */
+/* OBSOLETE (*console_v_scrollbar)->contrlVis = 0; */
+/* OBSOLETE lines = (*console_text)->nLines; */
+/* OBSOLETE newmax = lines - (((*console_text)->viewRect.bottom */
+/* OBSOLETE - (*console_text)->viewRect.top) */
+/* OBSOLETE / (*console_text)->lineHeight); */
+/* OBSOLETE if (newmax < 0) */
+/* OBSOLETE newmax = 0; */
+/* OBSOLETE SetCtlMax (console_v_scrollbar, newmax); */
+/* OBSOLETE value = ((*console_text)->viewRect.top - (*console_text)->destRect.top) */
+/* OBSOLETE / (*console_text)->lineHeight; */
+/* OBSOLETE SetCtlValue (console_v_scrollbar, value); */
+/* OBSOLETE (*console_v_scrollbar)->contrlVis = 0xff; */
+/* OBSOLETE ShowControl (console_v_scrollbar); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Scroll the TE record so that it is consistent with the scrollbar(s). */ */
+/* OBSOLETE */
+/* OBSOLETE adjust_console_text (void) */
+/* OBSOLETE { */
+/* OBSOLETE TEScroll (((*console_text)->viewRect.left */
+/* OBSOLETE - (*console_text)->destRect.left) */
+/* OBSOLETE - 0 /* get h scroll value */ , */
+/* OBSOLETE ((((*console_text)->viewRect.top - (*console_text)->destRect.top) */
+/* OBSOLETE / (*console_text)->lineHeight) */
+/* OBSOLETE - GetCtlValue (console_v_scrollbar)) */
+/* OBSOLETE * (*console_text)->lineHeight, */
+/* OBSOLETE console_text); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Readline substitute. */ */
+/* OBSOLETE */
+/* OBSOLETE char * */
+/* OBSOLETE readline (char *prrompt) */
+/* OBSOLETE { */
+/* OBSOLETE return gdb_readline (prrompt); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE char *rl_completer_word_break_characters; */
+/* OBSOLETE */
+/* OBSOLETE char *rl_completer_quote_characters; */
+/* OBSOLETE */
+/* OBSOLETE int (*rl_completion_entry_function) (); */
+/* OBSOLETE */
+/* OBSOLETE int rl_point; */
+/* OBSOLETE */
+/* OBSOLETE char *rl_line_buffer; */
+/* OBSOLETE */
+/* OBSOLETE char *rl_readline_name; */
+/* OBSOLETE */
+/* OBSOLETE /* History substitute. */ */
+/* OBSOLETE */
+/* OBSOLETE void */
+/* OBSOLETE add_history (char *buf) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE void */
+/* OBSOLETE stifle_history (int n) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE unstifle_history (void) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE read_history (char *name) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE write_history (char *name) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE history_expand (char *x, char **y) */
+/* OBSOLETE { */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE extern HIST_ENTRY * */
+/* OBSOLETE history_get (int xxx) */
+/* OBSOLETE { */
+/* OBSOLETE return NULL; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE int history_base; */
+/* OBSOLETE */
+/* OBSOLETE char * */
+/* OBSOLETE filename_completion_function (char *text, char *name) */
+/* OBSOLETE { */
+/* OBSOLETE return "?"; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE char * */
+/* OBSOLETE tilde_expand (char *str) */
+/* OBSOLETE { */
+/* OBSOLETE return xstrdup (str); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Modified versions of standard I/O. */ */
+/* OBSOLETE */
+/* OBSOLETE #undef fprintf */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE hacked_fprintf (FILE * fp, const char *fmt,...) */
+/* OBSOLETE { */
+/* OBSOLETE int ret; */
+/* OBSOLETE va_list ap; */
+/* OBSOLETE */
+/* OBSOLETE va_start (ap, fmt); */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE char buf[1000]; */
+/* OBSOLETE */
+/* OBSOLETE ret = vsprintf (buf, fmt, ap); */
+/* OBSOLETE TEInsert (buf, strlen (buf), console_text); */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE ret = vfprintf (fp, fmt, ap); */
+/* OBSOLETE va_end (ap); */
+/* OBSOLETE return ret; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef printf */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE hacked_printf (const char *fmt,...) */
+/* OBSOLETE { */
+/* OBSOLETE int ret; */
+/* OBSOLETE va_list ap; */
+/* OBSOLETE */
+/* OBSOLETE va_start (ap, fmt); */
+/* OBSOLETE ret = hacked_vfprintf (stdout, fmt, ap); */
+/* OBSOLETE va_end (ap); */
+/* OBSOLETE return ret; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef vfprintf */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE hacked_vfprintf (FILE * fp, const char *format, va_list args) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE char buf[1000]; */
+/* OBSOLETE int ret; */
+/* OBSOLETE */
+/* OBSOLETE ret = vsprintf (buf, format, args); */
+/* OBSOLETE TEInsert (buf, strlen (buf), console_text); */
+/* OBSOLETE if (strchr (buf, '\n')) */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE } */
+/* OBSOLETE return ret; */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE return vfprintf (fp, format, args); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef fputs */
+/* OBSOLETE */
+/* OBSOLETE hacked_fputs (const char *s, FILE * fp) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE TEInsert (s, strlen (s), console_text); */
+/* OBSOLETE if (strchr (s, '\n')) */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE } */
+/* OBSOLETE return 0; */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE return fputs (s, fp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef fputc */
+/* OBSOLETE */
+/* OBSOLETE hacked_fputc (const char c, FILE * fp) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE char buf[1]; */
+/* OBSOLETE */
+/* OBSOLETE buf[0] = c; */
+/* OBSOLETE TEInsert (buf, 1, console_text); */
+/* OBSOLETE if (c == '\n') */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE } */
+/* OBSOLETE return c; */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE return fputc (c, fp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef putc */
+/* OBSOLETE */
+/* OBSOLETE hacked_putc (const char c, FILE * fp) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE char buf[1]; */
+/* OBSOLETE */
+/* OBSOLETE buf[0] = c; */
+/* OBSOLETE TEInsert (buf, 1, console_text); */
+/* OBSOLETE if (c == '\n') */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE } */
+/* OBSOLETE return c; */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE return fputc (c, fp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef fflush */
+/* OBSOLETE */
+/* OBSOLETE hacked_fflush (FILE * fp) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdout || fp == stderr)) */
+/* OBSOLETE { */
+/* OBSOLETE adjust_console_sizes (); */
+/* OBSOLETE adjust_console_scrollbars (); */
+/* OBSOLETE adjust_console_text (); */
+/* OBSOLETE return 0; */
+/* OBSOLETE } */
+/* OBSOLETE return fflush (fp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #undef fgetc */
+/* OBSOLETE */
+/* OBSOLETE hacked_fgetc (FILE * fp) */
+/* OBSOLETE { */
+/* OBSOLETE if (mac_app && (fp == stdin)) */
+/* OBSOLETE { */
+/* OBSOLETE /* Catch any attempts to use this. */ */
+/* OBSOLETE DebugStr ("\pShould not be reading from stdin!"); */
+/* OBSOLETE return '\n'; */
+/* OBSOLETE } */
+/* OBSOLETE return fgetc (fp); */
+/* OBSOLETE } */
diff --git a/gdb/mpw-config.in b/gdb/mpw-config.in
index ed07878..150b7f9 100644
--- a/gdb/mpw-config.in
+++ b/gdb/mpw-config.in
@@ -1,81 +1,81 @@
-# Configuration fragment for GDB.
-
-If "{host_canonical}" =~ /m68k-apple-mpw/
- forward-include "{srcdir}"config:m68k:xm-mpw.h xm.h
- Set siow_lib '"{Libraries}"SIOW.o'
-
-Else If "{host_canonical}" =~ /powerpc-apple-mpw/
- forward-include "{srcdir}"config:powerpc:xm-mpw.h xm.h
- Set siow_lib '"{PPCLibraries}"PPCSIOW.o'
-
-End If
-
-Set xdepfiles '"{o}"mac-xdep.c.o'
-
-Set enable_cflags ""
-
-# Make a copy of this file and give it a different name, so it
-# won't be confused with GDB's serial.h.
-
-Duplicate -y "{CIncludes}"Serial.h MacSerial.h
-
-Echo "/* dummy */" >termio.h
-
-If "{target_canonical}" =~ /m68k-apple-macos/
- forward-include "{srcdir}"config:m68k:tm-mac.h tm.h
- forward-include "{srcdir}"config:m68k:tm-m68k.h 'm68k/tm-m68k.h'
- Set tdepfiles '"{o}"m68k-tdep.c.o'
-
-Else If "{target_canonical}" =~ /powerpc-apple-macos/
- forward-include "{srcdir}"config:powerpc:tm-macos.h tm.h
- forward-include "{srcdir}"config:rs6000:tm-rs6000.h 'rs6000/tm-rs6000.h'
- Set tdepfiles '"{o}"rs6000-tdep.c.o "{o}"xcoffread.c.o'
-
-Else If "{target_canonical}" =~ /i386-unknown-go32/
- forward-include "{srcdir}"config:i386:tm-i386v.h tm.h
- Set tdepfiles '"{o}"i386-tdep.c.o'
-
-Else If "{target_canonical}" =~ /mips-idt-ecoff/
- forward-include "{srcdir}"config:mips:tm-embed.h tm.h
- forward-include "{srcdir}"config:mips:tm-bigmips.h 'mips/tm-bigmips.h'
- forward-include "{srcdir}"config:mips:tm-mips.h 'mips/tm-mips.h'
- Set tdepfiles '"{o}"mips-tdep.c.o "{o}"remote-mips.c.o'
-
-Else If "{target_canonical}" =~ /sh-hitachi-hms/
- forward-include "{srcdir}"config:sh:tm-sh.h tm.h
- Set tdepfiles '"{o}"sh-tdep.c.o'
-
-End If
-
-If "{target_canonical}" =~ /m68k-apple-macos/
- forward-include "{srcdir}"config:m68k:nm-macos.h nm.h
- Set natdepfiles '"{o}"mac-nat.c.o'
-
-Else If "{target_canonical}" =~ /powerpc-apple-macos/
- forward-include "{srcdir}"config:powerpc:nm-macos.h nm.h
- Set natdepfiles '"{o}"mac-nat.c.o'
-
-Else
- forward-include "{srcdir}"config:nm-empty.h nm.h
- Set natdepfiles ' '
-
-End If
-
-Echo '# From mpw-config.in' > "{o}"mk.tmp
-Echo "TDEPFILES = " {tdepfiles} >> "{o}"mk.tmp
-Echo "XDEPFILES = " {xdepfiles} >> "{o}"mk.tmp
-Echo "NATDEPFILES = " {natdepfiles} >> "{o}"mk.tmp
-Echo "XM_ADD_FILES = " >> "{o}"mk.tmp
-Echo "TM_ADD_FILES = " >> "{o}"mk.tmp
-Echo "NAT_ADD_FILES = " >> "{o}"mk.tmp
-Echo "XM_CDEPS = " >> "{o}"mk.tmp
-Echo "TM_CDEPS = " >> "{o}"mk.tmp
-Echo "NAT_CDEPS = " >> "{o}"mk.tmp
-Echo "SIOW_LIB = " {siow_lib} >> "{o}"mk.tmp
-Echo "ENABLE_CFLAGS = " {enable_cflags} >> "{o}"mk.tmp
-Echo '# End from mpw-config.in' >> "{o}"mk.tmp
-
-Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
-Echo '#include "mpw.h"' >> "{o}"config.new
-
-MoveIfChange "{o}"config.new "{o}"config.h
+# OBSOLETE # Configuration fragment for GDB.
+# OBSOLETE
+# OBSOLETE If "{host_canonical}" =~ /m68k-apple-mpw/
+# OBSOLETE forward-include "{srcdir}"config:m68k:xm-mpw.h xm.h
+# OBSOLETE Set siow_lib '"{Libraries}"SIOW.o'
+# OBSOLETE
+# OBSOLETE Else If "{host_canonical}" =~ /powerpc-apple-mpw/
+# OBSOLETE forward-include "{srcdir}"config:powerpc:xm-mpw.h xm.h
+# OBSOLETE Set siow_lib '"{PPCLibraries}"PPCSIOW.o'
+# OBSOLETE
+# OBSOLETE End If
+# OBSOLETE
+# OBSOLETE Set xdepfiles '"{o}"mac-xdep.c.o'
+# OBSOLETE
+# OBSOLETE Set enable_cflags ""
+# OBSOLETE
+# OBSOLETE # Make a copy of this file and give it a different name, so it
+# OBSOLETE # won't be confused with GDB's serial.h.
+# OBSOLETE
+# OBSOLETE Duplicate -y "{CIncludes}"Serial.h MacSerial.h
+# OBSOLETE
+# OBSOLETE Echo "/* dummy */" >termio.h
+# OBSOLETE
+# OBSOLETE If "{target_canonical}" =~ /m68k-apple-macos/
+# OBSOLETE forward-include "{srcdir}"config:m68k:tm-mac.h tm.h
+# OBSOLETE forward-include "{srcdir}"config:m68k:tm-m68k.h 'm68k/tm-m68k.h'
+# OBSOLETE Set tdepfiles '"{o}"m68k-tdep.c.o'
+# OBSOLETE
+# OBSOLETE Else If "{target_canonical}" =~ /powerpc-apple-macos/
+# OBSOLETE forward-include "{srcdir}"config:powerpc:tm-macos.h tm.h
+# OBSOLETE forward-include "{srcdir}"config:rs6000:tm-rs6000.h 'rs6000/tm-rs6000.h'
+# OBSOLETE Set tdepfiles '"{o}"rs6000-tdep.c.o "{o}"xcoffread.c.o'
+# OBSOLETE
+# OBSOLETE Else If "{target_canonical}" =~ /i386-unknown-go32/
+# OBSOLETE forward-include "{srcdir}"config:i386:tm-i386v.h tm.h
+# OBSOLETE Set tdepfiles '"{o}"i386-tdep.c.o'
+# OBSOLETE
+# OBSOLETE Else If "{target_canonical}" =~ /mips-idt-ecoff/
+# OBSOLETE forward-include "{srcdir}"config:mips:tm-embed.h tm.h
+# OBSOLETE forward-include "{srcdir}"config:mips:tm-bigmips.h 'mips/tm-bigmips.h'
+# OBSOLETE forward-include "{srcdir}"config:mips:tm-mips.h 'mips/tm-mips.h'
+# OBSOLETE Set tdepfiles '"{o}"mips-tdep.c.o "{o}"remote-mips.c.o'
+# OBSOLETE
+# OBSOLETE Else If "{target_canonical}" =~ /sh-hitachi-hms/
+# OBSOLETE forward-include "{srcdir}"config:sh:tm-sh.h tm.h
+# OBSOLETE Set tdepfiles '"{o}"sh-tdep.c.o'
+# OBSOLETE
+# OBSOLETE End If
+# OBSOLETE
+# OBSOLETE If "{target_canonical}" =~ /m68k-apple-macos/
+# OBSOLETE forward-include "{srcdir}"config:m68k:nm-macos.h nm.h
+# OBSOLETE Set natdepfiles '"{o}"mac-nat.c.o'
+# OBSOLETE
+# OBSOLETE Else If "{target_canonical}" =~ /powerpc-apple-macos/
+# OBSOLETE forward-include "{srcdir}"config:powerpc:nm-macos.h nm.h
+# OBSOLETE Set natdepfiles '"{o}"mac-nat.c.o'
+# OBSOLETE
+# OBSOLETE Else
+# OBSOLETE forward-include "{srcdir}"config:nm-empty.h nm.h
+# OBSOLETE Set natdepfiles ' '
+# OBSOLETE
+# OBSOLETE End If
+# OBSOLETE
+# OBSOLETE Echo '# From mpw-config.in' > "{o}"mk.tmp
+# OBSOLETE Echo "TDEPFILES = " {tdepfiles} >> "{o}"mk.tmp
+# OBSOLETE Echo "XDEPFILES = " {xdepfiles} >> "{o}"mk.tmp
+# OBSOLETE Echo "NATDEPFILES = " {natdepfiles} >> "{o}"mk.tmp
+# OBSOLETE Echo "XM_ADD_FILES = " >> "{o}"mk.tmp
+# OBSOLETE Echo "TM_ADD_FILES = " >> "{o}"mk.tmp
+# OBSOLETE Echo "NAT_ADD_FILES = " >> "{o}"mk.tmp
+# OBSOLETE Echo "XM_CDEPS = " >> "{o}"mk.tmp
+# OBSOLETE Echo "TM_CDEPS = " >> "{o}"mk.tmp
+# OBSOLETE Echo "NAT_CDEPS = " >> "{o}"mk.tmp
+# OBSOLETE Echo "SIOW_LIB = " {siow_lib} >> "{o}"mk.tmp
+# OBSOLETE Echo "ENABLE_CFLAGS = " {enable_cflags} >> "{o}"mk.tmp
+# OBSOLETE Echo '# End from mpw-config.in' >> "{o}"mk.tmp
+# OBSOLETE
+# OBSOLETE Echo '/* config.h. Generated by mpw-configure. */' > "{o}"config.new
+# OBSOLETE Echo '#include "mpw.h"' >> "{o}"config.new
+# OBSOLETE
+# OBSOLETE MoveIfChange "{o}"config.new "{o}"config.h
diff --git a/gdb/mpw-make.sed b/gdb/mpw-make.sed
index ce6a9ec..a15442d 100644
--- a/gdb/mpw-make.sed
+++ b/gdb/mpw-make.sed
@@ -1,178 +1,178 @@
-# Sed commands that finish translating the GDB Unix Makefile to MPW syntax.
-
-/^host_alias =/s/^/#/
-/^target_alias =/s/^/#/
-
-/^host_makefile_frag@$/d
-/^target_makefile_frag@$/d
-
-/@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@/{ENABLE_CFLAGS}/g
-/^ENABLE_CFLAGS=/s/^/#/
-
-# Edit all the symbolic definitions pointing to various libraries and such.
-
-/^INCLUDE_DIR = /s/"{srcdir}":include/"{topsrcdir}"include:/
-
-/^MMALLOC_DIR = /s/::mmalloc/mmalloc:/
-/^MMALLOC_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-/^MMALLOC =/s/=.*$/=/
-/MMALLOC_CFLAGS =/s/=.*$/= -u USE_MMALLOC/
-
-/^BFD_DIR = /s/::bfd/bfd:/
-/^BFD = /s/{BFD_DIR}:libbfd/{BFD_DIR}libbfd/
-/^BFD_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-
-/^READLINE_DIR = /s/::readline/readline:/
-/^READLINE =/s/=.*$/=/
-/^READLINE_SRC = /s/"{srcdir}"/"{topsrcdir}"/
-
-/^INCLUDE_CFLAGS = /s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
-
-/^SER_HARDWIRE =/s/ser-unix/ser-mac/
-
-/^TERMCAP =/s/ =.*$/ =/
-
-# Whack out various autoconf vars that we don't need.
-/@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
-/@HLDFLAGS@/s/@HLDFLAGS@//g
-/@DEFS@/s/@DEFS@//g
-/@YACC@/s/@YACC@/byacc/g
-/@ENABLE_OBS@/s/@ENABLE_OBS@//g
-/@ENABLE_CLIBS@/s/@ENABLE_CLIBS@//g
-/@LIBS@/s/@LIBS@//g
-
-# Whack out autoconf hook for thread debugging.
-/@THREAD_DB_OBS@/s/@THREAD_DB_OBS@//g
-
-# Fix up paths to include directories.
-/INCLUDE_DIR/s/"{s}"{INCLUDE_DIR}/{INCLUDE_DIR}/g
-/INCLUDE_DIR/s/{INCLUDE_DIR}:/{INCLUDE_DIR}/g
-/INCLUDE_DIR/s/"{INCLUDE_DIR}":/"{INCLUDE_DIR}"/g
-
-/{BFD_DIR}/s/"{BFD_DIR}":/"{BFD_DIR}"/g
-/{BFD_DIR}/s/\([ ]\){BFD_DIR}/\1::{BFD_DIR}/g
-/{BFD_DIR}/s/\([ ]\)"{BFD_DIR}"/\1::"{BFD_DIR}"/g
-
-/{BFD_SRC}/s/"{s}"{BFD_SRC}/{BFD_SRC}/g
-/{BFD_SRC}/s/{BFD_SRC}:/{BFD_SRC}/g
-
-/{READLINE_SRC}/s/"{s}"{READLINE_SRC}/{READLINE_SRC}/g
-
-/^readline_headers =/,/^$/c\
-readline_headers =\
-
-
-# This isn't really useful, and seems to cause nonsensical complaints.
-/{ALLDEPFILES}/s/{ALLDEPFILES}//g
-
-/^copying.c \\Option-f /,/^$/d
-
-# Fix the syntax of bits of C code that go into version.c.
-/char /s/'char .Option-x/'char */
-
-# Point at files in the obj dir rather than src dir.
-/version/s/"{s}"version\.c/"{o}"version.c/g
-/version/s/^version\.c/"{o}"version.c/
-/config/s/"{s}"config\.h/"{o}"config.h/g
-/config/s/^config\.h/"{o}"config.h/
-/xm/s/"{s}"xm\.h/"{o}"xm.h/g
-/xm/s/^xm\.h/"{o}"xm.h/
-/tm/s/"{s}"tm\.h/"{o}"tm.h/g
-/tm/s/^tm\.h/"{o}"tm.h/
-/nm/s/"{s}"nm\.h/"{o}"nm.h/g
-/nm/s/^nm\.h/"{o}"nm.h/
-
-/exp.tab.c/s/"{s}"\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/g
-/exp.tab.c/s/^\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/
-
-/y.tab/s/"{s}"y.tab\.c/"{o}"y.tab.c/g
-/y.tab/s/^y.tab\.c/"{o}"y.tab.c/
-
-/init/s/"{s}"init\.c-tmp/"{o}"init.c-tmp/g
-/init/s/^init\.c-tmp/"{o}"init.c-tmp/
-/init/s/"{s}"init\.c/"{o}"init.c/g
-/init/s/^init\.c/"{o}"init.c/
-
-# Fix up the generation of version.c.
-/"{o}"version.c \\Option-f Makefile/,/^$/c\
-"{o}"version.c \\Option-f Makefile\
- echo -n 'char *version = "' >"{o}"version.c\
- echo -n "{VERSION}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
- echo -n 'char *host_name = "' >>"{o}"version.c\
- echo -n "{host_alias}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
- echo -n 'char *target_name = "' >>"{o}"version.c\
- echo -n "{target_alias}" >>"{o}"version.c\
- echo '";' >>"{o}"version.c\
-
-
-/ansidecl/s/include "{s}""ansidecl.h"/include "ansidecl.h"/
-
-# Open-brace in a command causes much confusion; replace with the
-# result from a script.
-/initialize_all_files ()/c\
- Echo -n 'void initialize_all_files () ' >> "{o}"init.c-tmp\
- open-brace >> "{o}"init.c-tmp
-
-# Replace the whole sed bit for init.c; it's simpler that way...
-/echo {OBS} {TSOBS}/,/echo '}'/c\
- For i in {OBS} {TSOBS}\
- Set filename "`Echo {i} | sed \\Option-d\
- -e '/^Onindy.c.o/d' \\Option-d\
- -e '/^nindy.c.o/d' \\Option-d\
- -e '/ttyflush.c.o/d' \\Option-d\
- -e '/xdr_ld.c.o/d' \\Option-d\
- -e '/xdr_ptrace.c.o/d' \\Option-d\
- -e '/xdr_rdb.c.o/d' \\Option-d\
- -e '/udr.c.o/d' \\Option-d\
- -e '/udip2soc.c.o/d' \\Option-d\
- -e '/udi2go32.c.o/d' \\Option-d\
- -e '/version.c.o/d' \\Option-d\
- -e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \\Option-d\
- -e 's/\\.c\\.o/.c/' \\Option-d\
- -e 's/^://'`"\
- If "{filename}" != ""\
- sed <"{s}""{filename}" >>"{o}"init.c-tmp -n \\Option-d\
- -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\\([a-z_0-9A-Z]*\\).*/ {extern void \\1 (); \\1 ();}/p'\
- End If\
- End For\
- Echo '}' >>"{o}"init.c-tmp
-
-# Fix the main compile/link command.
-/{CC_LD} {INTERNAL_LDFLAGS} -o gdb/,/"{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES}/c\
- {CC_LD} {INTERNAL_LDFLAGS} -o gdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES} {EXTRALIBS}\
- {MAKEPEF} gdb{PROG_EXT} -o gdb {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
- {REZ} "{s}"mac-gdb.r -o gdb -append -d PROG_NAME='"'gdb'"' -d VERSION_STRING='"'{version}'"'\
-
-# Replace the install actions with MPW-friendly script.
-/^install \\Option-f /,/^$/c\
-install \\Option-f all install-only\
-\
-install-only \\Option-f \
- NewFolderRecursive "{bindir}"\
- Duplicate -y gdb "{bindir}"gdb\
- If "`Exists SiowGDB`" != ""\
- Duplicate -y SiowGDB "{bindir}"SiowGDB\
- End If\
-
-
-# Don't do any recursive subdir stuff.
-/ subdir_do/s/{MAKE}/null-command/
-
-# Edit out actions that only confuse MPW Make.
-/^config.status \\Option-f/,/^$/d
-/^Makefile \\Option-f/,/^$/d
-
-# Don't test config.h dependencies.
-/^"{o}"config.h \\Option-f/s/^/#/
-
-# Add an action to build SIOWgdb.
-$a\
-SIOWgdb \\Option-f {OBS} {TSOBS} {ADD_DEPS} {CDEPS} "{o}"init.c.o\
- Delete -i -y SIOWgdb\
- {CC_LD} {INTERNAL_LDFLAGS} -t 'APPL' -c 'gdb ' -o SIOWgdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {SIOW_LIB} {LOADLIBES} {EXTRALIBS}\
- {MAKEPEF} SIOWgdb{PROG_EXT} -o SIOWgdb -ft 'APPL' -fc 'gdb ' {MAKEPEF_FLAGS} \
- {REZ} -o SIOWgdb "{RIncludes}"siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
- {REZ} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\
+# OBSOLETE # Sed commands that finish translating the GDB Unix Makefile to MPW syntax.
+# OBSOLETE
+# OBSOLETE /^host_alias =/s/^/#/
+# OBSOLETE /^target_alias =/s/^/#/
+# OBSOLETE
+# OBSOLETE /^host_makefile_frag@$/d
+# OBSOLETE /^target_makefile_frag@$/d
+# OBSOLETE
+# OBSOLETE /@ENABLE_CFLAGS@/s/@ENABLE_CFLAGS@/{ENABLE_CFLAGS}/g
+# OBSOLETE /^ENABLE_CFLAGS=/s/^/#/
+# OBSOLETE
+# OBSOLETE # Edit all the symbolic definitions pointing to various libraries and such.
+# OBSOLETE
+# OBSOLETE /^INCLUDE_DIR = /s/"{srcdir}":include/"{topsrcdir}"include:/
+# OBSOLETE
+# OBSOLETE /^MMALLOC_DIR = /s/::mmalloc/mmalloc:/
+# OBSOLETE /^MMALLOC_SRC = /s/"{srcdir}"/"{topsrcdir}"/
+# OBSOLETE /^MMALLOC =/s/=.*$/=/
+# OBSOLETE /MMALLOC_CFLAGS =/s/=.*$/= -u USE_MMALLOC/
+# OBSOLETE
+# OBSOLETE /^BFD_DIR = /s/::bfd/bfd:/
+# OBSOLETE /^BFD = /s/{BFD_DIR}:libbfd/{BFD_DIR}libbfd/
+# OBSOLETE /^BFD_SRC = /s/"{srcdir}"/"{topsrcdir}"/
+# OBSOLETE
+# OBSOLETE /^READLINE_DIR = /s/::readline/readline:/
+# OBSOLETE /^READLINE =/s/=.*$/=/
+# OBSOLETE /^READLINE_SRC = /s/"{srcdir}"/"{topsrcdir}"/
+# OBSOLETE
+# OBSOLETE /^INCLUDE_CFLAGS = /s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
+# OBSOLETE
+# OBSOLETE /^SER_HARDWIRE =/s/ser-unix/ser-mac/
+# OBSOLETE
+# OBSOLETE /^TERMCAP =/s/ =.*$/ =/
+# OBSOLETE
+# OBSOLETE # Whack out various autoconf vars that we don't need.
+# OBSOLETE /@CONFIG_LDFLAGS@/s/@CONFIG_LDFLAGS@//g
+# OBSOLETE /@HLDFLAGS@/s/@HLDFLAGS@//g
+# OBSOLETE /@DEFS@/s/@DEFS@//g
+# OBSOLETE /@YACC@/s/@YACC@/byacc/g
+# OBSOLETE /@ENABLE_OBS@/s/@ENABLE_OBS@//g
+# OBSOLETE /@ENABLE_CLIBS@/s/@ENABLE_CLIBS@//g
+# OBSOLETE /@LIBS@/s/@LIBS@//g
+# OBSOLETE
+# OBSOLETE # Whack out autoconf hook for thread debugging.
+# OBSOLETE /@THREAD_DB_OBS@/s/@THREAD_DB_OBS@//g
+# OBSOLETE
+# OBSOLETE # Fix up paths to include directories.
+# OBSOLETE /INCLUDE_DIR/s/"{s}"{INCLUDE_DIR}/{INCLUDE_DIR}/g
+# OBSOLETE /INCLUDE_DIR/s/{INCLUDE_DIR}:/{INCLUDE_DIR}/g
+# OBSOLETE /INCLUDE_DIR/s/"{INCLUDE_DIR}":/"{INCLUDE_DIR}"/g
+# OBSOLETE
+# OBSOLETE /{BFD_DIR}/s/"{BFD_DIR}":/"{BFD_DIR}"/g
+# OBSOLETE /{BFD_DIR}/s/\([ ]\){BFD_DIR}/\1::{BFD_DIR}/g
+# OBSOLETE /{BFD_DIR}/s/\([ ]\)"{BFD_DIR}"/\1::"{BFD_DIR}"/g
+# OBSOLETE
+# OBSOLETE /{BFD_SRC}/s/"{s}"{BFD_SRC}/{BFD_SRC}/g
+# OBSOLETE /{BFD_SRC}/s/{BFD_SRC}:/{BFD_SRC}/g
+# OBSOLETE
+# OBSOLETE /{READLINE_SRC}/s/"{s}"{READLINE_SRC}/{READLINE_SRC}/g
+# OBSOLETE
+# OBSOLETE /^readline_headers =/,/^$/c\
+# OBSOLETE readline_headers =\
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE # This isn't really useful, and seems to cause nonsensical complaints.
+# OBSOLETE /{ALLDEPFILES}/s/{ALLDEPFILES}//g
+# OBSOLETE
+# OBSOLETE /^copying.c \\Option-f /,/^$/d
+# OBSOLETE
+# OBSOLETE # Fix the syntax of bits of C code that go into version.c.
+# OBSOLETE /char /s/'char .Option-x/'char */
+# OBSOLETE
+# OBSOLETE # Point at files in the obj dir rather than src dir.
+# OBSOLETE /version/s/"{s}"version\.c/"{o}"version.c/g
+# OBSOLETE /version/s/^version\.c/"{o}"version.c/
+# OBSOLETE /config/s/"{s}"config\.h/"{o}"config.h/g
+# OBSOLETE /config/s/^config\.h/"{o}"config.h/
+# OBSOLETE /xm/s/"{s}"xm\.h/"{o}"xm.h/g
+# OBSOLETE /xm/s/^xm\.h/"{o}"xm.h/
+# OBSOLETE /tm/s/"{s}"tm\.h/"{o}"tm.h/g
+# OBSOLETE /tm/s/^tm\.h/"{o}"tm.h/
+# OBSOLETE /nm/s/"{s}"nm\.h/"{o}"nm.h/g
+# OBSOLETE /nm/s/^nm\.h/"{o}"nm.h/
+# OBSOLETE
+# OBSOLETE /exp.tab.c/s/"{s}"\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/g
+# OBSOLETE /exp.tab.c/s/^\([a-z0-9]*\)-exp\.tab\.c/"{o}"\1-exp.tab.c/
+# OBSOLETE
+# OBSOLETE /y.tab/s/"{s}"y.tab\.c/"{o}"y.tab.c/g
+# OBSOLETE /y.tab/s/^y.tab\.c/"{o}"y.tab.c/
+# OBSOLETE
+# OBSOLETE /init/s/"{s}"init\.c-tmp/"{o}"init.c-tmp/g
+# OBSOLETE /init/s/^init\.c-tmp/"{o}"init.c-tmp/
+# OBSOLETE /init/s/"{s}"init\.c/"{o}"init.c/g
+# OBSOLETE /init/s/^init\.c/"{o}"init.c/
+# OBSOLETE
+# OBSOLETE # Fix up the generation of version.c.
+# OBSOLETE /"{o}"version.c \\Option-f Makefile/,/^$/c\
+# OBSOLETE "{o}"version.c \\Option-f Makefile\
+# OBSOLETE echo -n 'char *version = "' >"{o}"version.c\
+# OBSOLETE echo -n "{VERSION}" >>"{o}"version.c\
+# OBSOLETE echo '";' >>"{o}"version.c\
+# OBSOLETE echo -n 'char *host_name = "' >>"{o}"version.c\
+# OBSOLETE echo -n "{host_alias}" >>"{o}"version.c\
+# OBSOLETE echo '";' >>"{o}"version.c\
+# OBSOLETE echo -n 'char *target_name = "' >>"{o}"version.c\
+# OBSOLETE echo -n "{target_alias}" >>"{o}"version.c\
+# OBSOLETE echo '";' >>"{o}"version.c\
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE /ansidecl/s/include "{s}""ansidecl.h"/include "ansidecl.h"/
+# OBSOLETE
+# OBSOLETE # Open-brace in a command causes much confusion; replace with the
+# OBSOLETE # result from a script.
+# OBSOLETE /initialize_all_files ()/c\
+# OBSOLETE Echo -n 'void initialize_all_files () ' >> "{o}"init.c-tmp\
+# OBSOLETE open-brace >> "{o}"init.c-tmp
+# OBSOLETE
+# OBSOLETE # Replace the whole sed bit for init.c; it's simpler that way...
+# OBSOLETE /echo {OBS} {TSOBS}/,/echo '}'/c\
+# OBSOLETE For i in {OBS} {TSOBS}\
+# OBSOLETE Set filename "`Echo {i} | sed \\Option-d\
+# OBSOLETE -e '/^Onindy.c.o/d' \\Option-d\
+# OBSOLETE -e '/^nindy.c.o/d' \\Option-d\
+# OBSOLETE -e '/ttyflush.c.o/d' \\Option-d\
+# OBSOLETE -e '/xdr_ld.c.o/d' \\Option-d\
+# OBSOLETE -e '/xdr_ptrace.c.o/d' \\Option-d\
+# OBSOLETE -e '/xdr_rdb.c.o/d' \\Option-d\
+# OBSOLETE -e '/udr.c.o/d' \\Option-d\
+# OBSOLETE -e '/udip2soc.c.o/d' \\Option-d\
+# OBSOLETE -e '/udi2go32.c.o/d' \\Option-d\
+# OBSOLETE -e '/version.c.o/d' \\Option-d\
+# OBSOLETE -e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \\Option-d\
+# OBSOLETE -e 's/\\.c\\.o/.c/' \\Option-d\
+# OBSOLETE -e 's/^://'`"\
+# OBSOLETE If "{filename}" != ""\
+# OBSOLETE sed <"{s}""{filename}" >>"{o}"init.c-tmp -n \\Option-d\
+# OBSOLETE -e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\\([a-z_0-9A-Z]*\\).*/ {extern void \\1 (); \\1 ();}/p'\
+# OBSOLETE End If\
+# OBSOLETE End For\
+# OBSOLETE Echo '}' >>"{o}"init.c-tmp
+# OBSOLETE
+# OBSOLETE # Fix the main compile/link command.
+# OBSOLETE /{CC_LD} {INTERNAL_LDFLAGS} -o gdb/,/"{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES}/c\
+# OBSOLETE {CC_LD} {INTERNAL_LDFLAGS} -o gdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {LOADLIBES} {EXTRALIBS}\
+# OBSOLETE {MAKEPEF} gdb{PROG_EXT} -o gdb {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
+# OBSOLETE {REZ} "{s}"mac-gdb.r -o gdb -append -d PROG_NAME='"'gdb'"' -d VERSION_STRING='"'{version}'"'\
+# OBSOLETE
+# OBSOLETE # Replace the install actions with MPW-friendly script.
+# OBSOLETE /^install \\Option-f /,/^$/c\
+# OBSOLETE install \\Option-f all install-only\
+# OBSOLETE \
+# OBSOLETE install-only \\Option-f \
+# OBSOLETE NewFolderRecursive "{bindir}"\
+# OBSOLETE Duplicate -y gdb "{bindir}"gdb\
+# OBSOLETE If "`Exists SiowGDB`" != ""\
+# OBSOLETE Duplicate -y SiowGDB "{bindir}"SiowGDB\
+# OBSOLETE End If\
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE # Don't do any recursive subdir stuff.
+# OBSOLETE / subdir_do/s/{MAKE}/null-command/
+# OBSOLETE
+# OBSOLETE # Edit out actions that only confuse MPW Make.
+# OBSOLETE /^config.status \\Option-f/,/^$/d
+# OBSOLETE /^Makefile \\Option-f/,/^$/d
+# OBSOLETE
+# OBSOLETE # Don't test config.h dependencies.
+# OBSOLETE /^"{o}"config.h \\Option-f/s/^/#/
+# OBSOLETE
+# OBSOLETE # Add an action to build SIOWgdb.
+# OBSOLETE $a\
+# OBSOLETE SIOWgdb \\Option-f {OBS} {TSOBS} {ADD_DEPS} {CDEPS} "{o}"init.c.o\
+# OBSOLETE Delete -i -y SIOWgdb\
+# OBSOLETE {CC_LD} {INTERNAL_LDFLAGS} -t 'APPL' -c 'gdb ' -o SIOWgdb{PROG_EXT} "{o}"init.c.o {OBS} {TSOBS} {ADD_FILES} {CLIBS} {SIOW_LIB} {LOADLIBES} {EXTRALIBS}\
+# OBSOLETE {MAKEPEF} SIOWgdb{PROG_EXT} -o SIOWgdb -ft 'APPL' -fc 'gdb ' {MAKEPEF_FLAGS} \
+# OBSOLETE {REZ} -o SIOWgdb "{RIncludes}"siow.r -append -d __kPrefSize=5000 -d __kMinSize=2000 -d APPNAME='"'SIOWgdb'"' \
+# OBSOLETE {REZ} "{s}"mac-gdb.r -o SIOWgdb -append -d VERSION_STRING='"'{version}'"'\
diff --git a/gdb/source.c b/gdb/source.c
index 9a6d60d..c96202a 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -609,22 +609,22 @@ done:
filename, NULL);
}
}
-#ifdef MPW
- /* This is a debugging hack that can go away when all combinations
- of Mac and Unix names are handled reasonably. */
- {
- extern int debug_openp;
-
- if (debug_openp)
- {
- printf ("openp on %s, path %s mode %d prot %d\n returned %d",
- string, path, mode, prot, fd);
- if (*filename_opened)
- printf (" (filename is %s)", *filename_opened);
- printf ("\n");
- }
- }
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE This is a debugging hack that can go away when all combinations */
+ /* OBSOLETE of Mac and Unix names are handled reasonably. */
+ /* OBSOLETE { */
+ /* OBSOLETE extern int debug_openp; */
+ /* OBSOLETE */
+ /* OBSOLETE if (debug_openp) */
+ /* OBSOLETE { */
+ /* OBSOLETE printf ("openp on %s, path %s mode %d prot %d\n returned %d", */
+ /* OBSOLETE string, path, mode, prot, fd); */
+ /* OBSOLETE if (*filename_opened) */
+ /* OBSOLETE printf (" (filename is %s)", *filename_opened); */
+ /* OBSOLETE printf ("\n"); */
+ /* OBSOLETE } */
+ /* OBSOLETE } */
+ /* OBSOLETE #endif *//* MPW */
return fd;
}
@@ -710,22 +710,22 @@ open_source_file (struct symtab *s)
if (p != s->filename)
result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
}
-#ifdef MPW
- if (result < 0)
- {
- /* Didn't work. Try using just the MPW basename. */
- p = (char *) mpw_basename (s->filename);
- if (p != s->filename)
- result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
- }
- if (result < 0)
- {
- /* Didn't work. Try using the mixed Unix/MPW basename. */
- p = (char *) mpw_mixed_basename (s->filename);
- if (p != s->filename)
- result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
- }
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE if (result < 0) */
+ /* OBSOLETE { */
+ /* OBSOLETE *//* Didn't work. Try using just the MPW basename. */
+ /* OBSOLETE p = (char *) mpw_basename (s->filename); */
+ /* OBSOLETE if (p != s->filename) */
+ /* OBSOLETE result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname); */
+ /* OBSOLETE } */
+ /* OBSOLETE if (result < 0) */
+ /* OBSOLETE { */
+ /* OBSOLETE *//* Didn't work. Try using the mixed Unix/MPW basename. */
+ /* OBSOLETE p = (char *) mpw_mixed_basename (s->filename); */
+ /* OBSOLETE if (p != s->filename) */
+ /* OBSOLETE result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname); */
+ /* OBSOLETE } */
+ /* OBSOLETE #endif MPW */
if (result >= 0)
{
diff --git a/gdb/top.c b/gdb/top.c
index 4cb3476..77d6c6a 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1002,11 +1002,11 @@ gdb_readline (char *prompt_arg)
character position to be off, since the newline we read from
the user is not accounted for. */
fputs_unfiltered (prompt_arg, gdb_stdout);
-#ifdef MPW
- /* Move to a new line so the entered line doesn't have a prompt
- on the front of it. */
- fputs_unfiltered ("\n", gdb_stdout);
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE Move to a new line so the entered line doesn't have a prompt */
+ /* OBSOLETE on the front of it. */
+ /* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
+ /* OBSOLETE #endif *//* MPW */
gdb_flush (gdb_stdout);
}
diff --git a/gdb/utils.c b/gdb/utils.c
index 2f52d4b..1e9c44f 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1262,11 +1262,11 @@ query (char *ctlstr,...)
/* Automatically answer "yes" if input is not from a terminal. */
if (!input_from_terminal_p ())
return 1;
-#ifdef MPW
- /* FIXME Automatically answer "yes" if called from MacGDB. */
- if (mac_app)
- return 1;
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE *//* FIXME Automatically answer "yes" if called from MacGDB. */
+ /* OBSOLETE if (mac_app) */
+ /* OBSOLETE return 1; */
+ /* OBSOLETE #endif *//* MPW */
while (1)
{
@@ -1282,12 +1282,12 @@ query (char *ctlstr,...)
if (annotation_level > 1)
printf_filtered ("\n\032\032query\n");
-#ifdef MPW
- /* If not in MacGDB, move to a new line so the entered line doesn't
- have a prompt on the front of it. */
- if (!mac_app)
- fputs_unfiltered ("\n", gdb_stdout);
-#endif /* MPW */
+ /* OBSOLETE #ifdef MPW */
+ /* OBSOLETE *//* If not in MacGDB, move to a new line so the entered line doesn't */
+ /* OBSOLETE have a prompt on the front of it. */
+ /* OBSOLETE if (!mac_app) */
+ /* OBSOLETE fputs_unfiltered ("\n", gdb_stdout); */
+ /* OBSOLETE #endif *//* MPW */
wrap_here ("");
gdb_flush (gdb_stdout);
@@ -1562,7 +1562,7 @@ init_page_info (void)
lines_per_page = 24;
chars_per_line = 80;
-#if !defined (MPW) && !defined (_WIN32)
+#if !defined (_WIN32)
/* No termcap under MPW, although might be cool to do something
by looking at worksheet or console window sizes. */
/* Initialize the screen height and width from termcap. */