0.8.16.18:
[sbcl.git] / src / code / stream.lisp
index 6ff6a91..a99b5e3 100644 (file)
 #!-sb-fluid (declaim (inline ansi-stream-unread-char))
 (defun ansi-stream-unread-char (character stream)
   (let ((index (1- (ansi-stream-in-index stream)))
-        (buffer (ansi-stream-in-buffer stream)))
+        (buffer (ansi-stream-cin-buffer stream)))
     (declare (fixnum index))
     (when (minusp index) (error "nothing to unread"))
     (cond (buffer
-           (setf (aref buffer index) (char-code character))
+           (setf (aref buffer index) character)
            (setf (ansi-stream-in-index stream) index))
           (t
            (funcall (ansi-stream-misc stream) stream
 ;;; the IN-BUFFER for text streams. There is definitely an IN-BUFFER,
 ;;; and hence must be an N-BIN method.
 (defun fast-read-char-refill (stream eof-error-p eof-value)
-  (let* ((ibuf (ansi-stream-in-buffer stream))
+  (let* ((ibuf (ansi-stream-cin-buffer stream))
         (count (funcall (ansi-stream-n-bin stream)
                         stream
                         ibuf
                                       sb!vm:n-word-bits))
                            (* count sb!vm:n-byte-bits)))
           (setf (ansi-stream-in-index stream) (1+ start))
-          (code-char (aref ibuf start))))))
+          (aref ibuf start)))))
 
 ;;; This is similar to FAST-READ-CHAR-REFILL, but we don't have to
 ;;; leave room for unreading.
             (:include string-stream
                       (in #'string-inch)
                       (bin #'ill-bin)
-                      (n-bin #'string-stream-read-n-bytes)
+                      (n-bin #'ill-bin)
                       (misc #'string-in-misc)
                        (string (missing-arg) :type simple-string))
             (:constructor internal-make-string-input-stream
 
 (defun case-frob-upcase-sout (stream str start end)
   (declare (type case-frob-stream stream)
-          (type simple-base-string str)
+          (type simple-string str)
           (type index start)
           (type (or index null) end))
   (let* ((target (case-frob-stream-target stream))
 
 (defun case-frob-downcase-sout (stream str start end)
   (declare (type case-frob-stream stream)
-          (type simple-base-string str)
+          (type simple-string str)
           (type index start)
           (type (or index null) end))
   (let* ((target (case-frob-stream-target stream))
 
 (defun case-frob-capitalize-sout (stream str start end)
   (declare (type case-frob-stream stream)
-          (type simple-base-string str)
+          (type simple-string str)
           (type index start)
           (type (or index null) end))
   (let* ((target (case-frob-stream-target stream))
 
 (defun case-frob-capitalize-aux-sout (stream str start end)
   (declare (type case-frob-stream stream)
-          (type simple-base-string str)
+          (type simple-string str)
           (type index start)
           (type (or index null) end))
   (let* ((target (case-frob-stream-target stream))
 
 (defun case-frob-capitalize-first-sout (stream str start end)
   (declare (type case-frob-stream stream)
-          (type simple-base-string str)
+          (type simple-string str)
           (type index start)
           (type (or index null) end))
   (let* ((target (case-frob-stream-target stream))
        (with-array-data ((data seq) (offset-start start) (offset-end end))
          (typecase data
           ((or (simple-array (unsigned-byte 8) (*))
-               (simple-array (signed-byte 8) (*))
-               simple-string)
+               (simple-array (signed-byte 8) (*)))
            (let* ((numbytes (- end start))
                   (bytes-read (read-n-bytes stream data offset-start
                                             numbytes nil)))