Dave Korn wrote: > On 14 September 2006 17:59, Volker Quetschke wrote: > >> Hi! > >> (snip) >>> +#ifdef __CYGWIN__ >>> + /* lseek'ing on text files is problematic; lseek reports the true >>> + file offset, but read collapses \r\n and returns a character >>> + count. We cannot reliably seek backwards if nr is smaller than >>> + the seek offset encountered during the read, and must instead >>> + treat the stream as unbuffered. */ >>> + if ((bp->b_flag & (B_TEXT | B_UNBUFF)) == B_TEXT) >> ------------------------^^^^^^^^^^^^^^^^^ ^^^^^^ >> part of the patch looks suspicious to me. You probably just want to test >> if the LHS expression is true. > > You reckon? That looks to me like a test for B_TEXT is set *and* B_UNBUFF > is cleared. Since the action we're going to take if this test succeeds is to > set the stream unbuffered, there's no need to do it for a stream that already > /is/ unbuffered. That's how it looks to me at first glance, anyway.
See, it was the lack of coffee ;) Sorry for the noise. Volker (snap) -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D
signature.asc
Description: OpenPGP digital signature