-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 2/29/2008 3:49 AM: | With strace you can see that there is only a single read() from the file | descriptor. I.e. at the moment when freadahead() returns 0, it is only | the ungetc-backup-buffer which has been emptied; the main buffer still | contains 685 bytes. | | Where to fix this? In closein.c? Or in freadahead.c?
It seems like freadahead should add together the length of the ungetc buffer and the read buffer, if we can easily get to both those pieces of information - the contract of freadahead is that it tries to report how many bytes can be read from the stream without requiring another underlying read(). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHyApu84KuGfSFAYARAlAsAKDHq/TGrozG8PU+Z1ocBNxAXgSziACglD3u qFXTh1EFS4Y/b5aF6lfLHf8= =MuLD -----END PGP SIGNATURE-----