Raymond Toy pushed to branch issue-379-gnu-style-options at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/commandline.lisp
    ... ... @@ -149,7 +149,14 @@
    149 149
       the switch.  If no value was specified, then any following words are
    
    150 150
       returned.  If there are no following words, then t is returned.  If
    
    151 151
       the switch was not specified, then nil is returned."
    
    152
    -  (let* ((name (if (char= (schar sname 0) #\-) (subseq sname 1) sname))
    
    152
    +  (let* ((posn (position-if-not #'(lambda (ch)
    
    153
    +				    (char= ch #\-))
    
    154
    +				sname))
    
    155
    +	 ;; Strip up to 2 leading "-" to get the switch name.
    
    156
    +	 ;; Otherwise, return the entire switch name.
    
    157
    +	 (name (if (and posn (<= posn 2))
    
    158
    +		   (subseq sname posn)
    
    159
    +		   sname))
    
    153 160
     	 (switch (find name *command-line-switches*
    
    154 161
     		       :test #'string-equal
    
    155 162
     		       :key #'cmd-switch-name)))