Fixed bug in %read-delimited! so the last char is not eaten if the

buffer is full
This commit is contained in:
marting 2000-06-28 13:48:21 +00:00
parent b79df3d6c1
commit 43b90a190a
1 changed files with 0 additions and 2 deletions

View File

@ -222,7 +222,6 @@
;; This is the code for other kinds of ports.
;; Mighty slow -- we read each char twice (peek first, then read).
(let lp ((i start))
(warn "use of read-delim lp")
(let ((c (peek-char port)))
(cond ((or (eof-object? c) ; Found terminating char or eof
(char-set-contains? delims c))
@ -230,7 +229,6 @@
(values c (- i start)))
((>= i end) ; Filled the buffer.
(if gobble? (read-char port))
(values #f (- i start)))
(else (string-set! buf i (read-char port))