[cl-plus-ssl-cvs] CVS trivial-gray-streams

avodonosov avodonosov at common-lisp.net
Mon Oct 5 00:46:22 UTC 2009


Update of /project/cl-plus-ssl/cvsroot/trivial-gray-streams
In directory cl-net:/tmp/cvs-serv881

Modified Files:
	mixin.lisp 
Log Message:
SBCL file-position support

--- /project/cl-plus-ssl/cvsroot/trivial-gray-streams/mixin.lisp	2008/11/01 03:13:22	1.7
+++ /project/cl-plus-ssl/cvsroot/trivial-gray-streams/mixin.lisp	2009/10/05 00:46:21	1.8
@@ -131,7 +131,7 @@
 
   (defmethod gray:stream-position ((stream trivial-gray-stream-mixin) position)
     (if position
-	(setf (stream-file-position stream) position)
+        (setf (stream-file-position stream) position)
         (stream-file-position stream))))
 
 #+sbcl
@@ -142,6 +142,11 @@
   (defmethod sb-gray:stream-write-sequence
       ((s trivial-gray-stream-mixin) seq &optional start end)
     (stream-write-sequence s seq (or start 0) (or end (length seq))))
+  (defmethod sb-gray:stream-file-position 
+      ((stream trivial-gray-stream-mixin) &optional position)
+    (if position
+        (setf (stream-file-position stream) position)
+        (stream-file-position stream)))
   ;; SBCL extension:
   (defmethod sb-gray:stream-line-length ((stream trivial-gray-stream-mixin))
     80))
@@ -150,7 +155,9 @@
 (progn
   (defmethod gray:stream-read-sequence
     ((s trivial-gray-stream-mixin) seq &optional start end)
+    (format t "trivial-read~%")
     (stream-read-sequence s seq (or start 0) (or end (length seq))))
   (defmethod gray:stream-write-sequence
     ((s trivial-gray-stream-mixin) seq &optional start end)
+    (format t "trivial-write~%")
     (stream-write-sequence s seq (or start 0) (or end (length seq)))))





More information about the cl-plus-ssl-cvs mailing list