Mail Archives: djgpp-workers/2001/01/31/04:14:46
On Wed, 31 Jan 2001, Martin Stromberg wrote:
> > > Index: src/libc/ansi/stdio/doprnt.c
> > > +
> > > + if (fp->_flag & _IOAPPEND)
> > > + {
> > > + if ( llseek(fileno(fp), 0, SEEK_END) == -1 )
> > > + {
> > > + return (EOF);
> > > + }
> > > + }
> >
> > This shouldn't be needed; the flsbuf() call should move to EOF.
>
> Well, I tried without it and it didn't work.
Are you sure you tried this with a handle which had _IOAPPEND flag set,
and with _flsbuf doing the Right Thing with _IOAPPEND?
I don't see how could this not work, since _doprnt always calls putc to
output the text, and putc always calls _flsbuf.
(Btw, you should avoid doing anything in _dpornt that assumes `fp' is a
real FILE object. See sprintf for the reason why.)
- Raw text -