Re: [PATCH 1/2] Add strbuf_initf()
- From
Kristian Høgsberg <krh@redhat.com>
- Date
- Mar 6, 2008, 18:35 UTC
- Message-ID
- <1204828515.10084.16.camel@gaara.boston.redhat.com>
- In-Reply-To
- <alpine.LSU.1.00.0803061925370.3941@racer.site>
On Thu, 2008-03-06 at 19:26 +0100, Johannes Schindelin wrote:
Show 22 quoted lines
> Hi, > > On Thu, 6 Mar 2008, Kristian Høgsberg wrote: > > > On Thu, 2008-03-06 at 11:55 +0100, Johannes Schindelin wrote: > > > > > So your suggestion is out, unless you suggest to implement the whole > > > printf mechanism... which I hope you're not. > > > > It's not a terrible idea, honestly. > > Heh. Yeah, I actually posted a start... > > > There are several mature vsnprintf implementations out there under > > friendly licenses. We could just stick it in compat/. It's the only > > way to do reliable, cross platform vsnprintf, in my experience. And the > > issue with %I64u vs %llu could be handle by implementing both, as Wayne > > Davison suggests. > > Sure, we could always copy from somewhere else. My rationale was that I > had fun writing it, and that we do not really need a full printf() > implementation.
That's how it always starts... "We just need %d and %s! It'll take me half an hour!" I know because, I've it a number of times myself ;) Just pull in the rsync one, don't waste time on this.
Kristian