From bb4091acb58f0724dca262bc137715f6ed882e5f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 8 Sep 2023 08:55:10 -0500 Subject: 1.0, why not --- boudin.util.scm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'boudin.util.scm') diff --git a/boudin.util.scm b/boudin.util.scm index 2683730..b5c3efe 100644 --- a/boudin.util.scm +++ b/boudin.util.scm @@ -5,17 +5,16 @@ edisplay eprint)) -(import (srfi 1) +(import (chicken io) + (srfi 1) (srfi 152)) (define (edisplay x) - (parameterize ((current-output-port (current-error-port))) - (display x))) + (display x (current-error-port))) (define (eprint . xs) - (parameterize ((current-output-port (current-error-port))) - (for-each display xs) - (newline))) + (for-each edisplay xs) + (newline (current-error-port))) (define (assoc-ref k alist) (let ((k/v (and (pair? alist) @@ -60,9 +59,5 @@ (case-lambda (() (slurp (current-input-port))) ((port) - (let loop ((ch (read-char port)) - (acc '())) - (if (eof-object? ch) - (list->string (reverse acc)) - (loop (read-char port) - (cons ch acc))))))) + (read-string #f port) ; CHICKEN-ism + ))) -- cgit 1.4.1-21-gabe81