diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-06 15:42:04 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-06 15:42:04 +0000 |
commit | 232dbc756390d30a86ae6de0cc84600eddb1c0b2 (patch) | |
tree | e4aadbb4076392bcaf30cce6329dc715375a98d7 /src/rcciconv.c | |
parent | 550bda3e54a0895e027fee14860f14171a357ac9 (diff) | |
download | librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.gz librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.bz2 librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.xz librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.zip |
Recode FS Fixes
Diffstat (limited to 'src/rcciconv.c')
-rw-r--r-- | src/rcciconv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rcciconv.c b/src/rcciconv.c index 50f827e..aaf655f 100644 --- a/src/rcciconv.c +++ b/src/rcciconv.c @@ -28,17 +28,17 @@ static int rccIConvUTFBytes(unsigned char c) { return 6-j; } -int rccIConv(rcc_context ctx, iconv_t icnv, const char *buf, int len) { +size_t rccIConv(rcc_context ctx, iconv_t icnv, const char *buf, size_t len) { char *in_buf, *out_buf, *res, err; int in_left, out_left, olen; int ub, utf_mode=0; int errors=0; - if ((!buf)||(!ctx)||(icnv == (iconv_t)-1)) return -1; + if ((!buf)||(!ctx)||(icnv == (iconv_t)-1)) return (size_t)-1; len = STRNLEN(buf,len); - if (iconv(icnv, NULL, NULL, NULL, NULL) == -1) return -1; + if (iconv(icnv, NULL, NULL, NULL, NULL) == -1) return (size_t)-1; loop_restart: errors = 0; @@ -61,10 +61,10 @@ loop: utf_mode = 1; goto loop_restart; } else { - return -1; + return (size_t)-1; } } else { - return -1; + return (size_t)-1; } } |