[LIBXML2] Update to version 2.9.10. CORE-16952

This commit is contained in:
Thomas Faber 2020-04-22 23:32:51 +02:00
parent b82bf8ce16
commit f22fa382fe
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
65 changed files with 2245 additions and 2056 deletions

View file

@ -1,5 +1,5 @@
/*
* xmlsave.c: Implemetation of the document serializer
* xmlsave.c: Implementation of the document serializer
*
* See Copyright for the status of this software.
*
@ -83,7 +83,6 @@ struct _xmlSaveCtxt {
const xmlChar *encoding;
xmlCharEncodingHandlerPtr handler;
xmlOutputBufferPtr buf;
xmlDocPtr doc;
int options;
int level;
int format;
@ -356,7 +355,7 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
/**
* xmlFreeSaveCtxt:
*
* Free a saving context, destroying the ouptut in any remaining buffer
* Free a saving context, destroying the output in any remaining buffer
*/
static void
xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt)
@ -707,7 +706,6 @@ static void
xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
xmlOutputBufferPtr buf;
int format, level;
xmlDocPtr doc;
if (dtd == NULL) return;
if ((ctxt == NULL) || (ctxt->buf == NULL))
@ -742,14 +740,11 @@ xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
}
format = ctxt->format;
level = ctxt->level;
doc = ctxt->doc;
ctxt->format = 0;
ctxt->level = -1;
ctxt->doc = dtd->doc;
xmlNodeListDumpOutput(ctxt, dtd->children);
ctxt->format = format;
ctxt->level = level;
ctxt->doc = doc;
xmlOutputBufferWrite(buf, 2, "]>");
}
@ -2191,9 +2186,9 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
*
* Dump an XML node, recursive behaviour,children are printed too.
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
* or xmlKeepBlanksDefault(0) was called
* or xmlKeepBlanksDefault(0) was called.
* Since this is using xmlBuffer structures it is limited to 2GB and somehow
* deprecated, use xmlBufNodeDump() instead.
* deprecated, use xmlNodeDumpOutput() instead.
*
* Returns the number of bytes written to the buffer or -1 in case of error
*/
@ -2360,7 +2355,6 @@ xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
encoding = "UTF-8";
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = doc;
ctxt.buf = buf;
ctxt.level = level;
ctxt.format = format ? 1 : 0;
@ -2446,7 +2440,6 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
}
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = out_doc;
ctxt.buf = out_buff;
ctxt.level = 0;
ctxt.format = format ? 1 : 0;
@ -2565,7 +2558,6 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
buf = xmlOutputBufferCreateFile(f, handler);
if (buf == NULL) return(-1);
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = cur;
ctxt.buf = buf;
ctxt.level = 0;
ctxt.format = format ? 1 : 0;
@ -2596,7 +2588,7 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
* xmlSaveFileTo:
* @buf: an output I/O buffer
* @cur: the document
* @encoding: the encoding if any assuming the I/O layer handles the trancoding
* @encoding: the encoding if any assuming the I/O layer handles the transcoding
*
* Dump an XML document to an I/O buffer.
* Warning ! This call xmlOutputBufferClose() on buf which is not available
@ -2615,7 +2607,6 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
return(-1);
}
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = cur;
ctxt.buf = buf;
ctxt.level = 0;
ctxt.format = 0;
@ -2631,7 +2622,7 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
* xmlSaveFormatFileTo:
* @buf: an output I/O buffer
* @cur: the document
* @encoding: the encoding if any assuming the I/O layer handles the trancoding
* @encoding: the encoding if any assuming the I/O layer handles the transcoding
* @format: should formatting spaces been added
*
* Dump an XML document to an I/O buffer.
@ -2655,7 +2646,6 @@ xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
return(-1);
}
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = cur;
ctxt.buf = buf;
ctxt.level = 0;
ctxt.format = format ? 1 : 0;
@ -2710,7 +2700,6 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
if (buf == NULL) return(-1);
memset(&ctxt, 0, sizeof(ctxt));
ctxt.doc = cur;
ctxt.buf = buf;
ctxt.level = 0;
ctxt.format = format ? 1 : 0;