summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/encoding.c b/encoding.c
index da063e2..a3dad07 100644
--- a/encoding.c
+++ b/encoding.c
@@ -223,7 +223,7 @@ UTF8Toascii(unsigned char* out, int *outlen,
*
* Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
* block of chars out.
- * Returns 0 if success, or -1 otherwise
+ * Returns the number of bytes written if success, or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
@@ -311,7 +311,8 @@ UTF8ToUTF8(unsigned char* out, int *outlen,
* Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
* block of chars out.
*
- * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * Returns the number of bytes written if success, -2 if the transcoding fails,
+ or -1 otherwise
* The value of @inlen after return is the number of octets consumed
* if the return value is positive, else unpredictable.
* The value of @outlen after return is the number of octets consumed.
@@ -2145,7 +2146,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) {
* the raw consumed value, this is not a cheap operation
*/
if (in->end - in->cur > 0) {
- static unsigned char convbuf[32000];
+ unsigned char convbuf[32000];
const unsigned char *cur = (const unsigned char *)in->cur;
int toconv = in->end - in->cur, written = 32000;