[Ecls-list] gray-stream support

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Tue May 6 12:42:27 UTC 2008


The file package.lisp should not be used in the ECL port. Instead use
the following patch:

--- mixin.lisp.old	2008-05-06 14:39:57.000000000 +0200
+++ mixin.lisp	2008-05-06 14:38:52.000000000 +0200
@@ -1,9 +1,18 @@
+#+ecl
+(progn
+  (si:package-lock "GRAY" nil)
+  (rename-package "GRAY" "GRAY" '("TRIVIAL-GRAY-STREAMS"))
+  (in-package :gray))
+
+#-ecl
 (in-package :trivial-gray-streams)

 (defclass trivial-gray-stream-mixin () ())

+#-ecl
 (defgeneric stream-read-sequence
     (stream sequence start end &key &allow-other-keys))
+#-ecl
 (defgeneric stream-write-sequence
     (stream sequence start end &key &allow-other-keys))

@@ -115,3 +124,18 @@
   ;; SBCL extension:
   (defmethod sb-gray:stream-line-length ((stream trivial-gray-stream-mixin))
     80))
+
+#+ecl
+(progn
+  (defmethod 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-write-sequence
+      ((s trivial-gray-stream-mixin) seq &optional start end)
+    (stream-write-sequence s seq (or start 0) (or end (length seq))))
+  ;; SBCL extension:
+  (defmethod stream-line-length ((stream trivial-gray-stream-mixin))
+    80))
+
+#+ecl
+(si:package-lock "TRIVIAL-GRAY-STREAMS" t)


-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list