(make-string 8 #\NUL))
((string=? blowfish-file-header-v2 line)
(let ((init-vector (make-string 8)))
- (if (not (= 8 (read-substring! init-vector 0 8 port)))
+ (if (not (= 8 (read-string! init-vector port)))
(error "Short read while getting init-vector:" port))
init-vector))
(else
(let ((xstring (make-string n-bytes)))
(let loop ((start 0))
(if (< start n-bytes)
- (let ((n-read (read-substring! xstring 0 n-bytes port)))
+ (let ((n-read (read-string! xstring port)))
(if (= n-read 0)
(error "Failed to read complete file:"
(+ start n-read) n-bytes pathname))
s))
(define (read-substring!-internal string start end port)
- (let ((n-read (read-substring! string start end port)))
+ (let ((n-read (read-string! string port start end)))
(if imap-transcript-port
(write-substring string start (+ start n-read) imap-transcript-port))
n-read))
unspecific)
(lambda ()
(let loop ()
- (let ((n (read-substring! buffer 0 4096 port)))
+ (let ((n (read-string! buffer port)))
(if (fix:= 0 n)
(%md5-final context)
(begin
unspecific)
(lambda ()
(let loop ()
- (let ((n (read-substring! buffer 0 4096 port)))
+ (let ((n (read-string! buffer port)))
(if (fix:= 0 n)
(mhash-end context)
(begin
(make-string 8 #\NUL))
((string=? blowfish-file-header-v2 line)
(let ((init-vector (make-string 8)))
- (if (not (= 8 (read-substring! init-vector 0 8 port)))
+ (if (not (= 8 (read-string! init-vector port)))
(error "Short read while getting init-vector:" port))
init-vector))
(else
unspecific)
(lambda ()
(let loop ()
- (let ((n (read-substring! buffer 0 4096 port)))
+ (let ((n (read-string! buffer port)))
(if (fix:= 0 n)
(mhash-end context)
(begin
unspecific)
(lambda ()
(let loop ()
- (let ((n (read-substring! buffer 0 4096 port)))
+ (let ((n (read-string! buffer port)))
(if (fix:= 0 n)
((ucode-primitive md5-final 1) context)
(begin
(let ((len (vector-8b-length buffer)))
(let loop ((n n))
(if (> n 0)
- (let ((m (read-substring! buffer 0 (min n len) port)))
+ (let ((m (read-string! buffer port 0 (min n len))))
(if (= m 0)
(error "Premature EOF in HTTP message body."))
(write-substring buffer 0 m output)
(buffer (make-string end)))
(let loop ((start 0))
(if (< start end)
- (loop (+ start (read-substring! buffer start end in)))
+ (loop (+ start (read-string! buffer in start end)))
buffer))))
(define (decode-message socket packet)
(let ((end (string-length entity)))
(let loop ((start 0))
(if (fix:< start end)
- (let ((n-read (read-substring! entity start end port)))
+ (let ((n-read (read-string! entity port start end)))
(cond ((not n-read)
(loop start))
((> n-read 0)