diff options
author | Peter Bex <peter@more-magic.net> | 2018-09-05 18:14:22 +0200 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2018-09-05 18:14:22 +0200 |
commit | 196f70a43bad9a55f2a14d7526816f7973fa7562 (patch) | |
tree | a40b856cb3dd3ef66ce1cdf382e055e2082d9195 /henrietta-cache.scm | |
parent | 7c8c0ab1c48699b94327ba30e7ef450eb1a44f29 (diff) | |
download | henrietta-cache-196f70a43bad9a55f2a14d7526816f7973fa7562.tar.gz |
Wrap program in a module to make it easier to port
Fix some issues like depending on srfi-13 implicitly only for
string-null? and some other bad imports.
Diffstat (limited to 'henrietta-cache.scm')
-rw-r--r-- | henrietta-cache.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm index fae2499..0c7f266 100644 --- a/henrietta-cache.scm +++ b/henrietta-cache.scm @@ -1,4 +1,8 @@ -(use utils posix http-client matchable uri-common srfi-1 chicken-syntax) +(module henrietta-cache () + +(import chicken scheme) + +(use utils files extras posix data-structures http-client matchable uri-common srfi-1) (define (usage code) (print #<#EOF @@ -60,7 +64,7 @@ EOF (define (copy-port in out #!optional limit) (let ((bufsize 1024)) (let loop ((data (read-string (min (or limit bufsize) bufsize) in))) - (unless (string-null? data) + (unless (zero? (string-length data)) (display data out) (when limit (set! limit (- limit (string-length data)))) (loop (read-string (min (or limit bufsize) bufsize) in)))))) @@ -361,3 +365,4 @@ EOF (else (loop (cdr args)))))))) (main (command-line-arguments)) +) |