author | Jeff King <peff@peff.net> | |
Sat, 26 Feb 2011 05:08:53 +0000 (23:08 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Feb 2011 09:06:50 +0000 (01:06 -0800) | ||
commit | ebeb60900fbab569ed14f710a0a1abb1637ec792 | |
tree | ce1d20fec4ef43f883230238eed21be1a598b1e0 | tree | snapshot |
parent | ab8632ae36d2e5faf524309696725b60ec18e588 | commit | diff |
strbuf: add strbuf_vaddf
In a variable-args function, the code for writing into a strbuf is
non-trivial. We ended up cutting and pasting it in several places
because there was no vprintf-style function for strbufs (which in turn
was held up by a lack of va_copy).
Now that we have a fallback va_copy, we can add strbuf_vaddf, the
strbuf equivalent of vsprintf. And we can clean up the cut and paste
mess.
Signed-off-by: Jeff King <peff@peff.net>
Improved-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In a variable-args function, the code for writing into a strbuf is
non-trivial. We ended up cutting and pasting it in several places
because there was no vprintf-style function for strbufs (which in turn
was held up by a lack of va_copy).
Now that we have a fallback va_copy, we can add strbuf_vaddf, the
strbuf equivalent of vsprintf. And we can clean up the cut and paste
mess.
Signed-off-by: Jeff King <peff@peff.net>
Improved-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c | diff | blob | history | |
merge-recursive.c | diff | blob | history | |
strbuf.c | diff | blob | history | |
strbuf.h | diff | blob | history | |
trace.c | diff | blob | history |