git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5829cb0
)
lib/charset/charcnv: rename a parameter of next_codepoint_convenience_ext() for clarity
author
Michael Adam
<obnox@samba.org>
Mon, 1 Nov 2010 14:53:43 +0000
(15:53 +0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 3 Nov 2010 22:45:20 +0000
(22:45 +0000)
lib/util/charset/charcnv.c
patch
|
blob
|
history
diff --git
a/lib/util/charset/charcnv.c
b/lib/util/charset/charcnv.c
index 25a54cca13d34f4d16ab9899af20ba4d0d990552..6cced15a527ce7149f693528c24c5a8ab341c2d4 100644
(file)
--- a/
lib/util/charset/charcnv.c
+++ b/
lib/util/charset/charcnv.c
@@
-391,7
+391,7
@@
_PUBLIC_ bool convert_string_talloc_convenience(TALLOC_CTX *ctx,
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
struct smb_iconv_convenience *ic,
const char *str, charset_t src_charset,
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
struct smb_iconv_convenience *ic,
const char *str, charset_t src_charset,
- size_t *
size
)
+ size_t *
bytes_consumed
)
{
/* it cannot occupy more than 4 bytes in UTF16 format */
uint8_t buf[4];
{
/* it cannot occupy more than 4 bytes in UTF16 format */
uint8_t buf[4];
@@
-402,7
+402,7
@@
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
char *outbuf;
if ((str[0] & 0x80) == 0) {
char *outbuf;
if ((str[0] & 0x80) == 0) {
- *
size
= 1;
+ *
bytes_consumed
= 1;
return (codepoint_t)str[0];
}
return (codepoint_t)str[0];
}
@@
-414,7
+414,7
@@
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
descriptor = get_conv_handle(ic, src_charset, CH_UTF16);
if (descriptor == (smb_iconv_t)-1) {
descriptor = get_conv_handle(ic, src_charset, CH_UTF16);
if (descriptor == (smb_iconv_t)-1) {
- *
size
= 1;
+ *
bytes_consumed
= 1;
return INVALID_CODEPOINT;
}
return INVALID_CODEPOINT;
}
@@
-429,7
+429,7
@@
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
smb_iconv(descriptor, &str, &ilen, &outbuf, &olen);
if (olen == 4) {
/* we didn't convert any bytes */
smb_iconv(descriptor, &str, &ilen, &outbuf, &olen);
if (olen == 4) {
/* we didn't convert any bytes */
- *
size
= 1;
+ *
bytes_consumed
= 1;
return INVALID_CODEPOINT;
}
olen = 4 - olen;
return INVALID_CODEPOINT;
}
olen = 4 - olen;
@@
-437,7
+437,7
@@
_PUBLIC_ codepoint_t next_codepoint_convenience_ext(
olen = 2 - olen;
}
olen = 2 - olen;
}
- *
size
= ilen_orig - ilen;
+ *
bytes_consumed
= ilen_orig - ilen;
if (olen == 2) {
return (codepoint_t)SVAL(buf, 0);
if (olen == 2) {
return (codepoint_t)SVAL(buf, 0);