From 44b25b872f926ba92bae9ddf2495e7f59d0c96e2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 2 Jan 2008 01:49:58 -0800 Subject: 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 --- utf8.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utf8.h') diff --git a/utf8.h b/utf8.h index 4a7f0464c4..98cce1b038 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); -- cgit v1.2.3