svn commit: r187805 - head/lib/libc/stdio

John Baldwin jhb at freebsd.org
Wed Jan 28 06:08:12 PST 2009


On Wednesday 28 January 2009 8:55:37 am Tom Rhodes wrote:
> On Wed, 28 Jan 2009 15:09:56 +0200
> Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> 
> > On Wed, 28 Jan 2009 01:11:21 +0000 (UTC), Tom Rhodes <trhodes at 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.

-- 
John Baldwin


More information about the svn-src-head mailing list