/[cmucl]/src/code/commandline.lisp
ViewVC logotype

Diff of /src/code/commandline.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by ram, Wed May 8 02:03:08 1996 UTC revision 1.6.2.2 by dtc, Mon Oct 16 17:32:21 2000 UTC
# Line 155  Line 155 
155        (cond (demon (funcall demon switch))        (cond (demon (funcall demon switch))
156              ((or (member name *legal-cmd-line-switches* :test #'string-equal)              ((or (member name *legal-cmd-line-switches* :test #'string-equal)
157                   (not *complain-about-illegal-switches*)))                   (not *complain-about-illegal-switches*)))
158              (t (warn "~S is an illegal switch" switch))))))              (t (warn "~S is an illegal switch" switch)))
159          (lisp::finish-standard-output-streams))))
160    
161  (defmacro defswitch (name &optional function)  (defmacro defswitch (name &optional function)
162    "Associates function with the switch name in *command-switch-demons*.  Name    "Associates function with the switch name in *command-switch-demons*.  Name
# Line 175  Line 176 
176    
177    
178  (defun eval-switch-demon (switch)  (defun eval-switch-demon (switch)
179    (eval (read-from-string (cmd-switch-arg switch))))    (let ((cmds (cmd-switch-arg switch)))
180        (do ((length (length cmds))
181             (start 0))
182            ((>= start length))
183          (multiple-value-bind (form next)
184              (read-from-string cmds nil nil :start start)
185            (eval form)
186            (lisp::finish-standard-output-streams)
187            (setf start next)))))
188  (defswitch "eval" #'eval-switch-demon)  (defswitch "eval" #'eval-switch-demon)
189    
190  (defun load-switch-demon (switch)  (defun load-switch-demon (switch)
191    (load (cmd-switch-arg switch)))    (load (cmd-switch-arg switch)))
192  (defswitch "load" #'load-switch-demon)  (defswitch "load" #'load-switch-demon)
193    
 (defun batch-switch-demon (switch)  
   (setq *batch-mode* t)  
   (setf (cmd-switch-value switch) t))  
 (defswitch "batch" #'batch-switch-demon)  
   
194  (defun cmd-switch-arg (switch)  (defun cmd-switch-arg (switch)
195    (or (cmd-switch-value switch)    (or (cmd-switch-value switch)
196        (car (cmd-switch-words switch))        (car (cmd-switch-words switch))
# Line 196  Line 200 
200  (defswitch "init")  (defswitch "init")
201  (defswitch "noinit")  (defswitch "noinit")
202  (defswitch "hinit")  (defswitch "hinit")
203    (defswitch "batch")

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.2.2

  ViewVC Help
Powered by ViewVC 1.1.5