summaryrefslogtreecommitdiff
path: root/xmlIO.c
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2013-06-09 00:17:44 +0800
committerAron Xu <aron@debian.org>2013-06-09 00:17:44 +0800
commit2c8fe012ef1ff6e0613480dd182dec099aa9636e (patch)
treef220f4e6733d3204aef57831a8dee2dd8551ed40 /xmlIO.c
parent3c845c4be476dc0ecb93388de9cfedb3f611e6a8 (diff)
downloadlibxml2-2c8fe012ef1ff6e0613480dd182dec099aa9636e.tar.gz
Imported Upstream version 2.9.1upstream/2.9.1
Diffstat (limited to 'xmlIO.c')
-rw-r--r--xmlIO.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/xmlIO.c b/xmlIO.c
index f8f438b..847cb7e 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -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);
}
/*