- (/show0 "at head of LOOP WHILE OPTIONS DO in TOPLEVEL-INIT")
- (let ((option (first options)))
- (flet ((pop-option ()
- (if options
- (pop options)
- (startup-error
- "unexpected end of command line options"))))
- (cond ((string= option "--sysinit")
- (pop-option)
- (if sysinit
- (startup-error "multiple --sysinit options")
- (setf sysinit (pop-option))))
- ((string= option "--userinit")
- (pop-option)
- (if userinit
- (startup-error "multiple --userinit options")
- (setf userinit (pop-option))))
- ((string= option "--eval")
- (pop-option)
- (push (pop-option) reversed-evals))
- ((string= option "--load")
- (pop-option)
- (push
- ;; FIXME: see BUG 296
- (concatenate 'string "(|LOAD| \"" (pop-option) "\")")
- reversed-evals))
- ((string= option "--noprint")
- (pop-option)
- (setf noprint t))
- ((string= option "--disable-debugger")
- (pop-option)
- (push "(|DISABLE-DEBUGGER|)" reversed-evals))
- ((string= option "--end-toplevel-options")
- (pop-option)
- (return))
- (t
- ;; Anything we don't recognize as a toplevel
- ;; option must be the start of user-level
- ;; options.. except that if we encounter
- ;; "--end-toplevel-options" after we gave up
- ;; because we didn't recognize an option as a
- ;; toplevel option, then the option we gave up on
- ;; must have been an error. (E.g. in
- ;; "sbcl --eval '(a)' --eval'(b)' --end-toplevel-options"
- ;; this test will let us detect that the string
- ;; "--eval(b)" is an error.)
- (if (find "--end-toplevel-options" options
- :test #'string=)
- (startup-error "bad toplevel option: ~S"
- (first options))
- (return)))))))
+ (/show0 "at head of LOOP WHILE OPTIONS DO in TOPLEVEL-INIT")
+ (let ((option (first options)))
+ (flet ((pop-option ()
+ (if options
+ (pop options)
+ (startup-error
+ "unexpected end of command line options"))))
+ (cond ((string= option "--sysinit")
+ (pop-option)
+ (if sysinit
+ (startup-error "multiple --sysinit options")
+ (setf sysinit (pop-option))))
+ ((string= option "--userinit")
+ (pop-option)
+ (if userinit
+ (startup-error "multiple --userinit options")
+ (setf userinit (pop-option))))
+ ((string= option "--eval")
+ (pop-option)
+ (push (pop-option) reversed-evals))
+ ((string= option "--load")
+ (pop-option)
+ (push
+ ;; FIXME: see BUG 296
+ (concatenate 'string "(|LOAD| \"" (pop-option) "\")")
+ reversed-evals))
+ ((string= option "--noprint")
+ (pop-option)
+ (setf noprint t))
+ ((string= option "--disable-debugger")
+ (pop-option)
+ (push "(|DISABLE-DEBUGGER|)" reversed-evals))
+ ((string= option "--end-toplevel-options")
+ (pop-option)
+ (return))
+ (t
+ ;; Anything we don't recognize as a toplevel
+ ;; option must be the start of user-level
+ ;; options.. except that if we encounter
+ ;; "--end-toplevel-options" after we gave up
+ ;; because we didn't recognize an option as a
+ ;; toplevel option, then the option we gave up on
+ ;; must have been an error. (E.g. in
+ ;; "sbcl --eval '(a)' --eval'(b)' --end-toplevel-options"
+ ;; this test will let us detect that the string
+ ;; "--eval(b)" is an error.)
+ (if (find "--end-toplevel-options" options
+ :test #'string=)
+ (startup-error "bad toplevel option: ~S"
+ (first options))
+ (return)))))))