Index: /trunk/ccl/level-1/l1-streams.lisp
===================================================================
--- /trunk/ccl/level-1/l1-streams.lisp	(revision 5065)
+++ /trunk/ccl/level-1/l1-streams.lisp	(revision 5066)
@@ -762,5 +762,5 @@
 		 (setq col 0)
 		 (incf col))
-	       (setf (schar buffer i) ch)))
+	       (setf (aref buffer i) (%char-code ch))))
 	   (setf (ioblock-dirty ioblock) t)
 	   (incf index written)
@@ -874,5 +874,5 @@
 			    (%extend-vector
 			     0 string (the fixnum (+ len more)))))
-		    (%copy-ivector-to-ivector
+		    (%copy-u8-to-string
 		     buf idx string len more)
 		    (return (values string nil))))
@@ -883,5 +883,5 @@
 		      string (%extend-vector
 			      0 string (the fixnum (+ len more))))
-		(%copy-ivector-to-ivector
+		(%copy-u8-to-string
 		 buf idx string len more)
 		(incf len more))))))))
@@ -907,5 +907,5 @@
 	  (if (> avail need)
 	    (setq avail need))
-	  (%copy-ivector-to-ivector inbuf idx vector i avail)
+	  (%copy-u8-to-string inbuf idx vector i avail)
 	  (setf (io-buffer-idx in) (+ idx avail))
 	  (incf i avail)
@@ -1500,6 +1500,6 @@
     (gvector :basic-stream class 0 nil nil)))
 
-(defmethod initialize-basic-stream ((s basic-stream) &key &allow-other-keys)
-  )
+(defmethod initialize-basic-stream ((s basic-stream) &key element-type &allow-other-keys)
+  (setf (getf (basic-stream.info s) :element-type) element-type))
 
 (defmethod initialize-basic-stream :after  ((s basic-input-stream) &key &allow-other-keys)
@@ -2211,8 +2211,17 @@
   (let* ((ioblock (stream-ioblock s nil)))
     (and ioblock (ioblock-device ioblock))))
+
+(defmethod stream-device ((s basic-stream) direction)
+  (declare (ignore direction))
+  (let* ((ioblock (basic-stream.state s)))
+    (and ioblock (ioblock-device ioblock))))
   
 (defmethod stream-element-type ((s buffered-stream-mixin))
   (%buffered-stream-element-type s))
 
+(defmethod stream-element-type ((s basic-stream))
+  (getf (basic-stream.info s) :element-type))
+
+
 (defmethod stream-create-ioblock ((stream buffered-stream-mixin) &rest args &key)
   (declare (dynamic-extent args))
@@ -2224,4 +2233,8 @@
 (defmethod stream-owner ((stream buffered-stream-mixin))
   (let* ((ioblock (stream-ioblock stream nil)))
+    (and ioblock (ioblock-owner ioblock))))
+
+(defmethod stream-owner ((stream basic-stream))
+  (let* ((ioblock (basic-stream.state stream)))
     (and ioblock (ioblock-owner ioblock))))
 
