From 49073be098319a9f78527640d0ae3646a1802b71 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Tue, 11 Apr 1995 02:08:59 +0000 Subject: [PATCH] Always keep MPW support --- gdb/.Sanitize | 45 ++++++--------------------------------- gdb/config/m68k/.Sanitize | 16 ++------------ gdb/top.c | 2 -- gdb/utils.c | 23 ++++++++++---------- 4 files changed, 20 insertions(+), 66 deletions(-) diff --git a/gdb/.Sanitize b/gdb/.Sanitize index 8b31968227..75d6df64f3 100644 --- a/gdb/.Sanitize +++ b/gdb/.Sanitize @@ -15,20 +15,6 @@ Do-first: -mpw_files="mpw-config.in mpw-make.in ser-mac.c mac-xdep.c mac-defs.h macgdb.r ChangeLog.mpw" - -if ( echo $* | grep keep\-mpw > /dev/null ) ; then - keep_these_too="${mpw_files} ${keep_these_too}" - if [ -n "${verbose}" ] ; then - echo Keeping ${mpw_files} - fi -else - lose_these_too="${mpw_files} ${lose_these_too}" - if [ -n "${verbose}" ] ; then - echo Deleting ${mpw_files} - fi -fi - # mswin gdb is not really gdbtk, but is close enough for now. gdbtk_files="gdbtk.c gdbtk.tcl mswin" @@ -192,6 +178,9 @@ m68k-stub.c m68k-tdep.c m88k-nat.c m88k-tdep.c +mac-defs.h +mac-xdep.c +macgdb.r main.c maint.c mdebugread.c @@ -205,6 +194,8 @@ mipsv4-nat.c mipsread.c monitor.h monitor.c +mpw-config.in +mpw-make.in news-xdep.c nindy-share nindy-tdep.c @@ -258,6 +249,7 @@ rom68k-rom.c saber.suppress ser-e7kpc.c ser-go32.c +ser-mac.c ser-tcp.c ser-unix.c serial.c @@ -351,31 +343,6 @@ remote-arc.c Do-last: -echo Removing traces of \"mpw\"... - -# Don't try to clean directories here, as the 'mv' command will fail. -# Also, grep fails on NFS mounted directories. -if ( echo $* | grep keep\-mpw > /dev/null ) ; then - for i in * ; do - if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then - echo Keeping mpw stuff in $i - fi - done -else - for i in * ; do - if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then - echo Removing traces of \"mpw\" out of $i... - cp $i new - sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new - if [ -n "${safe}" -a ! -f .Recover/$i ] ; then - echo Caching $i in .Recover... - mv $i .Recover - fi - mv new $i - fi - done -fi - echo Catering to RMS by removing traces of \"gdbtk\"... # Don't try to clean directories here, as the 'mv' command will fail. diff --git a/gdb/config/m68k/.Sanitize b/gdb/config/m68k/.Sanitize index 7017901dbc..0cbec16360 100644 --- a/gdb/config/m68k/.Sanitize +++ b/gdb/config/m68k/.Sanitize @@ -15,20 +15,6 @@ Do-first: -mpw_files="xm-mpw.h tm-mac.h" - -if ( echo $* | grep keep\-mpw > /dev/null ) ; then - keep_these_too="${mpw_files}" - if [ -n "${verbose}" ] ; then - echo Keeping ${mpw_files} - fi -else - lose_these_too="${mpw_files}" - if [ -n "${verbose}" ] ; then - echo Deleting ${mpw_files} - fi -fi - # All files listed between the "Things-to-keep:" line and the # "Files-to-sed:" line will be kept. All other files will be removed. # Directories listed in this section will have their own Sanitize @@ -100,6 +86,7 @@ tm-hp300bsd.h tm-hp300hpux.h tm-isi.h tm-m68kv4.h +tm-mac.h tm-monitor.h tm-news.h tm-os68k.h @@ -122,6 +109,7 @@ xm-isi.h xm-m68k.h xm-m68klynx.h xm-m68kv4.h +xm-mpw.h xm-news.h xm-news1000.h xm-sun2.h diff --git a/gdb/top.c b/gdb/top.c index 3ba7581ff8..cd6e4bac06 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1300,13 +1300,11 @@ gdb_readline (prrompt) character position to be off, since the newline we read from the user is not accounted for. */ fputs_unfiltered (prrompt, gdb_stdout); -/* start-sanitize-mpw */ #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 */ -/* end-sanitize-mpw */ gdb_flush (gdb_stdout); } diff --git a/gdb/utils.c b/gdb/utils.c index 0d51b7aac9..8277a97f71 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -113,6 +113,13 @@ int sevenbit_strings = 0; /* String to be printed before error messages, if any. */ char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + char *warning_pre_print = "\nwarning: "; /* Add a new cleanup to the cleanup_chain, @@ -463,8 +470,8 @@ quit () annotate_error_begin (); /* Don't use *_filtered; we don't want to prompt the user to continue. */ - if (error_pre_print) - fprintf_unfiltered (gdb_stderr, error_pre_print); + if (quit_pre_print) + fprintf_unfiltered (gdb_stderr, quit_pre_print); if (job_control /* If there is no terminal switching for this target, then we can't @@ -849,13 +856,11 @@ query (va_alist) /* Automatically answer "yes" if input is not from a terminal. */ if (!input_from_terminal_p ()) return 1; -/* start-sanitize-mpw */ #ifdef MPW - /* Automatically answer "yes" if called from MacGDB. */ + /* FIXME Automatically answer "yes" if called from MacGDB. */ if (mac_app) return 1; #endif /* MPW */ -/* end-sanitize-mpw */ while (1) { @@ -874,14 +879,13 @@ query (va_alist) if (annotation_level > 1) printf_filtered ("\n\032\032query\n"); -/* start-sanitize-mpw */ #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 */ -/* end-sanitize-mpw */ + gdb_flush (gdb_stdout); answer = fgetc (stdin); clearerr (stdin); /* in case of C-d */ @@ -1760,11 +1764,10 @@ initialize_utils () #else lines_per_page = 24; chars_per_line = 80; -/* start-sanitize-mpw */ + #ifndef MPW /* No termcap under MPW, although might be cool to do something by looking at worksheet or console window sizes. */ -/* end-sanitize-mpw */ /* Initialize the screen height and width from termcap. */ { char *termtype = getenv ("TERM"); @@ -1799,9 +1802,7 @@ initialize_utils () } } } -/* start-sanitize-mpw */ #endif /* MPW */ -/* end-sanitize-mpw */ #if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) -- 2.34.1