diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-04-03 12:31:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-04-03 12:31:19 -0700 |
commit | c3d1a4368ad4049a96a35f52da99024be4fe53a8 (patch) | |
tree | 0a3afa09fcfdfa062fc79c40ebd0c4a7f3c27cb3 /utf8.c | |
parent | Merge branch 'jn/maint-instaweb-plack-fix' into maint (diff) | |
parent | format-patch: rfc2047-encode newlines in headers (diff) | |
download | tgif-c3d1a4368ad4049a96a35f52da99024be4fe53a8.tar.xz |
Merge branch 'jk/format-patch-multiline-header' into maint
* jk/format-patch-multiline-header:
format-patch: rfc2047-encode newlines in headers
format-patch: wrap long header lines
strbuf: add fixed-length version of add_wrapped_text
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -405,6 +405,15 @@ new_line: } } +int strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len, + int indent, int indent2, int width) +{ + char *tmp = xstrndup(data, len); + int r = strbuf_add_wrapped_text(buf, tmp, indent, indent2, width); + free(tmp); + return r; +} + int is_encoding_utf8(const char *name) { if (!name) |