id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,planetversion,pltversion
280,eof error,rik.vanmechelen@…,soegaard,"It says in the comments that when you reach an eof it should return #f when reading.
I got an error that the bitwise-and got eof as first argument
the fix for this is:
;;;new if statement to chech for eof first
 (define (read-few-bits n)
        (if (eof-object? buffer)
            #f
            (let ((value (bitwise-and buffer 	; all bits in buffer
                                      (sub1 (<<1 mask)))))
              (set! bits-in-buffer (- bits-in-buffer n))
              (set! mask (>> mask n))
              (>> value bits-in-buffer)))) ; remove extra bits

and 
;;;added and with not eof?
((and (= n 1)		; read one bit
                (not (eof-object? buffer)))
	   (let ((value (if (bit-set? buffer mask) 1 0)))
	     (set! mask (>>1 mask))
	     (set! bits-in-buffer (sub1 bits-in-buffer))
	     value))

bye,
Rik Vanmechelen
rik.vanmechelen@vub.ac.be
Vrije Universiteit Brussel",defect,new,critical,,soegaard/bit-io.plt,,eof error,,(2 0),4.2.4
