Index: /trunk/ccl/level-1/l1-streams.lisp
===================================================================
--- /trunk/ccl/level-1/l1-streams.lisp	(revision 5050)
+++ /trunk/ccl/level-1/l1-streams.lisp	(revision 5051)
@@ -587,5 +587,5 @@
                 limit (io-buffer-count buf)))
         (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
-        (schar (io-buffer-buffer buf) idx)))))
+        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx))))))
 
 (defun %private-ioblock-tyi (ioblock)
@@ -605,5 +605,5 @@
 	      limit (io-buffer-count buf)))
       (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
-      (schar (io-buffer-buffer buf) idx))))
+      (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
 
 (defun %locked-ioblock-tyi (ioblock)
@@ -624,5 +624,5 @@
                 limit (io-buffer-count buf)))
         (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
-        (schar (io-buffer-buffer buf) idx)))))
+        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx))))))
 
 (declaim (inline %ioblock-tyy-no-hang))
@@ -643,5 +643,5 @@
 	      limit (io-buffer-count buf)))
       (setf (io-buffer-idx buf) (the fixnum (1+ idx)))
-      (schar (io-buffer-buffer buf) idx))))
+      (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
 
 
@@ -657,6 +657,5 @@
           (setq idx (io-buffer-idx buf)
                 limit (io-buffer-count buf)))
-	(let ((byte (uvref (io-buffer-buffer buf) idx)))
-	  (if (characterp byte) byte (%code-char byte))))))
+        (%code-char (aref (the (simple-array (unsigned-byte 8) (*)) (io-buffer-buffer buf)) idx)))))
 
 (defun %ioblock-clear-input (ioblock)    
@@ -737,5 +736,5 @@
 	 (buffer (io-buffer-buffer out)))
     (declare (fixnum written bufsize col)
-	     (simple-string buffer)
+	     (type (simple-array (unsigned-byte 8) (*)) buffer)
 	     (optimize (speed 3) (safety 0)))
     (do* ((pos start-octet (+ pos written))
@@ -2367,7 +2366,17 @@
     (%ioblock-eofp ioblock)))
 
+(defmethod stream-eofp ((stream basic-input-stream))
+  (let* ((ioblock (basic-stream-ioblock stream)))
+    (with-ioblock-input-locked (ioblock)
+      (%ioblock-eofp ioblock))))
+
 (defmethod stream-listen ((stream buffered-input-stream-mixin))
   (with-stream-ioblock-input (ioblock stream :speedy t)
     (%ioblock-listen ioblock)))
+
+(defmethod stream-listen ((stream basic-input-stream))
+  (let* ((ioblock (basic-stream-ioblock stream)))
+    (with-ioblock-input-locked (ioblock)
+      (%ioblock-listen ioblock))))
 
 (defun flush-ioblock (ioblock finish-p)
@@ -2409,4 +2418,10 @@
   (let* ((ioblock (stream-ioblock stream nil)))
     (and ioblock (ioblock-charpos ioblock))))
+
+(defmethod stream-line-column ((stream basic-character-output-stream))
+  (let* ((ioblock (basic-stream.state stream)))
+    (and ioblock (ioblock-charpos ioblock))))
+
+
 
 (defmethod stream-set-column ((stream buffered-character-output-stream-mixin)
