Mail Archives: djgpp-workers/2000/11/15/19:24:34
Hello.
Alain Magloire wrote:
> One thing, but my memory is failing (old age ?) it was about
> _filbuf() or something, this was not clearly related to snprintf()
> but it was trigger by it. stdio was trying to do fflush()
> on _IOSTR buffer or refill its buffer, which it should not do.
> Maybe Eli has a trace in its email archive about this.
I think this has been sorted out. __putc_raw() calls _flsbuf() to provide
buffer space, if there is not enough. We have added an extra case for
string buffers, to prevent the buffer being refilled. This is the else
clause below:
static __inline__ int __putc_raw(int const x,FILE *const p)
{
if(p->_cnt>0)
{
p->_cnt--;
return((unsigned char)(*(p->_ptr++)=(unsigned char)x));
}
else if (p->_flag & _IOSTRG)
{
/* noop for full string buffers */
return((unsigned char)x);
}
return(_flsbuf((unsigned char)x,p));
}
[ This is taken from my second diff. ]
Bye, Rich
--
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]
- Raw text -