From 196f70a43bad9a55f2a14d7526816f7973fa7562 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 5 Sep 2018 18:14:22 +0200 Subject: 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. --- henrietta-cache.scm | 9 +++++++-- 1 file 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)) +) -- cgit v1.2.3