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

Date: Sat, 18 Nov 2000 10:08:18 +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: <8011-Sat18Nov2000100818+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: <200011160105.UAA01282@envy.delorie.com> (message from DJ Delorie
on Wed, 15 Nov 2000 20:05:31 -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>
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: Wed, 15 Nov 2000 20:05:31 -0500
> From: DJ Delorie <dj AT delorie DOT com>
> 
> > 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)
> 
> This is making this macro pretty complex.  Would it be better to move
> the _IOSTRG logic into flsbuf, so that it acts like a "disk full"
> condition when the string buffer is empty?

Is it worth the function call overhead?  All _flsbuf would do is test
the same _IOSTRG flag and return the character, but we also pay the
function call overhead.

- Raw text -


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