From: Joe Marshall Date: Wed, 8 Jul 2015 18:35:10 +0000 (-0700) Subject: Print one of several messages on normal exit. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~80 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c46ad4fc94061923cebadf6ea299f0edd44ec52b;p=mit-scheme.git Print one of several messages on normal exit. --- diff --git a/src/microcode/errors.h b/src/microcode/errors.h index cf641352e..05b26859f 100644 --- a/src/microcode/errors.h +++ b/src/microcode/errors.h @@ -240,7 +240,7 @@ USA. #define TERM_MESSAGE_TABLE \ { \ -/* 0x00 */ "Moriturus te saluto", \ +/* 0x00 */ 0, \ /* 0x01 */ "Unrecoverable error while loading a band", \ /* 0x02 */ "Broken heart encountered", \ /* 0x03 */ "Non pointer relocation", \ @@ -268,5 +268,14 @@ USA. /* 0x19 */ "User requested termination after trap", \ /* 0x1A */ "Backing out of non-primitive" \ } + +#define MAX_HALT_MESSAGE 4 +#define TERM_HALT_MESSAGE_TABLE \ +{ \ + "Moriturus te saluto.", \ + "Happy happy joy joy!", \ + "Ceterum censeo Carthaginem esse delendam.", \ + "..#]^@^@^@ NO CARRIER" \ +} #endif /* SCM_ERRORS_H */ diff --git a/src/microcode/extern.h b/src/microcode/extern.h index e55cd1736..b08f7dd46 100644 --- a/src/microcode/extern.h +++ b/src/microcode/extern.h @@ -174,6 +174,7 @@ extern const char * Abort_Names []; extern const char * Error_Names []; extern const char * Term_Names []; extern const char * term_messages []; +extern const char * term_halt_messages []; extern const char * fixed_objects_names []; extern bool trapping; diff --git a/src/microcode/storage.c b/src/microcode/storage.c index 39121de9e..d5b30145b 100644 --- a/src/microcode/storage.c +++ b/src/microcode/storage.c @@ -135,4 +135,5 @@ const char * Abort_Names [] = ABORT_NAME_TABLE; /* in const.h */ const char * Error_Names [] = ERROR_NAME_TABLE; /* in errors.h */ const char * Term_Names [] = TERM_NAME_TABLE; /* in errors.h */ const char * term_messages [] = TERM_MESSAGE_TABLE; /* in errors.h */ +const char * term_halt_messages [] = TERM_HALT_MESSAGE_TABLE; /* in errors.h */ const char * fixed_objects_names [] = FIXED_OBJECTS_NAMES; /* in fixobj.h */ diff --git a/src/microcode/term.c b/src/microcode/term.c index de63d2537..c69c6d408 100644 --- a/src/microcode/term.c +++ b/src/microcode/term.c @@ -113,7 +113,9 @@ termination_prefix (int code) { if (!option_batch_mode) { - outf_console ("\n%s.\n", (term_messages[code])); + /* Pick a message "randomly" */ + unsigned long i = (((unsigned long) Free) >> 3) % MAX_HALT_MESSAGE; + outf_console ("\n%s\n", (term_halt_messages[i])); outf_flush_console (); } }