From 178cfa8e2eedba4b3cf975913d248338eafcfa38 Mon Sep 17 00:00:00 2001 From: bdc Date: Wed, 23 Apr 1997 22:51:33 +0000 Subject: [PATCH] i do not know how this happened --- scsh/static.scm.in | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/scsh/static.scm.in b/scsh/static.scm.in index 79ce45f..f74db85 100644 --- a/scsh/static.scm.in +++ b/scsh/static.scm.in @@ -56,12 +56,7 @@ For testing load this at a scsh prompt (define (parse-options argl) (let ((options (make-options))) - ;; Set the input and output filenames first. - (if (< (length argl) 3) (usage (car argl))) - (set-options:output-executable options (caddr args)) - (set-options:input-image options (cadr args)) - - (let loop ((args (cdddr argl))) + (let loop ((args (cdr argl))) (cond ((null? args) (cond ((not (options:output-executable options)) (display "error: -o is a required argument") @@ -71,6 +66,20 @@ For testing load this at a scsh prompt (display "error: -i is a required argument") (newline) (usage (car argl))))) + ((equal? (car args) "-i") + (cond ((not (null? (cdr args))) + (set-options:input-image options (cadr args)) + (loop (cddr args))) + (else + (display "error: -i requires argument") (newline) + (usage (car argl))))) + ((equal? (car args) "-o") + (cond ((not (null? (cdr args))) + (set-options:output-executable options (cadr args)) + (loop (cddr args))) + (else + (display "error: -o requires argument") (newline) + (usage (car argl))))) ((equal? (car args) "--temp") (cond ((not (null? (cdr args))) (set-options:temp-dir options (cadr args)) @@ -130,7 +139,9 @@ For testing load this at a scsh prompt (define (usage program-name) (format #t (string-append - "usage: ~a image executable~%" + "usage: ~a ~%" + " [-i image]~%" + " [-o executable]~%" " [--temp directory]~%" " [--cc command]~%" " [--ld command]~%"