From 3ff24115d2d95342ae1adc387560907d63f99ec7 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Wed, 13 Feb 2008 10:17:41 +0000 Subject: [PATCH] applied patch from Alfred Mickautsch to flush the output at the end of * xmlwriter.c: applied patch from Alfred Mickautsch to flush the output at the end of document. Daniel svn path=/trunk/; revision=3691 --- ChangeLog | 5 +++++ xmlwriter.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 773fafa5..8479b175 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 13 10:56:38 CET 2008 Daniel Veillard + + * xmlwriter.c: applied patch from Alfred Mickautsch to flush the + output at the end of document. + Fri Feb 8 11:57:03 CET 2008 Daniel Veillard * doc/examples/examples.xml: regenerated, it was truncated. diff --git a/xmlwriter.c b/xmlwriter.c index 2d9d1090..c6959b85 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -626,9 +626,10 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version, * xmlTextWriterEndDocument: * @writer: the xmlTextWriterPtr * - * End an xml document. All open elements are closed + * End an xml document. All open elements are closed, and + * the content is flushed to the output. * - * Returns the bytes written (may be 0 because of buffering) or -1 in case of error + * Returns the bytes written or -1 in case of error */ int xmlTextWriterEndDocument(xmlTextWriterPtr writer) @@ -702,6 +703,9 @@ xmlTextWriterEndDocument(xmlTextWriterPtr writer) return -1; sum += count; } + + sum += xmlTextWriterFlush(writer); + return sum; }