/[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.1 by dtc, Thu Aug 24 19:55:53 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)

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

  ViewVC Help
Powered by ViewVC 1.1.5