Aucbvax.2400 fa.unix-wizards utzoo!decvax!ucbvax!dcrocker@udel Wed Jul 22 06:39:14 1981 Re: fread and read from a terminal From: Dave Crocker You miss the point. 1. Stdio's _filbuf() thinks that end-of-file has been reached, because it sets the bit. (I.e., feof(stdin) returns true.) 2. I said that the control-D was typed at the beginning of the line, thus forcing a zero-length read(). The problem is that fread() is not correctly dealing with the fact that its input is buffered and, hence, it must defer reporting some events, such as end-of-file. Dave