diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-18 15:22:28 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-18 15:22:28 +0000 |
commit | 537c4b33fdf6e143243d5a0d286eeb247362e806 (patch) | |
tree | d8a94cfaa4a71ffc826b7d8176c54445369539f3 /src/rcciconv.c | |
parent | 4032f92867e5570f130e4175b3b4fb61240f9752 (diff) | |
download | librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.gz librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.bz2 librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.tar.xz librcc-537c4b33fdf6e143243d5a0d286eeb247362e806.zip |
API Improvements
- Removed 'rlen' return parameters there not necessary for multibyte encodings
- Two versions of recode functions: rccRecode -> rccRecode, rccSizedRecode
- Class Types: CONST, SKIP_SAVELOAD
- New recode functions: rccToCharset, rccFromCharset
- More new recode functions: rccRecodeToCharset, rccRecodeFromCharset, rccRecodeCharsets
- New function: rccGetCompiledConfiguration
- All warnings are fixed
- Perform "File Name" search only if there are non ISO8859-1 chars in the name.
- Do not copy invalid characters, - skip them.
- Fixed error in rccRecode with 'Recoding Cache' switched On.
- Strip leading and trailing spaces in rccDB4 get/set
Diffstat (limited to 'src/rcciconv.c')
-rw-r--r-- | src/rcciconv.c | 12 |
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*/ |