Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!ut-sally!pyramid!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: fgets() returns NULL at EOF?? Message-ID: <6885@sun.uucp> Date: Thu, 4-Sep-86 12:23:44 EDT Article-I.D.: sun.6885 Posted: Thu Sep 4 12:23:44 1986 Date-Received: Fri, 5-Sep-86 03:19:52 EDT References: <6444@sun.uucp> <86900031@haddock> Organization: Sun Microsystems, Inc. Lines: 10 > Better yet, return the number of characters read (so 0 on failure). Better still, return the number of characters read, but return EOF on failure; 1) this is what "fputs" does and 2) this encourages you to distinguish between EOF and error, something that several UNIX utilities, to their everlasting shame, do not do. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)