Subject: Re: [PATCH 1/2 v2] Add strbuf_vaddf(), use it in strbuf_addf(), and add strbuf_initf()

From: Johannes Sixt <[email-masked]>
Date: Thu, 06 Mar 2008 17:38:37 +0100

Johannes Schindelin schrieb:
> The most common use of addf() was to init a strbuf and addf() right away.
> Since it is so common, it makes sense to have a function strbuf_initf() to
> wrap both calls into one.
> 
> To do that, we implement a (really minimal) vaddf() lookalike to
> vsprintf().
> 
> At the moment, it only handles %u, %i, %d, %l, %o, %x and %X with size
> indicators '<number>', ' <number>' and '0<number>', as well as %c and %s,
> the latter with size indicators '.*' in addition to the same size
> indicators as for numbers.

WTF?

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!

-- Hannes