From: Chris Hanson Date: Mon, 19 Dec 1994 22:29:05 +0000 (+0000) Subject: Reconditionalize so that OS/2 is handled much like Windows -- using X-Git-Tag: 20090517-FFI~6843 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d64fb1028daa79a5c836685ab054512096d46398;p=mit-scheme.git Reconditionalize so that OS/2 is handled much like Windows -- using message boxes to show fatal output rather than writing it on the controlling terminal as in unix. --- diff --git a/v7/src/microcode/term.c b/v7/src/microcode/term.c index ae04d9eac..23e37176d 100644 --- a/v7/src/microcode/term.c +++ b/v7/src/microcode/term.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: term.c,v 1.10 1993/11/08 20:58:12 cph Exp $ +$Id: term.c,v 1.11 1994/12/19 22:29:05 cph Exp $ -Copyright (c) 1990-1993 Massachusetts Institute of Technology +Copyright (c) 1990-94 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -41,6 +41,10 @@ extern char * Term_Messages []; extern void EXFUN (get_band_parameters, (long * heap_size, long * const_size)); extern void EXFUN (Reset_Memory, (void)); +#if WINNT || defined(_OS2) +#define USING_MESSAGE_BOX_FOR_FATAL_OUTPUT +#endif + static void EXFUN (edwin_auto_save, (void)); static void EXFUN (delete_temp_files, (void)); @@ -114,15 +118,21 @@ DEFUN (termination_prefix, (code), int code) } else { - outf_fatal("\n"); +#ifdef USING_MESSAGE_BOX_FOR_FATAL_OUTPUT + outf_fatal ("Reason for termination:"); +#endif + outf_fatal ("\n"); if ((code < 0) || (code > MAX_TERMINATION)) - outf_fatal("Unknown termination code 0x%x", code); + outf_fatal ("Unknown termination code 0x%x", code); else - outf_fatal("%s", (Term_Messages [code])); + outf_fatal ("%s", (Term_Messages [code])); if (WITHIN_CRITICAL_SECTION_P ()) outf_fatal (" within critical section \"%s\"", (CRITICAL_SECTION_NAME ())); - outf_fatal(".\n"); + outf_fatal ("."); +#ifndef USING_MESSAGE_BOX_FOR_FATAL_OUTPUT + outf_fatal ("\n"); +#endif } } @@ -135,11 +145,13 @@ DEFUN (termination_suffix, (code, value, abnormal_p), #endif edwin_auto_save (); delete_temp_files (); +#ifdef USING_MESSAGE_BOX_FOR_FATAL_OUTPUT + /* Don't put up message box for ordinary exit. */ + if (code != TERM_HALT) +#endif + outf_flush_fatal(); #if WINNT - if (code != TERM_HALT) outf_flush_fatal(); /*dont salute*/ winnt_deallocate_registers(); -#else - outf_flush_fatal(); #endif Reset_Memory (); EXIT_SCHEME (value);