Ticket #79: diff
File diff, 779 bytes (added by , 15 years ago) |
---|
-
z3.scm
220 220 (define (z3:open-compressed-input-file filename) 221 221 (let* ((fd (file-open filename (bitwise-ior open/read open/binary))) 222 222 (z3 (z3:decode-file fd)) 223 (eof #f) 223 224 (buf #f) 224 225 (len 0) 225 226 (pos 0) ) 226 227 (define (read-next) 227 (let ((b (z3:read-decoded z3))) 228 (cond ((eof-object? b) b) 229 (else 230 (set! buf b) 231 (set! len (string-length b)) ) ) ) ) 228 (if eof 229 #!eof 230 (let ((b (z3:read-decoded z3))) 231 (cond ((eof-object? b) 232 (set! eof #t) 233 b) 234 (else 235 (set! buf b) 236 (set! len (string-length b)) ) ) ) ) ) 232 237 (make-input-port 233 238 (lambda () 234 239 (cond ((fx>= pos len)