138
137
(let ((args si::*command-args*))
139
;; BOZO. This isn't going to work perfectly because GCL doesn't seem to
140
;; have an equivalent of --. For now I'm going to at least expect that the
141
;; wrapper script uses -- anyway, e.g., a proper wrapper script is:
138
;; For this to work, the proper way to invoke GCL is through a wrapper
139
;; script along the lines of:
144
142
;; exec /blah/blah/blah.gcl -eval '(myprog::main)' -- "$@"
146
;; This way we can at least cut out the stuff that comes before --. But
147
;; it's not perfect because GCL will still try to process options like
148
;; -eval, -f, etc., that happen to come in $@.
150
(error "ARGV expected GCL to have at least the program name.")
153
(mv (cdr (member-equal "--" args)) state))
144
;; Note: This requires a version of GCL >= 2.6.10. In previous versions
145
;; the -- flag wasn't understood.
146
(cond ((string-listp args)
155
149
(error "ARGV found non string-listp arguments? ~a" args)
156
150
(mv nil state))))
159
153
(let ((args sys:*line-arguments-list*))
160
;; BOZO this is very similar to GCL. There's apparently no proper support
161
;; for --, so do the smae hack as for GCL, which sort of works. A proper
162
;; wrapper script is, e.g.,
154
;; BOZO. This isn't going to work perfectly because Lispworks doesn't
155
;; seem to have an equivalent of --. As a hack, we'll assume that a
156
;; proper wrapper script looks like:
165
159
;; exec /blah/blah/image.lw -init - -siteinit - -- "$@"
167
;; Again this isn't perfect.
161
;; We'll just grab whatever comes after --. Of course, this isn't
162
;; perfect because Lispworks will still try to process options like
163
;; -eval, -f, etc., that happen to come in $@.
168
164
(cond ((atom args)
169
165
(error "ARGV expected Lispworks to have at least the program name."))
170
166
((string-listp args)