From a48f8b538e9efb0dd4277922f5bfe4f4e17ff8ae Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Mon, 23 Oct 2000 20:20:48 +0000 Subject: [PATCH] Allow the *batch-mode* setting to default from the loaded core, with the command line -batch switch only modifying this when specified. --- compiler/generic/new-genesis.lisp | 4 +++- lisp/lisp.c | 26 +++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/compiler/generic/new-genesis.lisp b/compiler/generic/new-genesis.lisp index 1d3c8660f..dcf39281e 100644 --- a/compiler/generic/new-genesis.lisp +++ b/compiler/generic/new-genesis.lisp @@ -4,7 +4,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/new-genesis.lisp,v 1.39 1999/09/09 16:31:08 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/new-genesis.lisp,v 1.40 2000/10/23 20:20:48 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -711,6 +711,8 @@ (frob *free-interrupt-context-index* (make-fixnum-descriptor 0)) + (frob *batch-mode* (cold-intern nil)) + (frob *initial-layouts* (list-all-layouts)) (let ((res *nil-descriptor*)) diff --git a/lisp/lisp.c b/lisp/lisp.c index 5c562f207..fed153d56 100644 --- a/lisp/lisp.c +++ b/lisp/lisp.c @@ -1,7 +1,7 @@ /* * main() entry point for a stand alone lisp image. * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.17 2000/10/16 17:30:01 dtc Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.18 2000/10/23 20:20:42 dtc Exp $ * */ @@ -89,7 +89,6 @@ void main(int argc, char *argv[], char *envp[]) char *arg, **argptr; char *core = NULL, *default_core; boolean monitor; - lispobj batch_mode; lispobj initial_function; #ifdef MACH @@ -102,7 +101,6 @@ void main(int argc, char *argv[], char *envp[]) set_lossage_handler(ldb_monitor); monitor = FALSE; - batch_mode = NIL; argptr = argv; while ((arg = *++argptr) != NULL) { @@ -120,9 +118,6 @@ void main(int argc, char *argv[], char *envp[]) else if (strcmp(arg, "-monitor") == 0) { monitor = TRUE; } - else if (strcmp(arg, "-batch") == 0) { - batch_mode = T; - } } default_core = arch_init(); @@ -220,10 +215,23 @@ void main(int argc, char *argv[], char *envp[]) /* Convert the argv and envp to something Lisp can grok. */ SetSymbolValue(LISP_COMMAND_LINE_LIST, alloc_str_list(argv)); SetSymbolValue(LISP_ENVIRONMENT_LIST, alloc_str_list(envp)); - SetSymbolValue(BATCH_MODE, batch_mode); - /* Pick off sigint until the lisp system gets far enough along to */ - /* install it's own. */ + /* + * Parse the command line again, picking up values that override + * those loaded from the core. + */ + + argptr = argv; + while ((arg = *++argptr) != NULL) + { + if (strcmp(arg, "-batch") == 0) + SetSymbolGlobalValue(BATCH_MODE, T); + } + + /* + * Pick off sigint until the lisp system gets far enough along to + * install it's own. + */ sigint_init(); if (monitor) -- GitLab