Date: Sat, 18 Nov 2000 10:08:18 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: DJ Delorie 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 Precedence: bulk > Date: Wed, 15 Nov 2000 20:05:31 -0500 > From: DJ Delorie > > > 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.