Skip to content
Snippets Groups Projects
Commit b3c92a0f authored by ram's avatar ram
Browse files

Put in fix from wlott for unread-char/read-line interaction lossage.

parent 322d239a
No related branches found
No related tags found
No related merge requests found
...@@ -606,9 +606,9 @@ ...@@ -606,9 +606,9 @@
(values (values
(or (let ((sap (fd-stream-ibuf-sap stream)) (or (let ((sap (fd-stream-ibuf-sap stream))
(results (if (fd-stream-unread stream) (results (if (fd-stream-unread stream)
(prog1 (prog1
(string (fd-stream-unread stream)) (list (string (fd-stream-unread stream)))
(setf (fd-stream-unread stream) nil))))) (setf (fd-stream-unread stream) nil)))))
(catch 'eof-input-catcher (catch 'eof-input-catcher
(loop (loop
(input-at-least stream 1) (input-at-least stream 1)
...@@ -622,7 +622,7 @@ ...@@ -622,7 +622,7 @@
(end (or newline tail))) (end (or newline tail)))
(push (string-from-sap sap head end) (push (string-from-sap sap head end)
results) results)
(when newline (when newline
(setf eof nil) (setf eof nil)
(setf (fd-stream-ibuf-head stream) (setf (fd-stream-ibuf-head stream)
...@@ -636,8 +636,8 @@ ...@@ -636,8 +636,8 @@
(t (t
(apply #'concatenate 'simple-string (nreverse results))))) (apply #'concatenate 'simple-string (nreverse results)))))
(if eof-error-p (if eof-error-p
(error "EOF while reading ~S" stream) (error "EOF while reading ~S" stream)
eof-value)) eof-value))
eof))) eof)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment