[Ecls-list] Additional change

Juan Jose Garcia Ripoll lisp at arrakis.es
Mon May 2 11:04:06 UTC 2005

 - By default, the size of binary streams is rounded to a multiple of 8. 
If you
   want other behavior, pass :USE-HEADER-P T to the function OPEN.

The previous behavior seems to be counterintuitive for people who expect
being able to write scripts as

#!/home/jlr/bin/ecl -shell
(with-open-file (stdin  "/dev/stdin"  :element-type '(unsigned-byte 8)
          :direction :input :use-header-p nil)
  (with-open-file (stdout "/dev/stdout" :element-type '(unsigned-byte 8)
           :direction :output :use-header-p nil)
    (loop with buffer = (make-array 4096 :element-type '(unsigned-byte 8))
       for length = (read-sequence buffer stdin)
       while (plusp length)
       do (write-sequence buffer stdout :end length



More information about the ecl-devel mailing list