Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncoast.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!cwruecmp!atvax!ncoast!bsa From: bsa@ncoast.UUCP Newsgroups: net.unix-wizards Subject: Re: Re: 4.2bsd eof flag in stdio Message-ID: <504@ncoast.UUCP> Date: Tue, 18-Dec-84 15:47:14 EST Article-I.D.: ncoast.504 Posted: Tue Dec 18 15:47:14 1984 Date-Received: Fri, 21-Dec-84 00:22:10 EST References: <6535@brl-tgr.ARPA> Reply-To: bsa@ncoast.UUCP (Brandon Allbery) Organization: Unix-like Operating Systems Consultant Lines: 19 Summary: > Article <6535@brl-tgr.ARPA>, from henry@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 :-) >>>>>>