summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:36 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-27 19:24:36 -0800
commit2d2b3fd8485eee6dd238b930f2592535730089a4 (patch)
tree642dc8866db7840ef247164bee3435cf805ee03e /strbuf.h
parent14de7393f1eca05c99f785cc2f43281da2c46e9e (diff)
parent7de1950cb28cee7d6b1e9cdaf22f30ddcdc5bd01 (diff)
downloadgit-2d2b3fd8485eee6dd238b930f2592535730089a4.tar.gz
Merge branch 'rs/strbuf-expand'
* rs/strbuf-expand: remove the unused files interpolate.c and interpolate.h daemon: deglobalize variable 'directory' daemon: inline fill_in_extra_table_entries() daemon: use strbuf_expand() instead of interpolate() merge-recursive: use strbuf_expand() instead of interpolate() add strbuf_expand_dict_cb(), a helper for simple cases
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index eba7ba423a..b1670d9945 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -111,6 +111,11 @@ extern void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len);
typedef size_t (*expand_fn_t) (struct strbuf *sb, const char *placeholder, void *context);
extern void strbuf_expand(struct strbuf *sb, const char *format, expand_fn_t fn, void *context);
+struct strbuf_expand_dict_entry {
+ const char *placeholder;
+ const char *value;
+};
+extern size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder, void *context);
__attribute__((format(printf,2,3)))
extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);