From: Johannes Sixt Date: Thu, 06 Mar 2008 16:38:37 GMT Subject: Re: [PATCH 1/2 v2] Add strbuf_vaddf(), use it in strbuf_addf(), and add strbuf_initf() Message-ID: <47D01E0D.1090801@viscovery.net> In-Reply-To: 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 '', ' ' and '0', 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