X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=strbuf.h;h=13919123dc5261e7b8e4a4fdfc696f2355482b6c;hb=2ce1a1f23fd83d2cab22f87aff1165fb0c7ad450;hp=cd7f295b65237aaa1f4e4031482af43cbe9d9115;hpb=7481ebe9918771a9269c7fd0e91e855f18f2bc52;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, ...);