Re: [PATCH 1/2 v2] Add strbuf_vaddf(), use it in strbuf_addf(), and add strbuf_initf()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 6, 2008, 16:59 UTC
- Message-ID
- <alpine.LSU.1.00.0803061755080.3941@racer.site>
- In-Reply-To
- <47D02019.4000500@viscovery.net>
Hi,
On Thu, 6 Mar 2008, Johannes Sixt wrote:
Show 7 quoted lines
> Johannes Sixt schrieb: > > You did not cater for PRIuMAX, which is %llu except on Windows, where > > it is %I64u. We can make it %llu on Windows only if we can ensure that > > none of its uses ends up in a regular *printf function! > > Oh, well, PRIuMAX is *only* used in regular *printf and in die() calls. > That's fine, too.
Hey, no problem. I used my earlier analysis to find the _minimal_ set of formats needed to get Git running without that vsnprintf().
The idea is, of course, to enhance vaddf() as needed (if at all).
Note: I did not even bother trying to convert any vsnprintf() users except for strbuf_addf() to that interface: it should be relatively easy, but there are quite a few sites (even using strbuf, but not addf() because only a va_list is available), so it is left as an exercise to the reader ;-)
Ciao, Dscho