.
original commit: 55e75b7454eb063287276d908ba5d980b229ad0a
This commit is contained in:
parent
19950789d7
commit
964f823307
|
@ -76,12 +76,6 @@
|
||||||
(cons dest dests))
|
(cons dest dests))
|
||||||
(let ([s (make-bytes 4096)])
|
(let ([s (make-bytes 4096)])
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(let ([b (peek-byte-or-special src)])
|
|
||||||
(if (or (byte? b) (eof-object? b))
|
|
||||||
;; Read-bytes-avail should work fine --- assuming
|
|
||||||
;; that no one else reads the byte, first. So we
|
|
||||||
;; have a race condition here, and the solution is
|
|
||||||
;; to add read-bytes-avail-or-special! to MzScheme
|
|
||||||
(let ([c (read-bytes-avail! s src)])
|
(let ([c (read-bytes-avail! s src)])
|
||||||
(unless (eof-object? c)
|
(unless (eof-object? c)
|
||||||
(for-each
|
(for-each
|
||||||
|
@ -91,14 +85,7 @@
|
||||||
(let ([c2 (write-bytes-avail s dest start c)])
|
(let ([c2 (write-bytes-avail s dest start c)])
|
||||||
(loop (+ start c2))))))
|
(loop (+ start c2))))))
|
||||||
(cons dest dests))
|
(cons dest dests))
|
||||||
(loop)))
|
(loop))))))
|
||||||
;; Got a special
|
|
||||||
(begin
|
|
||||||
(for-each
|
|
||||||
(lambda (dest)
|
|
||||||
(write-special dest b))
|
|
||||||
(cons dest dests))
|
|
||||||
(loop)))))))
|
|
||||||
|
|
||||||
(define merge-input
|
(define merge-input
|
||||||
(case-lambda
|
(case-lambda
|
||||||
|
|
Loading…
Reference in New Issue
Block a user