Changeset 7298 in project


Ignore:
Timestamp:
01/07/08 08:36:43 (12 years ago)
Author:
felix winkelmann
Message:

csi uses command-line-arguments instead of argv when constructing the final command line arguments passed to a script

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/csi.scm

    r7295 r7298  
    809809        (let ((x (car args)))
    810810          (cond
    811            ((member x '("-s" "-ss" "-script" "--"))
    812             ;; remove any runtime options
    813             (let loop2 ((args args))
    814               (if (null? args)
    815                   '()
    816                   (let ((x (car args)))
    817                     (if (and (fx> (##sys#size x) 2)
    818                              (char=? #\- (##core#inline "C_subchar" x 0))
    819                              (char=? #\: (##core#inline "C_subchar" x 1)) )
    820                         (loop2 (cdr args))
    821                         (cons x (loop2 (cdr args))))))))
     811           ((member x '("-s" "-ss" "-script" "--")) args)
    822812           ((and (fx> (##sys#size x) 2)
    823813                 (char=? #\- (##core#inline "C_subchar" x 0))
     
    839829(define (run)
    840830  (let* ([extraopts (parse-option-string (or (getenv "CSI_OPTIONS") ""))]
    841          [args (canonicalize-args (cdr (argv)))]
     831         [args (canonicalize-args (command-line-arguments))]
    842832         [kwstyle (member* '("-k" "-keyword-style") args)]
    843833         [script (member* '("-s" "-ss" "-script") args)])
  • chicken/trunk/library.scm

    r7180 r7298  
    40654065               (let ([arg (##sys#slot args 0)]
    40664066                     [r (##sys#slot args 1)] )
    4067                  (if (and (fx>= (##sys#size arg) 3) (string=? "-:" (##sys#substring arg 0 2)))
     4067                 (if (and (fx>= (##sys#size arg) 3)
     4068                          (string=? "-:" (##sys#substring arg 0 2)))
    40684069                     (loop r)
    40694070                     (cons arg (loop r)) ) ) ) )
Note: See TracChangeset for help on using the changeset viewer.