From 39985765de57fa92b1586257c086278dbc40f095 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Mon, 16 Oct 2000 17:30:08 +0000 Subject: [PATCH] Define batch mode early in the C startup code. --- code/commandline.lisp | 9 ++------- compiler/alpha/parms.lisp | 3 ++- compiler/hppa/parms.lisp | 3 ++- compiler/mips/parms.lisp | 4 +++- compiler/sparc/parms.lisp | 3 ++- compiler/x86/parms.lisp | 3 ++- lisp/lisp.c | 8 +++++++- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/code/commandline.lisp b/code/commandline.lisp index fc2bf0985..f92b2eca5 100644 --- a/code/commandline.lisp +++ b/code/commandline.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.7 2000/08/24 19:55:29 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.8 2000/10/16 17:30:06 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -191,11 +191,6 @@ (load (cmd-switch-arg switch))) (defswitch "load" #'load-switch-demon) -(defun batch-switch-demon (switch) - (setq *batch-mode* t) - (setf (cmd-switch-value switch) t)) -(defswitch "batch" #'batch-switch-demon) - (defun cmd-switch-arg (switch) (or (cmd-switch-value switch) (car (cmd-switch-words switch)) @@ -205,4 +200,4 @@ (defswitch "init") (defswitch "noinit") (defswitch "hinit") - +(defswitch "batch") diff --git a/compiler/alpha/parms.lisp b/compiler/alpha/parms.lisp index d474cee04..99da98044 100644 --- a/compiler/alpha/parms.lisp +++ b/compiler/alpha/parms.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alpha/parms.lisp,v 1.5 1999/02/20 15:54:41 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alpha/parms.lisp,v 1.6 2000/10/16 17:30:06 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -191,6 +191,7 @@ ;; The C startup code must fill these in. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* lisp::*initial-fdefn-objects* ;; Functions that the C code needs to call diff --git a/compiler/hppa/parms.lisp b/compiler/hppa/parms.lisp index f7d64f439..2a5e86ac6 100644 --- a/compiler/hppa/parms.lisp +++ b/compiler/hppa/parms.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/hppa/parms.lisp,v 1.6 1998/09/13 12:27:13 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/hppa/parms.lisp,v 1.7 2000/10/16 17:30:06 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -179,6 +179,7 @@ ;; The C startup code must fill these in. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* lisp::*initial-fdefn-objects* ;; Functions that the C code needs to call diff --git a/compiler/mips/parms.lisp b/compiler/mips/parms.lisp index ac6aff165..efcae0d4d 100644 --- a/compiler/mips/parms.lisp +++ b/compiler/mips/parms.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/parms.lisp,v 1.112 1997/08/23 16:00:15 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/parms.lisp,v 1.113 2000/10/16 17:30:07 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -196,6 +196,7 @@ ;; Random stuff needed for initialization. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* lisp::*initial-fdefn-objects* ;; Functions that the C code needs to call @@ -229,6 +230,7 @@ ;; Random stuff needed for initialization. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* ;; Functions that the C code needs to call kernel::internal-error diff --git a/compiler/sparc/parms.lisp b/compiler/sparc/parms.lisp index e58d6915b..cfb491bce 100644 --- a/compiler/sparc/parms.lisp +++ b/compiler/sparc/parms.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/parms.lisp,v 1.27 1998/03/21 08:05:24 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/parms.lisp,v 1.28 2000/10/16 17:30:08 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -220,6 +220,7 @@ ;; The C startup code must fill these in. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* lisp::*initial-fdefn-objects* ;; Functions that the C code needs to call diff --git a/compiler/x86/parms.lisp b/compiler/x86/parms.lisp index 141930c0b..18dc12816 100644 --- a/compiler/x86/parms.lisp +++ b/compiler/x86/parms.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.15 1999/09/16 15:48:23 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.16 2000/10/16 17:30:08 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -237,6 +237,7 @@ ;; The C startup code must fill these in. lisp::lisp-environment-list lisp::lisp-command-line-list + ext::*batch-mode* lisp::*initial-fdefn-objects* ;; Functions that the C code needs to call diff --git a/lisp/lisp.c b/lisp/lisp.c index 8b67a2de5..5c562f207 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.16 1999/09/09 16:22:44 pw Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.17 2000/10/16 17:30:01 dtc Exp $ * */ @@ -89,6 +89,7 @@ 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 @@ -101,6 +102,7 @@ void main(int argc, char *argv[], char *envp[]) set_lossage_handler(ldb_monitor); monitor = FALSE; + batch_mode = NIL; argptr = argv; while ((arg = *++argptr) != NULL) { @@ -118,6 +120,9 @@ 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(); @@ -215,6 +220,7 @@ 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. */ -- GitLab