Parcourir la source

FILE-POSITION support for Allegro CL. Thanks to Bart Botta.

avodonosov il y a 15 ans
Parent
commit
514076746b
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8 1
      mixin.lisp

+ 8 - 1
mixin.lisp

@@ -48,9 +48,16 @@
   (defmethod excl:stream-read-sequence
       ((s trivial-gray-stream-mixin) seq &optional start end)
     (stream-read-sequence s seq (or start 0) (or end (length seq))))
+
   (defmethod stream:stream-write-sequence
       ((s trivial-gray-stream-mixin) seq &optional start end)
-    (stream-write-sequence s seq (or start 0) (or end (length seq)))))
+    (stream-write-sequence s seq (or start 0) (or end (length seq))))
+
+  (defmethod excl::stream-file-position
+       ((stream trivial-gray-stream-mixin) &optional position)
+     (if position
+         (setf (stream-file-position stream) position)
+         (stream-file-position stream))))
 
 #+cmu
 (progn