summaryrefslogtreecommitdiff
path: root/intarweb.scm
diff options
context:
space:
mode:
Diffstat (limited to 'intarweb.scm')
-rw-r--r--intarweb.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/intarweb.scm b/intarweb.scm
index ffea2a2..d2cca10 100644
--- a/intarweb.scm
+++ b/intarweb.scm
@@ -100,7 +100,7 @@
basic-auth-param-subunparser digest-auth-param-subunparser
)
-(import scheme (chicken base) (chicken foreign) (chicken irregex)
+(import scheme (scheme base) (chicken base) (chicken foreign) (chicken irregex)
(chicken format) (chicken io) (chicken string)
(chicken time posix) (chicken pathname) (chicken fixnum)
(chicken condition) (chicken port) (chicken syntax)
@@ -153,8 +153,8 @@
;; that deal with headers.
(define-record headers v)
-(define-record-printer (headers h out)
- (fprintf out "#(headers: ~S)" (headers-v h)))
+(set-record-printer! headers (lambda (h out)
+ (fprintf out "#(headers: ~S)" (headers-v h))))
(define headers->list headers-v)
@@ -271,7 +271,7 @@
(fprintf port "~X\r\n~A\r\n" len s))))
(lambda () ; close
(close-output-port port))
- (lambda () ; flush
+ force-output: (lambda ()
(flush-output port)))))
;; first "reserved" slot
;; Slot 7 should probably stay 'custom
@@ -312,12 +312,12 @@
(or (not position) (char-ready? port)))
(lambda () ; close
(close-input-port port))
- (lambda () ; peek-char
+ peek-char: (lambda ()
(check-position)
(if position
(peek-char port)
#!eof))
- (lambda (p bytes buf off) ; read-string!
+ read-bytevector: (lambda (p bytes buf off)
(let lp ((todo bytes)
(total-bytes-read 0)
(off off))
@@ -325,7 +325,7 @@
(if (or (not position) (= todo 0))
total-bytes-read
(let* ((n (min todo (- chunk-length position)))
- (bytes-read (read-string! n buf port off)))
+ (bytes-read (read-bytevector! buf port off (+ off n))))
(set! position (+ position bytes-read))
(lp (- todo bytes-read)
(+ total-bytes-read bytes-read)