delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/06/11:28:16

Message-Id: <200011061623.LAA03881@qnx.com>
Subject: Re: snprintf
To: eliz AT is DOT elta DOT co DOT il
Date: Mon, 6 Nov 2000 11:23:36 -0500 (EST)
From: "Alain Magloire" <alain AT qnx DOT com>
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <2593-Sat04Nov2000085036+0200-eliz@is.elta.co.il> from "Eli Zaretskii" at Nov 04, 2000 08:50:36 AM
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

> 
> > Date: Fri, 3 Nov 2000 16:06:21 -0500 (EST)
> > From: "Alain Magloire" <alain AT qnx DOT com>
> > 
> > Yes, I forgot about that.  It was change somewhat to comply
> > to C99 snprintf/vsnprintf semantics,  I've sent the docs and patches
> > to Eli, but that was along time ago.  It was suppose to be
> > in V2.03 ? or something.
> 
> No, it was not meant to be part of v2.03, since it came late, and
> needed some non-trivial work.
> 
> > The good thing is that it reused
> > DJGPP stdio guts but some small cosmetic changes was supposed
> > to be done on _doprnt() or __putc() to make it aware of the
> > size of the buffer, after that writing v/snprintf() was trivial,
> > a few lines of code.
> > 
> > Sorry, I could not find trace of the patches in my $HOME.
> 
> It's on my todo to get that done, if no one else does it before.  Your
> patches (and the ensuing discussions) are all available via searching
> the DJGPP mail archives, http://www.delorie.com/djgpp/mail-archives/.

I do not think it is since most of the exchange was not Cc:ed to
this list. You'll probably find the trivial v/snprintf implementations
but not the patched to make __putc() or fillbuffer overwrite
the buffer when the limit is reach.

> > In any case the stdio guts (_doprnt() and friends) should
> > pay attention not to overflow its buffer.  Once that is
> > done vsnpritf is trivial and maybe other things can be added.
> 
> Yes, this small issue was the reason why the function is not yet part
> of the CVS.
> 


-- 
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