X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=strbuf.h;h=13919123dc5261e7b8e4a4fdfc696f2355482b6c;hb=84ef033832af9e0be886214c70b2006b08630072;hp=cd7f295b65237aaa1f4e4031482af43cbe9d9115;hpb=35865ca24500a0d46a012f7a55f39bf36389f7ba;p=git.git diff --git a/strbuf.h b/strbuf.h index cd7f295b6..13919123d 100644 --- a/strbuf.h +++ b/strbuf.h @@ -101,6 +101,10 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s) { static inline void strbuf_addbuf(struct strbuf *sb, struct strbuf *sb2) { strbuf_add(sb, sb2->buf, sb2->len); } +extern void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len); + +typedef void (*expand_fn_t) (struct strbuf *sb, const char *placeholder, void *context); +extern void strbuf_expand(struct strbuf *sb, const char *format, const char **placeholders, expand_fn_t fn, void *context); __attribute__((format(printf,2,3))) extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);