delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/18/03:12:01

Date: Sat, 18 Nov 2000 10:12:25 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: DJ Delorie <dj AT delorie DOT com>
Message-Id: <9743-Sat18Nov2000101225+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <200011180030.TAA26797@envy.delorie.com> (message from DJ Delorie
on Fri, 17 Nov 2000 19:30:59 -0500)
Subject: Re: snprintf() diff
References: <200011132023 DOT PAA04930 AT qnx DOT com> <3A1328A7 DOT C9866232 AT bigfoot DOT com> <200011160105 DOT UAA01282 AT envy DOT delorie DOT com> <3A15C4B1 DOT 383439DB AT bigfoot DOT com> <200011180030 DOT TAA26797 AT envy DOT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 17 Nov 2000 19:30:59 -0500
> From: DJ Delorie <dj AT delorie DOT com>
> 
> > *** /develop/djgpp/src/libc/ansi/stdio/flsbuf.c Thu Jun  3 18:27:34 1999
> > --- /develop/djgpp.dev/src/libc/ansi/stdio/flsbuf.c     Fri Nov 17
> > 23:36:04 2000
> > ***************
> > *** 27,32 ****
> > --- 27,36 ----
> >     if ((f->_flag&_IOWRT)==0)
> >       return EOF;
> >   
> > +   /* No-op for full string buffers */
> > +   if (f->_flag & _IOSTRG)
> > +     return c;
> > + 
> 
> Shouldn't this return EOF, not c?

Not if we want to keep the existing behavior of putc, which only
returns EOF when the whole call should fail.

Perhaps there's some misunderstanding here, because I didn't
understand why did you suggest to put this snippet into _flsbuf, and
why did you say ``so that it acts like a "disk full" condition when
the string buffer is empty''.  Could you please describe the situation
which you had in mind?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019