4.2bsd eof flag in stdio
Bill Shannon
shannon at sun.uucp
Sun Dec 2 09:22:03 AEST 1984
Jim Balter says,
"show me the manual page for fread that says that 0 is returned upon EOF!"
Here's an excerpt from the 4.2BSD man page for fread, V7 is identical:
DESCRIPTION
Fread reads, into a block beginning at ptr, nitems of data
of the type of *ptr from the named input stream. It returns
the number of items actually read.
. . .
DIAGNOSTICS
Fread and fwrite return 0 upon end of file or error.
He also says,
"A change can only be considered a bug fix if it brings into
line behavior previously out of line with the documentation."
Thank you, Jim, for justifying our change. It seems apparent from your
argument that it was System III/V that did the wrong thing.
Bill Shannon
Sun Microsystems, Inc.
More information about the Comp.unix.wizards
mailing list