diff options
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); } /* |