diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-05-28 11:00:53 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-05-28 11:00:53 +0000 |
commit | 9403a0495dcbdfa430b669b4e3d689d8e208c687 (patch) | |
tree | cd11faf87ae611b32653dbda99e8068e5005fcb8 /encoding.c | |
parent | 6278fb5b30821c9edc7b4304619944d2f50a932b (diff) | |
download | android_external_libxml2-9403a0495dcbdfa430b669b4e3d689d8e208c687.tar.gz android_external_libxml2-9403a0495dcbdfa430b669b4e3d689d8e208c687.tar.bz2 android_external_libxml2-9403a0495dcbdfa430b669b4e3d689d8e208c687.zip |
- TODO: updated - nanohttp.[ch] : started adding APIs to get the
- TODO: updated
- nanohttp.[ch] : started adding APIs to get the redirected URL
when this occurs (needed for further base computation
- tree.h: cleanup
- encoding.c: cleanup
- SAX.c: minor change around ctxt->loadsubset
Daniel
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 62 |
1 files changed, 31 insertions, 31 deletions
@@ -1690,43 +1690,43 @@ xmlFindCharEncodingHandler(const char *name) { */ static int xmlIconvWrapper(iconv_t cd, - unsigned char *out, int *outlen, - const unsigned char *in, int *inlen) { - - size_t icv_inlen = *inlen, icv_outlen = *outlen; - const char *icv_in = (const char *) in; - char *icv_out = (char *) out; - int ret; - - ret = iconv(cd, &icv_in, &icv_inlen, &icv_out, &icv_outlen); - if (in != NULL) { - *inlen -= icv_inlen; - *outlen -= icv_outlen; - } else { - *inlen = 0; - *outlen = 0; - } - if ((icv_inlen != 0) || (ret == -1)) { + unsigned char *out, int *outlen, + const unsigned char *in, int *inlen) { + + size_t icv_inlen = *inlen, icv_outlen = *outlen; + const char *icv_in = (const char *) in; + char *icv_out = (char *) out; + int ret; + + ret = iconv(cd, &icv_in, &icv_inlen, &icv_out, &icv_outlen); + if (in != NULL) { + *inlen -= icv_inlen; + *outlen -= icv_outlen; + } else { + *inlen = 0; + *outlen = 0; + } + if ((icv_inlen != 0) || (ret == -1)) { #ifdef EILSEQ - if (errno == EILSEQ) { - return -2; - } else + if (errno == EILSEQ) { + return -2; + } else #endif #ifdef E2BIG - if (errno == E2BIG) { - return -1; - } else + if (errno == E2BIG) { + return -1; + } else #endif #ifdef EINVAL - if (errno == EINVAL) { - return -3; - } else + if (errno == EINVAL) { + return -3; + } else #endif - { - return -3; - } - } - return 0; + { + return -3; + } + } + return 0; } #endif /* LIBXML_ICONV_ENABLED */ |