* bug fix: Formatted output now flushes the output port.
* --script now takes a required script name as an argument.
This commit is contained in:
parent
4261e71b24
commit
431ea890a3
BIN
lib/ikarus.boot
BIN
lib/ikarus.boot
Binary file not shown.
|
@ -54,23 +54,28 @@
|
|||
(putprop '|#system| '*sc-expander* sysmod)
|
||||
(putprop 'scheme '*sc-expander* schmod))))
|
||||
|
||||
(let-values ([(files script? args)
|
||||
(let-values ([(files script args)
|
||||
(let f ([args (command-line-arguments)])
|
||||
(cond
|
||||
[(null? args) (values '() #f '())]
|
||||
[(string=? (car args) "--")
|
||||
(values '() #f (cdr args))]
|
||||
[(string=? (car args) "--script")
|
||||
(let-values ([(f* _ a*) (f (cdr args))])
|
||||
(values f* #t a*))]
|
||||
(let ([d (cdr args)])
|
||||
(cond
|
||||
[(null? d)
|
||||
(error #f "--script requires a script name")]
|
||||
[else
|
||||
(values '() (car d) (cdr d))]))]
|
||||
[else
|
||||
(let-values ([(f* script? a*) (f (cdr args))])
|
||||
(values (cons (car args) f*) script? a*))]))])
|
||||
(let-values ([(f* script a*) (f (cdr args))])
|
||||
(values (cons (car args) f*) script a*))]))])
|
||||
(current-eval compile)
|
||||
(command-line-arguments args)
|
||||
(cond
|
||||
[script? ; no greeting, no cafe
|
||||
[script ; no greeting, no cafe
|
||||
(for-each load files)
|
||||
(load script)
|
||||
(exit 0)]
|
||||
[else
|
||||
(printf "Ikarus Scheme (Build ~a)\n" (compile-time-date-string))
|
||||
|
|
|
@ -425,7 +425,8 @@
|
|||
(error who "invalid sequence ~~~a" c)])))]
|
||||
[else
|
||||
(write-char c p)
|
||||
(f (fxadd1 i) args)]))))))
|
||||
(f (fxadd1 i) args)]))))
|
||||
(flush-output-port p)))
|
||||
|
||||
(define fprintf
|
||||
(lambda (port fmt . args)
|
||||
|
|
Loading…
Reference in New Issue