summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-02 09:49:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-01-07 04:53:46 (GMT)
commit44b25b872f926ba92bae9ddf2495e7f59d0c96e2 (patch)
tree579d32398870dd862ea60008566dd498acad6902 /utf8.h
parent396ccf1fcb91f31d5060555cbffc35bf24172a35 (diff)
downloadgit-44b25b872f926ba92bae9ddf2495e7f59d0c96e2.zip
git-44b25b872f926ba92bae9ddf2495e7f59d0c96e2.tar.gz
git-44b25b872f926ba92bae9ddf2495e7f59d0c96e2.tar.bz2
utf8_width(): allow non NUL-terminated input
The original interface assumed that the input string is always terminated with a NUL, but that wasn't too useful. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.h b/utf8.h
index 4a7f046..98cce1b 100644
--- a/utf8.h
+++ b/utf8.h
@@ -3,8 +3,8 @@
typedef unsigned int ucs_char_t; /* assuming 32bit int */
-ucs_char_t pick_one_utf8_char(const char **start);
-int utf8_width(const char **start);
+ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p);
+int utf8_width(const char **start, size_t *remainder_p);
int is_utf8(const char *text);
int is_encoding_utf8(const char *name);