diff options
author | Case Duckworth | 2023-08-28 23:21:53 -0500 |
---|---|---|
committer | Case Duckworth | 2023-08-28 23:21:53 -0500 |
commit | 4b932068c4d7b2b6e9cb35ef03455cfc0fc490bc (patch) | |
tree | 54ae5ed3fc73c942937076eb6f47dca4975bc8f9 | |
parent | Add shell trampoline for script usage (diff) | |
download | schmaltz-4b932068c4d7b2b6e9cb35ef03455cfc0fc490bc.tar.gz schmaltz-4b932068c4d7b2b6e9cb35ef03455cfc0fc490bc.zip |
Remove internal define
-rwxr-xr-x | schmaltz.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/schmaltz.scm b/schmaltz.scm index 940ff76..16236eb 100755 --- a/schmaltz.scm +++ b/schmaltz.scm | |||
@@ -24,21 +24,20 @@ schmaltz --- the command-line program | |||
24 | (else)) | 24 | (else)) |
25 | 25 | ||
26 | (define (main args) | 26 | (define (main args) |
27 | (define (display-render) | ||
28 | (display (render)) | ||
29 | (newline)) | ||
30 | (define (rout file) | 27 | (define (rout file) |
31 | (with-input-from-file file display-render)) | 28 | (with-input-from-file file (lambda () (render) (newline)))) |
32 | (cond | 29 | (cond |
33 | ((and (null? args) ; input from stdin | 30 | ((and (null? args) ; input from stdin |
34 | (char-ready?)) | 31 | (char-ready?)) |
35 | (display-render)) | 32 | (render) |
33 | (newline)) | ||
36 | ((member "-" args) | 34 | ((member "-" args) |
37 | (let-values (((fs1 fs2) | 35 | (let-values (((fs1 fs2) |
38 | (break (lambda (x) (equal? x "-")) | 36 | (break (lambda (x) (equal? x "-")) |
39 | args))) | 37 | args))) |
40 | (for-each rout fs1) | 38 | (for-each rout fs1) |
41 | (display-render) | 39 | (render) |
40 | (newline) | ||
42 | (for-each rout (cdr fs2)))) | 41 | (for-each rout (cdr fs2)))) |
43 | ((< 0 (length args)) | 42 | ((< 0 (length args)) |
44 | (for-each rout args)) | 43 | (for-each rout args)) |