/[cmucl]/src/code/stream.lisp
ViewVC logotype

Diff of /src/code/stream.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.87.6.3 by rtoy, Fri Sep 25 13:46:28 2009 UTC revision 1.87.6.4 by rtoy, Fri Sep 25 18:13:11 2009 UTC
# Line 471  Line 471 
471                 (funcall (lisp-stream-misc stream) stream                 (funcall (lisp-stream-misc stream) stream
472                          :unread character))))                          :unread character))))
473        #+unicode        #+unicode
474        (let ((index (1- (lisp-stream-string-index stream)))        (let ((sbuf (lisp-stream-string-buffer stream))
475              (buffer (lisp-stream-string-buffer stream)))              (ibuf (lisp-stream-in-buffer stream)))
476          (declare (fixnum index))          (cond (sbuf
477          (when (and buffer (minusp index)) (error "Nothing to unread."))                 (let ((index (1- (lisp-stream-string-index stream))))
478          (cond (buffer                   (when (minusp index)
479                 (setf (aref buffer index) character)                     (error "Nothing to unread."))
480                 (setf (lisp-stream-string-index stream) index))                   (setf (aref sbuf index) character)
481                     (setf (lisp-stream-string-index stream) index)))
482                  (ibuf
483                   (let ((index (1- (lisp-stream-in-index stream))))
484                     (when (minusp index)
485                       (error "Nothing to unread."))
486                     ;; This only works for iso8859-1!
487                     (setf (aref ibuf index) (char-code character))
488                     (setf (lisp-stream-in-index stream) index)))
489                (t                (t
490                 (funcall (lisp-stream-misc stream) stream                 (funcall (lisp-stream-misc stream) stream
491                          :unread character))))                          :unread character))))

Legend:
Removed from v.1.87.6.3  
changed lines
  Added in v.1.87.6.4

  ViewVC Help
Powered by ViewVC 1.1.5