[EMAIL PROTECTED] writes: > You could of course use things like feof and such, except that GNU tail > currently uses file-descriptor-based methods rather than stream based > ones, and feof only works on streams. So you'd need to re-write the lot.
feof won't buy you anything, it can only report EOF after a previous fgetc has read past EOF. And doing non-blocking I/O on streams is messy at best. > And even then feof basically does a getc to check if it gets EOF I > beleive (could be wrong there). feof uses the remembered result from the last call to fgetc (directly or indirectly). Don't mix that with Pascal's eof function, which indeed does a read-ahead. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux AG, Maxfeldstra�e 5, 90409 N�rnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
