4.2bsd eof flag in stdio
Brandon Allbery
bsa at ncoast.UUCP
Fri Nov 23 05:04:53 AEST 1984
TTY(4) XENIX Programmer's Manual TTY(4)
. . .
EOT (Control-D) may be used to generate an end of file from
a terminal. When an EOT is received, all the charac-
ters waiting to be read are immediately passed to the
program, without waiting for a new-line, and the EOT is
discarded. Thus if there are no characters waiting,
which is to say the EOT occurred at the beginning of a
line, zero characters will be passed back, and this is
the standard end-of-file indication.
\this is in the system manual; \i'd suggest both you
and \berkeley look it up (in a v7 manual if necessary).
fread() was \n\o\t designed for terminal \i/\o.
--bsa
--
Brandon Allbery @ North Coast Xenix | the.world!ucbvax!decvax!cwruecmp!
6504 Chestnut Road, Independence, Ohio | {atvax!}ncoast!{tdi1!}bsa
(216) 524-1416 \ 44131 | E1439 at CSUOHIO.BITNET (friend's acct.)
---------------------------------------+---------------------------------------
Forgive; we just had a system crash & lost a month's worth of work and patches.
More information about the Comp.unix.wizards
mailing list