From: Junio C Hamano Date: Mon, 25 Feb 2013 16:03:59 +0000 (-0800) Subject: Merge branch 'jx/utf8-printf-width' into maint X-Git-Tag: v1.8.2-rc1~2^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75288cc7e120cfcce4b11699d034bcadccdf9344;p=git Merge branch 'jx/utf8-printf-width' into maint * jx/utf8-printf-width: Add utf8_fprintf helper that returns correct number of columns --- 75288cc7e120cfcce4b11699d034bcadccdf9344 diff --cc utf8.h index a214238bdd,3ca85c7737..501b2bd9c4 --- a/utf8.h +++ b/utf8.h @@@ -8,10 -8,11 +8,11 @@@ int utf8_strwidth(const char *string) int is_utf8(const char *text); int is_encoding_utf8(const char *name); int same_encoding(const char *, const char *); + int utf8_fprintf(FILE *, const char *, ...); -int strbuf_add_wrapped_text(struct strbuf *buf, +void strbuf_add_wrapped_text(struct strbuf *buf, const char *text, int indent, int indent2, int width); -int strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len, +void strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len, int indent, int indent2, int width); #ifndef NO_ICONV