[Wisp-cvs] wisp/modules getopt.wim,1.17,1.18
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-07 21:58:03
|
Update of /cvsroot/wisp/wisp/modules In directory usw-pr-cvs1:/tmp/cvs-serv5670/modules Modified Files: getopt.wim Log Message: Made getopt.wim avoid |string-length| in favour of |length|. Index: getopt.wim =================================================================== RCS file: /cvsroot/wisp/wisp/modules/getopt.wim,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- getopt.wim 26 Aug 2002 16:18:18 -0000 1.17 +++ getopt.wim 7 Sep 2002 21:58:00 -0000 1.18 @@ -89,12 +89,12 @@ (if (not (null? given-args)) (my item (string-copy (car given-args)) (cond - ((and (> (string-length item) 1) + ((and (> (length item) 1) (eq? item[0] #\-)) ; an option (cond ((eq? item[1] #\-) (cond - ((= (string-length item) 2) ; "--" all alone + ((= (length item) 2) ; "--" all alone (set! rargs (append-reverse (cdr given-args) rargs))) (else ; a long option (my sep (find-first-char #\= item 2) @@ -155,27 +155,27 @@ (apply (lambda-pack ((flag (alias name) (value #t)) (process-flag #t alias value) - (if (= (string-length item) 2) + (if (= (length item) 2) (loop (cdr given-args)) (loop (cons (string-append #\- item[2 ...]) (cdr given-args))))) ((soft-flag (alias name) (value #t)) (process-flag #f alias value) - (if (= (string-length item) 2) + (if (= (length item) 2) (loop (cdr given-args)) (loop (cons (string-append #\- item[2 ...]) (cdr given-args))))) ((count (alias name) (initial 0)) (process-counter alias (+ initial 1)) - (if (= (string-length item) 2) + (if (= (length item) 2) (loop (cdr given-args)) (loop (cons (string-append #\- item[2 ...]) (cdr given-args))))) ((value (alias name)) - (if (= (string-length item) 2) + (if (= (length item) 2) (begin (my rest (cdr given-args) (if (null? rest) @@ -187,7 +187,7 @@ item[2 ...]) (loop (cdr given-args))))) ((multivalue (alias name)) - (if (= (string-length item) 2) + (if (= (length item) 2) (begin (my rest (cdr given-args) (if (null? rest) |