Skip to content
Snippets Groups Projects
Commit 39985765 authored by dtc's avatar dtc
Browse files

Define batch mode early in the C startup code.

parent a570a6a7
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -191,11 +191,6 @@
(load (cmd-switch-arg switch))) (load (cmd-switch-arg switch)))
(defswitch "load" #'load-switch-demon) (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) (defun cmd-switch-arg (switch)
(or (cmd-switch-value switch) (or (cmd-switch-value switch)
(car (cmd-switch-words switch)) (car (cmd-switch-words switch))
...@@ -205,4 +200,4 @@ ...@@ -205,4 +200,4 @@
(defswitch "init") (defswitch "init")
(defswitch "noinit") (defswitch "noinit")
(defswitch "hinit") (defswitch "hinit")
(defswitch "batch")
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -191,6 +191,7 @@
;; The C startup code must fill these in. ;; The C startup code must fill these in.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
lisp::*initial-fdefn-objects* lisp::*initial-fdefn-objects*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -179,6 +179,7 @@
;; The C startup code must fill these in. ;; The C startup code must fill these in.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
lisp::*initial-fdefn-objects* lisp::*initial-fdefn-objects*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -196,6 +196,7 @@
;; Random stuff needed for initialization. ;; Random stuff needed for initialization.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
lisp::*initial-fdefn-objects* lisp::*initial-fdefn-objects*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
...@@ -229,6 +230,7 @@ ...@@ -229,6 +230,7 @@
;; Random stuff needed for initialization. ;; Random stuff needed for initialization.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
kernel::internal-error kernel::internal-error
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -220,6 +220,7 @@
;; The C startup code must fill these in. ;; The C startup code must fill these in.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
lisp::*initial-fdefn-objects* lisp::*initial-fdefn-objects*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -237,6 +237,7 @@
;; The C startup code must fill these in. ;; The C startup code must fill these in.
lisp::lisp-environment-list lisp::lisp-environment-list
lisp::lisp-command-line-list lisp::lisp-command-line-list
ext::*batch-mode*
lisp::*initial-fdefn-objects* lisp::*initial-fdefn-objects*
;; Functions that the C code needs to call ;; Functions that the C code needs to call
......
/* /*
* main() entry point for a stand alone lisp image. * 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[]) ...@@ -89,6 +89,7 @@ void main(int argc, char *argv[], char *envp[])
char *arg, **argptr; char *arg, **argptr;
char *core = NULL, *default_core; char *core = NULL, *default_core;
boolean monitor; boolean monitor;
lispobj batch_mode;
lispobj initial_function; lispobj initial_function;
#ifdef MACH #ifdef MACH
...@@ -101,6 +102,7 @@ void main(int argc, char *argv[], char *envp[]) ...@@ -101,6 +102,7 @@ void main(int argc, char *argv[], char *envp[])
set_lossage_handler(ldb_monitor); set_lossage_handler(ldb_monitor);
monitor = FALSE; monitor = FALSE;
batch_mode = NIL;
argptr = argv; argptr = argv;
while ((arg = *++argptr) != NULL) { while ((arg = *++argptr) != NULL) {
...@@ -118,6 +120,9 @@ void main(int argc, char *argv[], char *envp[]) ...@@ -118,6 +120,9 @@ void main(int argc, char *argv[], char *envp[])
else if (strcmp(arg, "-monitor") == 0) { else if (strcmp(arg, "-monitor") == 0) {
monitor = TRUE; monitor = TRUE;
} }
else if (strcmp(arg, "-batch") == 0) {
batch_mode = T;
}
} }
default_core = arch_init(); default_core = arch_init();
...@@ -215,6 +220,7 @@ void main(int argc, char *argv[], char *envp[]) ...@@ -215,6 +220,7 @@ void main(int argc, char *argv[], char *envp[])
/* Convert the argv and envp to something Lisp can grok. */ /* Convert the argv and envp to something Lisp can grok. */
SetSymbolValue(LISP_COMMAND_LINE_LIST, alloc_str_list(argv)); SetSymbolValue(LISP_COMMAND_LINE_LIST, alloc_str_list(argv));
SetSymbolValue(LISP_ENVIRONMENT_LIST, alloc_str_list(envp)); 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 */ /* Pick off sigint until the lisp system gets far enough along to */
/* install it's own. */ /* install it's own. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment