diff options
author | Aron Xu <aron@debian.org> | 2013-06-09 00:17:44 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2013-06-09 00:17:44 +0800 |
commit | 2c8fe012ef1ff6e0613480dd182dec099aa9636e (patch) | |
tree | f220f4e6733d3204aef57831a8dee2dd8551ed40 /xmlIO.c | |
parent | 3c845c4be476dc0ecb93388de9cfedb3f611e6a8 (diff) | |
download | libxml2-2c8fe012ef1ff6e0613480dd182dec099aa9636e.tar.gz |
Imported Upstream version 2.9.1upstream/2.9.1
Diffstat (limited to 'xmlIO.c')
-rw-r--r-- | xmlIO.c | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -800,7 +800,7 @@ xmlCheckFilename (const char *path) return 1; } -static int +int xmlNop(void) { return(0); } @@ -3238,7 +3238,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in, * convert as much as possible to the parser reading buffer. */ use = xmlBufUse(in->raw); - nbchars = xmlCharEncInput(in); + nbchars = xmlCharEncInput(in, 1); if (nbchars < 0) { xmlIOErr(XML_IO_ENCODER, NULL); in->error = XML_IO_ENCODER; @@ -3343,7 +3343,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) { * convert as much as possible to the parser reading buffer. */ use = xmlBufUse(in->raw); - nbchars = xmlCharEncInput(in); + nbchars = xmlCharEncInput(in, 1); if (nbchars < 0) { xmlIOErr(XML_IO_ENCODER, NULL); in->error = XML_IO_ENCODER; @@ -3725,14 +3725,16 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) { */ if ((out->conv != NULL) && (out->encoder != NULL)) { /* - * convert as much as possible to the parser reading buffer. + * convert as much as possible to the parser output buffer. */ - nbchars = xmlCharEncOutput(out, 0); - if (nbchars < 0) { - xmlIOErr(XML_IO_ENCODER, NULL); - out->error = XML_IO_ENCODER; - return(-1); - } + do { + nbchars = xmlCharEncOutput(out, 0); + if (nbchars < 0) { + xmlIOErr(XML_IO_ENCODER, NULL); + out->error = XML_IO_ENCODER; + return(-1); + } + } while (nbchars); } /* |