[Cl-darcs-cvs] r19 - cl-darcs/trunk
mhenoch at common-lisp.net
mhenoch at common-lisp.net
Sat Jul 8 22:50:33 UTC 2006
Author: mhenoch
Date: Sat Jul 8 18:50:33 2006
New Revision: 19
Modified:
cl-darcs/trunk/unreadable-stream.lisp
Log:
Clear EOF flag when something is unread
Modified: cl-darcs/trunk/unreadable-stream.lisp
==============================================================================
--- cl-darcs/trunk/unreadable-stream.lisp (original)
+++ cl-darcs/trunk/unreadable-stream.lisp Sat Jul 8 18:50:33 2006
@@ -167,11 +167,13 @@
(defmethod unread-byte ((stream unreadable-stream) byte)
"Store BYTE at the head of the unread buffer."
+ (setf (slot-value stream 'at-end-of-file) nil)
(push byte (slot-value stream 'buffer)))
(defmethod unread-sequence ((stream unreadable-stream) sequence)
"Store SEQUENCE at the head of the unread buffer.
It is assumed that SEQUENCE will not be modified."
+ (setf (slot-value stream 'at-end-of-file) nil)
(with-slots (buffer) stream
;; Empty sequences must not be stored in the buffer.
(unless (zerop (length sequence))
@@ -180,6 +182,7 @@
(defmethod unread-line ((stream unreadable-stream) line)
"Store LINE with an appended newline at the head of the unread buffer.
It is assumed that SEQUENCE will not be modified."
+ (setf (slot-value stream 'at-end-of-file) nil)
(with-slots (buffer) stream
;; If the line is empty, just store a newline.
(if (zerop (length line))
More information about the Cl-darcs-cvs
mailing list