From 50bdd93136d0c6e971705594a181a3a5175e2bae Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 31 Oct 2010 08:21:41 +0100 Subject: lib/util/charset/charconv: clarify comments in next_codepoint_convenience_ext() Give the unicod U+ notation of the codepoints referred to in the comments. Also reformat the comments some. --- lib/util/charset/charcnv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/util/charset') diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c index 6cced15a52..f8aeea34b8 100644 --- a/lib/util/charset/charcnv.c +++ b/lib/util/charset/charcnv.c @@ -406,9 +406,10 @@ _PUBLIC_ codepoint_t next_codepoint_convenience_ext( return (codepoint_t)str[0]; } - /* we assume that no multi-byte character can take - more than 5 bytes. This is OK as we only - support codepoints up to 1M */ + /* + * we assume that no multi-byte character can take more than 5 bytes. + * This is OK as we only support codepoints up to 1M (U+100000) + */ ilen_orig = strnlen(str, 5); ilen = ilen_orig; @@ -418,8 +419,10 @@ _PUBLIC_ codepoint_t next_codepoint_convenience_ext( return INVALID_CODEPOINT; } - /* this looks a little strange, but it is needed to cope - with codepoints above 64k */ + /* + * this looks a little strange, but it is needed to cope with + * codepoints above 64k (U+1000) which are encoded as per RFC2781. + */ olen = 2; outbuf = (char *)buf; smb_iconv(descriptor, &str, &ilen, &outbuf, &olen); -- cgit