diff options
author | Mike Hommey <mh@glandium.org> | 2004-10-13 08:57:08 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-10-13 08:57:08 +0000 |
commit | 0732be88d054db33fa0ca479eab9988c8e6be42e (patch) | |
tree | 8b9cf70e04bd32115caebeb74cb0d841d1eced3b /encoding.c | |
parent | 09deb06614c3408ec0816a3c88920138bae2083c (diff) | |
download | libxml2-0732be88d054db33fa0ca479eab9988c8e6be42e.tar.gz |
Load /tmp/tmp.zzO3vU/libxml2-2.6.14 intoupstream/2.6.14
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2132,7 +2132,7 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { */ if (in->end - in->cur > 0) { static unsigned char convbuf[32000]; - unsigned const char *cur = (unsigned const char *)in->cur; + const unsigned char *cur = (const unsigned char *)in->cur; int toconv = in->end - in->cur, written = 32000; int ret; @@ -2230,7 +2230,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen, return(-2); } c = *in++; - if ((c & 0xC0) != 0xC0) { + if ((c & 0xC0) != 0x80) { /* not a trailing byte */ *outlen = out - outstart; *inlen = in - instart - 2; @@ -2256,14 +2256,14 @@ UTF8ToISO8859x(unsigned char* out, int *outlen, return(-2); } c1 = *in++; - if ((c1 & 0xC0) != 0xC0) { + if ((c1 & 0xC0) != 0x80) { /* not a trailing byte (c1) */ *outlen = out - outstart; *inlen = in - instart - 2; return(-2); } c2 = *in++; - if ((c2 & 0xC0) != 0xC0) { + if ((c2 & 0xC0) != 0x80) { /* not a trailing byte (c2) */ *outlen = out - outstart; *inlen = in - instart - 2; @@ -2271,8 +2271,9 @@ UTF8ToISO8859x(unsigned char* out, int *outlen, } c1 = c1 & 0x3F; c2 = c2 & 0x3F; - d = d & 0x0F; - d = xlattable [48 + c2 + xlattable [48 + c1 + xlattable [32 + d] * 64] * 64]; + d = d & 0x0F; + d = xlattable [48 + c2 + xlattable [48 + c1 + + xlattable [32 + d] * 64] * 64]; if (d == 0) { /* not in character set */ *outlen = out - outstart; |