From owner-cvs-usrbin Sun Nov 17 06:01:49 1996 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA20089 for cvs-usrbin-outgoing; Sun, 17 Nov 1996 06:01:49 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA20076; Sun, 17 Nov 1996 06:01:33 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id AAA19233; Mon, 18 Nov 1996 00:58:54 +1100 Date: Mon, 18 Nov 1996 00:58:54 +1100 From: Bruce Evans Message-Id: <199611171358.AAA19233@godzilla.zeta.org.au> To: j@uriah.heep.sax.de, wosch@cs.tu-berlin.de Subject: Re: cvs commit: src/usr.bin/sed main.c Cc: bde@zeta.org.au, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, joerg@freefall.freebsd.org, joerg_wunsch@uriah.heep.sax.de Sender: owner-cvs-usrbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> >> Erm, as I told the submitter, this introduces C programmer's bug >> >> #: feof() is not valid until EOF has been read. >> > >> >Huh? I can't find any reference claiming this. >> >> The reference is in my private mail box, as Bruce wrote. > >Nope, my question was which standard claims that feof() could return >wrong results after a successful fopen() but before reaching the EOF >of the stream. It returns correct but uninteresting results (always 0) from after fopen() until EOF has been read from the stream. ANSI standard. Bruce