Date: Wed, 28 Jan 2009 09:40:20 -0500 From: Tom Rhodes <trhodes@FreeBSD.org> To: Giorgos Keramidas <keramida@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org Subject: Re: svn commit: r187805 - head/lib/libc/stdio Message-ID: <20090128094020.0e399ba9.trhodes@FreeBSD.org> In-Reply-To: <87k58fh5ez.fsf@kobe.laptop> References: <200901280111.n0S1BL7n003092@svn.freebsd.org> <873af38tln.fsf@kobe.laptop> <20090128085537.2d6c9c34.trhodes@FreeBSD.org> <200901280907.52256.jhb@freebsd.org> <87k58fh5ez.fsf@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 28 Jan 2009 16:27:32 +0200 Giorgos Keramidas <keramida@FreeBSD.org> wrote: > On Wed, 28 Jan 2009 09:07:51 -0500, John Baldwin <jhb@freebsd.org> wrote: > > On Wednesday 28 January 2009 8:55:37 am Tom Rhodes wrote: > >> On Wed, 28 Jan 2009 15:09:56 +0200 Giorgos Keramidas <keramida@ceid.upatras.gr> wrote: > >> > On Wed, 28 Jan 2009 01:11:21 +0000 (UTC), Tom Rhodes <trhodes@FreeBSD.org> 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'. > > See latest change, took your wording and John's follow up, thanks! -- Tom Rhodes
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090128094020.0e399ba9.trhodes>