4.2bsd eof flag in stdio
bsa at ncoast.UUCP
bsa at ncoast.UUCP
Wed Dec 19 06:47:14 AEST 1984
> Article <6535 at brl-tgr.ARPA>, from henry at utzoo.uucp
+----------------
| > Here's an excerpt from the 4.2BSD man page for fread, V7 is identical:
| >
| > DIAGNOSTICS
| > Fread and fwrite return 0 upon end of file or error.
|
| Not just a short count, mind you, but 0.
Which is wrong. If you request 7 characters and it reads 4 before EOF,
you've either lost 4 characters or gotten 3 garbage characters, depending
on what fread returns and how your program deals with EOF. Sounds to
me like fread is wrong from square one.
--bsa
--
Brandon Allbery @ decvax!cwruecmp!ncoast!bsa (..ncoast!tdi1!bsa business)
6504 Chestnut Road, Independence, Ohio 44131 (216) 524-1416
<<<<<< An equal opportunity employer: I both create and destroy bugs :-) >>>>>>
More information about the Comp.unix.wizards
mailing list