From: Junio C Hamano Date: Thu, 14 Feb 2013 18:29:08 +0000 (-0800) Subject: Merge branch 'jx/utf8-printf-width' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3cc3cf970c5ce477bde78df73614d1efba2b52eb;p=git.git Merge branch 'jx/utf8-printf-width' Use a new helper that prints a message and counts its display width to align the help messages parse-options produces. * jx/utf8-printf-width: Add utf8_fprintf helper that returns correct number of columns --- 3cc3cf970c5ce477bde78df73614d1efba2b52eb diff --cc utf8.h index a214238bd,3ca85c773..501b2bd9c --- 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