X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=strbuf.h;h=675a91f93821421aa79de51857b22a4960da8ec1;hb=267684f0b7428583ba88c4acc0e9ef322a36b3ff;hp=fa07ecf094bd3ef8997958fde29199f8fb6421b9;hpb=ce67b3eed896e0884ca4cdc2edce9a032cefe45a;p=git.git diff --git a/strbuf.h b/strbuf.h index fa07ecf09..675a91f93 100644 --- a/strbuf.h +++ b/strbuf.h @@ -16,7 +16,7 @@ * * 2. the ->buf member is a byte array that has at least ->len + 1 bytes * allocated. The extra byte is used to store a '\0', allowing the ->buf - * member to be a valid C-string. Every strbuf function ensure this + * member to be a valid C-string. Every strbuf function ensures this * invariant is preserved. * * Note that it is OK to "play" with the buffer directly if you work it @@ -81,7 +81,6 @@ extern void strbuf_trim(struct strbuf *); extern void strbuf_rtrim(struct strbuf *); extern void strbuf_ltrim(struct strbuf *); extern int strbuf_cmp(const struct strbuf *, const struct strbuf *); -extern void strbuf_tolower(struct strbuf *); extern struct strbuf **strbuf_split(const struct strbuf *, int delim); extern void strbuf_list_free(struct strbuf **); @@ -105,6 +104,7 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s) { strbuf_add(sb, s, strlen(s)); } static inline void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2) { + strbuf_grow(sb, sb2->len); strbuf_add(sb, sb2->buf, sb2->len); } extern void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len); @@ -116,6 +116,7 @@ struct strbuf_expand_dict_entry { const char *value; }; extern size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder, void *context); +extern void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src); __attribute__((format (printf,2,3))) extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);