summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-10-31 08:21:41 +0100
committerMichael Adam <obnox@samba.org>2010-11-03 22:45:20 +0000
commit50bdd93136d0c6e971705594a181a3a5175e2bae (patch)
tree5eca59796505930f4df46a962f3484011a6de90b /lib/util
parentc18b67235c71ab012d1d74d8fdc1e5f38d713362 (diff)
downloadsamba-50bdd93136d0c6e971705594a181a3a5175e2bae.tar.gz
samba-50bdd93136d0c6e971705594a181a3a5175e2bae.tar.bz2
samba-50bdd93136d0c6e971705594a181a3a5175e2bae.zip
lib/util/charset/charconv: clarify comments in next_codepoint_convenience_ext()
Give the unicod U+<hexnumber> notation of the codepoints referred to in the comments. Also reformat the comments some.
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/charset/charcnv.c13
1 files changed, 8 insertions, 5 deletions
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);