Aucbvax.2388 fa.unix-wizards utzoo!decvax!ucbvax!dcrocker@udel Tue Jul 21 16:19:18 1981 Stdio FRead From: Dave Crocker The documentation for fread() lies, a little bit. It claims to return a zero on error or end-of-file. When reading from a terminal, this will usually not be true. If you try to read some arbitrarily large amount, fread will keep doing read() calls on the terminal, until the count is filled or until a control-D at the beginning of the line. If you have some text (i.e., the control-D is not done on the first input line), then fread() returns the count of text already acquired. The next fread() will simply generate another read() on the terminal. I.e., feof(stdin) and ferror(stdin) are not done when fread starts. Dave