From owner-svn-src-head@FreeBSD.ORG Wed Jan 28 14:27:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1B9C1065762; Wed, 28 Jan 2009 14:27:42 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1F69C8FC16; Wed, 28 Jan 2009 14:27:41 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl21-232.kln.forthnet.gr [77.49.148.232]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0SERXDo032187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jan 2009 16:27:38 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0SERW0a004270; Wed, 28 Jan 2009 16:27:32 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n0SERWH9004269; Wed, 28 Jan 2009 16:27:32 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: John Baldwin References: <200901280111.n0S1BL7n003092@svn.freebsd.org> <873af38tln.fsf@kobe.laptop> <20090128085537.2d6c9c34.trhodes@FreeBSD.org> <200901280907.52256.jhb@freebsd.org> Date: Wed, 28 Jan 2009 16:27:32 +0200 In-Reply-To: <200901280907.52256.jhb@freebsd.org> (John Baldwin's message of "Wed, 28 Jan 2009 09:07:51 -0500") Message-ID: <87k58fh5ez.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n0SERXDo032187 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.46, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.06, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: svn-src-head@freebsd.org, Tom Rhodes , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187805 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 14:27:43 -0000 On Wed, 28 Jan 2009 09:07:51 -0500, John Baldwin wrote: > On Wednesday 28 January 2009 8:55:37 am Tom Rhodes wrote: >> On Wed, 28 Jan 2009 15:09:56 +0200 Giorgos Keramidas wrote: >> > On Wed, 28 Jan 2009 01:11:21 +0000 (UTC), Tom Rhodes wrote: >> > > Author: trhodes >> > > Date: Wed Jan 28 01:11:20 2009 >> > > New Revision: 187805 >> > > URL: http://svn.freebsd.org/changeset/base/187805 >> > > >> > > Log: >> > > Remove comment about clearerr() being the only method of clearing >> > > the EOF indicator, fseek() may also be used for this. >> > > >> > > Bump document date. >> > >> > I don't like this, sorry... Having a pointer to clearerr() is nice. >> > Removing it *deletes* useful information, but we should add _more_ of >> > it. >> > >> > How about this instead? >> > >> > The end-of-file indicator may be cleared by explicitly calling >> > .Fn clearerr , >> > or as a side-effect of other operations, i.e.\& >> > .Fn fseek . >> >> I think 'side-effect" is wrong here - it may not be a "side >> effect" at all, but, on purpose. :) > > If one solely wants to clear the indicator then clearerr() is probably > what you should do. Using fseek() only to clear the indicator would > be bad form. One should be using fseek() because they need to seek to > a different location in the stream, not to clear the error. Thus, I > agree with Giorgos' wording. Precisely. We are not suggesting that users SHOULD use side-effects, just noting one example. The _intent_ of a function to clear EOF is more important than the fact that it happens 'in addition to' other things as opposed to 'because we asked for it'.