summaryrefslogtreecommitdiffstats
path: root/src/rcciconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rcciconv.c')
-rw-r--r--src/rcciconv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rcciconv.c b/src/rcciconv.c
index 1add9d9..65b32b3 100644
--- a/src/rcciconv.c
+++ b/src/rcciconv.c
@@ -9,11 +9,11 @@
static void rccIConvCopySymbol(char **in_buf, int *in_left, char **out_buf, int *out_left) {
if ((out_left>0)&&(in_left>0)) {
- (**out_buf)=(**in_buf);
+/* (**out_buf)=(**in_buf);
(*out_buf)++;
+ (*out_left)--;*/
(*in_buf)++;
(*in_left)--;
- (*out_left)--;
}
}
@@ -49,16 +49,16 @@ void rccIConvClose(rcc_iconv icnv) {
}
size_t rccIConvRecode(rcc_iconv icnv, char *outbuf, size_t outsize, const char *buf, size_t size) {
- char *in_buf, *out_buf, *res, err;
- int in_left, out_left, olen;
+ char *in_buf, *out_buf, err;
+ int in_left, out_left;
int ub, utf_mode=0;
int errors=0;
if ((!buf)||(!outbuf)||(!outsize)||(!icnv)||(icnv->icnv == (iconv_t)-1)) return (size_t)-1;
if (iconv(icnv->icnv, NULL, NULL, NULL, NULL) == -1) return (size_t)-1;
- size = STRNLEN(buf,size);
-
+ if (!size) size = strlen(buf);
+
loop_restart:
errors = 0;
in_buf = (char*)buf; /*DS*/