delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/13/15:23:47

Message-Id: <200011132023.PAA04930@qnx.com>
Subject: Re: snprintf() diff
To: djgpp-workers AT delorie DOT com
Date: Mon, 13 Nov 2000 15:23:40 -0500 (EST)
From: "Alain Magloire" <alain AT qnx DOT com>
In-Reply-To: <3A0F14F3.DF321E50@bigfoot.com> from "Richard Dawe" at Nov 12, 2000 10:08:51 PM
X-Mailer: ELM [version 2.5 PL0b1]
MIME-Version: 1.0
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

> 
> Hello.
> 
> Please find below a first diff for adding snprintf(), based on Alain
> Magloire's code. Changes from Alain's code drop:
> 
> * snprintf() & vsnprintf() avoid wrap-around in FILE's _cnt by returning
> EFBIG if 'n' is greater than INT_MAX.
> 
> * Rewrote the docs a little, to make them clearer. (Hope you don't mind
> Alain. ;) )


I do not mind at all.  And thank you for picking things up.
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.

BTW, nice job, unfortunately I can not test it for you.

-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!

- Raw text -


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