[Bese-devel] arnesi io patch

Chris Dean ctdean at sokitomi.com
Tue Apr 8 01:25:12 UTC 2008


Below is a patch for more element-type support in
read-string-from-file.

Cheers,
Chris Dean

--- old-arnesi_dev/src/io.lisp	2008-04-07 18:22:40.000000000 -0700
+++ new-arnesi_dev/src/io.lisp	2008-04-07 18:22:40.000000000 -0700
@@ -59,8 +59,10 @@
 ENCODING-KEYWORD-TO-NATIVE, see ENCODING-KEYWORD-TO-NATIVE to
 possible values."
   (with-input-from-file
-      (file-stream pathname :external-format (encoding-keyword-to-native external-format))
-    (with-output-to-string (datum) 
+      (file-stream pathname
+                   :element-type element-type
+                   :external-format (encoding-keyword-to-native external-format))
+    (with-output-to-string (datum nil :element-type element-type) 
       (let ((buffer (make-array buffer-size :element-type element-type)))
 	(loop for bytes-read = (read-sequence buffer file-stream)
 	      do (write-sequence buffer datum :start 0 :end bytes-read)




More information about the bese-devel mailing list