Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt!ius2.cs.cmu.edu!edw From: edw@ius2.cs.cmu.edu (Eddie Wyatt) Newsgroups: comp.lang.c Subject: Re: Writing readable code Message-ID: <1227@ius2.cs.cmu.edu> Date: Mon, 6-Jul-87 09:37:04 EDT Article-I.D.: ius2.1227 Posted: Mon Jul 6 09:37:04 1987 Date-Received: Tue, 7-Jul-87 03:01:59 EDT References: <8168@brl-adm.ARPA> Organization: Carnegie-Mellon University, CS/RI Lines: 24 In article <8168@brl-adm.ARPA>, DRIEHUIS%HLERUL5.BITNET@wiscvm.wisc.EDU writes: > Of course, you should keep in mind that fopen() returns EOF, > which is defined as -1, and that assuming that any negative > return from fopen() means an error has occurred, is non-portable > as far as machines with possibly valid negative pointers are > concerned (This is the case on small-model 808x for instance). > - Bert > Bert Driehuis, LICOR Leiden, The Netherlands> V.N.G. The Hague fopen returns EOF on error??? My man page says it returns NULL (0) if it can't open a file. If what you really meant was open, well my man page says it returns -1 not EOF on error. (This really doesn't belong in comp.lang.c) -- Eddie Wyatt e-mail: edw@ius2.cs.cmu.edu terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.