From 8b7ade14efb521cacfeb04b1f40a1a0f11fa02de Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 26 Nov 2025 14:34:00 +0200 Subject: [PATCH] [LIBXML2] Update to release 2.12.8 (from Wine-10.0) --- sdk/include/reactos/libs/libxml/DOCBparser.h | 96 - sdk/include/reactos/libs/libxml/c14n.h | 128 - sdk/include/reactos/libs/libxml/globals.h | 499 -- sdk/include/reactos/libs/libxml/schematron.h | 142 - sdk/include/reactos/libs/libxml/xlink.h | 189 - sdk/include/reactos/libs/libxml/xmlmodule.h | 57 - sdk/include/reactos/libs/libxml/xmlunicode.h | 202 - .../reactos/libs/libxml/xmlversion.h.in | 503 -- sdk/include/reactos/libs/libxml/xmlwriter.h | 488 -- sdk/lib/3rdparty/libxml2/AUTHORS | 5 + sdk/lib/3rdparty/libxml2/CMakeLists.txt | 22 +- .../3rdparty/libxml2/{Copyright => COPYING} | 0 sdk/lib/3rdparty/libxml2/HTMLparser.c | 1169 +-- sdk/lib/3rdparty/libxml2/HTMLtree.c | 27 +- sdk/lib/3rdparty/libxml2/NEWS | 3836 --------- sdk/lib/3rdparty/libxml2/README.md | 126 - sdk/lib/3rdparty/libxml2/SAX.c | 1 - sdk/lib/3rdparty/libxml2/SAX2.c | 523 +- sdk/lib/3rdparty/libxml2/TODO | 276 - sdk/lib/3rdparty/libxml2/TODO_SCHEMAS | 31 - sdk/lib/3rdparty/libxml2/buf.c | 192 +- sdk/lib/3rdparty/libxml2/buf.h | 67 - sdk/lib/3rdparty/libxml2/c14n.c | 2228 ------ sdk/lib/3rdparty/libxml2/catalog.c | 25 +- sdk/lib/3rdparty/libxml2/chvalid.c | 2 + sdk/lib/3rdparty/libxml2/config.h | 217 - sdk/lib/3rdparty/libxml2/debugXML.c | 6 +- sdk/lib/3rdparty/libxml2/dict.c | 1507 ++-- sdk/lib/3rdparty/libxml2/enc.h | 32 - sdk/lib/3rdparty/libxml2/encoding.c | 1372 ++-- sdk/lib/3rdparty/libxml2/entities.c | 26 +- sdk/lib/3rdparty/libxml2/error.c | 90 +- sdk/lib/3rdparty/libxml2/globals.c | 1367 ++-- sdk/lib/3rdparty/libxml2/hash.c | 1809 ++--- .../libxml2/include}/libxml/HTMLparser.h | 113 +- .../libxml2/include}/libxml/HTMLtree.h | 36 +- .../3rdparty/libxml2/include}/libxml/SAX.h | 74 +- .../3rdparty/libxml2/include}/libxml/SAX2.h | 75 +- .../libxml2/include}/libxml/catalog.h | 72 +- .../libxml2/include}/libxml/chvalid.h | 18 +- .../libxml2/include}/libxml/debugXML.h | 56 +- .../3rdparty/libxml2/include}/libxml/dict.h | 27 +- .../libxml2/include}/libxml/encoding.h | 69 +- .../libxml2/include}/libxml/entities.h | 44 +- .../3rdparty/libxml2/include/libxml/globals.h | 41 + .../3rdparty/libxml2/include}/libxml/hash.h | 168 +- .../3rdparty/libxml2/include}/libxml/list.h | 52 +- .../libxml2/include}/libxml/nanoftp.h | 48 +- .../libxml2/include}/libxml/nanohttp.h | 34 +- .../3rdparty/libxml2/include}/libxml/parser.h | 326 +- .../libxml2/include}/libxml/parserInternals.h | 293 +- .../libxml2/include}/libxml/pattern.h | 30 +- .../libxml2/include}/libxml/relaxng.h | 55 +- .../include}/libxml/schemasInternals.h | 5 +- .../libxml2/include}/libxml/threads.h | 52 +- .../3rdparty/libxml2/include}/libxml/tree.h | 417 +- .../3rdparty/libxml2/include}/libxml/uri.h | 33 +- .../3rdparty/libxml2/include}/libxml/valid.h | 161 +- .../libxml2/include}/libxml/xinclude.h | 20 +- .../3rdparty/libxml2/include}/libxml/xmlIO.h | 195 +- .../libxml2/include}/libxml/xmlautomata.h | 42 +- .../libxml2/include}/libxml/xmlerror.h | 103 +- .../libxml2/include}/libxml/xmlexports.h | 57 +- .../libxml2/include}/libxml/xmlmemory.h | 126 +- .../libxml2/include}/libxml/xmlreader.h | 181 +- .../libxml2/include}/libxml/xmlregexp.h | 71 +- .../libxml2/include}/libxml/xmlsave.h | 31 +- .../libxml2/include}/libxml/xmlschemas.h | 63 +- .../libxml2/include}/libxml/xmlschemastypes.h | 68 +- .../libxml2/include}/libxml/xmlstring.h | 60 +- .../libxml2/include/libxml/xmlunicode.h | 202 + .../libxml2/include}/libxml/xmlversion.h | 116 +- .../3rdparty/libxml2/include}/libxml/xpath.h | 82 +- .../libxml2/include}/libxml/xpathInternals.h | 237 +- .../libxml2/include}/libxml/xpointer.h | 51 +- .../3rdparty/libxml2/include/private/buf.h | 67 + .../3rdparty/libxml2/include/private/dict.h | 72 + .../3rdparty/libxml2/include/private/enc.h | 18 + .../libxml2/include/private/entities.h | 23 + .../3rdparty/libxml2/include/private/error.h | 23 + .../libxml2/include/private/globals.h | 9 + .../3rdparty/libxml2/include/private/html.h | 13 + sdk/lib/3rdparty/libxml2/include/private/io.h | 22 + .../3rdparty/libxml2/include/private/memory.h | 9 + .../3rdparty/libxml2/include/private/parser.h | 68 + .../3rdparty/libxml2/include/private/regexp.h | 9 + .../3rdparty/libxml2/include/private/save.h | 17 + .../3rdparty/libxml2/include/private/string.h | 9 + .../libxml2/include/private/threads.h | 35 + .../3rdparty/libxml2/include/private/tree.h | 18 + .../libxml2/include/private/xinclude.h | 9 + .../3rdparty/libxml2/include/private/xpath.h | 7 + .../3rdparty/libxml2/include/win32config.h | 20 +- .../3rdparty/libxml2/include/wsockcompat.h | 50 - sdk/lib/3rdparty/libxml2/legacy.c | 1342 ---- sdk/lib/3rdparty/libxml2/libxml.h | 108 +- sdk/lib/3rdparty/libxml2/list.c | 2 +- sdk/lib/3rdparty/libxml2/nanoftp.c | 2108 ----- sdk/lib/3rdparty/libxml2/nanohttp.c | 1890 ----- sdk/lib/3rdparty/libxml2/parser.c | 6442 ++++++++------- sdk/lib/3rdparty/libxml2/parserInternals.c | 1804 +++-- sdk/lib/3rdparty/libxml2/pattern.c | 103 +- sdk/lib/3rdparty/libxml2/relaxng.c | 309 +- sdk/lib/3rdparty/libxml2/save.h | 36 - sdk/lib/3rdparty/libxml2/schematron.c | 2060 ----- sdk/lib/3rdparty/libxml2/threads.c | 1038 +-- sdk/lib/3rdparty/libxml2/tree.c | 536 +- sdk/lib/3rdparty/libxml2/trio.c | 6892 ----------------- sdk/lib/3rdparty/libxml2/trio.h | 230 - sdk/lib/3rdparty/libxml2/triodef.h | 228 - sdk/lib/3rdparty/libxml2/trionan.c | 914 --- sdk/lib/3rdparty/libxml2/trionan.h | 84 - sdk/lib/3rdparty/libxml2/triop.h | 150 - sdk/lib/3rdparty/libxml2/triostr.c | 2112 ----- sdk/lib/3rdparty/libxml2/triostr.h | 144 - sdk/lib/3rdparty/libxml2/uri.c | 66 +- sdk/lib/3rdparty/libxml2/valid.c | 364 +- sdk/lib/3rdparty/libxml2/xinclude.c | 1317 ++-- sdk/lib/3rdparty/libxml2/xlink.c | 165 - sdk/lib/3rdparty/libxml2/xmlIO.c | 456 +- sdk/lib/3rdparty/libxml2/xmlcatalog.c | 606 -- sdk/lib/3rdparty/libxml2/xmllint.c | 3804 --------- sdk/lib/3rdparty/libxml2/xmlmemory.c | 298 +- sdk/lib/3rdparty/libxml2/xmlmodule.c | 459 -- sdk/lib/3rdparty/libxml2/xmlreader.c | 197 +- sdk/lib/3rdparty/libxml2/xmlregexp.c | 1008 +-- sdk/lib/3rdparty/libxml2/xmlsave.c | 127 +- sdk/lib/3rdparty/libxml2/xmlschemas.c | 629 +- sdk/lib/3rdparty/libxml2/xmlschemastypes.c | 256 +- sdk/lib/3rdparty/libxml2/xmlstring.c | 86 +- sdk/lib/3rdparty/libxml2/xmlwriter.c | 4736 ----------- sdk/lib/3rdparty/libxml2/xpath.c | 1650 +--- sdk/lib/3rdparty/libxml2/xpointer.c | 71 +- sdk/lib/3rdparty/libxml2/xzlib.c | 818 -- sdk/lib/3rdparty/libxml2/xzlib.h | 19 - 135 files changed, 13167 insertions(+), 54259 deletions(-) delete mode 100644 sdk/include/reactos/libs/libxml/DOCBparser.h delete mode 100644 sdk/include/reactos/libs/libxml/c14n.h delete mode 100644 sdk/include/reactos/libs/libxml/globals.h delete mode 100644 sdk/include/reactos/libs/libxml/schematron.h delete mode 100644 sdk/include/reactos/libs/libxml/xlink.h delete mode 100644 sdk/include/reactos/libs/libxml/xmlmodule.h delete mode 100644 sdk/include/reactos/libs/libxml/xmlunicode.h delete mode 100644 sdk/include/reactos/libs/libxml/xmlversion.h.in delete mode 100644 sdk/include/reactos/libs/libxml/xmlwriter.h create mode 100644 sdk/lib/3rdparty/libxml2/AUTHORS rename sdk/lib/3rdparty/libxml2/{Copyright => COPYING} (100%) delete mode 100644 sdk/lib/3rdparty/libxml2/NEWS delete mode 100644 sdk/lib/3rdparty/libxml2/README.md delete mode 100644 sdk/lib/3rdparty/libxml2/TODO delete mode 100644 sdk/lib/3rdparty/libxml2/TODO_SCHEMAS delete mode 100644 sdk/lib/3rdparty/libxml2/buf.h delete mode 100644 sdk/lib/3rdparty/libxml2/c14n.c delete mode 100644 sdk/lib/3rdparty/libxml2/config.h delete mode 100644 sdk/lib/3rdparty/libxml2/enc.h rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/HTMLparser.h (81%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/HTMLtree.h (88%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/SAX.h (80%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/SAX2.h (80%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/catalog.h (80%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/chvalid.h (96%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/debugXML.h (87%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/dict.h (79%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/encoding.h (89%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/entities.h (85%) create mode 100644 sdk/lib/3rdparty/libxml2/include/libxml/globals.h rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/hash.h (63%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/list.h (81%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/nanoftp.h (86%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/nanohttp.h (78%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/parser.h (83%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/parserInternals.h (75%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/pattern.h (86%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/relaxng.h (86%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/schemasInternals.h (99%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/threads.h (64%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/tree.h (86%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/uri.h (84%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/valid.h (83%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xinclude.h (92%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlIO.h (69%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlautomata.h (82%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlerror.h (95%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlexports.h (57%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlmemory.h (69%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlreader.h (81%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlregexp.h (82%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlsave.h (83%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlschemas.h (87%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlschemastypes.h (81%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlstring.h (86%) create mode 100644 sdk/lib/3rdparty/libxml2/include/libxml/xmlunicode.h rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xmlversion.h (79%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xpath.h (92%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xpathInternals.h (68%) rename sdk/{include/reactos/libs => lib/3rdparty/libxml2/include}/libxml/xpointer.h (78%) create mode 100644 sdk/lib/3rdparty/libxml2/include/private/buf.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/dict.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/enc.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/entities.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/error.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/globals.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/html.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/io.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/memory.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/parser.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/regexp.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/save.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/string.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/threads.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/tree.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/xinclude.h create mode 100644 sdk/lib/3rdparty/libxml2/include/private/xpath.h delete mode 100644 sdk/lib/3rdparty/libxml2/include/wsockcompat.h delete mode 100644 sdk/lib/3rdparty/libxml2/legacy.c delete mode 100644 sdk/lib/3rdparty/libxml2/nanoftp.c delete mode 100644 sdk/lib/3rdparty/libxml2/nanohttp.c delete mode 100644 sdk/lib/3rdparty/libxml2/save.h delete mode 100644 sdk/lib/3rdparty/libxml2/schematron.c delete mode 100644 sdk/lib/3rdparty/libxml2/trio.c delete mode 100644 sdk/lib/3rdparty/libxml2/trio.h delete mode 100644 sdk/lib/3rdparty/libxml2/triodef.h delete mode 100644 sdk/lib/3rdparty/libxml2/trionan.c delete mode 100644 sdk/lib/3rdparty/libxml2/trionan.h delete mode 100644 sdk/lib/3rdparty/libxml2/triop.h delete mode 100644 sdk/lib/3rdparty/libxml2/triostr.c delete mode 100644 sdk/lib/3rdparty/libxml2/triostr.h delete mode 100644 sdk/lib/3rdparty/libxml2/xlink.c delete mode 100644 sdk/lib/3rdparty/libxml2/xmlcatalog.c delete mode 100644 sdk/lib/3rdparty/libxml2/xmllint.c delete mode 100644 sdk/lib/3rdparty/libxml2/xmlmodule.c delete mode 100644 sdk/lib/3rdparty/libxml2/xmlwriter.c delete mode 100644 sdk/lib/3rdparty/libxml2/xzlib.c delete mode 100644 sdk/lib/3rdparty/libxml2/xzlib.h diff --git a/sdk/include/reactos/libs/libxml/DOCBparser.h b/sdk/include/reactos/libs/libxml/DOCBparser.h deleted file mode 100644 index 9394fa71bdd..00000000000 --- a/sdk/include/reactos/libs/libxml/DOCBparser.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Summary: old DocBook SGML parser - * Description: interface for a DocBook SGML non-verifying parser - * This code is DEPRECATED, and should not be used anymore. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __DOCB_PARSER_H__ -#define __DOCB_PARSER_H__ -#include - -#ifdef LIBXML_DOCB_ENABLED - -#include -#include - -#ifndef IN_LIBXML -#ifdef __GNUC__ -#warning "The DOCBparser module has been deprecated in libxml2-2.6.0" -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and SGML are shared. - */ -typedef xmlParserCtxt docbParserCtxt; -typedef xmlParserCtxtPtr docbParserCtxtPtr; -typedef xmlSAXHandler docbSAXHandler; -typedef xmlSAXHandlerPtr docbSAXHandlerPtr; -typedef xmlParserInput docbParserInput; -typedef xmlParserInputPtr docbParserInputPtr; -typedef xmlDocPtr docbDocPtr; - -/* - * There is only few public functions. - */ -XMLPUBFUN int XMLCALL - docbEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); - -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseDoc (xmlChar *cur, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XMLPUBFUN docbDocPtr XMLCALL - docbParseDoc (xmlChar *cur, - const char *encoding); -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseFile (const char *filename, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XMLPUBFUN docbDocPtr XMLCALL - docbParseFile (const char *filename, - const char *encoding); - -/** - * Interfaces for the Push mode. - */ -XMLPUBFUN void XMLCALL - docbFreeParserCtxt (docbParserCtxtPtr ctxt); -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreatePushParserCtxt(docbSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -XMLPUBFUN int XMLCALL - docbParseChunk (docbParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreateFileParserCtxt(const char *filename, - const char *encoding); -XMLPUBFUN int XMLCALL - docbParseDocument (docbParserCtxtPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_DOCB_ENABLED */ - -#endif /* __DOCB_PARSER_H__ */ diff --git a/sdk/include/reactos/libs/libxml/c14n.h b/sdk/include/reactos/libs/libxml/c14n.h deleted file mode 100644 index af93de63a4c..00000000000 --- a/sdk/include/reactos/libs/libxml/c14n.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Summary: Provide Canonical XML and Exclusive XML Canonicalization - * Description: the c14n modules provides a - * - * "Canonical XML" implementation - * http://www.w3.org/TR/xml-c14n - * - * and an - * - * "Exclusive XML Canonicalization" implementation - * http://www.w3.org/TR/xml-exc-c14n - - * Copy: See Copyright for the status of this software. - * - * Author: Aleksey Sanin - */ -#ifndef __XML_C14N_H__ -#define __XML_C14N_H__ - -#include - -#ifdef LIBXML_C14N_ENABLED -#ifdef LIBXML_OUTPUT_ENABLED - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * XML Canonicalization - * http://www.w3.org/TR/xml-c14n - * - * Exclusive XML Canonicalization - * http://www.w3.org/TR/xml-exc-c14n - * - * Canonical form of an XML document could be created if and only if - * a) default attributes (if any) are added to all nodes - * b) all character and parsed entity references are resolved - * In order to achieve this in libxml2 the document MUST be loaded with - * following global settings: - * - * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - * xmlSubstituteEntitiesDefault(1); - * - * or corresponding parser context setting: - * xmlParserCtxtPtr ctxt; - * - * ... - * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - * ctxt->replaceEntities = 1; - * ... - */ - -/* - * xmlC14NMode: - * - * Predefined values for C14N modes - * - */ -typedef enum { - XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */ - XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */ - XML_C14N_1_1 = 2 /* C14N 1.1 spec */ -} xmlC14NMode; - -XMLPUBFUN int XMLCALL - xmlC14NDocSaveTo (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlOutputBufferPtr buf); - -XMLPUBFUN int XMLCALL - xmlC14NDocDumpMemory (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlChar **doc_txt_ptr); - -XMLPUBFUN int XMLCALL - xmlC14NDocSave (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - const char* filename, - int compression); - - -/** - * This is the core C14N function - */ -/** - * xmlC14NIsVisibleCallback: - * @user_data: user data - * @node: the current node - * @parent: the parent node - * - * Signature for a C14N callback on visible nodes - * - * Returns 1 if the node should be included - */ -typedef int (*xmlC14NIsVisibleCallback) (void* user_data, - xmlNodePtr node, - xmlNodePtr parent); - -XMLPUBFUN int XMLCALL - xmlC14NExecute (xmlDocPtr doc, - xmlC14NIsVisibleCallback is_visible_callback, - void* user_data, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlOutputBufferPtr buf); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* LIBXML_OUTPUT_ENABLED */ -#endif /* LIBXML_C14N_ENABLED */ -#endif /* __XML_C14N_H__ */ - diff --git a/sdk/include/reactos/libs/libxml/globals.h b/sdk/include/reactos/libs/libxml/globals.h deleted file mode 100644 index d57ccb05415..00000000000 --- a/sdk/include/reactos/libs/libxml/globals.h +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Summary: interface for all global variables of the library - * Description: all the global variables and thread handling for - * those variables is handled by this module. - * - * The bottom of this file is automatically generated by build_glob.py - * based on the description file global.data - * - * Copy: See Copyright for the status of this software. - * - * Author: Gary Pennington , Daniel Veillard - */ - -#ifndef __XML_GLOBALS_H -#define __XML_GLOBALS_H - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -XML_DEPRECATED -XMLPUBFUN void XMLCALL xmlInitGlobals(void); -XML_DEPRECATED -XMLPUBFUN void XMLCALL xmlCleanupGlobals(void); - -/** - * xmlParserInputBufferCreateFilenameFunc: - * @URI: the URI to read from - * @enc: the requested source encoding - * - * Signature for the function doing the lookup for a suitable input method - * corresponding to an URI. - * - * Returns the new xmlParserInputBufferPtr in case of success or NULL if no - * method was found. - */ -typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, - xmlCharEncoding enc); - - -/** - * xmlOutputBufferCreateFilenameFunc: - * @URI: the URI to write to - * @enc: the requested target encoding - * - * Signature for the function doing the lookup for a suitable output method - * corresponding to an URI. - * - * Returns the new xmlOutputBufferPtr in case of success or NULL if no - * method was found. - */ -typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, - xmlCharEncodingHandlerPtr encoder, - int compression); - -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc -XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); -XMLPUBFUN xmlOutputBufferCreateFilenameFunc -XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); - -/* - * Externally global symbols which need to be protected for backwards - * compatibility support. - */ - -#undef htmlDefaultSAXHandler -#undef oldXMLWDcompatibility -#undef xmlBufferAllocScheme -#undef xmlDefaultBufferSize -#undef xmlDefaultSAXHandler -#undef xmlDefaultSAXLocator -#undef xmlDoValidityCheckingDefaultValue -#undef xmlFree -#undef xmlGenericError -#undef xmlStructuredError -#undef xmlGenericErrorContext -#undef xmlStructuredErrorContext -#undef xmlGetWarningsDefaultValue -#undef xmlIndentTreeOutput -#undef xmlTreeIndentString -#undef xmlKeepBlanksDefaultValue -#undef xmlLineNumbersDefaultValue -#undef xmlLoadExtDtdDefaultValue -#undef xmlMalloc -#undef xmlMallocAtomic -#undef xmlMemStrdup -#undef xmlParserDebugEntities -#undef xmlParserVersion -#undef xmlPedanticParserDefaultValue -#undef xmlRealloc -#undef xmlSaveNoEmptyTags -#undef xmlSubstituteEntitiesDefaultValue -#undef xmlRegisterNodeDefaultValue -#undef xmlDeregisterNodeDefaultValue -#undef xmlLastError -#undef xmlParserInputBufferCreateFilenameValue -#undef xmlOutputBufferCreateFilenameValue - -/** - * xmlRegisterNodeFunc: - * @node: the current node - * - * Signature for the registration callback of a created node - */ -typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); -/** - * xmlDeregisterNodeFunc: - * @node: the current node - * - * Signature for the deregistration callback of a discarded node - */ -typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); - -typedef struct _xmlGlobalState xmlGlobalState; -typedef xmlGlobalState *xmlGlobalStatePtr; -struct _xmlGlobalState -{ - const char *xmlParserVersion; - - xmlSAXLocator xmlDefaultSAXLocator; - xmlSAXHandlerV1 xmlDefaultSAXHandler; - xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */ - xmlSAXHandlerV1 htmlDefaultSAXHandler; - - xmlFreeFunc xmlFree; - xmlMallocFunc xmlMalloc; - xmlStrdupFunc xmlMemStrdup; - xmlReallocFunc xmlRealloc; - - xmlGenericErrorFunc xmlGenericError; - xmlStructuredErrorFunc xmlStructuredError; - void *xmlGenericErrorContext; - - int oldXMLWDcompatibility; - - xmlBufferAllocationScheme xmlBufferAllocScheme; - int xmlDefaultBufferSize; - - int xmlSubstituteEntitiesDefaultValue; - int xmlDoValidityCheckingDefaultValue; - int xmlGetWarningsDefaultValue; - int xmlKeepBlanksDefaultValue; - int xmlLineNumbersDefaultValue; - int xmlLoadExtDtdDefaultValue; - int xmlParserDebugEntities; - int xmlPedanticParserDefaultValue; - - int xmlSaveNoEmptyTags; - int xmlIndentTreeOutput; - const char *xmlTreeIndentString; - - xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; - xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; - - xmlMallocFunc xmlMallocAtomic; - xmlError xmlLastError; - - xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; - xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; - - void *xmlStructuredErrorContext; -}; - -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif - -XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs); - -XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); - -XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); - -XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func); -XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); -XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); -XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); - -XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL - xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func); -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL - xmlThrDefParserInputBufferCreateFilenameDefault( - xmlParserInputBufferCreateFilenameFunc func); - -/** DOC_DISABLE */ -/* - * In general the memory allocation entry points are not kept - * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED - * - xmlMalloc - * - xmlMallocAtomic - * - xmlRealloc - * - xmlMemStrdup - * - xmlFree - */ - -#ifdef LIBXML_THREAD_ALLOC_ENABLED -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void); -#define xmlMalloc \ -(*(__xmlMalloc())) -#else -XMLPUBVAR xmlMallocFunc xmlMalloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void); -#define xmlMallocAtomic \ -(*(__xmlMallocAtomic())) -#else -XMLPUBVAR xmlMallocFunc xmlMallocAtomic; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void); -#define xmlRealloc \ -(*(__xmlRealloc())) -#else -XMLPUBVAR xmlReallocFunc xmlRealloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void); -#define xmlFree \ -(*(__xmlFree())) -#else -XMLPUBVAR xmlFreeFunc xmlFree; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void); -#define xmlMemStrdup \ -(*(__xmlMemStrdup())) -#else -XMLPUBVAR xmlStrdupFunc xmlMemStrdup; -#endif - -#else /* !LIBXML_THREAD_ALLOC_ENABLED */ -XMLPUBVAR xmlMallocFunc xmlMalloc; -XMLPUBVAR xmlMallocFunc xmlMallocAtomic; -XMLPUBVAR xmlReallocFunc xmlRealloc; -XMLPUBVAR xmlFreeFunc xmlFree; -XMLPUBVAR xmlStrdupFunc xmlMemStrdup; -#endif /* LIBXML_THREAD_ALLOC_ENABLED */ - -#ifdef LIBXML_HTML_ENABLED -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define htmlDefaultSAXHandler \ -(*(__htmlDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler; -#endif -#endif - -XMLPUBFUN xmlError * XMLCALL __xmlLastError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLastError \ -(*(__xmlLastError())) -#else -XMLPUBVAR xmlError xmlLastError; -#endif - -/* - * Everything starting from the line below is - * Automatically generated by build_glob.py. - * Do not modify the previous line. - */ - - -XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void); -#ifdef LIBXML_THREAD_ENABLED -#define oldXMLWDcompatibility \ -(*(__oldXMLWDcompatibility())) -#else -XMLPUBVAR int oldXMLWDcompatibility; -#endif - -XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlBufferAllocScheme \ -(*(__xmlBufferAllocScheme())) -#else -XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme; -#endif -XMLPUBFUN xmlBufferAllocationScheme XMLCALL - xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v); - -XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultBufferSize \ -(*(__xmlDefaultBufferSize())) -#else -XMLPUBVAR int xmlDefaultBufferSize; -#endif -XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v); - -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXHandler \ -(*(__xmlDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler; -#endif - -XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXLocator \ -(*(__xmlDefaultSAXLocator())) -#else -XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator; -#endif - -XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDoValidityCheckingDefaultValue \ -(*(__xmlDoValidityCheckingDefaultValue())) -#else -XMLPUBVAR int xmlDoValidityCheckingDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v); - -XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericError \ -(*(__xmlGenericError())) -#else -XMLPUBVAR xmlGenericErrorFunc xmlGenericError; -#endif - -XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlStructuredError \ -(*(__xmlStructuredError())) -#else -XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError; -#endif - -XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericErrorContext \ -(*(__xmlGenericErrorContext())) -#else -XMLPUBVAR void * xmlGenericErrorContext; -#endif - -XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlStructuredErrorContext \ -(*(__xmlStructuredErrorContext())) -#else -XMLPUBVAR void * xmlStructuredErrorContext; -#endif - -XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGetWarningsDefaultValue \ -(*(__xmlGetWarningsDefaultValue())) -#else -XMLPUBVAR int xmlGetWarningsDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlIndentTreeOutput \ -(*(__xmlIndentTreeOutput())) -#else -XMLPUBVAR int xmlIndentTreeOutput; -#endif -XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v); - -XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlTreeIndentString \ -(*(__xmlTreeIndentString())) -#else -XMLPUBVAR const char * xmlTreeIndentString; -#endif -XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v); - -XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlKeepBlanksDefaultValue \ -(*(__xmlKeepBlanksDefaultValue())) -#else -XMLPUBVAR int xmlKeepBlanksDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLineNumbersDefaultValue \ -(*(__xmlLineNumbersDefaultValue())) -#else -XMLPUBVAR int xmlLineNumbersDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLoadExtDtdDefaultValue \ -(*(__xmlLoadExtDtdDefaultValue())) -#else -XMLPUBVAR int xmlLoadExtDtdDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserDebugEntities \ -(*(__xmlParserDebugEntities())) -#else -XMLPUBVAR int xmlParserDebugEntities; -#endif -XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v); - -XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserVersion \ -(*(__xmlParserVersion())) -#else -XMLPUBVAR const char * xmlParserVersion; -#endif - -XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlPedanticParserDefaultValue \ -(*(__xmlPedanticParserDefaultValue())) -#else -XMLPUBVAR int xmlPedanticParserDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSaveNoEmptyTags \ -(*(__xmlSaveNoEmptyTags())) -#else -XMLPUBVAR int xmlSaveNoEmptyTags; -#endif -XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v); - -XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSubstituteEntitiesDefaultValue \ -(*(__xmlSubstituteEntitiesDefaultValue())) -#else -XMLPUBVAR int xmlSubstituteEntitiesDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v); - -XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlRegisterNodeDefaultValue \ -(*(__xmlRegisterNodeDefaultValue())) -#else -XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; -#endif - -XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDeregisterNodeDefaultValue \ -(*(__xmlDeregisterNodeDefaultValue())) -#else -XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; -#endif - -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \ - __xmlParserInputBufferCreateFilenameValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserInputBufferCreateFilenameValue \ -(*(__xmlParserInputBufferCreateFilenameValue())) -#else -XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; -#endif - -XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlOutputBufferCreateFilenameValue \ -(*(__xmlOutputBufferCreateFilenameValue())) -#else -XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_GLOBALS_H */ diff --git a/sdk/include/reactos/libs/libxml/schematron.h b/sdk/include/reactos/libs/libxml/schematron.h deleted file mode 100644 index c61e61b3cf5..00000000000 --- a/sdk/include/reactos/libs/libxml/schematron.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Summary: XML Schematron implementation - * Description: interface to the XML Schematron validity checking. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_SCHEMATRON_H__ -#define __XML_SCHEMATRON_H__ - -#include - -#ifdef LIBXML_SCHEMATRON_ENABLED - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */ - XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */ - XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */ - XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */ - XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */ - XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */ - XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */ -} xmlSchematronValidOptions; - -/** - * The schemas related types are kept internal - */ -typedef struct _xmlSchematron xmlSchematron; -typedef xmlSchematron *xmlSchematronPtr; - -/** - * xmlSchematronValidityErrorFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of an error callback from a Schematron validation - */ -typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); - -/** - * xmlSchematronValidityWarningFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of a warning callback from a Schematron validation - */ -typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); - -/** - * A schemas validation context - */ -typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt; -typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr; - -typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt; -typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr; - -/* - * Interfaces for parsing. - */ -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewParserCtxt (const char *URL); -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewMemParserCtxt(const char *buffer, - int size); -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewDocParserCtxt(xmlDocPtr doc); -XMLPUBFUN void XMLCALL - xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt); -/***** -XMLPUBFUN void XMLCALL - xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt, - xmlSchematronValidityErrorFunc err, - xmlSchematronValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt, - xmlSchematronValidityErrorFunc * err, - xmlSchematronValidityWarningFunc * warn, - void **ctx); -XMLPUBFUN int XMLCALL - xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt); - *****/ -XMLPUBFUN xmlSchematronPtr XMLCALL - xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlSchematronFree (xmlSchematronPtr schema); -/* - * Interfaces for validating - */ -XMLPUBFUN void XMLCALL - xmlSchematronSetValidStructuredErrors( - xmlSchematronValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, - void *ctx); -/****** -XMLPUBFUN void XMLCALL - xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt, - xmlSchematronValidityErrorFunc err, - xmlSchematronValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt, - xmlSchematronValidityErrorFunc *err, - xmlSchematronValidityWarningFunc *warn, - void **ctx); -XMLPUBFUN int XMLCALL - xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt, - int options); -XMLPUBFUN int XMLCALL - xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt, - xmlNodePtr elem); - *******/ - -XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL - xmlSchematronNewValidCtxt (xmlSchematronPtr schema, - int options); -XMLPUBFUN void XMLCALL - xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, - xmlDocPtr instance); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_SCHEMATRON_ENABLED */ -#endif /* __XML_SCHEMATRON_H__ */ diff --git a/sdk/include/reactos/libs/libxml/xlink.h b/sdk/include/reactos/libs/libxml/xlink.h deleted file mode 100644 index 04e4b32c015..00000000000 --- a/sdk/include/reactos/libs/libxml/xlink.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Summary: unfinished XLink detection module - * Description: unfinished XLink detection module - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_XLINK_H__ -#define __XML_XLINK_H__ - -#include -#include - -#ifdef LIBXML_XPTR_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Various defines for the various Link properties. - * - * NOTE: the link detection layer will try to resolve QName expansion - * of namespaces. If "foo" is the prefix for "http://foo.com/" - * then the link detection layer will expand role="foo:myrole" - * to "http://foo.com/:myrole". - * NOTE: the link detection layer will expand URI-References found on - * href attributes by using the base mechanism if found. - */ -typedef xmlChar *xlinkHRef; -typedef xmlChar *xlinkRole; -typedef xmlChar *xlinkTitle; - -typedef enum { - XLINK_TYPE_NONE = 0, - XLINK_TYPE_SIMPLE, - XLINK_TYPE_EXTENDED, - XLINK_TYPE_EXTENDED_SET -} xlinkType; - -typedef enum { - XLINK_SHOW_NONE = 0, - XLINK_SHOW_NEW, - XLINK_SHOW_EMBED, - XLINK_SHOW_REPLACE -} xlinkShow; - -typedef enum { - XLINK_ACTUATE_NONE = 0, - XLINK_ACTUATE_AUTO, - XLINK_ACTUATE_ONREQUEST -} xlinkActuate; - -/** - * xlinkNodeDetectFunc: - * @ctx: user data pointer - * @node: the node to check - * - * This is the prototype for the link detection routine. - * It calls the default link detection callbacks upon link detection. - */ -typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); - -/* - * The link detection module interact with the upper layers using - * a set of callback registered at parsing time. - */ - -/** - * xlinkSimpleLinkFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @href: the target of the link - * @role: the role string - * @title: the link title - * - * This is the prototype for a simple link detection callback. - */ -typedef void -(*xlinkSimpleLinkFunk) (void *ctx, - xmlNodePtr node, - const xlinkHRef href, - const xlinkRole role, - const xlinkTitle title); - -/** - * xlinkExtendedLinkFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @nbLocators: the number of locators detected on the link - * @hrefs: pointer to the array of locator hrefs - * @roles: pointer to the array of locator roles - * @nbArcs: the number of arcs detected on the link - * @from: pointer to the array of source roles found on the arcs - * @to: pointer to the array of target roles found on the arcs - * @show: array of values for the show attributes found on the arcs - * @actuate: array of values for the actuate attributes found on the arcs - * @nbTitles: the number of titles detected on the link - * @title: array of titles detected on the link - * @langs: array of xml:lang values for the titles - * - * This is the prototype for a extended link detection callback. - */ -typedef void -(*xlinkExtendedLinkFunk)(void *ctx, - xmlNodePtr node, - int nbLocators, - const xlinkHRef *hrefs, - const xlinkRole *roles, - int nbArcs, - const xlinkRole *from, - const xlinkRole *to, - xlinkShow *show, - xlinkActuate *actuate, - int nbTitles, - const xlinkTitle *titles, - const xmlChar **langs); - -/** - * xlinkExtendedLinkSetFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @nbLocators: the number of locators detected on the link - * @hrefs: pointer to the array of locator hrefs - * @roles: pointer to the array of locator roles - * @nbTitles: the number of titles detected on the link - * @title: array of titles detected on the link - * @langs: array of xml:lang values for the titles - * - * This is the prototype for a extended link set detection callback. - */ -typedef void -(*xlinkExtendedLinkSetFunk) (void *ctx, - xmlNodePtr node, - int nbLocators, - const xlinkHRef *hrefs, - const xlinkRole *roles, - int nbTitles, - const xlinkTitle *titles, - const xmlChar **langs); - -/** - * This is the structure containing a set of Links detection callbacks. - * - * There is no default xlink callbacks, if one want to get link - * recognition activated, those call backs must be provided before parsing. - */ -typedef struct _xlinkHandler xlinkHandler; -typedef xlinkHandler *xlinkHandlerPtr; -struct _xlinkHandler { - xlinkSimpleLinkFunk simple; - xlinkExtendedLinkFunk extended; - xlinkExtendedLinkSetFunk set; -}; - -/* - * The default detection routine, can be overridden, they call the default - * detection callbacks. - */ - -XMLPUBFUN xlinkNodeDetectFunc XMLCALL - xlinkGetDefaultDetect (void); -XMLPUBFUN void XMLCALL - xlinkSetDefaultDetect (xlinkNodeDetectFunc func); - -/* - * Routines to set/get the default handlers. - */ -XMLPUBFUN xlinkHandlerPtr XMLCALL - xlinkGetDefaultHandler (void); -XMLPUBFUN void XMLCALL - xlinkSetDefaultHandler (xlinkHandlerPtr handler); - -/* - * Link detection module itself. - */ -XMLPUBFUN xlinkType XMLCALL - xlinkIsLink (xmlDocPtr doc, - xmlNodePtr node); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_XPTR_ENABLED */ - -#endif /* __XML_XLINK_H__ */ diff --git a/sdk/include/reactos/libs/libxml/xmlmodule.h b/sdk/include/reactos/libs/libxml/xmlmodule.h deleted file mode 100644 index 9667820070a..00000000000 --- a/sdk/include/reactos/libs/libxml/xmlmodule.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Summary: dynamic module loading - * Description: basic API for dynamic module loading, used by - * libexslt added in 2.6.17 - * - * Copy: See Copyright for the status of this software. - * - * Author: Joel W. Reed - */ - -#ifndef __XML_MODULE_H__ -#define __XML_MODULE_H__ - -#include - -#ifdef LIBXML_MODULES_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlModulePtr: - * - * A handle to a dynamically loaded module - */ -typedef struct _xmlModule xmlModule; -typedef xmlModule *xmlModulePtr; - -/** - * xmlModuleOption: - * - * enumeration of options that can be passed down to xmlModuleOpen() - */ -typedef enum { - XML_MODULE_LAZY = 1, /* lazy binding */ - XML_MODULE_LOCAL= 2 /* local binding */ -} xmlModuleOption; - -XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename, - int options); - -XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module, - const char* name, - void **result); - -XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module); - -XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_MODULES_ENABLED */ - -#endif /*__XML_MODULE_H__ */ diff --git a/sdk/include/reactos/libs/libxml/xmlunicode.h b/sdk/include/reactos/libs/libxml/xmlunicode.h deleted file mode 100644 index 01ac8b61f56..00000000000 --- a/sdk/include/reactos/libs/libxml/xmlunicode.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Summary: Unicode character APIs - * Description: API for the Unicode character APIs - * - * This file is automatically generated from the - * UCS description files of the Unicode Character Database - * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html - * using the genUnicode.py Python script. - * - * Generation date: Mon Mar 27 11:09:52 2006 - * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt - * Author: Daniel Veillard - */ - -#ifndef __XML_UNICODE_H__ -#define __XML_UNICODE_H__ - -#include - -#ifdef LIBXML_UNICODE_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code); -XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code); -XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code); -XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code); -XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code); -XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code); -XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code); -XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code); -XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code); -XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code); -XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code); -XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code); -XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code); -XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code); -XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code); -XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code); -XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLao (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code); -XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code); -XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code); -XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code); -XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code); -XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code); -XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code); -XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code); -XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code); -XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code); -XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code); -XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTags (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code); -XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code); -XMLPUBFUN int XMLCALL xmlUCSIsThai (int code); -XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code); -XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code); -XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code); -XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code); -XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code); -XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code); -XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code); -XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code); - -XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block); - -XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code); -XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code); - -XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_UNICODE_ENABLED */ - -#endif /* __XML_UNICODE_H__ */ diff --git a/sdk/include/reactos/libs/libxml/xmlversion.h.in b/sdk/include/reactos/libs/libxml/xmlversion.h.in deleted file mode 100644 index bdebfe3b0c9..00000000000 --- a/sdk/include/reactos/libs/libxml/xmlversion.h.in +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Summary: compile-time version information - * Description: compile-time version information for the XML library - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_VERSION_H__ -#define __XML_VERSION_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * use those to be sure nothing nasty will happen if - * your library and includes mismatch - */ -#ifndef LIBXML2_COMPILING_MSCCDEF -XMLPUBFUN void XMLCALL xmlCheckVersion(int version); -#endif /* LIBXML2_COMPILING_MSCCDEF */ - -/** - * LIBXML_DOTTED_VERSION: - * - * the version string like "1.2.3" - */ -#define LIBXML_DOTTED_VERSION "@VERSION@" - -/** - * LIBXML_VERSION: - * - * the version number: 1.2.3 value is 10203 - */ -#define LIBXML_VERSION @LIBXML_VERSION_NUMBER@ - -/** - * LIBXML_VERSION_STRING: - * - * the version number string, 1.2.3 value is "10203" - */ -#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@" - -/** - * LIBXML_VERSION_EXTRA: - * - * extra version information, used to show a git commit description - */ -#define LIBXML_VERSION_EXTRA "@LIBXML_VERSION_EXTRA@" - -/** - * LIBXML_TEST_VERSION: - * - * Macro to check that the libxml version in use is compatible with - * the version the software has been compiled against - */ -#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@); - -#ifndef VMS -#if @WITH_TRIO@ -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO -#else -/** - * WITHOUT_TRIO: - * - * defined if the trio support should not be configured in - */ -#define WITHOUT_TRIO -#endif -#else /* VMS */ -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO 1 -#endif /* VMS */ - -/** - * LIBXML_THREAD_ENABLED: - * - * Whether the thread support is configured in - */ -#if @WITH_THREADS@ -#define LIBXML_THREAD_ENABLED -#endif - -/** - * LIBXML_THREAD_ALLOC_ENABLED: - * - * Whether the allocation hooks are per-thread - */ -#if @WITH_THREAD_ALLOC@ -#define LIBXML_THREAD_ALLOC_ENABLED -#endif - -/** - * LIBXML_TREE_ENABLED: - * - * Whether the DOM like tree manipulation API support is configured in - */ -#if @WITH_TREE@ -#define LIBXML_TREE_ENABLED -#endif - -/** - * LIBXML_OUTPUT_ENABLED: - * - * Whether the serialization/saving support is configured in - */ -#if @WITH_OUTPUT@ -#define LIBXML_OUTPUT_ENABLED -#endif - -/** - * LIBXML_PUSH_ENABLED: - * - * Whether the push parsing interfaces are configured in - */ -#if @WITH_PUSH@ -#define LIBXML_PUSH_ENABLED -#endif - -/** - * LIBXML_READER_ENABLED: - * - * Whether the xmlReader parsing interface is configured in - */ -#if @WITH_READER@ -#define LIBXML_READER_ENABLED -#endif - -/** - * LIBXML_PATTERN_ENABLED: - * - * Whether the xmlPattern node selection interface is configured in - */ -#if @WITH_PATTERN@ -#define LIBXML_PATTERN_ENABLED -#endif - -/** - * LIBXML_WRITER_ENABLED: - * - * Whether the xmlWriter saving interface is configured in - */ -#if @WITH_WRITER@ -#define LIBXML_WRITER_ENABLED -#endif - -/** - * LIBXML_SAX1_ENABLED: - * - * Whether the older SAX1 interface is configured in - */ -#if @WITH_SAX1@ -#define LIBXML_SAX1_ENABLED -#endif - -/** - * LIBXML_FTP_ENABLED: - * - * Whether the FTP support is configured in - */ -#if @WITH_FTP@ -#define LIBXML_FTP_ENABLED -#endif - -/** - * LIBXML_HTTP_ENABLED: - * - * Whether the HTTP support is configured in - */ -#if @WITH_HTTP@ -#define LIBXML_HTTP_ENABLED -#endif - -/** - * LIBXML_VALID_ENABLED: - * - * Whether the DTD validation support is configured in - */ -#if @WITH_VALID@ -#define LIBXML_VALID_ENABLED -#endif - -/** - * LIBXML_HTML_ENABLED: - * - * Whether the HTML support is configured in - */ -#if @WITH_HTML@ -#define LIBXML_HTML_ENABLED -#endif - -/** - * LIBXML_LEGACY_ENABLED: - * - * Whether the deprecated APIs are compiled in for compatibility - */ -#if @WITH_LEGACY@ -#define LIBXML_LEGACY_ENABLED -#endif - -/** - * LIBXML_C14N_ENABLED: - * - * Whether the Canonicalization support is configured in - */ -#if @WITH_C14N@ -#define LIBXML_C14N_ENABLED -#endif - -/** - * LIBXML_CATALOG_ENABLED: - * - * Whether the Catalog support is configured in - */ -#if @WITH_CATALOG@ -#define LIBXML_CATALOG_ENABLED -#endif - -/** - * LIBXML_XPATH_ENABLED: - * - * Whether XPath is configured in - */ -#if @WITH_XPATH@ -#define LIBXML_XPATH_ENABLED -#endif - -/** - * LIBXML_XPTR_ENABLED: - * - * Whether XPointer is configured in - */ -#if @WITH_XPTR@ -#define LIBXML_XPTR_ENABLED -#endif - -/** - * LIBXML_XPTR_LOCS_ENABLED: - * - * Whether support for XPointer locations is configured in - */ -#if @WITH_XPTR_LOCS@ -#define LIBXML_XPTR_LOCS_ENABLED -#endif - -/** - * LIBXML_XINCLUDE_ENABLED: - * - * Whether XInclude is configured in - */ -#if @WITH_XINCLUDE@ -#define LIBXML_XINCLUDE_ENABLED -#endif - -/** - * LIBXML_ICONV_ENABLED: - * - * Whether iconv support is available - */ -#if @WITH_ICONV@ -#define LIBXML_ICONV_ENABLED -#endif - -/** - * LIBXML_ICU_ENABLED: - * - * Whether icu support is available - */ -#if @WITH_ICU@ -#define LIBXML_ICU_ENABLED -#endif - -/** - * LIBXML_ISO8859X_ENABLED: - * - * Whether ISO-8859-* support is made available in case iconv is not - */ -#if @WITH_ISO8859X@ -#define LIBXML_ISO8859X_ENABLED -#endif - -/** - * LIBXML_DEBUG_ENABLED: - * - * Whether Debugging module is configured in - */ -#if @WITH_DEBUG@ -#define LIBXML_DEBUG_ENABLED -#endif - -/** - * DEBUG_MEMORY_LOCATION: - * - * Whether the memory debugging is configured in - */ -#if @WITH_MEM_DEBUG@ -#define DEBUG_MEMORY_LOCATION -#endif - -/** - * LIBXML_DEBUG_RUNTIME: - * - * Whether the runtime debugging is configured in - */ -#if @WITH_RUN_DEBUG@ -#define LIBXML_DEBUG_RUNTIME -#endif - -/** - * LIBXML_UNICODE_ENABLED: - * - * Whether the Unicode related interfaces are compiled in - */ -#if @WITH_REGEXPS@ -#define LIBXML_UNICODE_ENABLED -#endif - -/** - * LIBXML_REGEXP_ENABLED: - * - * Whether the regular expressions interfaces are compiled in - */ -#if @WITH_REGEXPS@ -#define LIBXML_REGEXP_ENABLED -#endif - -/** - * LIBXML_AUTOMATA_ENABLED: - * - * Whether the automata interfaces are compiled in - */ -#if @WITH_REGEXPS@ -#define LIBXML_AUTOMATA_ENABLED -#endif - -/** - * LIBXML_EXPR_ENABLED: - * - * Whether the formal expressions interfaces are compiled in - * - * This code is unused and disabled unconditionally for now. - */ -#if 0 -#define LIBXML_EXPR_ENABLED -#endif - -/** - * LIBXML_SCHEMAS_ENABLED: - * - * Whether the Schemas validation interfaces are compiled in - */ -#if @WITH_SCHEMAS@ -#define LIBXML_SCHEMAS_ENABLED -#endif - -/** - * LIBXML_SCHEMATRON_ENABLED: - * - * Whether the Schematron validation interfaces are compiled in - */ -#if @WITH_SCHEMATRON@ -#define LIBXML_SCHEMATRON_ENABLED -#endif - -/** - * LIBXML_MODULES_ENABLED: - * - * Whether the module interfaces are compiled in - */ -#if @WITH_MODULES@ -#define LIBXML_MODULES_ENABLED -/** - * LIBXML_MODULE_EXTENSION: - * - * the string suffix used by dynamic modules (usually shared libraries) - */ -#define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@" -#endif - -/** - * LIBXML_ZLIB_ENABLED: - * - * Whether the Zlib support is compiled in - */ -#if @WITH_ZLIB@ -#define LIBXML_ZLIB_ENABLED -#endif - -/** - * LIBXML_LZMA_ENABLED: - * - * Whether the Lzma support is compiled in - */ -#if @WITH_LZMA@ -#define LIBXML_LZMA_ENABLED -#endif - -#ifdef __GNUC__ - -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ - -#ifndef ATTRIBUTE_UNUSED -# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7))) -# define ATTRIBUTE_UNUSED __attribute__((unused)) -# else -# define ATTRIBUTE_UNUSED -# endif -#endif - -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ - -#ifndef LIBXML_ATTR_ALLOC_SIZE -# if (!defined(__clang__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))) -# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) -# else -# define LIBXML_ATTR_ALLOC_SIZE(x) -# endif -#else -# define LIBXML_ATTR_ALLOC_SIZE(x) -#endif - -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ - -#ifndef LIBXML_ATTR_FORMAT -# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) -# else -# define LIBXML_ATTR_FORMAT(fmt,args) -# endif -#else -# define LIBXML_ATTR_FORMAT(fmt,args) -#endif - -#ifndef XML_DEPRECATED -# ifdef IN_LIBXML -# define XML_DEPRECATED -# else -/* Available since at least GCC 3.1 */ -# define XML_DEPRECATED __attribute__((deprecated)) -# endif -#endif - -#else /* ! __GNUC__ */ -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ -#define ATTRIBUTE_UNUSED -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ -#define LIBXML_ATTR_ALLOC_SIZE(x) -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ -#define LIBXML_ATTR_FORMAT(fmt,args) -/** - * XML_DEPRECATED: - * - * Macro used to indicate that a function, variable, type or struct member - * is deprecated. - */ -#ifndef XML_DEPRECATED -#define XML_DEPRECATED -#endif -#endif /* __GNUC__ */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif - - diff --git a/sdk/include/reactos/libs/libxml/xmlwriter.h b/sdk/include/reactos/libs/libxml/xmlwriter.h deleted file mode 100644 index dd5add34166..00000000000 --- a/sdk/include/reactos/libs/libxml/xmlwriter.h +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Summary: text writing API for XML - * Description: text writing API for XML - * - * Copy: See Copyright for the status of this software. - * - * Author: Alfred Mickautsch - */ - -#ifndef __XML_XMLWRITER_H__ -#define __XML_XMLWRITER_H__ - -#include - -#ifdef LIBXML_WRITER_ENABLED - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct _xmlTextWriter xmlTextWriter; - typedef xmlTextWriter *xmlTextWriterPtr; - -/* - * Constructors & Destructor - */ - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriter(xmlOutputBufferPtr out); - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriterFilename(const char *uri, int compression); - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriterMemory(xmlBufferPtr buf, int compression); - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression); - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriterDoc(xmlDocPtr * doc, int compression); - XMLPUBFUN xmlTextWriterPtr XMLCALL - xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node, - int compression); - XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer); - -/* - * Functions - */ - - -/* - * Document - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartDocument(xmlTextWriterPtr writer, - const char *version, - const char *encoding, - const char *standalone); - XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr - writer); - -/* - * Comments - */ - XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr - writer); - XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer, - const char *format, ...) - LIBXML_ATTR_FORMAT(2,3); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(2,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr - writer, - const xmlChar * - content); - -/* - * Elements - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartElement(xmlTextWriterPtr writer, - const xmlChar * name); - XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr - writer, - const xmlChar * - prefix, - const xmlChar * name, - const xmlChar * - namespaceURI); - XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer); - XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr - writer); - -/* - * Elements conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, ...) - LIBXML_ATTR_FORMAT(3,4); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(3,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr - writer, - const xmlChar * name, - const xmlChar * - content); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer, - const xmlChar * prefix, - const xmlChar * name, - const xmlChar * namespaceURI, - const char *format, ...) - LIBXML_ATTR_FORMAT(5,6); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer, - const xmlChar * prefix, - const xmlChar * name, - const xmlChar * namespaceURI, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(5,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr - writer, - const xmlChar * - prefix, - const xmlChar * name, - const xmlChar * - namespaceURI, - const xmlChar * - content); - -/* - * Text - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, - const char *format, ...) - LIBXML_ATTR_FORMAT(2,3); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, - const char *format, va_list argptr) - LIBXML_ATTR_FORMAT(2,0); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteRawLen(xmlTextWriterPtr writer, - const xmlChar * content, int len); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteRaw(xmlTextWriterPtr writer, - const xmlChar * content); - XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr - writer, - const char - *format, ...) - LIBXML_ATTR_FORMAT(2,3); - XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr - writer, - const char - *format, - va_list argptr) - LIBXML_ATTR_FORMAT(2,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer, - const xmlChar * - content); - XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer, - const char *data, - int start, int len); - XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer, - const char *data, - int start, int len); - -/* - * Attributes - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartAttribute(xmlTextWriterPtr writer, - const xmlChar * name); - XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr - writer, - const xmlChar * - prefix, - const xmlChar * - name, - const xmlChar * - namespaceURI); - XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr - writer); - -/* - * Attributes conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, ...) - LIBXML_ATTR_FORMAT(3,4); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(3,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr - writer, - const xmlChar * name, - const xmlChar * - content); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer, - const xmlChar * prefix, - const xmlChar * name, - const xmlChar * namespaceURI, - const char *format, ...) - LIBXML_ATTR_FORMAT(5,6); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer, - const xmlChar * prefix, - const xmlChar * name, - const xmlChar * namespaceURI, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(5,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr - writer, - const xmlChar * - prefix, - const xmlChar * - name, - const xmlChar * - namespaceURI, - const xmlChar * - content); - -/* - * PI's - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartPI(xmlTextWriterPtr writer, - const xmlChar * target); - XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer); - -/* - * PI conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, - const xmlChar * target, - const char *format, ...) - LIBXML_ATTR_FORMAT(3,4); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, - const xmlChar * target, - const char *format, va_list argptr) - LIBXML_ATTR_FORMAT(3,0); - XMLPUBFUN int XMLCALL - xmlTextWriterWritePI(xmlTextWriterPtr writer, - const xmlChar * target, - const xmlChar * content); - -/** - * xmlTextWriterWriteProcessingInstruction: - * - * This macro maps to xmlTextWriterWritePI - */ -#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI - -/* - * CDATA - */ - XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer); - XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer); - -/* - * CDATA conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, - const char *format, ...) - LIBXML_ATTR_FORMAT(2,3); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, - const char *format, va_list argptr) - LIBXML_ATTR_FORMAT(2,0); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteCDATA(xmlTextWriterPtr writer, - const xmlChar * content); - -/* - * DTD - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartDTD(xmlTextWriterPtr writer, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid); - XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer); - -/* - * DTD conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid, - const char *format, ...) - LIBXML_ATTR_FORMAT(5,6); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid, - const char *format, va_list argptr) - LIBXML_ATTR_FORMAT(5,0); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteDTD(xmlTextWriterPtr writer, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid, - const xmlChar * subset); - -/** - * xmlTextWriterWriteDocType: - * - * this macro maps to xmlTextWriterWriteDTD - */ -#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD - -/* - * DTD element definition - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartDTDElement(xmlTextWriterPtr writer, - const xmlChar * name); - XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr - writer); - -/* - * DTD element definition conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, ...) - LIBXML_ATTR_FORMAT(3,4); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(3,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr - writer, - const xmlChar * - name, - const xmlChar * - content); - -/* - * DTD attribute list definition - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer, - const xmlChar * name); - XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr - writer); - -/* - * DTD attribute list definition conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, ...) - LIBXML_ATTR_FORMAT(3,4); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer, - const xmlChar * name, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(3,0); - XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr - writer, - const xmlChar * - name, - const xmlChar * - content); - -/* - * DTD entity definition - */ - XMLPUBFUN int XMLCALL - xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer, - int pe, const xmlChar * name); - XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr - writer); - -/* - * DTD entity definition conveniency functions - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer, - int pe, - const xmlChar * name, - const char *format, ...) - LIBXML_ATTR_FORMAT(4,5); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer, - int pe, - const xmlChar * name, - const char *format, - va_list argptr) - LIBXML_ATTR_FORMAT(4,0); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer, - int pe, - const xmlChar * name, - const xmlChar * content); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer, - int pe, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid, - const xmlChar * ndataid); - XMLPUBFUN int XMLCALL - xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr - writer, - const xmlChar * pubid, - const xmlChar * sysid, - const xmlChar * - ndataid); - XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr - writer, int pe, - const xmlChar * name, - const xmlChar * - pubid, - const xmlChar * - sysid, - const xmlChar * - ndataid, - const xmlChar * - content); - -/* - * DTD notation definition - */ - XMLPUBFUN int XMLCALL - xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer, - const xmlChar * name, - const xmlChar * pubid, - const xmlChar * sysid); - -/* - * Indentation - */ - XMLPUBFUN int XMLCALL - xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent); - XMLPUBFUN int XMLCALL - xmlTextWriterSetIndentString(xmlTextWriterPtr writer, - const xmlChar * str); - - XMLPUBFUN int XMLCALL - xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar); - - -/* - * misc - */ - XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_WRITER_ENABLED */ - -#endif /* __XML_XMLWRITER_H__ */ diff --git a/sdk/lib/3rdparty/libxml2/AUTHORS b/sdk/lib/3rdparty/libxml2/AUTHORS new file mode 100644 index 00000000000..cf2e9a6fadd --- /dev/null +++ b/sdk/lib/3rdparty/libxml2/AUTHORS @@ -0,0 +1,5 @@ +Daniel Veillard +Bjorn Reese +William Brack +Igor Zlatkovic for the Windows port +Aleksey Sanin diff --git a/sdk/lib/3rdparty/libxml2/CMakeLists.txt b/sdk/lib/3rdparty/libxml2/CMakeLists.txt index ba32c6a732a..b4e9cc0b3bd 100644 --- a/sdk/lib/3rdparty/libxml2/CMakeLists.txt +++ b/sdk/lib/3rdparty/libxml2/CMakeLists.txt @@ -1,6 +1,5 @@ include_directories( - include ${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/libwin-iconv ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib) @@ -8,7 +7,6 @@ add_definitions( -D__MINGW32__ -DLIBXML_STATIC -D_REENTRANT - -DHAVE_WIN32_THREADS -D_MBCS -D_WINDOWS -DWIN32 @@ -18,7 +16,6 @@ add_definitions( list(APPEND SOURCE buf.c - c14n.c catalog.c chvalid.c debugXML.c @@ -30,10 +27,7 @@ list(APPEND SOURCE hash.c HTMLparser.c HTMLtree.c - legacy.c list.c - nanoftp.c - nanohttp.c parser.c parserInternals.c pattern.c @@ -45,17 +39,14 @@ list(APPEND SOURCE uri.c valid.c xinclude.c - xlink.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c - xmlmodule.c xmlsave.c xmlschemas.c xmlschemastypes.c xmlunicode.c - xmlwriter.c xpath.c xpointer.c xmlstring.c @@ -69,10 +60,23 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") target_compile_options(libxml2 PRIVATE "/wd4101") # Local variable initialized but not referenced remove_target_compile_option(libxml2 "/we4189") + # warning C4996: 'function': was declared deprecated + target_compile_options(libxml2 PRIVATE "/wd4996") + # warning C4090: 'function': different 'const' qualifiers + target_compile_options(libxml2 PRIVATE "/wd4090") + if(ARCH STREQUAL "amd64" OR ARCH STREQUAL "arm64") + # '=': conversion from 'size_t' to 'int', possible loss of data + target_compile_options(libxml2 PRIVATE "/wd4267") + endif() else() target_compile_options(libxml2 PRIVATE "-w") endif() +target_include_directories(libxml2 + PRIVATE include/private + PUBLIC include;include/libxml +) + target_link_libraries(libxml2 oldnames) add_pch(libxml2 libxml.h SOURCE) add_dependencies(libxml2 psdk) diff --git a/sdk/lib/3rdparty/libxml2/Copyright b/sdk/lib/3rdparty/libxml2/COPYING similarity index 100% rename from sdk/lib/3rdparty/libxml2/Copyright rename to sdk/lib/3rdparty/libxml2/COPYING diff --git a/sdk/lib/3rdparty/libxml2/HTMLparser.c b/sdk/lib/3rdparty/libxml2/HTMLparser.c index ba886908e44..ea6a4f265fd 100644 --- a/sdk/lib/3rdparty/libxml2/HTMLparser.c +++ b/sdk/lib/3rdparty/libxml2/HTMLparser.c @@ -14,30 +14,30 @@ #include #include +#include #include #include #include #include #include -#include #include #include #include -#include #include -#include #include -#include "buf.h" -#include "enc.h" +#include "private/buf.h" +#include "private/enc.h" +#include "private/error.h" +#include "private/html.h" +#include "private/io.h" +#include "private/parser.h" +#include "private/tree.h" #define HTML_MAX_NAMELEN 1000 #define HTML_PARSER_BIG_BUFFER_SIZE 1000 #define HTML_PARSER_BUFFER_SIZE 100 -/* #define DEBUG */ -/* #define DEBUG_PUSH */ - static int htmlOmittedDefaultValue = 1; xmlChar * htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, @@ -145,7 +145,7 @@ htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error, * * Pushes a new element name on top of the name stack * - * Returns 0 in case of error, the index in the stack otherwise + * Returns -1 in case of error, the index in the stack otherwise */ static int htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value) @@ -155,15 +155,17 @@ htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value) if ((ctxt->html < 10) && (xmlStrEqual(value, BAD_CAST "body"))) ctxt->html = 10; if (ctxt->nameNr >= ctxt->nameMax) { - ctxt->nameMax *= 2; - ctxt->nameTab = (const xmlChar * *) - xmlRealloc((xmlChar * *)ctxt->nameTab, - ctxt->nameMax * - sizeof(ctxt->nameTab[0])); - if (ctxt->nameTab == NULL) { + size_t newSize = ctxt->nameMax * 2; + const xmlChar **tmp; + + tmp = xmlRealloc((xmlChar **) ctxt->nameTab, + newSize * sizeof(ctxt->nameTab[0])); + if (tmp == NULL) { htmlErrMemory(ctxt, NULL); - return (0); + return (-1); } + ctxt->nameTab = tmp; + ctxt->nameMax = newSize; } ctxt->nameTab[ctxt->nameNr] = value; ctxt->name = value; @@ -270,8 +272,6 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt) * * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding * - * CURRENT Returns the current char value, with the full decoding of - * UTF-8 if we are using this mode. It returns an int. * NEXT Skip to the next character, this does the proper decoding * in UTF-8 mode. It also pop-up unfinished entities on the fly. * NEXTL(l) Skip the current unicode character of l xmlChars long. @@ -291,20 +291,17 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt) #define SHRINK if ((ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \ (ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \ - xmlParserInputShrink(ctxt->input) + xmlParserShrink(ctxt) #define GROW if ((ctxt->progressive == 0) && \ (ctxt->input->end - ctxt->input->cur < INPUT_CHUNK)) \ - xmlParserInputGrow(ctxt->input, INPUT_CHUNK) - -#define CURRENT ((int) (*ctxt->input->cur)) + xmlParserGrow(ctxt) #define SKIP_BLANKS htmlSkipBlankChars(ctxt) /* Imported from XML */ -/* #define CUR (ctxt->token ? ctxt->token : (int) (*ctxt->input->cur)) */ -#define CUR ((int) (*ctxt->input->cur)) +#define CUR (*ctxt->input->cur) #define NEXT xmlNextChar(ctxt) #define RAW (ctxt->token ? -1 : (*ctxt->input->cur)) @@ -324,10 +321,9 @@ htmlNodeInfoPop(htmlParserCtxtPtr ctxt) ************/ #define CUR_CHAR(l) htmlCurrentChar(ctxt, &l) -#define CUR_SCHAR(s, l) xmlStringCurrentChar(ctxt, s, &l) #define COPY_BUF(l,b,i,v) \ - if (l == 1) b[i++] = (xmlChar) v; \ + if (l == 1) b[i++] = v; \ else i += xmlCopyChar(l,&b[i],v) /** @@ -349,8 +345,7 @@ htmlFindEncoding(xmlParserCtxtPtr ctxt) { const xmlChar *start, *cur, *end; if ((ctxt == NULL) || (ctxt->input == NULL) || - (ctxt->input->encoding != NULL) || (ctxt->input->buf == NULL) || - (ctxt->input->buf->encoder != NULL)) + (ctxt->input->flags & XML_INPUT_HAS_ENCODING)) return(NULL); if ((ctxt->input->cur == NULL) || (ctxt->input->end == NULL)) return(NULL); @@ -409,7 +404,14 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { *len = 0; return(ctxt->token); } - if (ctxt->charset != XML_CHAR_ENCODING_UTF8) { + + if (ctxt->input->end - ctxt->input->cur < INPUT_CHUNK) { + xmlParserGrow(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + return(0); + } + + if ((ctxt->input->flags & XML_INPUT_HAS_ENCODING) == 0) { xmlChar * guess; xmlCharEncodingHandlerPtr handler; @@ -418,7 +420,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { * a compatible encoding for the ASCII set, since * HTML constructs only use < 128 chars */ - if ((int) *ctxt->input->cur < 0x80) { + if (*ctxt->input->cur < 0x80) { *len = 1; if ((*ctxt->input->cur == 0) && (ctxt->input->cur < ctxt->input->end)) { @@ -426,7 +428,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { "Char 0x%X out of allowed range\n", 0); return(' '); } - return((int) *ctxt->input->cur); + return(*ctxt->input->cur); } /* @@ -436,9 +438,6 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { if (guess == NULL) { xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_8859_1); } else { - if (ctxt->input->encoding != NULL) - xmlFree((xmlChar *) ctxt->input->encoding); - ctxt->input->encoding = guess; handler = xmlFindCharEncodingHandler((const char *) guess); if (handler != NULL) { /* @@ -451,8 +450,9 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, "Unsupported encoding %s", guess, NULL); } + xmlFree(guess); } - ctxt->charset = XML_CHAR_ENCODING_UTF8; + ctxt->input->flags |= XML_INPUT_HAS_ENCODING; } /* @@ -469,29 +469,21 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { cur = ctxt->input->cur; c = *cur; if (c & 0x80) { + size_t avail; + if ((c & 0x40) == 0) goto encoding_error; - if (cur[1] == 0) { - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); - cur = ctxt->input->cur; - } - if ((cur[1] & 0xc0) != 0x80) + + avail = ctxt->input->end - ctxt->input->cur; + + if ((avail < 2) || ((cur[1] & 0xc0) != 0x80)) goto encoding_error; if ((c & 0xe0) == 0xe0) { - - if (cur[2] == 0) { - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); - cur = ctxt->input->cur; - } - if ((cur[2] & 0xc0) != 0x80) + if ((avail < 3) || ((cur[2] & 0xc0) != 0x80)) goto encoding_error; if ((c & 0xf0) == 0xf0) { - if (cur[3] == 0) { - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); - cur = ctxt->input->cur; - } if (((c & 0xf8) != 0xf0) || - ((cur[3] & 0xc0) != 0x80)) + (avail < 4) || ((cur[3] & 0xc0) != 0x80)) goto encoding_error; /* 4-byte code */ *len = 4; @@ -533,17 +525,10 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { } /* 1-byte code */ *len = 1; - return((int) *ctxt->input->cur); + return(*ctxt->input->cur); } encoding_error: - /* - * If we detect an UTF8 error that probably mean that the - * input encoding didn't get properly advertised in the - * declaration header. Report the error and switch the encoding - * to ISO-Latin-1 (if you don't like this policy, just declare the - * encoding !) - */ { char buffer[150]; @@ -559,18 +544,10 @@ encoding_error: BAD_CAST buffer, NULL); } - /* - * Don't switch encodings twice. Note that if there's an encoder, we - * shouldn't receive invalid UTF-8 anyway. - * - * Note that if ctxt->input->buf == NULL, switching encodings is - * impossible, see Gitlab issue #34. - */ - if ((ctxt->input->buf != NULL) && - (ctxt->input->buf->encoder == NULL)) + if ((ctxt->input->flags & XML_INPUT_HAS_ENCODING) == 0) xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_8859_1); *len = 1; - return((int) *ctxt->input->cur); + return(*ctxt->input->cur); } /** @@ -587,17 +564,12 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) { int res = 0; while (IS_BLANK_CH(*(ctxt->input->cur))) { - if ((*ctxt->input->cur == 0) && - (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { - xmlPopInput(ctxt); - } else { - if (*(ctxt->input->cur) == '\n') { - ctxt->input->line++; ctxt->input->col = 1; - } else ctxt->input->col++; - ctxt->input->cur++; - if (*ctxt->input->cur == 0) - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); - } + if (*(ctxt->input->cur) == '\n') { + ctxt->input->line++; ctxt->input->col = 1; + } else ctxt->input->col++; + ctxt->input->cur++; + if (*ctxt->input->cur == 0) + xmlParserGrow(ctxt); if (res < INT_MAX) res++; } @@ -1223,7 +1195,6 @@ static const htmlStartCloseEntry htmlStartClose[] = { { "menu", "form" }, { "menu", "ul" }, { "ol", "form" }, - { "ol", "ul" }, { "option", "optgroup" }, { "option", "option" }, { "p", "address" }, @@ -1307,7 +1278,6 @@ static const htmlStartCloseEntry htmlStartClose[] = { { "ul", "address" }, { "ul", "form" }, { "ul", "menu" }, - { "ul", "ol" }, { "ul", "pre" }, { "xmp", "dd" }, { "xmp", "dl" }, @@ -1395,10 +1365,7 @@ static const elementPriority htmlEndPriority[] = { /** * htmlInitAutoClose: * - * DEPRECATED: This function will be made private. Call xmlInitParser to - * initialize the library. - * - * This is a no-op now. + * DEPRECATED: This is a no-op. */ void htmlInitAutoClose(void) { @@ -1565,20 +1532,11 @@ htmlAutoCloseOnEnd(htmlParserCtxtPtr ctxt) static void htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag) { - while ((newtag != NULL) && (ctxt->name != NULL) && - (htmlCheckAutoClose(newtag, ctxt->name))) { - if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) - ctxt->sax->endElement(ctxt->userData, ctxt->name); - htmlnamePop(ctxt); - } - if (newtag == NULL) { - htmlAutoCloseOnEnd(ctxt); + if (newtag == NULL) return; - } - while ((newtag == NULL) && (ctxt->name != NULL) && - ((xmlStrEqual(ctxt->name, BAD_CAST "head")) || - (xmlStrEqual(ctxt->name, BAD_CAST "body")) || - (xmlStrEqual(ctxt->name, BAD_CAST "html")))) { + + while ((ctxt->name != NULL) && + (htmlCheckAutoClose(newtag, ctxt->name))) { if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, ctxt->name); htmlnamePop(ctxt); @@ -2075,8 +2033,8 @@ static const htmlEntityDesc html40EntitiesTable[] = { #define growBuffer(buffer) { \ xmlChar *tmp; \ buffer##_size *= 2; \ - tmp = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \ - if (tmp == NULL) { \ + tmp = (xmlChar *) xmlRealloc(buffer, buffer##_size); \ + if (tmp == NULL) { \ htmlErrMemory(ctxt, "growing buffer\n"); \ xmlFree(buffer); \ return(NULL); \ @@ -2320,7 +2278,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen, else cp = ent->name; len = strlen(cp); - if (out + 2 + len > outend) + if (outend - out < len + 2) break; *out++ = '&'; memcpy(out, cp, len); @@ -2572,6 +2530,7 @@ htmlSkipBogusComment(htmlParserCtxtPtr ctxt) { static const xmlChar * htmlParseHTMLName(htmlParserCtxtPtr ctxt) { + const xmlChar *ret; int i = 0; xmlChar loc[HTML_PARSER_BUFFER_SIZE]; @@ -2589,7 +2548,11 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) { NEXT; } - return(xmlDictLookup(ctxt->dict, loc, i)); + ret = xmlDictLookup(ctxt->dict, loc, i); + if (ret == NULL) + htmlErrMemory(ctxt, NULL); + + return(ret); } @@ -2674,13 +2637,14 @@ static const xmlChar * htmlParseNameComplex(xmlParserCtxtPtr ctxt) { int len = 0, l; int c; - int count = 0; + int maxLength = (ctxt->options & XML_PARSE_HUGE) ? + XML_MAX_TEXT_LENGTH : + XML_MAX_NAME_LENGTH; const xmlChar *base = ctxt->input->base; /* * Handler for more complex cases */ - GROW; c = CUR_CHAR(l); if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */ (!IS_LETTER(c) && (c != '_') && @@ -2694,11 +2658,11 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) { (c == '_') || (c == ':') || (IS_COMBINING(c)) || (IS_EXTENDER(c)))) { - if (count++ > 100) { - count = 0; - GROW; - } len += l; + if (len > maxLength) { + htmlParseErr(ctxt, XML_ERR_NAME_TOO_LONG, "name too long", NULL, NULL); + return(NULL); + } NEXTL(l); c = CUR_CHAR(l); if (ctxt->input->base != base) { @@ -2709,6 +2673,8 @@ htmlParseNameComplex(xmlParserCtxtPtr ctxt) { return(htmlParseNameComplex(ctxt)); } } + if (ctxt->instate == XML_PARSER_EOF) + return(NULL); if (ctxt->input->cur - ctxt->input->base < len) { /* Sanity check */ @@ -2736,6 +2702,9 @@ static xmlChar * htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { xmlChar *buffer = NULL; int buffer_size = 0; + int maxLength = (ctxt->options & XML_PARSE_HUGE) ? + XML_MAX_HUGE_LENGTH : + XML_MAX_TEXT_LENGTH; xmlChar *out = NULL; const xmlChar *name = NULL; const xmlChar *cur = NULL; @@ -2745,7 +2714,7 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { * allocate a translation buffer. */ buffer_size = HTML_PARSER_BUFFER_SIZE; - buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar)); + buffer = (xmlChar *) xmlMallocAtomic(buffer_size); if (buffer == NULL) { htmlErrMemory(ctxt, "buffer allocation failed\n"); return(NULL); @@ -2841,6 +2810,10 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { out = &buffer[indx]; } c = CUR_CHAR(l); + if (ctxt->instate == XML_PARSER_EOF) { + xmlFree(buffer); + return(NULL); + } if (c < 0x80) { *out++ = c; bits= -6; } else if (c < 0x800) @@ -2853,8 +2826,14 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { for ( ; bits >= 0; bits-= 6) { *out++ = ((c >> bits) & 0x3F) | 0x80; } - NEXT; + NEXTL(l); } + if (out - buffer > maxLength) { + htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED, + "attribute value too long\n", NULL, NULL); + xmlFree(buffer); + return(NULL); + } } *out = 0; return(buffer); @@ -2865,6 +2844,8 @@ htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) { * @ctxt: an HTML parser context * @str: location to store the entity name * + * DEPRECATED: Internal function, don't use. + * * parse an HTML ENTITY references * * [68] EntityRef ::= '&' Name ';' @@ -2999,9 +2980,9 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, "Unfinished SystemLiteral\n", NULL, NULL); } else { - NEXT; if (err == 0) ret = xmlStrndup((BASE_PTR+startPosition), len); + NEXT; } return(ret); @@ -3054,9 +3035,9 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, "Unfinished PubidLiteral\n", NULL, NULL); } else { - NEXT; if (err == 0) ret = xmlStrndup((BASE_PTR + startPosition), len); + NEXT; } return(ret); @@ -3089,7 +3070,6 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { int nbchar = 0; int cur,l; - SHRINK; cur = CUR_CHAR(l); while (cur != 0) { if ((cur == '<') && (NXT(1) == '/')) { @@ -3128,6 +3108,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, "Invalid char in CDATA 0x%X\n", cur); } + NEXTL(l); if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) { buf[nbchar] = 0; if (ctxt->sax->cdataBlock!= NULL) { @@ -3139,12 +3120,14 @@ htmlParseScript(htmlParserCtxtPtr ctxt) { ctxt->sax->characters(ctxt->userData, buf, nbchar); } nbchar = 0; + SHRINK; } - GROW; - NEXTL(l); cur = CUR_CHAR(l); } + if (ctxt->instate == XML_PARSER_EOF) + return; + if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) { buf[nbchar] = 0; if (ctxt->sax->cdataBlock!= NULL) { @@ -3175,12 +3158,10 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 6]; int nbchar = 0; int cur, l; - int chunk = 0; if (readahead) buf[nbchar++] = readahead; - SHRINK; cur = CUR_CHAR(l); while (((cur != '<') || (ctxt->token == '<')) && ((cur != '&') || (ctxt->token == '&')) && @@ -3191,6 +3172,7 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { } else { COPY_BUF(l,buf,nbchar,cur); } + NEXTL(l); if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) { buf[nbchar] = 0; @@ -3214,21 +3196,12 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { } } nbchar = 0; - } - NEXTL(l); - chunk++; - if (chunk > HTML_PARSER_BUFFER_SIZE) { - chunk = 0; SHRINK; - GROW; - } - cur = CUR_CHAR(l); - if (cur == 0) { - SHRINK; - GROW; - cur = CUR_CHAR(l); } + cur = CUR_CHAR(l); } + if (ctxt->instate == XML_PARSER_EOF) + return; if (nbchar != 0) { buf[nbchar] = 0; @@ -3251,12 +3224,6 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { ctxt->sax->characters(ctxt->userData, buf, nbchar); } } - } else { - /* - * Loop detection - */ - if (cur == 0) - ctxt->instate = XML_PARSER_EOF; } } @@ -3347,9 +3314,11 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { int len = 0; int size = HTML_PARSER_BUFFER_SIZE; int cur, l; + int maxLength = (ctxt->options & XML_PARSE_HUGE) ? + XML_MAX_HUGE_LENGTH : + XML_MAX_TEXT_LENGTH; const xmlChar *target; xmlParserInputState state; - int count = 0; if ((RAW == '<') && (NXT(1) == '?')) { state = ctxt->instate; @@ -3358,7 +3327,6 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { * this is a Processing Instruction. */ SKIP(2); - SHRINK; /* * Parse the target name and check for special support like @@ -3379,7 +3347,7 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { ctxt->instate = state; return; } - buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); + buf = (xmlChar *) xmlMallocAtomic(size); if (buf == NULL) { htmlErrMemory(ctxt, NULL); ctxt->instate = state; @@ -3397,7 +3365,7 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { xmlChar *tmp; size *= 2; - tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar)); + tmp = (xmlChar *) xmlRealloc(buf, size); if (tmp == NULL) { htmlErrMemory(ctxt, NULL); xmlFree(buf); @@ -3406,11 +3374,6 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { } buf = tmp; } - count++; - if (count > 50) { - GROW; - count = 0; - } if (IS_CHAR(cur)) { COPY_BUF(l,buf,len,cur); } else { @@ -3418,15 +3381,21 @@ htmlParsePI(htmlParserCtxtPtr ctxt) { "Invalid char in processing instruction " "0x%X\n", cur); } + if (len > maxLength) { + htmlParseErr(ctxt, XML_ERR_PI_NOT_FINISHED, + "PI %s too long", target, NULL); + xmlFree(buf); + ctxt->instate = state; + return; + } NEXTL(l); cur = CUR_CHAR(l); - if (cur == 0) { - SHRINK; - GROW; - cur = CUR_CHAR(l); - } } buf[len] = 0; + if (ctxt->instate == XML_PARSER_EOF) { + xmlFree(buf); + return; + } if (cur != '>') { htmlParseErr(ctxt, XML_ERR_PI_NOT_FINISHED, "ParsePI: PI %s never end ...\n", target, NULL); @@ -3467,6 +3436,9 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { int r, rl; int cur, l; int next, nl; + int maxLength = (ctxt->options & XML_PARSE_HUGE) ? + XML_MAX_HUGE_LENGTH : + XML_MAX_TEXT_LENGTH; xmlParserInputState state; /* @@ -3477,9 +3449,8 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { state = ctxt->instate; ctxt->instate = XML_PARSER_COMMENT; - SHRINK; SKIP(4); - buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); + buf = (xmlChar *) xmlMallocAtomic(size); if (buf == NULL) { htmlErrMemory(ctxt, "buffer allocation failed\n"); ctxt->instate = state; @@ -3511,11 +3482,6 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { (r != '-') || (q != '-'))) { NEXTL(l); next = CUR_CHAR(nl); - if (next == 0) { - SHRINK; - GROW; - next = CUR_CHAR(nl); - } if ((q == '-') && (r == '-') && (cur == '!') && (next == '>')) { htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, @@ -3528,7 +3494,7 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { xmlChar *tmp; size *= 2; - tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar)); + tmp = (xmlChar *) xmlRealloc(buf, size); if (tmp == NULL) { xmlFree(buf); htmlErrMemory(ctxt, "growing buffer failed\n"); @@ -3543,6 +3509,13 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR, "Invalid char in comment 0x%X\n", q); } + if (len > maxLength) { + htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, + "comment too long", NULL, NULL); + xmlFree(buf); + ctxt->instate = state; + return; + } q = r; ql = rl; @@ -3553,6 +3526,10 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { } finished: buf[len] = 0; + if (ctxt->instate == XML_PARSER_EOF) { + xmlFree(buf); + return; + } if (cur == '>') { NEXT; if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) && @@ -3573,6 +3550,8 @@ unfinished: * htmlParseCharRef: * @ctxt: an HTML parser context * + * DEPRECATED: Internal function, don't use. + * * parse Reference declarations * * [66] CharRef ::= '&#' [0-9]+ ';' | @@ -3701,7 +3680,8 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) { htmlParseErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED, "DOCTYPE improperly terminated\n", NULL, NULL); /* Ignore bogus content */ - while ((CUR != 0) && (CUR != '>')) + while ((CUR != 0) && (CUR != '>') && + (ctxt->instate != XML_PARSER_EOF)) NEXT; } if (CUR == '>') @@ -3769,93 +3749,6 @@ htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) { return(name); } -/** - * htmlCheckEncodingDirect: - * @ctxt: an HTML parser context - * @attvalue: the attribute value - * - * Checks an attribute value to detect - * the encoding - * If a new encoding is detected the parser is switched to decode - * it and pass UTF8 - */ -static void -htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) { - - if ((ctxt == NULL) || (encoding == NULL) || - (ctxt->options & HTML_PARSE_IGNORE_ENC)) - return; - - /* do not change encoding */ - if (ctxt->input->encoding != NULL) - return; - - if (encoding != NULL) { - xmlCharEncoding enc; - xmlCharEncodingHandlerPtr handler; - - while ((*encoding == ' ') || (*encoding == '\t')) encoding++; - - if (ctxt->input->encoding != NULL) - xmlFree((xmlChar *) ctxt->input->encoding); - ctxt->input->encoding = xmlStrdup(encoding); - - enc = xmlParseCharEncoding((const char *) encoding); - /* - * registered set of known encodings - */ - if (enc != XML_CHAR_ENCODING_ERROR) { - if (((enc == XML_CHAR_ENCODING_UTF16LE) || - (enc == XML_CHAR_ENCODING_UTF16BE) || - (enc == XML_CHAR_ENCODING_UCS4LE) || - (enc == XML_CHAR_ENCODING_UCS4BE)) && - (ctxt->input->buf != NULL) && - (ctxt->input->buf->encoder == NULL)) { - htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, - "htmlCheckEncoding: wrong encoding meta\n", - NULL, NULL); - } else { - xmlSwitchEncoding(ctxt, enc); - } - ctxt->charset = XML_CHAR_ENCODING_UTF8; - } else { - /* - * fallback for unknown encodings - */ - handler = xmlFindCharEncodingHandler((const char *) encoding); - if (handler != NULL) { - xmlSwitchToEncoding(ctxt, handler); - ctxt->charset = XML_CHAR_ENCODING_UTF8; - } else { - htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING, - "htmlCheckEncoding: unknown encoding %s\n", - encoding, NULL); - } - } - - if ((ctxt->input->buf != NULL) && - (ctxt->input->buf->encoder != NULL) && - (ctxt->input->buf->raw != NULL) && - (ctxt->input->buf->buffer != NULL)) { - int nbchars; - int processed; - - /* - * convert as much as possible to the parser reading buffer. - */ - processed = ctxt->input->cur - ctxt->input->base; - xmlBufShrink(ctxt->input->buf->buffer, processed); - nbchars = xmlCharEncInput(ctxt->input->buf, 1); - xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input); - if (nbchars < 0) { - htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, - "htmlCheckEncoding: encoder error\n", - NULL, NULL); - } - } - } -} - /** * htmlCheckEncoding: * @ctxt: an HTML parser context @@ -3884,7 +3777,7 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) { encoding = xmlStrcasestr(attvalue, BAD_CAST"="); if (encoding && *encoding == '=') { encoding ++; - htmlCheckEncodingDirect(ctxt, encoding); + xmlSetDeclaredEncoding(ctxt, xmlStrdup(encoding)); } } @@ -3913,7 +3806,7 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) { && (!xmlStrcasecmp(value, BAD_CAST"Content-Type"))) http = 1; else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"charset"))) - htmlCheckEncodingDirect(ctxt, value); + xmlSetDeclaredEncoding(ctxt, xmlStrdup(value)); else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"content"))) content = value; att = atts[i++]; @@ -4033,7 +3926,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { SKIP_BLANKS; while ((CUR != 0) && (CUR != '>') && - ((CUR != '/') || (NXT(1) != '>'))) { + ((CUR != '/') || (NXT(1) != '>')) && + (ctxt->instate != XML_PARSER_EOF)) { GROW; attname = htmlParseAttribute(ctxt, &attvalue); if (attname != NULL) { @@ -4094,7 +3988,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) { * the end of the tag. */ while ((CUR != 0) && !(IS_BLANK_CH(CUR)) && (CUR != '>') && - ((CUR != '/') || (NXT(1) != '>'))) + ((CUR != '/') || (NXT(1) != '>')) && + (ctxt->instate != XML_PARSER_EOF)) NEXT; } @@ -4461,6 +4356,8 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { else { htmlParseCharData(ctxt); } + + SHRINK; GROW; } if (currentNode != NULL) xmlFree(currentNode); @@ -4470,6 +4367,8 @@ htmlParseContent(htmlParserCtxtPtr ctxt) { * htmlParseElement: * @ctxt: an HTML parser context * + * DEPRECATED: Internal function, don't use. + * * parse an HTML element, this is highly recursive * this is kept for compatibility with previous code versions * @@ -4727,8 +4626,16 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { int depth; const xmlChar *name; - currentNode = xmlStrdup(ctxt->name); depth = ctxt->nameNr; + if (depth <= 0) { + currentNode = NULL; + } else { + currentNode = xmlStrdup(ctxt->name); + if (currentNode == NULL) { + htmlErrMemory(ctxt, NULL); + return; + } + } while (1) { GROW; @@ -4744,8 +4651,16 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { if (currentNode != NULL) xmlFree(currentNode); - currentNode = xmlStrdup(ctxt->name); depth = ctxt->nameNr; + if (depth <= 0) { + currentNode = NULL; + } else { + currentNode = xmlStrdup(ctxt->name); + if (currentNode == NULL) { + htmlErrMemory(ctxt, NULL); + break; + } + } } continue; /* while */ } @@ -4767,6 +4682,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { xmlFree(currentNode); currentNode = xmlStrdup(ctxt->name); + if (currentNode == NULL) { + htmlErrMemory(ctxt, NULL); + break; + } depth = ctxt->nameNr; continue; } @@ -4790,6 +4709,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { if (currentNode != NULL) xmlFree(currentNode); currentNode = xmlStrdup(ctxt->name); + if (currentNode == NULL) { + htmlErrMemory(ctxt, NULL); + break; + } depth = ctxt->nameNr; continue; } @@ -4841,6 +4764,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { if (currentNode != NULL) xmlFree(currentNode); currentNode = xmlStrdup(ctxt->name); + if (currentNode == NULL) { + htmlErrMemory(ctxt, NULL); + break; + } depth = ctxt->nameNr; } else if (CUR == '<') { @@ -4872,6 +4799,8 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) { else { htmlParseCharData(ctxt); } + + SHRINK; GROW; } if (currentNode != NULL) xmlFree(currentNode); @@ -4904,44 +4833,31 @@ __htmlParseContent(void *ctxt) { int htmlParseDocument(htmlParserCtxtPtr ctxt) { - xmlChar start[4]; - xmlCharEncoding enc; xmlDtdPtr dtd; xmlInitParser(); - htmlDefaultSAXHandlerInit(); - if ((ctxt == NULL) || (ctxt->input == NULL)) { htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, "htmlParseDocument: context error\n", NULL, NULL); return(XML_ERR_INTERNAL_ERROR); } - ctxt->html = 1; - ctxt->linenumbers = 1; - GROW; + /* * SAX: beginning of the document processing. */ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); - if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) && - ((ctxt->input->end - ctxt->input->cur) >= 4)) { - /* - * Get the 4 first bytes and decode the charset - * if enc != XML_CHAR_ENCODING_NONE - * plug some encoding conversion routines. - */ - start[0] = RAW; - start[1] = NXT(1); - start[2] = NXT(2); - start[3] = NXT(3); - enc = xmlDetectCharEncoding(&start[0], 4); - if (enc != XML_CHAR_ENCODING_NONE) { - xmlSwitchEncoding(ctxt, enc); - } - } + xmlDetectEncoding(ctxt); + + /* + * This is wrong but matches long-standing behavior. In most cases, + * a document starting with an XML declaration will specify UTF-8. + */ + if (((ctxt->input->flags & XML_INPUT_HAS_ENCODING) == 0) && + (xmlStrncmp(ctxt->input->cur, BAD_CAST "sax == NULL) + ctxt->sax = (htmlSAXHandler *) xmlMalloc(sizeof(htmlSAXHandler)); + if (ctxt->sax == NULL) { htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n"); return(-1); } - memset(sax, 0, sizeof(htmlSAXHandler)); + if (sax == NULL) { + memset(ctxt->sax, 0, sizeof(htmlSAXHandler)); + xmlSAX2InitHtmlDefaultSAXHandler(ctxt->sax); + ctxt->userData = ctxt; + } else { + memcpy(ctxt->sax, sax, sizeof(htmlSAXHandler)); + ctxt->userData = userData ? userData : ctxt; + } /* Allocate the Input stack */ ctxt->inputTab = (htmlParserInputPtr *) @@ -5115,10 +5041,6 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt) ctxt->nodeInfoNr = 0; ctxt->nodeInfoMax = 0; - ctxt->sax = sax; - xmlSAX2InitHtmlDefaultSAXHandler(sax); - - ctxt->userData = ctxt; ctxt->myDoc = NULL; ctxt->wellFormed = 1; ctxt->replaceEntities = 0; @@ -5161,6 +5083,23 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt) htmlParserCtxtPtr htmlNewParserCtxt(void) +{ + return(htmlNewSAXParserCtxt(NULL, NULL)); +} + +/** + * htmlNewSAXParserCtxt: + * @sax: SAX handler + * @userData: user data + * + * Allocate and initialize a new SAX parser context. If userData is NULL, + * the parser context will be passed as user data. + * + * Returns the htmlParserCtxtPtr or NULL in case of allocation error + */ + +htmlParserCtxtPtr +htmlNewSAXParserCtxt(const htmlSAXHandler *sax, void *userData) { xmlParserCtxtPtr ctxt; @@ -5170,7 +5109,7 @@ htmlNewParserCtxt(void) return(NULL); } memset(ctxt, 0, sizeof(xmlParserCtxt)); - if (htmlInitParserCtxt(ctxt) < 0) { + if (htmlInitParserCtxt(ctxt, sax, userData) < 0) { htmlFreeParserCtxt(ctxt); return(NULL); } @@ -5202,7 +5141,10 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) { return(NULL); buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE); - if (buf == NULL) return(NULL); + if (buf == NULL) { + xmlFreeParserCtxt(ctxt); + return(NULL); + } input = xmlNewInputStream(ctxt); if (input == NULL) { @@ -5221,7 +5163,7 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) { /** * htmlCreateDocParserCtxt: - * @cur: a pointer to an array of xmlChar + * @str: a pointer to an array of xmlChar * @encoding: a free form C string describing the HTML document encoding, or NULL * * Create a parser context for an HTML document. @@ -5231,25 +5173,41 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) { * Returns the new parser context or NULL */ static htmlParserCtxtPtr -htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) { - int len; - htmlParserCtxtPtr ctxt; +htmlCreateDocParserCtxt(const xmlChar *str, const char *encoding) { + xmlParserCtxtPtr ctxt; + xmlParserInputPtr input; + xmlParserInputBufferPtr buf; - if (cur == NULL) + if (str == NULL) return(NULL); - len = xmlStrlen(cur); - ctxt = htmlCreateMemoryParserCtxt((char *)cur, len); + + ctxt = htmlNewParserCtxt(); if (ctxt == NULL) return(NULL); + buf = xmlParserInputBufferCreateString(str); + if (buf == NULL) { + xmlFreeParserCtxt(ctxt); + return(NULL); + } + + input = xmlNewInputStream(ctxt); + if (input == NULL) { + xmlFreeParserInputBuffer(buf); + xmlFreeParserCtxt(ctxt); + return(NULL); + } + + input->filename = NULL; + input->buf = buf; + xmlBufResetInput(buf->buffer, input); + + inputPush(ctxt, input); + if (encoding != NULL) { xmlCharEncoding enc; xmlCharEncodingHandlerPtr handler; - if (ctxt->input->encoding != NULL) - xmlFree((xmlChar *) ctxt->input->encoding); - ctxt->input->encoding = xmlStrdup((const xmlChar *) encoding); - enc = xmlParseCharEncoding(encoding); /* * registered set of known encodings @@ -5275,6 +5233,7 @@ htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) { } } } + return(ctxt); } @@ -5307,33 +5266,20 @@ static int htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, xmlChar next, xmlChar third, int ignoreattrval) { - int base, len; + size_t base, len; htmlParserInputPtr in; const xmlChar *buf; - int invalue = 0; - char valdellim = 0x0; + int quote; in = ctxt->input; if (in == NULL) return (-1); - base = in->cur - in->base; - if (base < 0) - return (-1); + base = ctxt->checkIndex; + quote = ctxt->endCheckState; - if (ctxt->checkIndex > base) { - base = ctxt->checkIndex; - /* Abuse hasPErefs member to restore current state. */ - invalue = ctxt->hasPErefs & 1 ? 1 : 0; - } - - if (in->buf == NULL) { - buf = in->base; - len = in->length; - } else { - buf = xmlBufContent(in->buf->buffer); - len = xmlBufUse(in->buf->buffer); - } + buf = in->cur; + len = in->end - in->cur; /* take into account the sequence length */ if (third) @@ -5341,19 +5287,19 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, else if (next) len--; for (; base < len; base++) { + if (base >= INT_MAX / 2) { + ctxt->checkIndex = 0; + ctxt->endCheckState = 0; + return (base - 2); + } if (ignoreattrval) { + if (quote) { + if (buf[base] == quote) + quote = 0; + continue; + } if (buf[base] == '"' || buf[base] == '\'') { - if (invalue) { - if (buf[base] == valdellim) { - invalue = 0; - continue; - } - } else { - valdellim = buf[base]; - invalue = 1; - continue; - } - } else if (invalue) { + quote = buf[base]; continue; } } @@ -5366,41 +5312,12 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first, continue; } ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - if (next == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c' found at %d\n", - first, base); - else if (third == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c' found at %d\n", - first, next, base); - else - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c%c' found at %d\n", - first, next, third, base); -#endif - return (base - (in->cur - in->base)); + ctxt->endCheckState = 0; + return (base); } } ctxt->checkIndex = base; - /* Abuse hasPErefs member to track current state. */ - if (invalue) - ctxt->hasPErefs |= 1; - else - ctxt->hasPErefs &= ~1; -#ifdef DEBUG_PUSH - if (next == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c' failed\n", first); - else if (third == 0) - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c' failed\n", first, next); - else - xmlGenericError(xmlGenericErrorContext, - "HPP: lookup '%c%c%c' failed\n", first, next, - third); -#endif + ctxt->endCheckState = quote; return (-1); } @@ -5422,16 +5339,23 @@ static int htmlParseLookupCommentEnd(htmlParserCtxtPtr ctxt) { int mark = 0; - int cur = CUR_PTR - BASE_PTR; + int offset; - while (mark >= 0) { + while (1) { mark = htmlParseLookupSequence(ctxt, '-', '-', 0, 0); - if ((mark < 0) || - (NXT(mark+2) == '>') || + if (mark < 0) + break; + if ((NXT(mark+2) == '>') || ((NXT(mark+2) == '!') && (NXT(mark+3) == '>'))) { - return mark; + ctxt->checkIndex = 0; + break; } - ctxt->checkIndex = cur + mark + 1; + offset = (NXT(mark+2) == '!') ? 3 : 2; + if (mark + offset >= ctxt->input->end - ctxt->input->cur) { + ctxt->checkIndex = mark; + return(-1); + } + ctxt->checkIndex = mark + 1; } return mark; } @@ -5455,68 +5379,11 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { htmlParserNodeInfo node_info; -#ifdef DEBUG_PUSH - switch (ctxt->instate) { - case XML_PARSER_EOF: - xmlGenericError(xmlGenericErrorContext, - "HPP: try EOF\n"); break; - case XML_PARSER_START: - xmlGenericError(xmlGenericErrorContext, - "HPP: try START\n"); break; - case XML_PARSER_MISC: - xmlGenericError(xmlGenericErrorContext, - "HPP: try MISC\n");break; - case XML_PARSER_COMMENT: - xmlGenericError(xmlGenericErrorContext, - "HPP: try COMMENT\n");break; - case XML_PARSER_PROLOG: - xmlGenericError(xmlGenericErrorContext, - "HPP: try PROLOG\n");break; - case XML_PARSER_START_TAG: - xmlGenericError(xmlGenericErrorContext, - "HPP: try START_TAG\n");break; - case XML_PARSER_CONTENT: - xmlGenericError(xmlGenericErrorContext, - "HPP: try CONTENT\n");break; - case XML_PARSER_CDATA_SECTION: - xmlGenericError(xmlGenericErrorContext, - "HPP: try CDATA_SECTION\n");break; - case XML_PARSER_END_TAG: - xmlGenericError(xmlGenericErrorContext, - "HPP: try END_TAG\n");break; - case XML_PARSER_ENTITY_DECL: - xmlGenericError(xmlGenericErrorContext, - "HPP: try ENTITY_DECL\n");break; - case XML_PARSER_ENTITY_VALUE: - xmlGenericError(xmlGenericErrorContext, - "HPP: try ENTITY_VALUE\n");break; - case XML_PARSER_ATTRIBUTE_VALUE: - xmlGenericError(xmlGenericErrorContext, - "HPP: try ATTRIBUTE_VALUE\n");break; - case XML_PARSER_DTD: - xmlGenericError(xmlGenericErrorContext, - "HPP: try DTD\n");break; - case XML_PARSER_EPILOG: - xmlGenericError(xmlGenericErrorContext, - "HPP: try EPILOG\n");break; - case XML_PARSER_PI: - xmlGenericError(xmlGenericErrorContext, - "HPP: try PI\n");break; - case XML_PARSER_SYSTEM_LITERAL: - xmlGenericError(xmlGenericErrorContext, - "HPP: try SYSTEM_LITERAL\n");break; - } -#endif - while (1) { in = ctxt->input; if (in == NULL) break; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); - else - avail = (ptrdiff_t)xmlBufUse(in->buf->buffer) - - (in->cur - in->base); + avail = in->end - in->cur; if ((avail == 0) && (terminate)) { htmlAutoCloseOnEnd(ctxt); if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) { @@ -5549,17 +5416,23 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { */ goto done; case XML_PARSER_START: + /* + * This is wrong but matches long-standing behavior. In most + * cases, a document starting with an XML declaration will + * specify UTF-8. + */ + if (((ctxt->input->flags & XML_INPUT_HAS_ENCODING) == 0) && + (xmlStrncmp(ctxt->input->cur, BAD_CAST "cur[0]; if (IS_BLANK_CH(cur)) { SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); - else - avail = (ptrdiff_t)xmlBufUse(in->buf->buffer) - - (in->cur - in->base); + avail = in->end - in->cur; } if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, @@ -5567,6 +5440,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX)) ctxt->sax->startDocument(ctxt->userData); + if (ctxt->instate == XML_PARSER_EOF) + goto done; cur = in->cur[0]; next = in->cur[1]; @@ -5578,31 +5453,17 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing internal subset\n"); -#endif htmlParseDocTypeDecl(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_PROLOG; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering PROLOG\n"); -#endif } else { ctxt->instate = XML_PARSER_MISC; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering MISC\n"); -#endif } break; case XML_PARSER_MISC: SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); - else - avail = (ptrdiff_t)xmlBufUse(in->buf->buffer) - - (in->cur - in->base); + avail = in->end - in->cur; /* * no chars in buffer */ @@ -5624,21 +5485,17 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing Comment\n"); -#endif htmlParseComment(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_MISC; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing PI\n"); -#endif htmlParsePI(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_MISC; } else if ((cur == '<') && (next == '!') && (UPP(2) == 'D') && (UPP(3) == 'O') && @@ -5648,34 +5505,20 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing internal subset\n"); -#endif htmlParseDocTypeDecl(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_PROLOG; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering PROLOG\n"); -#endif } else if ((cur == '<') && (next == '!') && (avail < 9)) { goto done; } else { ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering START_TAG\n"); -#endif } break; case XML_PARSER_PROLOG: SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); - else - avail = (ptrdiff_t)xmlBufUse(in->buf->buffer) - - (in->cur - in->base); + avail = in->end - in->cur; if (avail < 2) goto done; cur = in->cur[0]; @@ -5684,39 +5527,27 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing Comment\n"); -#endif htmlParseComment(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_PROLOG; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing PI\n"); -#endif htmlParsePI(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_PROLOG; } else if ((cur == '<') && (next == '!') && (avail < 4)) { goto done; } else { ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering START_TAG\n"); -#endif } break; case XML_PARSER_EPILOG: - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); - else - avail = (ptrdiff_t)xmlBufUse(in->buf->buffer) - - (in->cur - in->base); + avail = in->end - in->cur; if (avail < 1) goto done; cur = in->cur[0]; @@ -5731,21 +5562,17 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (in->cur[2] == '-') && (in->cur[3] == '-')) { if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing Comment\n"); -#endif htmlParseComment(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_EPILOG; } else if ((cur == '<') && (next == '?')) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing PI\n"); -#endif htmlParsePI(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_EPILOG; } else if ((cur == '<') && (next == '!') && (avail < 4)) { @@ -5754,10 +5581,6 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->errNo = XML_ERR_DOCUMENT_END; ctxt->wellFormed = 0; ctxt->instate = XML_PARSER_EOF; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering EOF\n"); -#endif if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) ctxt->sax->endDocument(ctxt->userData); goto done; @@ -5787,19 +5610,11 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { cur = in->cur[0]; if (cur != '<') { ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif break; } if (next == '/') { ctxt->instate = XML_PARSER_END_TAG; ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering END_TAG\n"); -#endif break; } if ((!terminate) && @@ -5840,11 +5655,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) ctxt->sax->endElement(ctxt->userData, name); htmlnamePop(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif break; } @@ -5866,11 +5679,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (ctxt->record_info) htmlNodeInfoPush(ctxt, &node_info); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif break; } @@ -5886,11 +5697,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (ctxt->record_info) htmlNodeInfoPush(ctxt, &node_info); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_CONTENT; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif break; } case XML_PARSER_CONTENT: { @@ -5900,7 +5709,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { * Handle preparsed entities and charRef */ if (ctxt->token != 0) { - chr[0] = (xmlChar) ctxt->token; + chr[0] = ctxt->token; htmlCheckParagraph(ctxt); if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) ctxt->sax->characters(ctxt->userData, chr, 1); @@ -5952,20 +5761,26 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if (idx < 0) goto done; val = in->cur[idx + 2]; - if (val == 0) /* bad cut of input */ + if (val == 0) { /* bad cut of input */ + /* + * FIXME: htmlParseScript checks for additional + * characters after 'checkIndex = idx; goto done; + } } htmlParseScript(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; if ((cur == '<') && (next == '/')) { ctxt->instate = XML_PARSER_END_TAG; ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering END_TAG\n"); -#endif break; } } else if ((cur == '<') && (next == '!')) { + if (avail < 4) + goto done; /* * Sometimes DOCTYPE arrives in the middle of the document */ @@ -5984,11 +5799,9 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing Comment\n"); -#endif htmlParseComment(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_CONTENT; } else { if ((!terminate) && @@ -6000,31 +5813,19 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { if ((!terminate) && (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) goto done; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing PI\n"); -#endif htmlParsePI(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; ctxt->instate = XML_PARSER_CONTENT; - } else if ((cur == '<') && (next == '!') && (avail < 4)) { - goto done; } else if ((cur == '<') && (next == '/')) { ctxt->instate = XML_PARSER_END_TAG; ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering END_TAG\n"); -#endif break; } else if ((cur == '<') && IS_ASCII_LETTER(next)) { if ((!terminate) && (next == 0)) goto done; ctxt->instate = XML_PARSER_START_TAG; ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering START_TAG\n"); -#endif break; } else if (cur == '<') { if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && @@ -6043,10 +5844,6 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (htmlParseLookupSequence(ctxt, '<', 0, 0, 0) < 0)) goto done; ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: Parsing char data\n"); -#endif while ((ctxt->instate != XML_PARSER_EOF) && (cur != '<') && (in->cur < in->end)) { if (cur == '&') { @@ -6067,128 +5864,20 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0)) goto done; htmlParseEndTag(ctxt); + if (ctxt->instate == XML_PARSER_EOF) + goto done; if (ctxt->nameNr == 0) { ctxt->instate = XML_PARSER_EPILOG; } else { ctxt->instate = XML_PARSER_CONTENT; } ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif break; - case XML_PARSER_CDATA_SECTION: + default: htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == CDATA\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif + "HPP: internal error\n", NULL, NULL); + ctxt->instate = XML_PARSER_EOF; break; - case XML_PARSER_DTD: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == DTD\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_COMMENT: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == COMMENT\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_PI: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == PI\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_ENTITY_DECL: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == ENTITY_DECL\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_ENTITY_VALUE: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == ENTITY_VALUE\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering DTD\n"); -#endif - break; - case XML_PARSER_ATTRIBUTE_VALUE: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == ATTRIBUTE_VALUE\n", - NULL, NULL); - ctxt->instate = XML_PARSER_START_TAG; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering START_TAG\n"); -#endif - break; - case XML_PARSER_SYSTEM_LITERAL: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == XML_PARSER_SYSTEM_LITERAL\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_IGNORE: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == XML_PARSER_IGNORE\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - case XML_PARSER_PUBLIC_LITERAL: - htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR, - "HPP: internal error, state == XML_PARSER_LITERAL\n", - NULL, NULL); - ctxt->instate = XML_PARSER_CONTENT; - ctxt->checkIndex = 0; -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, - "HPP: entering CONTENT\n"); -#endif - break; - } } done: @@ -6214,9 +5903,6 @@ done: BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN", BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd"); } -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, "HPP: done %d\n", ret); -#endif return(ret); } @@ -6241,42 +5927,16 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, } if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) { - size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); - size_t cur = ctxt->input->cur - ctxt->input->base; + size_t pos = ctxt->input->cur - ctxt->input->base; int res; res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); - xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); + xmlBufUpdateInput(ctxt->input->buf->buffer, ctxt->input, pos); if (res < 0) { - ctxt->errNo = XML_PARSER_EOF; - ctxt->disableSAX = 1; - return (XML_PARSER_EOF); - } -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); -#endif - -#if 0 - if ((terminate) || (ctxt->input->buf->buffer->use > 80)) - htmlParseTryOrFinish(ctxt, terminate); -#endif - } else if (ctxt->instate != XML_PARSER_EOF) { - if ((ctxt->input != NULL) && ctxt->input->buf != NULL) { - xmlParserInputBufferPtr in = ctxt->input->buf; - if ((in->encoder != NULL) && (in->buffer != NULL) && - (in->raw != NULL)) { - int nbchars; - size_t base = xmlBufGetInputBase(in->buffer, ctxt->input); - size_t current = ctxt->input->cur - ctxt->input->base; - - nbchars = xmlCharEncInput(in, terminate); - xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current); - if (nbchars < 0) { - htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING, - "encoder error\n", NULL, NULL); - return(XML_ERR_INVALID_ENCODING); - } - } + htmlParseErr(ctxt, ctxt->input->buf->error, + "xmlParserInputBufferPush failed", NULL, NULL); + xmlHaltParser(ctxt); + return (ctxt->errNo); } } htmlParseTryOrFinish(ctxt, terminate); @@ -6327,29 +5987,14 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, xmlInitParser(); - buf = xmlAllocParserInputBuffer(enc); + buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE); if (buf == NULL) return(NULL); - ctxt = htmlNewParserCtxt(); + ctxt = htmlNewSAXParserCtxt(sax, user_data); if (ctxt == NULL) { xmlFreeParserInputBuffer(buf); return(NULL); } - if(enc==XML_CHAR_ENCODING_UTF8 || buf->encoder) - ctxt->charset=XML_CHAR_ENCODING_UTF8; - if (sax != NULL) { - if (ctxt->sax != (xmlSAXHandlerPtr) &htmlDefaultSAXHandler) - xmlFree(ctxt->sax); - ctxt->sax = (htmlSAXHandlerPtr) xmlMalloc(sizeof(htmlSAXHandler)); - if (ctxt->sax == NULL) { - xmlFree(buf); - xmlFree(ctxt); - return(NULL); - } - memcpy(ctxt->sax, sax, sizeof(htmlSAXHandler)); - if (user_data != NULL) - ctxt->userData = user_data; - } if (filename == NULL) { ctxt->directory = NULL; } else { @@ -6359,7 +6004,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputStream = htmlNewInputStream(ctxt); if (inputStream == NULL) { xmlFreeParserCtxt(ctxt); - xmlFree(buf); + xmlFreeParserInputBuffer(buf); return(NULL); } @@ -6373,17 +6018,21 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputPush(ctxt, inputStream); + if (enc != XML_CHAR_ENCODING_NONE) + xmlSwitchEncoding(ctxt, enc); + if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) && (ctxt->input->buf != NULL)) { - size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input); - size_t cur = ctxt->input->cur - ctxt->input->base; + size_t pos = ctxt->input->cur - ctxt->input->base; + int res; - xmlParserInputBufferPush(ctxt->input->buf, size, chunk); - - xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur); -#ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size); -#endif + res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); + xmlBufUpdateInput(ctxt->input->buf->buffer, ctxt->input, pos); + if (res < 0) { + htmlParseErr(ctxt, ctxt->input->buf->error, + "xmlParserInputBufferPush failed\n", NULL, NULL); + xmlHaltParser(ctxt); + } } ctxt->progressive = 1; @@ -6398,6 +6047,8 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, * @sax: the SAX handler block * @userData: if using SAX, this pointer will be provided on callbacks. * + * DEPRECATED: Use htmlNewSAXParserCtxt and htmlCtxtReadDoc. + * * Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks * to handle parse events. If sax is NULL, fallback to the default DOM * behavior and return a tree. @@ -6469,8 +6120,6 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) htmlParserCtxtPtr ctxt; htmlParserInputPtr inputStream; char *canonicFilename; - /* htmlCharEncoding enc; */ - xmlChar *content, *content_line = (xmlChar *) "charset="; if (filename == NULL) return(NULL); @@ -6481,11 +6130,6 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) } canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename); if (canonicFilename == NULL) { -#ifdef LIBXML_SAX1_ENABLED - if (xmlDefaultSAXHandler.error != NULL) { - xmlDefaultSAXHandler.error(NULL, "out of memory\n"); - } -#endif xmlFreeParserCtxt(ctxt); return(NULL); } @@ -6501,17 +6145,12 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) /* set encoding */ if (encoding) { - size_t l = strlen(encoding); + xmlCharEncodingHandlerPtr hdlr; - if (l < 1000) { - content = xmlMallocAtomic (xmlStrlen(content_line) + l + 1); - if (content) { - strcpy ((char *)content, (char *)content_line); - strcat ((char *)content, (char *)encoding); - htmlCheckEncoding (ctxt, content); - xmlFree (content); - } - } + hdlr = xmlFindCharEncodingHandler(encoding); + if (hdlr != NULL) { + xmlSwitchToEncoding(ctxt, hdlr); + } } return(ctxt); @@ -6524,6 +6163,8 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding) * @sax: the SAX handler block * @userData: if using SAX, this pointer will be provided on callbacks. * + * DEPRECATED: Use htmlNewSAXParserCtxt and htmlCtxtReadFile. + * * parse an HTML file and build a tree. Automatic support for ZLIB/Compress * compressed document is provided by default if found at compile-time. * It use the given SAX function block to handle the parsing callback. @@ -6792,14 +6433,15 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt) ctxt->disableSAX = 0; ctxt->valid = 1; ctxt->vctxt.userData = ctxt; + ctxt->vctxt.flags = XML_VCTXT_USE_PCTXT; ctxt->vctxt.error = xmlParserValidityError; ctxt->vctxt.warning = xmlParserValidityWarning; ctxt->record_info = 0; ctxt->checkIndex = 0; + ctxt->endCheckState = 0; ctxt->inSubset = 0; ctxt->errNo = XML_ERR_OK; ctxt->depth = 0; - ctxt->charset = XML_CHAR_ENCODING_NONE; ctxt->catalogs = NULL; xmlInitNodeInfoSeq(&ctxt->node_seq); @@ -6811,6 +6453,11 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt) xmlHashFree(ctxt->attsSpecial, NULL); ctxt->attsSpecial = NULL; } + + ctxt->nbErrors = 0; + ctxt->nbWarnings = 0; + if (ctxt->lastError.code != XML_ERR_OK) + xmlResetError(&ctxt->lastError); } /** @@ -6881,6 +6528,7 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options) options -= HTML_PARSE_NOIMPLIED; } ctxt->dictNames = 0; + ctxt->linenumbers = 1; return (options); } @@ -6910,9 +6558,6 @@ htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding, hdlr = xmlFindCharEncodingHandler(encoding); if (hdlr != NULL) { xmlSwitchToEncoding(ctxt, hdlr); - if (ctxt->input->encoding != NULL) - xmlFree((xmlChar *) ctxt->input->encoding); - ctxt->input->encoding = xmlStrdup((xmlChar *)encoding); } } if ((URL != NULL) && (ctxt->input != NULL) && @@ -6997,12 +6642,9 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi htmlParserCtxtPtr ctxt; xmlInitParser(); - ctxt = xmlCreateMemoryParserCtxt(buffer, size); + ctxt = htmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return (NULL); - htmlDefaultSAXHandlerInit(); - if (ctxt->sax != NULL) - memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1)); return (htmlDoRead(ctxt, URL, encoding, options, 0)); } @@ -7099,7 +6741,7 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, /** * htmlCtxtReadDoc: * @ctxt: an HTML parser context - * @cur: a pointer to a zero terminated string + * @str: a pointer to a zero terminated string * @URL: the base URL to use for the document * @encoding: the document encoding, or NULL * @options: a combination of htmlParserOption(s) @@ -7110,13 +6752,33 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, * Returns the resulting document tree */ htmlDocPtr -htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur, +htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar *str, const char *URL, const char *encoding, int options) { - if (cur == NULL) + xmlParserInputBufferPtr input; + xmlParserInputPtr stream; + + if (ctxt == NULL) return (NULL); - return (htmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL, - encoding, options)); + if (str == NULL) + return (NULL); + xmlInitParser(); + + htmlCtxtReset(ctxt); + + input = xmlParserInputBufferCreateString(str); + if (input == NULL) { + return(NULL); + } + + stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE); + if (stream == NULL) { + xmlFreeParserInputBuffer(input); + return(NULL); + } + + inputPush(ctxt, stream); + return (htmlDoRead(ctxt, URL, encoding, options, 1)); } /** @@ -7182,7 +6844,8 @@ htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size, htmlCtxtReset(ctxt); - input = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE); + input = xmlParserInputBufferCreateStatic(buffer, size, + XML_CHAR_ENCODING_NONE); if (input == NULL) { return(NULL); } diff --git a/sdk/lib/3rdparty/libxml2/HTMLtree.c b/sdk/lib/3rdparty/libxml2/HTMLtree.c index 3dd78a91eba..8698f53e821 100644 --- a/sdk/lib/3rdparty/libxml2/HTMLtree.c +++ b/sdk/lib/3rdparty/libxml2/HTMLtree.c @@ -19,13 +19,14 @@ #include #include #include -#include #include #include -#include #include -#include "buf.h" +#include "private/buf.h" +#include "private/error.h" +#include "private/io.h" +#include "private/save.h" /************************************************************************ * * @@ -328,11 +329,6 @@ htmlIsBooleanAttr(const xmlChar *name) } #ifdef LIBXML_OUTPUT_ENABLED -/* - * private routine exported from xmlIO.c - */ -xmlOutputBufferPtr -xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder); /************************************************************************ * * * Output error handlers * @@ -417,7 +413,7 @@ htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, htmlSaveErrMemory("allocating HTML output buffer"); return (-1); } - memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer)); + memset(outbuf, 0, sizeof(xmlOutputBuffer)); outbuf->buffer = buf; outbuf->encoder = NULL; outbuf->writecallback = NULL; @@ -622,8 +618,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { * * ************************************************************************/ -void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur); - /** * htmlDtdDumpOutput: * @buf: the HTML buffer output @@ -705,10 +699,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { while (IS_BLANK_CH(*tmp)) tmp++; /* - * the < and > have already been escaped at the entity level - * And doing so here breaks server side includes + * Angle brackets are technically illegal in URIs, but they're + * used in server side includes, for example. Curly brackets + * are illegal as well and often used in templates. + * Don't escape non-whitespace, printable ASCII chars for + * improved interoperability. Only escape space, control + * and non-ASCII chars. */ - escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>"); + escaped = xmlURIEscapeStr(tmp, + BAD_CAST "\"#$%&+,/:;<=>?@[\\]^`{|}"); if (escaped != NULL) { xmlBufWriteQuotedString(buf->buffer, escaped); xmlFree(escaped); diff --git a/sdk/lib/3rdparty/libxml2/NEWS b/sdk/lib/3rdparty/libxml2/NEWS deleted file mode 100644 index 72e130b94d4..00000000000 --- a/sdk/lib/3rdparty/libxml2/NEWS +++ /dev/null @@ -1,3836 +0,0 @@ -NEWS file for libxml2 - -v2.10.3: Oct 14 2022 - -### Security - -- [CVE-2022-40304] Fix dict corruption caused by entity reference cycles -- [CVE-2022-40303] Fix integer overflows with XML_PARSE_HUGE -- Fix overflow check in SAX2.c - -### Portability - -- win32: Fix build with VS2013 - -### Build system - -- cmake: Set SOVERSION - - -v2.10.2: Aug 29 2022 - -### Improvements - -- Remove set-but-unused variable in xmlXPathScanName -- Silence -Warray-bounds warning - -### Build system - -- build: require automake-1.16.3 or later (Xi Ruoyao) -- Remove generated files from distribution - -### Test suite - -- Don't create missing.xml when running testapi - - -v2.10.1: Aug 25 2022 - -### Regressions - -- Fix xmlCtxtReadDoc with encoding - -### Bug fixes - -- Fix HTML parser with threads and --without-legacy - -### Build system - -- Fix build with Python 3.10 -- cmake: Disable version script on macOS -- Remove Makefile rule to build testapi.c - -### Documentation - -- Switch back to HTML output for API documentation -- Port doc/examples/index.py to Python 3 -- Fix order of exports in libxml2-api.xml -- Remove libxml2-refs.xml - - -v2.10.0: Aug 17 2022 - -### Security - -- [CVE-2022-2309] Reset nsNr in xmlCtxtReset -- Reserve byte for NUL terminator and report errors consistently in xmlBuf and - xmlBuffer (David Kilzer) -- Fix missing NUL terminators in xmlBuf and xmlBuffer functions (David Kilzer) -- Fix integer overflow in xmlBufferDump() (David Kilzer) -- xmlBufAvail() should return length without including a byte for NUL - terminator (David Kilzer) -- Fix ownership of xmlNodePtr & xmlAttrPtr fields in xmlSetTreeDoc() (David - Kilzer) -- Use xmlNewDocText in xmlXIncludeCopyRange -- Fix use-after-free bugs when calling xmlTextReaderClose() before - xmlFreeTextReader() on post-validating parser (David Kilzer) -- Use UPDATE_COMPAT() consistently in buf.c (David Kilzer) -- fix: xmlXPathParserContext could be double-delete in OOM case. (jinsub ahn) - -### Removals and deprecations - -- Disable XPointer location support by default -- Remove outdated xml2Conf.sh -- Deprecate module init and cleanup functions -- Remove obsolete XML Software Autoupdate (XSA) file -- Remove DOCBparser -- Remove obsolete Python test framework -- Remove broken VxWorks support -- Remove broken Mac OS 9 support -- Remove broken bakefile support -- Remove broken Visual Studio 2010 support -- Remove broken Windows CE support -- Deprecate IDREF-related functions in valid.h -- Deprecate legacy functions -- Disable legacy support by default -- Deprecate all functions in nanoftp.h -- Disable FTP support by default -- Add XML_DEPRECATED macro -- Remove elfgcchack.h - -### Regressions - -- Skip incorrectly opened HTML comments -- Restore behavior of htmlDocContentDumpFormatOutput() (David Kilzer) - -### Bug fixes - -- Fix memory leak with invalid XSD -- Make XPath depth check work with recursive invocations -- Fix memory leak in xmlLoadEntityContent error path -- Avoid double-free if malloc fails in inputPush -- Properly fold whitespace around the QName value when validating an XSD - schema. (Damjan Jovanovic) -- Add whitespace folding for some atomic data types that it's missing on. - (Damjan Jovanovic) -- Don't add IDs containing unexpanded entity references - -### Improvements - -- Avoid calling xmlSetTreeDoc -- Simplify xmlFreeNode -- Don't reset nsDef when changing node content -- Fix unintended fall-through in xmlNodeAddContentLen -- Remove unused xmlBuf functions (David Kilzer) -- Implement xpath1() XPointer scheme -- Add configuration flag for XPointer locations support -- Fix compiler warnings in Python code -- Mark more static data as `const` (David Kilzer) -- Make xmlStaticCopyNode non-recursive -- Clean up encoding switching code -- Simplify recursive pthread mutex -- Use non-recursive mutex in dict.c -- Fix parser progress checks -- Avoid arithmetic on freed pointers -- Improve buffer allocation scheme -- Remove unneeded #includes -- Add support for some non-standard escapes in regular expressions. (Damjan - Jovanovic) -- htmlParseComment: handle abruptly-closed comments (Mike Dalessio) -- Add let variable tag support (Oliver Diehl) -- Add value-of tag support (Oliver Diehl) -- Remove useless call to xmlRelaxNGCleanupTypes -- Don't include ICU headers in public headers -- Update `xmlStrlen()` to use POSIX / ISO C `strlen()` (Mike Dalessio) -- Fix unused variable warnings with disabled features -- Only warn on invalid redeclarations of predefined entities -- Remove unneeded code in xmlreader.c -- Rework validation context flags - -### Portability - -- Use NAN/INFINITY if available to init XPath NaN/Inf (Sergey Kosukhin) -- Fix Python tests on macOS -- Fix xmlCleanupThreads on Windows -- Fix reinitialization of library on Windows -- Don't mix declarations and code in runtest.c -- Use portable python shebangs (David Seifert) -- Use critical sections as mutex on Windows -- Don't set HAVE_WIN32_THREADS in win32config.h -- Use stdint.h with newer MSVC -- Remove cruft from win32config.h -- Remove isinf/isnan emulation in win32config.h -- Always fopen files with "rb" -- Remove __DJGPP__ checks -- Remove useless __CYGWIN__ checks - -### Build system - -- Don't autogenerate doc/examples/Makefile.am -- cmake: Install libxml.m4 on UNIX-like platforms (Daniel E) -- cmake: Use symbol versioning on UNIX-like platforms (Daniel E) -- Port genUnicode.py to Python 3 -- Port gentest.py to Python 3 -- cmake: Fix build without thread support -- cmake: Install documentation in CMAKE_INSTALL_DOCDIR -- cmake: Remove non needed files in docs dir (Daniel E) -- configure: move XML_PRIVATE_LIBS after WIN32_EXTRA_LIBADD is set - (Christopher Degawa) -- Move local Autoconf macros into m4 directory -- Use XML_PRIVATE_LIBS in libxml2_la_LIBADD -- Update libxml-2.0-uninstalled.pc.in -- Remove LIBS from XML_PRIVATE_LIBS -- Add WIN32_EXTRA_LIBADD to XML_PRIVATE_LIBS -- Don't overlink executables -- cmake: Adjust paths for UNIX or UNIX-like target systems (Daniel Engberg) -- build: Make use of variables in libxml's pkg-config file (Daniel Engberg) -- Avoid obsolescent `test -a` constructs (David Seifert) -- Move AM_MAINTAINER_MODE to AM section -- configure.ac: make AM_SILENT_RULES([yes]) unconditional (David Seifert) -- Streamline documentation installation -- Don't try to recreate COPYING symlink -- Detect libm using libtool's macros (David Seifert) -- configure.ac: disable static libraries by default (David Seifert) -- python/Makefile.am: nest python docs in $(docdir) (David Seifert) -- python/Makefile.am: rely on global AM_INIT_AUTOMAKE (David Seifert) -- Makefile.am: install examples more idiomatically (David Seifert) -- configure.ac: remove useless AC_SUBST (David Seifert) -- Respect `--sysconfdir` in source files (David Seifert) -- Ignore configure backup file created by recent autoreconf too (Vadim Zeitlin) -- Only install *.html and *.c example files -- Remove --with-html-dir option -- Rework documentation build system -- Remove old website -- Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings (David Seifert) -- Update genChRanges.py -- Update build_glob.py -- Remove ICONV_CONST test -- Remove obsolete AC_HEADER checks -- Don't check for standard C89 library functions -- Don't check for standard C89 headers -- Remove special configuration for certain maintainers - -### Test suite, CI - -- Disable network in API tests -- testapi: remove leading slash from "/missing.xml" (Mike Gilbert) -- Build Autotools CI tests out of source tree (VPATH) -- Add --with-minimum build to CI tests -- Fix warnings when testing --with-minimum build -- cmake: Run all tests when threads are disabled -- Also build CI tests with -Werror -- Move doc/examples tests to new test suite -- Simplify 'make check' targets -- Fix schemas and relaxng tests -- Remove unused result files -- Allow missing result files in runtest -- Move regexp tests to runtest -- Move SVG tests to runtest.c -- Move testModule to new test suite -- Move testThreads to new test suite -- Remove major parts of old test suite -- Make testchar return an error on failure (Tony Tascioglu) -- Add CI job for static build -- python/tests: open() relative to test scripts (David Seifert) -- Port some test scripts to Python 3 - -### Documentation - -- Improve documentation of tree manipulation API -- Update xml2-config man page -- Consolidate man pages -- Rename xmlcatalog_man.xml -- Make examples a standalone HTML page -- Fix documentation in entities.c -- Add note about optimization flags - - -v2.9.14: May 02 2022: - - Security: - [CVE-2022-29824] Integer overflow in xmlBuf and xmlBuffer - Fix potential double-free in xmlXPtrStringRangeFunction - Fix memory leak in xmlFindCharEncodingHandler - Normalize XPath strings in-place - Prevent integer-overflow in htmlSkipBlankChars() and xmlSkipBlankChars() - (David Kilzer) - Fix leak of xmlElementContent (David Kilzer) - - - Bug fixes: - Fix parsing of subtracted regex character classes - Fix recursion check in xinclude.c - Reset last error in xmlCleanupGlobals - Fix certain combinations of regex range quantifiers - Fix range quantifier on subregex - - - Improvements: - Fix recovery from invalid HTML start tags - - - Build system, portability: - Define LFS macros before including system headers - Initialize XPath floating-point globals - configure: check for icu DEFS (James Hilliard) - configure.ac: produce tar.xz only (GNOME policy) (David Seifert) - CMakeLists.txt: Fix LIBXML_VERSION_NUMBER - Fix build with older Python versions - Fix --without-valid build - - -v2.9.13: Feb 19 2022: - - Security: - [CVE-2022-23308] Use-after-free of ID and IDREF attributes - (Thanks to Shinji Sato for the report) - Use-after-free in xmlXIncludeCopyRange (David Kilzer) - Fix Null-deref-in-xmlSchemaGetComponentTargetNs (huangduirong) - Fix memory leak in xmlXPathCompNodeTest - Fix null pointer deref in xmlStringGetNodeList - Fix several memory leaks found by Coverity (David King) - - - Fixed regressions: - Fix regression in RelaxNG pattern matching - Properly handle nested documents in xmlFreeNode - Fix regression with PEs in external DTD - Fix random dropping of characters on dumping ASCII encoded XML (Mohammad Razavi) - Revert "Make schema validation fail with multiple top-level elements" - Fix regression when parsing invalid HTML tags in push mode - Fix regression parsing public IDs literals in HTML - Fix buffering in xmlOutputBufferWrite - Fix whitespace when serializing empty HTML documents - Fix XPath recursion limit - Fix regression in xmlNodeDumpOutputInternal - Work around lxml API abuse - - - Bug fixes: - Fix xmlSetTreeDoc with entity references - Fix double counting of CRLF in comments - Make sure to grow input buffer in xmlParseMisc - Don't ignore xmllint options after "-" - Don't normalize namespace URIs in XPointer xmlns() scheme - Fix handling of XSD with empty namespace - Also register HTML document nodes - Make xmllint return an error if arguments are missing - Fix handling of ctxt->base in xmlXPtrEvalXPtrPart - Fix xmllint --maxmem - Fix htmlReadFd, which was using a mix of xml and html context functions (Finn Barber) - Move current position before possible calling of ctxt->sax->characters (Yulin Li) - Fix parse failure when 4-byte character in UTF-16 BE is split across a chunk (David Kilzer) - Patch to forbid epsilon-reduction of final states (Arne Becker) - Avoid segfault at exit when using custom memory functions (Mike Dalessio) - - - Tests, code quality, fuzzing: - Remove .travis.yml - Make xmlFuzzReadString return a zero size in error case - Fix unused function warning in testapi.c - Update NewsML DTD in test suite - Add more checks for malloc failures in xmllint.c - Avoid potential integer overflow in xmlstring.c - Run CI tests with UBSan implicit-conversion checks - Fix casting of line numbers in SAX2.c - Fix integer conversion warnings in hash.c - Add explicit casts in runtest.c - Fix integer conversion warning in xmlIconvWrapper - Add suffix to unsigned constant in xmlmemory.c - Add explicit casts in testchar.c - Fix integer conversion warnings in xmlstring.c - Add explicit cast in xmlURIUnescapeString - Remove unused variable in xmlCharEncOutFunc (David King) - - - Build system, portability: - Remove xmlwin32version.h - Fix fuzzer test with VPATH build - Support custom prefix when installing Python module - Remove Makefile.win - Remove CVS and SVN-related code - Port python 3.x module to Windows and improve distutils (Chun-wei Fan) - Correctly install the HTML examples into their subdirectory (Mattia Rizzolo) - Refactor the settings of $docdir (Mattia Rizzolo) - Remove unused configure checks (Ben Boeckel) - python/Makefile.am: use *_LIBADD, not *_LDFLAGS for LIBS (Sam James) - Fix check for libtool in autogen.sh - Use version in configure.ac for CMake (Timothy Lyanguzov) - Add CMake alias targets for embedded projects (Markus Rickert) - - - Documentation: - Remove SVN keyword anchors - Rework README - Remove README.cvs-commits - Remove old ChangeLog - Update hyperlinks - Remove README.docs - Remove MAINTAINERS - Remove xmltutorial.pdf - Upload documentation to GitLab pages - Document how to escape XML_CATALOG_FILES - Fix libxml2.doap - Update URL for libxml++ C++ binding (Kjell Ahlstedt) - Generate devhelp2 index file (Emmanuele Bassi) - Mention XML_CATALOG_FILES is space-separated (Jan Tojnar) - Add documentaiton for xmllint exit code 10 (Rainer Canavan) - Fix some validation errors in the FAQ (David King) - Add instructions on how to use CMake to compile libxml (Markus Rickert) - - - -v2.9.12: May 13 2021: - - Build system: - Add fuzz.h and seed/regexp to EXTRA_DIST - - - -v2.9.11: May 13 2021: - - Security: - Patch for security issue CVE-2021-3541 (Daniel Veillard) - - - Documentation: - Clarify xmlNewDocProp documentation (Nick Wellnhofer) - - - Portability: - CMake: Only add postfixes if MSVC (Christopher Degawa), - Fix XPath NaN/Inf for older GCC versions (Nick Wellnhofer), - Use CMake PROJECT_VERSION (Markus Rickert), - Fix warnings in libxml.m4 with autoconf 2.70+. (Simon Josefsson), - Add CI for CMake on MSVC (Markus Rickert), - Update minimum required CMake version (Markus Rickert), - Add variables for configured options to CMake config files (Markus Rickert), - Check if variables exist when defining targets (Markus Rickert), - Check if target exists when reading target properties (Markus Rickert), - Add xmlcatalog target and definition to config files (Markus Rickert), - Remove include directories for link-only dependencies (Markus Rickert), - Fix ICU build in CMake (Markus Rickert), - Configure pkgconfig, xml2-config, and xml2Conf.sh file (Markus Rickert), - Update CMake config files (Markus Rickert), - Add xmlcatalog and xmllint to CMake export (Markus Rickert), - Simplify xmlexports.h (Nick Wellnhofer), - Require dependencies based on enabled CMake options (Markus Rickert), - Use NAMELINK_COMPONENT in CMake install (Markus Rickert), - Add CMake files to EXTRA_DIST (Markus Rickert), - Add missing compile definition for static builds to CMake (Markus Rickert), - Add CI for CMake on Linux and MinGW (Markus Rickert), - Fix variable name in win32/configure.js (Nick Wellnhofer), - Fix version parsing in win32/configure.js (Nick Wellnhofer), - Fix autotools warnings (Nick Wellnhofer), - Update config.h.cmake.in (Markus Rickert), - win32: allow passing *FLAGS on command line (Michael Stahl), - Configure file xmlwin32version.h.in on MSVC (Markus Rickert), - List headers individually (Markus Rickert), - Add CMake build files (Markus Rickert), - Parenthesize Py_Check() in ifs (Miro Hrončok), - Minor fixes to configure.js (Nick Wellnhofer) - - - Bug Fixes: - Fix null deref in legacy SAX1 parser (Nick Wellnhofer), - Fix handling of unexpected EOF in xmlParseContent (Nick Wellnhofer), - Fix line numbers in error messages for mismatched tags (Nick Wellnhofer), - Fix htmlTagLookup (Nick Wellnhofer), - Propagate error in xmlParseElementChildrenContentDeclPriv (Nick Wellnhofer), - Fix user-after-free with `xmllint --xinclude --dropdtd` (Nick Wellnhofer), - Fix dangling pointer with `xmllint --dropdtd` (Nick Wellnhofer), - Validate UTF8 in xmlEncodeEntities (Joel Hockey), - Fix use-after-free with `xmllint --html --push` (Nick Wellnhofer), - Allow FP division by zero in xmlXPathInit (Nick Wellnhofer), - Fix xmlGetNodePath with invalid node types (Nick Wellnhofer), - Fix exponential behavior with recursive entities (Nick Wellnhofer), - Fix quadratic behavior when looking up xml:* attributes (Nick Wellnhofer), - Fix slow parsing of HTML with encoding errors (Nick Wellnhofer), - Fix null deref introduced with previous commit (Nick Wellnhofer), - Check for invalid redeclarations of predefined entities (Nick Wellnhofer), - Add the copy of type from original xmlDoc in xmlCopyDoc() (SVGAnimate), - parser.c: shrink the input buffer when appropriate (Mike Dalessio), - Fix infinite loop in HTML parser introduced with recent commits (Nick Wellnhofer), - Fix quadratic runtime when parsing CDATA sections (Nick Wellnhofer), - Fix timeout when handling recursive entities (Nick Wellnhofer), - Fix memory leak in xmlParseElementMixedContentDecl (Nick Wellnhofer), - Fix null deref in xmlStringGetNodeList (Nick Wellnhofer), - use new htmlParseLookupCommentEnd to find comment ends (Mike Dalessio), - htmlParseComment: treat `--!>` as if it closed the comment (Mike Dalessio), - Fix integer overflow in xmlSchemaGetParticleTotalRangeMin (Nick Wellnhofer), - encoding: fix memleak in xmlRegisterCharEncodingHandler() (Xiaoming Ni), - xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add, check "facet->val" (Xiaoming Ni), - Fix null pointer deref in xmlXPtrRangeInsideFunction (Nick Wellnhofer), - Fix quadratic runtime in HTML push parser with null bytes (Nick Wellnhofer), - Avoid quadratic checking of identity-constraints (Michael Matz), - Fix building with ICU 68. (Frederik Seiffert), - Convert python/libxml.c to PY_SSIZE_T_CLEAN (Victor Stinner), - Fix xmlURIEscape memory leaks. (Elliott Hughes), - Avoid call stack overflow with XML reader and recursive XIncludes (Nick Wellnhofer), - Fix caret in regexp character group (Nick Wellnhofer), - parser.c: xmlParseCharData peek behavior fixed wrt newlines (Mike Dalessio), - Fix memory leaks in XPointer string-range function (Nick Wellnhofer), - Fix use-after-free when XIncluding text from Reader (Nick Wellnhofer), - Fix SEGV in xmlSAXParseFileWithData (yanjinjq), - Fix null deref in XPointer expression error path (Nick Wellnhofer), - Don't call xmlXPathInit directly (Nick Wellnhofer), - Fix cleanup of attributes in XML reader (Nick Wellnhofer), - Fix double free in XML reader with XIncludes (Nick Wellnhofer), - Fix memory leak in xmlXIncludeAddNode error paths (Nick Wellnhofer), - Revert "Fix quadratic runtime in xi:fallback processing" (Nick Wellnhofer), - Fix error reporting with xi:fallback (Nick Wellnhofer), - Fix quadratic runtime in xi:fallback processing (Nick Wellnhofer), - Fix corner case with empty xi:fallback (Nick Wellnhofer), - Fix XInclude regression introduced with recent commit (Nick Wellnhofer), - Fix memory leak in runtest.c (Nick Wellnhofer), - Make "xmllint --push --recovery" work (Nick Wellnhofer), - Revert "Do not URI escape in server side includes" (Nick Wellnhofer), - Fix column number accounting in xmlParse*NameAndCompare (Nick Wellnhofer), - Stop counting nbChars in parser context (Nick Wellnhofer), - Fix out-of-bounds read with 'xmllint --htmlout' (Nick Wellnhofer), - Fix exponential runtime and memory in xi:fallback processing (Nick Wellnhofer), - Don't process siblings of root in xmlXIncludeProcess (Nick Wellnhofer), - Don't recurse into xi:include children in xmlXIncludeDoProcess (Nick Wellnhofer), - Fix memory leak in xmlXIncludeIncludeNode error paths (Nick Wellnhofer), - Check for custom free function in global destructor (Nick Wellnhofer), - Fix integer overflow when comparing schema dates (Nick Wellnhofer), - Fix exponential runtime in xmlFARecurseDeterminism (Nick Wellnhofer), - Don't try to handle namespaces when building HTML documents (Nick Wellnhofer), - Fix several quadratic runtime issues in HTML push parser (Nick Wellnhofer), - Fix quadratic runtime when push parsing HTML start tags (Nick Wellnhofer), - Reset XML parser input before reporting errors (David Kilzer), - Fix quadratic runtime when push parsing HTML entity refs (Nick Wellnhofer), - Fix HTML push parser lookahead (Nick Wellnhofer), - Make htmlCurrentChar always translate U+0000 (Nick Wellnhofer), - Fix UTF-8 decoder in HTML parser (Nick Wellnhofer), - Fix quadratic runtime when parsing HTML script content (Nick Wellnhofer), - Reset HTML parser input before reporting error (Nick Wellnhofer), - Fix more quadratic runtime issues in HTML push parser (Nick Wellnhofer), - Fix regression introduced with 477c7f6a (Nick Wellnhofer), - Fix quadratic runtime in HTML parser (Nick Wellnhofer), - Reset HTML parser input before reporting encoding error (Nick Wellnhofer), - Fix integer overflow in xmlFAParseQuantExact (Nick Wellnhofer), - Fix return value of xmlC14NDocDumpMemory (Nick Wellnhofer), - Don't follow next pointer on documents in xmlXPathRunStreamEval (Nick Wellnhofer), - Fix integer overflow in _xmlSchemaParseGYear (Nick Wellnhofer), - Fix integer overflow when parsing {min,max}Occurs (Nick Wellnhofer), - Fix another memory leak in xmlSchemaValAtomicType (Nick Wellnhofer), - Fix unsigned integer overflow in htmlParseTryOrFinish (Nick Wellnhofer), - Fix integer overflow in htmlParseCharRef (Nick Wellnhofer), - Fix undefined behavior in UTF16LEToUTF8 (Nick Wellnhofer), - Fix return value of xmlCharEncOutput (Nick Wellnhofer), - Never expand parameter entities in text declaration (Nick Wellnhofer), - Fix undefined behavior in xmlXPathTryStreamCompile (Nick Wellnhofer), - Fix use-after-free with validating reader (Nick Wellnhofer), - xmlParseBalancedChunkMemory must not be called with NULL doc (Nick Wellnhofer), - Revert "Fix memory leak in xmlParseBalancedChunkMemoryRecover" (Nick Wellnhofer), - Fix memory leak in xmlXIncludeLoadDoc error path (Nick Wellnhofer), - Make schema validation fail with multiple top-level elements (Nick Wellnhofer), - Call xmlCleanupParser on ELF destruction (Samuel Thibault), - Fix copying of entities in xmlParseReference (Nick Wellnhofer), - Fix memory leak in xmlSchemaValidateStream (Zhipeng Xie), - Fix xmlSchemaGetCanonValue formatting for date and dateTime (Kevin Puetz), - Fix memory leak when shared libxml.dll is unloaded (Kevin Puetz), - Fix potentially-uninitialized critical section in Win32 DLL builds (Kevin Puetz), - Fix integer overflow in xmlBufferResize (Nick Wellnhofer), - Check for overflow when allocating two-dimensional arrays (Nick Wellnhofer), - Remove useless comparisons (Nick Wellnhofer), - Fix overflow check in xmlNodeDump (Nick Wellnhofer), - Fix infinite loop in xmlStringLenDecodeEntities (Zhipeng Xie), - Fix freeing of nested documents (Nick Wellnhofer), - Fix more memory leaks in error paths of XPath parser (Nick Wellnhofer), - Fix memory leaks of encoding handlers in xmlsave.c (Nick Wellnhofer), - Fix xml2-config error code (Nick Wellnhofer), - Fix memory leak in error path of XPath expr parser (Nick Wellnhofer), - Fix overflow handling in xmlBufBackToBuffer (Nick Wellnhofer), - Null pointer handling in catalog.c (raniervf), - xml2-config.in: fix regressions introduced by commit 2f2bf4b2c (Dmitry V. Levin) - - - Improvements: - Store per-element parser state in a struct (Nick Wellnhofer), - update for xsd:language type check (PaulHiggs), - Update INSTALL.libxml2 (Nick Wellnhofer), - Fix include order in c14n.h (Nick Wellnhofer), - Fix duplicate xmlStrEqual calls in htmlParseEndTag (Nick Wellnhofer), - Speed up htmlCheckAutoClose (Nick Wellnhofer), - Speed up htmlTagLookup (Nick Wellnhofer), - Stop checking attributes for UTF-8 validity (Nick Wellnhofer), - Reduce some fuzzer timeouts (Nick Wellnhofer), - Only run a few CI tests unless scheduled (Nick Wellnhofer), - Improve fuzzer stability (Nick Wellnhofer), - Check for feature flags in fuzzer tests (Nick Wellnhofer), - Another attempt at improving fuzzer stability (Nick Wellnhofer), - Revert "Improve HTML fuzzer stability" (Nick Wellnhofer), - Add charset names to fuzzing dictionaries (Nick Wellnhofer), - Improve HTML fuzzer stability (Nick Wellnhofer), - Add CI for MSVC x86 (Markus Rickert), - Add a flag to not output anything when xmllint succeeded (hhb), - Speed up HTML fuzzer (Nick Wellnhofer), - Remove unused encoding parameter of HTML output functions (Nick Wellnhofer), - Handle malloc failures in fuzzing code (Nick Wellnhofer), - add test coverage for incorrectly-closed comments (Mike Dalessio), - Enforce maximum length of fuzz input (Nick Wellnhofer), - Remove temporary members from struct _xmlXPathContext (Nick Wellnhofer), - Build the Python extension with PY_SSIZE_T_CLEAN (Victor Stinner), - Add CI test for Python 3 (Nick Wellnhofer), - Add fuzzing dictionaries to EXTRA_DIST (Nick Wellnhofer), - Add 'fuzz' subdirectory to DIST_SUBDIRS (Nick Wellnhofer), - Allow port numbers up to INT_MAX (Nick Wellnhofer), - Handle dumps of corrupted documents more gracefully (Nick Wellnhofer), - Limit size of free lists in XML reader when fuzzing (Nick Wellnhofer), - Hardcode maximum XPath recursion depth (Nick Wellnhofer), - Pass URL of main entity in XML fuzzer (Nick Wellnhofer), - Consolidate seed corpus generation (Nick Wellnhofer), - Test fuzz targets with dummy driver (Nick Wellnhofer), - Fix regression introduced with commit d88df4b (Nick Wellnhofer), - Fix regression introduced with commit 74dcc10b (Nick Wellnhofer), - Add TODO comment in xinclude.c (Nick Wellnhofer), - Stop using maxParserDepth in xpath.c (Nick Wellnhofer), - Remove dead code in xinclude.c (Nick Wellnhofer), - Don't add formatting newlines to XInclude nodes (Nick Wellnhofer), - Don't use SAX1 if all element handlers are NULL (Nick Wellnhofer), - Remove unneeded progress checks in HTML parser (Nick Wellnhofer), - Use strcmp when fuzzing (Nick Wellnhofer), - Fix XPath fuzzer (Nick Wellnhofer), - Fuzz XInclude engine (Nick Wellnhofer), - Add XPath and XPointer fuzzer (Nick Wellnhofer), - Update fuzzing code (Nick Wellnhofer), - More *NodeDumpOutput fixes (Nick Wellnhofer), - Fix *NodeDumpOutput functions (Nick Wellnhofer), - Make xmlNodeDumpOutputInternal non-recursive (Nick Wellnhofer), - Make xhtmlNodeDumpOutput non-recursive (Nick Wellnhofer), - Make htmlNodeDumpFormatOutput non-recursive (Nick Wellnhofer), - Fix .gitattributes (Nick Wellnhofer), - Rework control flow in htmlCurrentChar (Nick Wellnhofer), - Make 'xmllint --html --push -' read from stdin (Nick Wellnhofer), - Remove misleading comments in xpath.c (Nick Wellnhofer), - Update to Devhelp index file format version 2 (Andre Klapper), - Set project language to C (Markus Rickert), - Add variable for working directory of XML Conformance Test Suite (Markus Rickert), - Add additional tests and XML Conformance Test Suite (Markus Rickert), - Add command line option for temp directory in runtest (Markus Rickert), - Ensure LF line endings for test files (Markus Rickert), - Enable runtests and testThreads (Markus Rickert), - Limit regexp nesting depth (Nick Wellnhofer), - Fix return values and documentation in encoding.c (Nick Wellnhofer), - Add regexp regression tests (David Kilzer), - Report error for invalid regexp quantifiers (Nick Wellnhofer), - Fix rebuilding docs, by hiding __attribute__((...)) behind a macro. (Martin Vidner), - Copy xs:duration parser from libexslt (Nick Wellnhofer), - Fuzz target for XML Schemas (Nick Wellnhofer), - Move entity recorder to fuzz.c (Nick Wellnhofer), - Fuzz target for HTML parser (Nick Wellnhofer), - Update GitLab CI container (Nick Wellnhofer), - Add options file for xml fuzzer (Nick Wellnhofer), - Add a couple of libFuzzer targets (Nick Wellnhofer), - Guard new calls to xmlValidatePopElement in xml_reader.c (Daniel Cheng), - Add LIBXML_VALID_ENABLED to xmlreader (Łukasz Wojniłowicz), - Fix typos (Nick Wellnhofer), - Disable LeakSanitizer (Nick Wellnhofer), - Stop calling SAX getEntity handler from XMLReader (Nick Wellnhofer), - Add test case for recursive external parsed entities (Nick Wellnhofer), - Enable error tests with entity substitution (Nick Wellnhofer), - Don't load external entity from xmlSAX2GetEntity (Nick Wellnhofer), - Merge code paths loading external entities (Nick Wellnhofer), - Copy some XMLReader option flags to parser context (Nick Wellnhofer), - Add xmlPopOutputCallbacks (Nick Wellnhofer), - Updated Python test reader2.py (Pieter van Oostrum), - Updated python/tests/tstLastError.py (Pieter van Oostrum), - Use random seed in xmlDictComputeFastKey (Ranier Vilela), - Enable more undefined behavior sanitizers (Nick Wellnhofer) - - - -v2.9.10: Oct 30 2019: - - Documentation: - Fix a few more typos ("fonction") (Nick Wellnhofer), - Large batch of typo fixes (Jared Yanovich), - Fix typos: tree: move{ -> s}, reconcil{i -> }ed, h{o -> e}ld by... (Jan Pokorný), - Fix typo: xpath: simpli{ -> fi}ed (Jan Pokorný), - Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump (Jan Pokorný), - Fix comments in test code (zhouzhongyuan), - fix comment in testReader.c (zhouzhongyuan) - - - Portability: - Fix some release issues on Fedora 30 (Daniel Veillard), - Fix exponent digits when running tests under old MSVC (Daniel Richard G), - Work around buggy ceil() function on AIX (Daniel Richard G), - Don't call printf with NULL string in runtest.c (Daniel Richard G), - Switched from unsigned long to ptrdiff_t in parser.c (Stephen Chenney), - timsort.h: support older GCCs (Jérôme Duval), - Make configure.ac work with older pkg-config (Nick Wellnhofer), - Stop defining _REENTRANT on some Win32 platforms (Nick Wellnhofer), - Fix nanohttp.c on MinGW (Nick Wellnhofer), - Fix Windows compiler warning in testC14N.c (Nick Wellnhofer), - Merge testThreadsWin32.c into testThreads.c (Nick Wellnhofer), - Fix Python bindings under Windows (Nick Wellnhofer) - - - Bug Fixes: - Another fix for conditional sections at end of document (Nick Wellnhofer), - Fix for conditional sections at end of document (Nick Wellnhofer), - Make sure that Python tests exit with error code (Nick Wellnhofer), - Audit memory error handling in xpath.c (Nick Wellnhofer), - Fix error code in xmlTextWriterStartDocument (Nick Wellnhofer), - Fix integer overflow when counting written bytes (Nick Wellnhofer), - Fix uninitialized memory access in HTML parser (Nick Wellnhofer), - Fix memory leak in xmlSchemaValAtomicType (Nick Wellnhofer), - Disallow conditional sections in internal subset (Nick Wellnhofer), - Fix use-after-free in xmlTextReaderFreeNodeList (Nick Wellnhofer), - Fix Regextests (Nick Wellnhofer), - Fix empty branch in regex (Nick Wellnhofer), - Fix integer overflow in entity recursion check (Nick Wellnhofer), - Don't read external entities or XIncludes from stdin (Nick Wellnhofer), - Fix Schema determinism check of ##other namespaces (Nick Wellnhofer), - Fix potential null deref in xmlSchemaIDCFillNodeTables (zhouzhongyuan), - Fix potential memory leak in xmlBufBackToBuffer (Nick Wellnhofer), - Fix error message when processing XIncludes with fallbacks (Nick Wellnhofer), - Fix memory leak in xmlRegEpxFromParse (zhouzhongyuan), - 14:00 is a valid timezone for xs:dateTime (Nick Wellnhofer), - Fix memory leak in xmlParseBalancedChunkMemoryRecover (Zhipeng Xie), - Fix potential null deref in xmlRelaxNGParsePatterns (Nick Wellnhofer), - Misleading error message with xs:{min|max}Inclusive (bettermanzzy), - Fix memory leak in xmlXIncludeLoadTxt (Wang Kirin), - Partial fix for comparison of xs:durations (Nick Wellnhofer), - Fix null deref in xmlreader buffer (zhouzhongyuan), - Fix unability to RelaxNG-validate grammar with choice-based name class (Jan Pokorný), - Fix unability to validate ambiguously constructed interleave for RelaxNG (Jan Pokorný), - Fix possible null dereference in xmlXPathIdFunction (zhouzhongyuan), - fix memory leak in xmlAllocOutputBuffer (zhouzhongyuan), - Fix unsigned int overflow (Jens Eggerstedt), - dict.h: gcc 2.95 doesn't allow multiple storage classes (Nick Wellnhofer), - Fix another code path in xmlParseQName (Nick Wellnhofer), - Make sure that xmlParseQName returns NULL in error case (Nick Wellnhofer), - Fix build without reader but with pattern (Nick Wellnhofer), - Fix memory leak in xmlAllocOutputBufferInternal error path (Nick Wellnhofer), - Fix unsigned integer overflow (Nick Wellnhofer), - Fix return value of xmlOutputBufferWrite (Nick Wellnhofer), - Fix parser termination from "Double hyphen within comment" error (David Warring), - Fix call stack overflow in xmlFreePattern (Nick Wellnhofer), - Fix null deref in previous commit (Nick Wellnhofer), - Fix memory leaks in xmlXPathParseNameComplex error paths (Nick Wellnhofer), - Check for integer overflow in xmlXPtrEvalChildSeq (Nick Wellnhofer), - Fix xmllint dump of XPath namespace nodes (Nick Wellnhofer), - Fix float casts in xmlXPathSubstringFunction (Nick Wellnhofer), - Fix null deref in xmlregexp error path (Nick Wellnhofer), - Fix null pointer dereference in xmlTextReaderReadOuterXml (Nick Wellnhofer), - Fix memory leaks in xmlParseStartTag2 error paths (Nick Wellnhofer), - Fix memory leak in xmlSAX2StartElement (Nick Wellnhofer), - Fix commit "Memory leak in xmlFreeID (xmlreader.c)" (Nick Wellnhofer), - Fix NULL pointer deref in xmlTextReaderValidateEntity (Nick Wellnhofer), - Memory leak in xmlFreeTextReader (Nick Wellnhofer), - Memory leak in xmlFreeID (xmlreader.c) (Nick Wellnhofer) - - - Improvements: - Run XML conformance tests under CI (Nick Wellnhofer), - Update GitLab CI config (Nick Wellnhofer), - Propagate memory errors in valuePush (Nick Wellnhofer), - Propagate memory errors in xmlXPathCompExprAdd (Nick Wellnhofer), - Make xmlFreeDocElementContent non-recursive (Nick Wellnhofer), - Enable continuous integration via GitLab CI (Nick Wellnhofer), - Avoid ignored attribute warnings under GCC (Nick Wellnhofer), - Make xmlDumpElementContent non-recursive (Nick Wellnhofer), - Make apibuild.py ignore ATTRIBUTE_NO_SANITIZE (Nick Wellnhofer), - Mark xmlExp* symbols as removed (Nick Wellnhofer), - Make xmlParseConditionalSections non-recursive (Nick Wellnhofer), - Adjust expected error in Python tests (Nick Wellnhofer), - Make xmlTextReaderFreeNodeList non-recursive (Nick Wellnhofer), - Make xmlFreeNodeList non-recursive (Nick Wellnhofer), - Make xmlParseContent and xmlParseElement non-recursive (Nick Wellnhofer), - Remove executable bit from non-executable files (Nick Wellnhofer), - Fix expected output of test/schemas/any4 (Nick Wellnhofer), - Optimize build instructions in README (zhouzhongyuan), - xml2-config.in: Output CFLAGS and LIBS on the same line (Hugh McMaster), - xml2-config: Add a --dynamic switch to print only shared libraries (Hugh McMaster), - Annotate functions with __attribute__((no_sanitize)) (Nick Wellnhofer), - Fix warnings when compiling without reader or push parser (Nick Wellnhofer), - Remove unused member `doc` in xmlSaveCtxt (Nick Wellnhofer), - Limit recursion depth in xmlXPathCompOpEvalPredicate (Nick Wellnhofer), - Remove -Wno-array-bounds (Nick Wellnhofer), - Remove unreachable code in xmlXPathCountFunction (Nick Wellnhofer), - Improve XPath predicate and filter evaluation (Nick Wellnhofer), - Limit recursion depth in xmlXPathOptimizeExpression (Nick Wellnhofer), - Disable hash randomization when fuzzing (Nick Wellnhofer), - Optional recursion limit when parsing XPath expressions (Nick Wellnhofer), - Optional recursion limit when evaluating XPath expressions (Nick Wellnhofer), - Use break statements in xmlXPathCompOpEval (Nick Wellnhofer), - Optional XPath operation limit (Nick Wellnhofer), - Fix compilation with --with-minimum (Nick Wellnhofer), - Check XPath stack after calling functions (Nick Wellnhofer), - Remove debug printf in xmlreader.c (Nick Wellnhofer), - Always define LIBXML_THREAD_ENABLED when enabled (Michael Haubenwallner), - Regenerate NEWS (Nick Wellnhofer), - Change git repo URL (Nick Wellnhofer), - Change bug tracker URL (Nick Wellnhofer), - Remove outdated HTML file (Nick Wellnhofer), - Fix unused function warning in testapi.c (Nick Wellnhofer), - Add some generated test files to .gitignore (Nick Wellnhofer), - Remove unneeded function pointer casts (Nick Wellnhofer), - Fix -Wcast-function-type warnings (GCC 8) (Nick Wellnhofer), - Fix -Wformat-truncation warnings (GCC 8) (Nick Wellnhofer) - - - Cleanups: - Rebuild docs (Nick Wellnhofer), - Disable xmlExp regex code (Nick Wellnhofer), - Remove redundant code in xmlRelaxNGValidateState (Nick Wellnhofer), - Remove redundant code in xmlXPathCompRelationalExpr (Nick Wellnhofer) - - - -v2.9.9: Jan 03 2019: - - Security: - CVE-2018-9251 CVE-2018-14567 Fix infinite loop in LZMA decompression (Nick Wellnhofer), - CVE-2018-14404 Fix nullptr deref with XPath logic ops (Nick Wellnhofer), - - - Documentation: - reader: Fix documentation comment (Mohammed Sadiq) - - - Portability: - Fix MSVC build with lzma (Nick Wellnhofer), - Variables need 'extern' in static lib on Cygwin (Michael Haubenwallner), - Really declare dllexport/dllimport for Cygwin (Michael Haubenwallner), - Merge branch 'patch-2' into 'master' (Nick Wellnhofer), - Change dir to $THEDIR after ACLOCAL_PATH check autoreconf creates aclocal.m4 in $srcdir (Vitaly Buka), - Improve error message if pkg.m4 couldn't be found (Nick Wellnhofer), - NaN and Inf fixes for pre-C99 compilers (Nick Wellnhofer) - - - Bug Fixes: - Revert "Support xmlTextReaderNextSibling w/o preparsed doc" (Nick Wellnhofer), - Fix building relative URIs (Thomas Holder), - Problem with data in interleave in RelaxNG validation (Nikolai Weibull), - Fix memory leak in xmlSwitchInputEncodingInt error path (Nick Wellnhofer), - Set doc on element obtained from freeElems (Nick Wellnhofer), - Fix HTML serialization with UTF-8 encoding (Nick Wellnhofer), - Use actual doc in xmlTextReaderRead*Xml (Nick Wellnhofer), - Unlink node before freeing it in xmlSAX2StartElement (Nick Wellnhofer), - Check return value of nodePush in xmlSAX2StartElement (Nick Wellnhofer), - Free input buffer in xmlHaltParser (Nick Wellnhofer), - Reset HTML parser input pointers on encoding failure (Nick Wellnhofer), - Don't run icu_parse_test if EUC-JP is unsupported (Nick Wellnhofer), - Fix xmlSchemaValidCtxtPtr reuse memory leak (Greg Hildstrom), - Fix xmlTextReaderNext with preparsed document (Felix Bünemann), - Remove stray character from comment (Nick Wellnhofer), - Remove a misleading line from xmlCharEncOutput (Andrey Bienkowski), - HTML noscript should not close p (Daniel Veillard), - Don't change context node in xmlXPathRoot (Nick Wellnhofer), - Stop using XPATH_OP_RESET (Nick Wellnhofer), - Revert "Change calls to xmlCharEncInput to set flush false" (Nick Wellnhofer) - - - Improvements: - Fix "Problem with data in interleave in RelaxNG validation" (Nikolai Weibull), - cleanup: remove some unreachable code (Thomas Holder), - add --relative to testURI (Thomas Holder), - Remove redefined starts and defines inside include elements (Nikolai Weibull), - Allow choice within choice in nameClass in RELAX NG (Nikolai Weibull), - Look inside divs for starts and defines inside include (Nikolai Weibull), - Add compile and libxml2-config.cmake to .gitignore (Nikolai Weibull), - Stop using doc->charset outside parser code (Nick Wellnhofer), - Add newlines to 'xmllint --xpath' output (Nick Wellnhofer), - Don't include SAX.h from globals.h (Nick Wellnhofer), - Support xmlTextReaderNextSibling w/o preparsed doc (Felix Bünemann), - Don't instruct user to run make when autogen.sh failed (林博仁(Buo-ren Lin)), - Run Travis ASan tests with "sudo: required" (Nick Wellnhofer), - Improve restoring of context size and position (Nick Wellnhofer), - Simplify and harden nodeset filtering (Nick Wellnhofer), - Avoid unnecessary backups of the context node (Nick Wellnhofer), - Fix inconsistency in xmlXPathIsInf (Nick Wellnhofer) - - - Cleanups: - - - -v2.9.8: Mar 05 2018: - - Portability: - python: remove single use of _PyVerify_fd (Patrick Welche), - Build more test executables on Windows/MSVC (Nick Wellnhofer), - Stop including ansidecl.h (Nick Wellnhofer), - Fix libz and liblzma detection (Nick Wellnhofer), - Revert "Compile testapi with -Wno-unused-function" (Nick Wellnhofer) - - - Bug Fixes: - Fix xmlParserEntityCheck (Nick Wellnhofer), - Halt parser in case of encoding error (Nick Wellnhofer), - Clear entity content in case of errors (Nick Wellnhofer), - Change calls to xmlCharEncInput to set flush false when not final call. Having flush incorrectly set to true causes errors for ICU. (Joel Hockey), - Fix buffer over-read in xmlParseNCNameComplex (Nick Wellnhofer), - Fix ICU library filenames on Windows/MSVC (Nick Wellnhofer), - Fix xmlXPathIsNaN broken by recent commit (Nick Wellnhofer), - Fix -Wenum-compare warnings (Nick Wellnhofer), - Fix callback signature in testapi.c (Nick Wellnhofer), - Fix unused parameter warning without ICU (Nick Wellnhofer), - Fix IO callback signatures (Nick Wellnhofer), - Fix misc callback signatures (Nick Wellnhofer), - Fix list callback signatures (Nick Wellnhofer), - Fix hash callback signatures (Nick Wellnhofer), - Refactor name and type signature for xmlNop (Vlad Tsyrklevich), - Fixed ICU to set flush correctly and provide pivot buffer. (Joel Hockey), - Skip EBCDIC tests if EBCDIC isn't supported (Nick Wellnhofer) - - - Improvements: - Disable pointer-overflow UBSan checks under Travis (Nick Wellnhofer), - Improve handling of context input_id (Daniel Veillard), - Add resource file to Windows DLL (ccpaging), - Run Travis tests with -Werror (Nick Wellnhofer), - Build with "-Wall -Wextra" (Nick Wellnhofer), - Fix -Wtautological-pointer-compare warnings (Nick Wellnhofer), - Remove unused AC_CHECKs (Nick Wellnhofer), - Update information about contributing (Nick Wellnhofer), - Fix -Wmisleading-indentation warnings (Nick Wellnhofer), - Don't touch CFLAGS in configure.ac (Nick Wellnhofer), - Ignore function pointer cast warnings (Nick Wellnhofer), - Simplify XPath NaN, inf and -0 handling (Nick Wellnhofer), - Introduce xmlPosixStrdup and update xmlMemStrdup (Nick Wellnhofer), - Add test for ICU flush and pivot buffer (Nick Wellnhofer), - Compile testapi with -Wno-unused-function (Nick Wellnhofer) - - - -2.9.7: Nov 02 2017: - - Documentation: - xmlcatalog: refresh man page wrt. querying system catalog easily (Jan Pokorný) - - - Portability: - Fix deprecated Travis compiler flag (Nick Wellnhofer), - Add declaration for DllMain (J. Peter Mugaas), - Fix preprocessor conditional in threads.h (J. Peter Mugaas), - Fix pointer comparison warnings on 64-bit Windows (J. Peter Mugaas), - Fix macro redefinition warning (J. Peter Mugaas), - Default to native threads on MinGW-w64 (Nick Wellnhofer), - Simplify Windows IO functions (Nick Wellnhofer), - Fix runtest on Windows (Nick Wellnhofer), - socklen_t is always int on Windows (Nick Wellnhofer), - Don't redefine socket error codes on Windows (Nick Wellnhofer), - Fix pointer/int cast warnings on 64-bit Windows (Nick Wellnhofer), - Fix Windows compiler warnings in xmlCanonicPath (Nick Wellnhofer) - - - Bug Fixes: - xmlcatalog: restore ability to query system catalog easily (Jan Pokorný), - Fix comparison of nodesets to strings (Nick Wellnhofer) - - - Improvements: - Add Makefile rules to rebuild HTML man pages (Nick Wellnhofer), - Fix mixed decls and code in timsort.h (Nick Wellnhofer), - Rework handling of return values in thread tests (Nick Wellnhofer), - Fix unused variable warnings in testrecurse (Nick Wellnhofer), - Fix -Wimplicit-fallthrough warnings (J. Peter Mugaas), - Upgrade timsort.h to latest revision (Nick Wellnhofer), - Increase warning level to /W3 under MSVC (Nick Wellnhofer), - Fix a couple of warnings in dict.c and threads.c (Nick Wellnhofer), - Update .gitignore for Windows (Nick Wellnhofer), - Fix unused variable warnings in nanohttp.c (Nick Wellnhofer), - Fix the Windows header mess (Nick Wellnhofer), - Don't include winsock2.h in xmllint.c (Nick Wellnhofer), - Remove generated file python/setup.py from version control (Nick Wellnhofer), - Use __linux__ macro in generated code (Nick Wellnhofer) - - - -v2.9.6: Oct 06 2017: - - Portability: - Change preprocessor OS tests to __linux__ (Nick Wellnhofer) - - - Bug Fixes: - Fix XPath stack frame logic (Nick Wellnhofer), - Report undefined XPath variable error message (Nick Wellnhofer), - Fix regression with librsvg (Nick Wellnhofer), - Handle more invalid entity values in recovery mode (Nick Wellnhofer), - Fix structured validation errors (Nick Wellnhofer), - Fix memory leak in LZMA decompressor (Nick Wellnhofer), - Set memory limit for LZMA decompression (Nick Wellnhofer), - Handle illegal entity values in recovery mode (Nick Wellnhofer), - Fix debug dump of streaming XPath expressions (Nick Wellnhofer), - Fix memory leak in nanoftp (Nick Wellnhofer), - Fix memory leaks in SAX1 parser (Nick Wellnhofer) - - - -v2.9.5: Sep 04 2017: - - Security: - Detect infinite recursion in parameter entities (Nick Wellnhofer), - Fix handling of parameter-entity references (Nick Wellnhofer), - Disallow namespace nodes in XPointer ranges (Nick Wellnhofer), - Fix XPointer paths beginning with range-to (Nick Wellnhofer) - - - Documentation: - Documentation fixes (Nick Wellnhofer), - Spelling and grammar fixes (Nick Wellnhofer) - - - Portability: - Adding README.zOS to list of extra files for the release (Daniel Veillard), - Description of work needed to compile on zOS (Stéphane Michaut), - Porting libxml2 on zOS encoding of code (Stéphane Michaut), - small changes for OS/400 (Patrick Monnerat), - relaxng.c, xmlschemas.c: Fix build on pre-C99 compilers (Chun-wei Fan) - - - Bug Fixes: - Problem resolving relative URIs (Daniel Veillard), - Fix unwanted warnings when switching encodings (Nick Wellnhofer), - Fix signature of xmlSchemaAugmentImportedIDC (Daniel Veillard), - Heap-buffer-overflow read of size 1 in xmlFAParsePosCharGroup (David Kilzer), - Fix NULL pointer deref in xmlFAParseCharClassEsc (Nick Wellnhofer), - Fix infinite loops with push parser in recovery mode (Nick Wellnhofer), - Send xmllint usage error to stderr (Nick Wellnhofer), - Fix NULL deref in xmlParseExternalEntityPrivate (Nick Wellnhofer), - Make sure not to call IS_BLANK_CH when parsing the DTD (Nick Wellnhofer), - Fix xmlHaltParser (Nick Wellnhofer), - Fix pathological performance when outputting charrefs (Nick Wellnhofer), - Fix invalid-source-encoding warnings in testWriter.c (Nick Wellnhofer), - Fix duplicate SAX callbacks for entity content (David Kilzer), - Treat URIs with scheme as absolute in C14N (Nick Wellnhofer), - Fix copy-paste errors in error messages (Nick Wellnhofer), - Fix sanity check in htmlParseNameComplex (Nick Wellnhofer), - Fix potential infinite loop in xmlStringLenDecodeEntities (Nick Wellnhofer), - Reset parser input pointers on encoding failure (Nick Wellnhofer), - Fix memory leak in xmlParseEntityDecl error path (Nick Wellnhofer), - Fix xmlBuildRelativeURI for URIs starting with './' (Nick Wellnhofer), - Fix type confusion in xmlValidateOneNamespace (Nick Wellnhofer), - Fix memory leak in xmlStringLenGetNodeList (Nick Wellnhofer), - Fix NULL pointer deref in xmlDumpElementContent (Daniel Veillard), - Fix memory leak in xmlBufAttrSerializeTxtContent (Nick Wellnhofer), - Stop parser on unsupported encodings (Nick Wellnhofer), - Check for integer overflow in memory debug code (Nick Wellnhofer), - Fix buffer size checks in xmlSnprintfElementContent (Nick Wellnhofer), - Avoid reparsing in xmlParseStartTag2 (Nick Wellnhofer), - Fix undefined behavior in xmlRegExecPushStringInternal (Nick Wellnhofer), - Check XPath exponents for overflow (Nick Wellnhofer), - Check for overflow in xmlXPathIsPositionalPredicate (Nick Wellnhofer), - Fix spurious error message (Nick Wellnhofer), - Fix memory leak in xmlCanonicPath (Nick Wellnhofer), - Fix memory leak in xmlXPathCompareNodeSetValue (Nick Wellnhofer), - Fix memory leak in pattern error path (Nick Wellnhofer), - Fix memory leak in parser error path (Nick Wellnhofer), - Fix memory leaks in XPointer error paths (Nick Wellnhofer), - Fix memory leak in xmlXPathNodeSetMergeAndClear (Nick Wellnhofer), - Fix memory leak in XPath filter optimizations (Nick Wellnhofer), - Fix memory leaks in XPath error paths (Nick Wellnhofer), - Do not leak the new CData node if adding fails (David Tardon), - Prevent unwanted external entity reference (Neel Mehta), - Increase buffer space for port in HTTP redirect support (Daniel Veillard), - Fix more NULL pointer derefs in xpointer.c (Nick Wellnhofer), - Avoid function/data pointer conversion in xpath.c (Nick Wellnhofer), - Fix format string warnings (Nick Wellnhofer), - Disallow namespace nodes in XPointer points (Nick Wellnhofer), - Fix comparison with root node in xmlXPathCmpNodes (Nick Wellnhofer), - Fix attribute decoding during XML schema validation (Alex Henrie), - Fix NULL pointer deref in XPointer range-to (Nick Wellnhofer) - - - Improvements: - Updating the spec file to reflect Fedora 24 (Daniel Veillard), - Add const in five places to move 1 KiB to .rdata (Bruce Dawson), - Fix missing part of comment for function xmlXPathEvalExpression() (Daniel Veillard), - Get rid of "blanks wrapper" for parameter entities (Nick Wellnhofer), - Simplify handling of parameter entity references (Nick Wellnhofer), - Deduplicate code in encoding.c (Nick Wellnhofer), - Make HTML parser functions take const pointers (Nick Wellnhofer), - Build test programs only when needed (Nick Wellnhofer), - Fix doc/examples/index.py (Nick Wellnhofer), - Fix compiler warnings in threads.c (Nick Wellnhofer), - Fix empty-body warning in nanohttp.c (Nick Wellnhofer), - Fix cast-align warnings (Nick Wellnhofer), - Fix unused-parameter warnings (Nick Wellnhofer), - Rework entity boundary checks (Nick Wellnhofer), - Don't switch encoding for internal parameter entities (Nick Wellnhofer), - Merge duplicate code paths handling PE references (Nick Wellnhofer), - Test SAX2 callbacks with entity substitution (Nick Wellnhofer), - Support catalog and threads tests under --without-sax1 (Nick Wellnhofer), - Misc fixes for 'make tests' (Nick Wellnhofer), - Initialize keepBlanks in HTML parser (Nick Wellnhofer), - Add test cases for bug 758518 (David Kilzer), - Fix compiler warning in htmlParseElementInternal (Nick Wellnhofer), - Remove useless check in xmlParseAttributeListDecl (Nick Wellnhofer), - Allow zero sized memory input buffers (Nick Wellnhofer), - Add TODO comment in xmlSwitchEncoding (Nick Wellnhofer), - Check for integer overflow in xmlXPathFormatNumber (Nick Wellnhofer), - Make Travis print UBSan stacktraces (Nick Wellnhofer), - Add .travis.yml (Nick Wellnhofer), - Fix expected error output in Python tests (Nick Wellnhofer), - Simplify control flow in xmlParseStartTag2 (Nick Wellnhofer), - Disable LeakSanitizer when running API tests (Nick Wellnhofer), - Avoid out-of-bound array access in API tests (Nick Wellnhofer), - Avoid spurious UBSan errors in parser.c (Nick Wellnhofer), - Parse small XPath numbers more accurately (Nick Wellnhofer), - Rework XPath rounding functions (Nick Wellnhofer), - Fix white space in test output (Nick Wellnhofer), - Fix axis traversal from attribute and namespace nodes (Nick Wellnhofer), - Check for trailing characters in XPath expressions earlier (Nick Wellnhofer), - Rework final handling of XPath results (Nick Wellnhofer), - Make xmlXPathEvalExpression call xmlXPathEval (Nick Wellnhofer), - Remove unused variables (Nick Wellnhofer), - Don't print generic error messages in XPath tests (Nick Wellnhofer) - - - Cleanups: - Fix a couple of misleading indentation errors (Daniel Veillard), - Remove unnecessary calls to xmlPopInput (Nick Wellnhofer) - - - -2.9.4: May 23 2016: - - Security: - More format string warnings with possible format string vulnerability (David Kilzer), - Avoid building recursive entities (Daniel Veillard), - Heap-based buffer overread in htmlCurrentChar (Pranjal Jumde), - Heap-based buffer-underreads due to xmlParseName (David Kilzer), - Heap use-after-free in xmlSAX2AttributeNs (Pranjal Jumde), - Heap use-after-free in htmlParsePubidLiteral and htmlParseSystemiteral (Pranjal Jumde), - Fix some format string warnings with possible format string vulnerability (David Kilzer), - Detect change of encoding when parsing HTML names (Hugh Davenport), - Fix inappropriate fetch of entities content (Daniel Veillard), - Bug 759398: Heap use-after-free in xmlDictComputeFastKey (Pranjal Jumde), - Bug 758605: Heap-based buffer overread in xmlDictAddString (Pranjal Jumde), - Bug 758588: Heap-based buffer overread in xmlParserPrintFileContextInternal (David Kilzer), - Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup (Pranjal Jumde), - Add missing increments of recursion depth counter to XML parser. (Peter Simons) - - - Documentation: - Fix typo: s{ ec -> cr }cipt (Jan Pokorný), - Fix typos: dictio{ nn -> n }ar{y,ies} (Jan Pokorný), - Fix typos: PATH_{ SEAPARATOR -> SEPARATOR } (Jan Pokorný), - Correct a typo. (Shlomi Fish) - - - Portability: - Correct the usage of LDFLAGS (Mattias Hansson), - Revert the use of SAVE_LDFLAGS in configure.ac (Mattias Hansson), - libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles (Mike Frysinger), - Fix apibuild for a recently added construct (Daniel Veillard), - Use pkg-config to locate zlib when possible (Stewart Brodie), - Use pkg-config to locate ICU when possible (Stewart Brodie), - Portability to non C99 compliant compilers (Patrick Monnerat), - dict.h: Move xmlDictPtr definition before includes to allow direct inclusion. (Patrick Monnerat), - os400: tell about xmllint and xmlcatalog in README400. (Patrick Monnerat), - os400: properly process SGML add in XMLCATALOG command. (Patrick Monnerat), - os400: implement CL command XMLCATALOG. (Patrick Monnerat), - os400: compile and install program xmlcatalog (qshell-only). (Patrick Monnerat), - os400: expand tabs in sources, strip trailing blanks. (Patrick Monnerat), - os400: implement CL command XMLLINT. (Patrick Monnerat), - os400: compile and install program xmllint (qshell-only). (Patrick Monnerat), - os400: initscript make_module(): Use options instead of positional parameters. (Patrick Monnerat), - os400: c14n.rpgle: allow *omit for nullable reference parameters. (Patrick Monnerat), - os400: use like() for double type. (Patrick Monnerat), - os400: use like() for int type. (Patrick Monnerat), - os400: use like() for unsigned int type. (Patrick Monnerat), - os400: use like() for enum types. (Patrick Monnerat), - Add xz to xml2-config --libs output (Baruch Siach), - Bug 760190: configure.ac should be able to build --with-icu without icu-config tool (David Kilzer), - win32\VC10\config.h and VS 2015 (Bruce Dawson), - Add configure maintainer mode (orzen) - - - Bug Fixes: - Avoid an out of bound access when serializing malformed strings (Daniel Veillard), - Unsigned addition may overflow in xmlMallocAtomicLoc() (David Kilzer), - Integer signed/unsigned type mismatch in xmlParserInputGrow() (David Kilzer), - Bug 763071: heap-buffer-overflow in xmlStrncat (Pranjal Jumde), - Integer overflow parsing port number in URI (Michael Paddon), - Fix an error with regexp on nullable counted char transition (Daniel Veillard), - Fix memory leak with XPath namespace nodes (Nick Wellnhofer), - Fix namespace axis traversal (Nick Wellnhofer), - Fix null pointer deref in docs with no root element (Hugh Davenport), - Fix XSD validation of URIs with ampersands (Alex Henrie), - xmlschemastypes.c: accept endOfDayFrag Times set to "24:00:00" mean "end of day" and should not cause an error. (Patrick Monnerat), - xmlcatalog: flush stdout before interactive shell input. (Patrick Monnerat), - xmllint: flush stdout before interactive shell input. (Patrick Monnerat), - Don't recurse into OP_VALUEs in xmlXPathOptimizeExpression (Nick Wellnhofer), - Fix namespace::node() XPath expression (Nick Wellnhofer), - Fix OOB write in xmlXPathEmptyNodeSet (Nick Wellnhofer), - Fix parsing of NCNames in XPath (Nick Wellnhofer), - Fix OOB read with invalid UTF-8 in xmlUTF8Strsize (Nick Wellnhofer), - Do normalize string-based datatype value in RelaxNG facet checking (Audric Schiltknecht), - Bug 760921: REGRESSION (8eb55d78): doc/examples/io1 test fails after fix for "xmlSaveUri() incorrectly recomposes URIs with rootless paths" (David Kilzer), - Bug 760861: REGRESSION (bf9c1dad): Missing results for test/schemas/regexp-char-ref_[01].xsd (David Kilzer), - error.c: *input->cur == 0 does not mean no error (Pavel Raiskup), - Add missing RNG test files (David Kilzer), - Bug 760183: REGRESSION (v2.9.3): XML push parser fails with bogus UTF-8 encoding error when multi-byte character in large CDATA section is split across buffer (David Kilzer), - Bug 758572: ASAN crash in make check (David Kilzer), - Bug 721158: Missing ICU string when doing --version on xmllint (David Kilzer), - python 3: libxml2.c wrappers create Unicode str already (Michael Stahl), - Add autogen.sh to distrib (orzen), - Heap-based buffer overread in xmlNextChar (Daniel Veillard) - - - Improvements: - Add more debugging info to runtest (Daniel Veillard), - Implement "runtest -u" mode (David Kilzer), - Add a make rule to rebuild for ASAN (Daniel Veillard) - - - -v2.9.3: Nov 20 2015: - - Security: - CVE-2015-8242 Buffer overead with HTML parser in push mode (Hugh Davenport), - CVE-2015-7500 Fix memory access error due to incorrect entities boundaries (Daniel Veillard), - CVE-2015-7499-2 Detect incoherency on GROW (Daniel Veillard), - CVE-2015-7499-1 Add xmlHaltParser() to stop the parser (Daniel Veillard), - CVE-2015-5312 Another entity expansion issue (David Drysdale), - CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKey (David Drysdale), - CVE-2015-7498 Avoid processing entities after encoding conversion failures (Daniel Veillard), - CVE-2015-8035 Fix XZ compression support loop (Daniel Veillard), - CVE-2015-7942-2 Fix an error in previous Conditional section patch (Daniel Veillard), - CVE-2015-7942 Another variation of overflow in Conditional sections (Daniel Veillard), - CVE-2015-1819 Enforce the reader to run in constant memory (Daniel Veillard) - CVE-2015-7941_2 Cleanup conditional section error handling (Daniel Veillard), - CVE-2015-7941_1 Stop parsing on entities boundaries errors (Daniel Veillard), - - - Documentation: - Correct spelling of "calling" (Alex Henrie), - Fix a small error in xmllint --format description (Fabien Degomme), - Avoid XSS on the search of xmlsoft.org (Daniel Veillard) - - - Portability: - threads: use forward declarations only for glibc (Michael Heimpold), - Update Win32 configure.js to search for configure.ac (Daniel Veillard) - - - Bug Fixes: - Bug on creating new stream from entity (Daniel Veillard), - Fix some loop issues embedding NEXT (Daniel Veillard), - Do not print error context when there is none (Daniel Veillard), - Avoid extra processing of MarkupDecl when EOF (Hugh Davenport), - Fix parsing short unclosed comment uninitialized access (Daniel Veillard), - Add missing Null check in xmlParseExternalEntityPrivate (Gaurav Gupta), - Fix a bug in CData error handling in the push parser (Daniel Veillard), - Fix a bug on name parsing at the end of current input buffer (Daniel Veillard), - Fix the spurious ID already defined error (Daniel Veillard), - Fix previous change to node sort order (Nick Wellnhofer), - Fix a self assignment issue raised by clang (Scott Graham), - Fail parsing early on if encoding conversion failed (Daniel Veillard), - Do not process encoding values if the declaration if broken (Daniel Veillard), - Silence clang's -Wunknown-attribute (Michael Catanzaro), - xmlMemUsed is not thread-safe (Martin von Gagern), - Fix support for except in nameclasses (Daniel Veillard), - Fix order of root nodes (Nick Wellnhofer), - Allow attributes on descendant-or-self axis (Nick Wellnhofer), - Fix the fix to Windows locking (Steve Nairn), - Fix timsort invariant loop re: Envisage article (Christopher Swenson), - Don't add IDs in xmlSetTreeDoc (Nick Wellnhofer), - Account for ID attributes in xmlSetTreeDoc (Nick Wellnhofer), - Remove various unused value assignments (Philip Withnall), - Fix missing entities after CVE-2014-3660 fix (Daniel Veillard), - Revert "Missing initialization for the catalog module" (Daniel Veillard) - - - Improvements: - Reuse xmlHaltParser() where it makes sense (Daniel Veillard), - xmlStopParser reset errNo (Daniel Veillard), - Re-enable xz support by default (Daniel Veillard), - Recover unescaped less-than character in HTML recovery parsing (Daniel Veillard), - Allow HTML serializer to output HTML5 DOCTYPE (Shaun McCance), - Regression test for bug #695699 (Nick Wellnhofer), - Add a couple of XPath tests (Nick Wellnhofer), - Add Python 3 rpm subpackage (Tomas Radej), - libxml2-config.cmake.in: update include directories (Samuel Martin), - Adding example from bugs 738805 to regression tests (Daniel Veillard) - - - Cleanups: - - - -2.9.2: Oct 16 2014: - - Security: - Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard), - CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard) - - - Bug Fixes: - fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer), - xmlmemory: handle realloc properly (Yegor Yefremov), - Python generator bug raised by the const change (Daniel Veillard), - Windows Critical sections not released correctly (Daniel Veillard), - Parser error on repeated recursive entity expansion containing < (Daniel Veillard), - xpointer : fixing Null Pointers (Gaurav Gupta), - Remove Unnecessary Null check in xpointer.c (Gaurav Gupta), - parser bug on misformed namespace attributes (Dennis Filder), - Pointer dereferenced before null check (Daniel Veillard), - Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta), - Possible overflow in HTMLParser.c (Daniel Veillard), - python/tests/sync.py assumes Python dictionaries are ordered (John Beck), - Fix Enum check and missing break (Gaurav Gupta), - xmlIO: Handle error returns from dup() (Philip Withnall), - Fix a problem properly saving URIs (Daniel Veillard), - wrong error column in structured error when parsing attribute values (Juergen Keil), - wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil), - no error column in structured error handler for xml schema validation errors (Juergen Keil), - Couple of Missing Null checks (Gaurav Gupta), - Add couple of missing Null checks (Daniel Veillard), - xmlschemastypes: Fix potential array overflow (Philip Withnall), - runtest: Fix a memory leak on parse failure (Philip Withnall), - xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall), - xmlcatalog: Fix a memory leak on quit (Philip Withnall), - HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall), - Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer), - Avoid Possible Null Pointer in trio.c (Gaurav Gupta), - Fix processing in SAX2 in case of an allocation failure (Daniel Veillard), - XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard), - Fix various Missing Null checks (Gaurav Gupta), - Fix a potential NULL dereference (Daniel Veillard), - Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta), - Add a missing argument check (Gaurav Gupta), - Adding a check in case of allocation error (Gaurav Gupta), - xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder), - Adding some missing NULL checks (Gaurav), - Fixes for xmlInitParserCtxt (Daniel Veillard), - Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard), - erroneously ignores a validation error if no error callback set (Daniel Veillard), - xmllint was not parsing the --c14n11 flag (Sérgio Batista), - Avoid Possible null pointer dereference in memory debug mode (Gaurav), - Avoid Double Null Check (Gaurav), - Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer), - Fix xmlParseInNodeContext() if node is not element (Daniel Veillard), - Avoid a possible NULL pointer dereference (Gaurav), - Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard), - Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard), - fixing a ptotential uninitialized access (Daniel Veillard), - Fix an fd leak in an error case (Daniel Veillard), - Missing initialization for the catalog module (Daniel Veillard), - Handling of XPath function arguments in error case (Nick Wellnhofer), - Fix a couple of missing NULL checks (Gaurav), - Avoid a possibility of dangling encoding handler (Gaurav), - Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks), - Fix a bug loading some compressed files (Mike Alexander), - Fix XPath node comparison bug (Gaurav), - Type mismatch in xmlschemas.c (Gaurav), - Type mismatch in xmlschemastypes.c (Gaurav), - Avoid a deadcode in catalog.c (Daniel Veillard), - run close socket on Solaris, same as we do on other platforms (Denis Pauk), - Fix pointer dereferenced before null check (Gaurav), - Fix a potential NULL dereference in tree code (Daniel Veillard), - Fix potential NULL pointer dereferences in regexp code (Gaurav), - xmllint --pretty crashed without following numeric argument (Tim Galeckas), - Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer), - Fix XPath '//' optimization with predicates (Nick Wellnhofer), - Clear up a potential NULL dereference (Daniel Veillard), - Fix a possible NULL dereference (Gaurav), - Avoid crash if allocation fails (Daniel Veillard), - Remove occasional leading space in XPath number formatting (Daniel Veillard), - Fix handling of mmap errors (Daniel Veillard), - Catch malloc error and exit accordingly (Daniel Veillard), - missing else in xlink.c (Ami Fischman), - Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard), - Fix a regression in xmlGetDocCompressMode() (Daniel Veillard), - properly quote the namespace uris written out during c14n (Aleksey Sanin), - Remove premature XInclude check on URI being relative (Alexey Neyman), - Fix missing break on last() function for attributes (dcb), - Do not URI escape in server side includes (Romain Bondue), - Fix an error in xmlCleanupParser (Alexander Pastukhov) - - - Documentation: - typo in error messages "colon are forbidden from..." (Daniel Veillard), - Fix a link to James SAX documentation old page (Daniel Veillard), - Fix typos in relaxng.c (Jan Pokorný), - Fix a doc typo (Daniel Veillard), - Fix typos in {tree,xpath}.c (errror) (Jan Pokorný), - Add limitations about encoding conversion (Daniel Veillard), - Fix typos in xmlschemas{,types}.c (Jan Pokorný), - Fix incorrect spelling entites->entities (Jan Pokorný), - Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard) - - - Portability: - AC_CONFIG_FILES and executable bit (Roumen Petrov), - remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov), - fix some tabs mixing incompatible with python3 (Roumen Petrov), - Visual Studio 14 CTP defines snprintf() (Francis Dupont), - OS400: do not try to copy unexisting doc files (Patrick Monnerat), - OS400: use either configure.ac or configure.in. (Patrick Monnerat), - os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat), - OS400: Add some more C macros equivalent procedures. (Patrick Monnerat), - OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat), - OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat), - OS400: include in distribution tarball. (Patrick Monnerat), - OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat), - OS400: Add compilation scripts. (Patrick Monnerat), - OS400: ILE RPG language header files. (Patrick Monnerat), - OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat), - OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat), - OS400: Easy character transcoding support (Patrick Monnerat), - OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat), - OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat), - Fix building when configuring without xpath and xptr (Daniel Veillard), - configure: Add --with-python-install-dir (Jonas Eriksson), - Fix compilation with minimum and xinclude. (Nicolas Le Cam), - Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam), - Fix compilation with minimum and schematron. (Nicolas Le Cam), - Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam), - Don't use xmlValidateName() when not available. (Nicolas Le Cam), - Fix a portability issue on Windows (Longstreth Jon), - Various portability patches for OpenVMS (Jacob (Jouk) Jansen), - Use specific macros for portability to OS/400 (Patrick Monnerat), - Add macros needed for OS/400 portability (Patrick Monnerat), - Portability patch for fopen on OS/400 (Patrick Monnerat), - Portability fixes for OS/400 (Patrick Monnerat), - Improve va_list portability (Patrick Monnerat), - Portability fix (Patrick Monnerat), - Portability fix (Patrick Monnerat), - Generic portability fix (Patrick Monnerat), - Shortening lines in headers (Patrick Monnerat), - build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall), - build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall), - fix some tabs mixing incompatible with python3 (Daniel Veillard), - add additional defines checks for support "./configure --with-minimum" (Denis Pauk), - Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis), - python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev), - python: Fix compiler warnings when building python3 bindings (Armin K), - Fix for compilation with python 2.6.8 (Petr Sumbera) - - - Improvements: - win32/libxml2.def.src after rebuild in doc (Roumen Petrov), - elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov), - elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov), - Provide cmake module (Samuel Martin), - Fix a couple of issues raised by make dist (Daniel Veillard), - Fix and add const qualifiers (Kurt Roeckx), - Preparing for upcoming release of 2.9.2 (Daniel Veillard), - Fix zlib and lzma libraries check via command line (Dmitriy), - wrong error column in structured error when parsing end tag (Juergen Keil), - doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat), - Add methods for python3 iterator (Ron Angeles), - Support element node traversal in document fragments. (Kyle VanderBeek), - xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom), - Added macros for argument casts (Eric Zurcher), - adding init calls to xml and html Read parsing entry points (Daniel Veillard), - Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný), - Implement choice for name classes on attributes (Shaun McCance), - Two small namespace tweaks (Daniel Veillard), - xmllint --memory should fail on empty files (Daniel Veillard), - Cast encoding name to char pointer to match arg type (Nikolay Sivov) - - - Cleanups: - Removal of old configure.in (Daniel Veillard), - Unreachable code in tree.c (Gaurav Gupta), - Remove a couple of dead conditions (Gaurav Gupta), - Avoid some dead code and cleanup in relaxng.c (Gaurav), - Drop not needed checks (Denis Pauk), - Fix a wrong test (Daniel Veillard) - - - -2.9.1: Apr 19 2013: - - Features: - Support for Python3 (Daniel Veillard), - Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh) - - - Documentation: - Add documentation for xmllint --xpath (Daniel Veillard), - Fix the URL of the SAX documentation from James (Daniel Veillard), - Fix spelling of "length". (Michael Wood) - - - Portability: - Fix python bindings with versions older than 2.7 (Daniel Veillard), - rebuild docs:Makefile.am (Roumen Petrov), - elfgcchack.h after rebuild in doc (Roumen Petrov), - elfgcchack for buf module (Roumen Petrov), - Fix a uneeded and wrong extra link parameter (Daniel Veillard), - Few cleanup patches for Windows (Denis Pauk), - Fix rpmbuild --nocheck (Mark Salter), - Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard), - Fix Broken multi-arch support in xml2-config (Daniel Veillard), - Fix a portability issue for GCC < 3.4.0 (Daniel Veillard), - Windows build fixes (Daniel Richard), - Fix a thread portability problem (Friedrich Haubensak), - Downgrade autoconf requirement to 2.63 (Daniel Veillard) - - - Bug Fixes: - Fix a linking error for python bindings (Daniel Veillard), - Fix a couple of return without value (Jüri Aedla), - Improve the hashing functions (Daniel Franke), - Improve handling of xmlStopParser() (Daniel Veillard), - Remove risk of lockup in dictionary initialization (Daniel Veillard), - Activate detection of encoding in external subset (Daniel Veillard), - Fix an output buffer flushing conversion bug (Mikhail Titov), - Fix an old bug in xmlSchemaValidateOneElement (Csaba László), - Fix configure cannot remove messages (Gilles Espinasse), - fix schema validation in combination with xsi:nil (Daniel Veillard), - xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf), - Fix a few problems with setEntityLoader (Alexey Neyman), - Detect excessive entities expansion upon replacement (Daniel Veillard), - Fix the flushing out of raw buffers on encoding conversions (Daniel, -Veillard), - Fix some buffer conversion issues (Daniel Veillard), - When calling xmlNodeDump make sure we grow the buffer quickly (Daniel, -Veillard), - Fix an error in the progressive DTD parsing code (Dan Winship), - xmllint should not load DTD by default when using the reader (Daniel, -Veillard), - Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera), - Fix potential out of bound access (Daniel Veillard), - Fix large parse of file from memory (Daniel Veillard), - Fix a bug in the nsclean option of the parser (Daniel Veillard), - Fix a regression in 2.9.0 breaking validation while streaming (Daniel, -Veillard), - Remove potential calls to exit() (Daniel Veillard) - - - Improvements: - Regenerated API, and testapi, rebuild documentation (Daniel Veillard), - Fix tree iterators broken by 2to3 script (Daniel Veillard), - update all tests for Python3 and Python2 (Daniel Veillard), - A few more fixes for python 3 affecting libxml2.py (Daniel Veillard), - Fix compilation on Python3 (Daniel Veillard), - Converting apibuild.py to python3 (Daniel Veillard), - First pass at starting porting to python3 (Daniel Veillard), - updated configure.in for python3 (Daniel Veillard), - Add support for xpathRegisterVariable in Python (Shaun McCance), - Added a regression tests from bug 694228 data (Daniel Veillard), - Cache presence of '<' in entities content (Daniel Veillard), - Avoid extra processing on entities (Daniel Veillard), - Python binding for xmlRegisterInputCallback (Alexey Neyman), - Python bindings: DOM casts everything to xmlNode (Alexey Neyman), - Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling), - Adding streaming validation to runtest checks (Daniel Veillard), - Add a --pushsmall option to xmllint (Daniel Veillard) - - - Cleanups: - Switched comment in file to UTF-8 encoding (Daniel Veillard), - Extend gitignore (Daniel Veillard), - Silent the new python test on input (Alexey Neyman), - Cleanup of a duplicate test (Daniel Veillard), - Cleanup on duplicate test expressions (Daniel Veillard), - Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick, -Gansterer), - Spec cleanups and a fix for multiarch support (Daniel Veillard), - Silence a clang warning (Daniel Veillard), - Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard), - rand_seed should be static in dict.c (Wouter Van Rooy), - Fix typos in parser comments (Jan Pokorný) - - - -2.9.0: Sep 11 2012: - - Features: - A few new API entry points, - More resilient push parser mode, - A lot of portability improvement, - Faster XPath evaluation - - - Documentation: - xml2-config.1 markup error (Christian Weisgerber), - libxml(3) manpage typo fix (John Bradshaw), - More cleanups to the documentation part of libxml2 (Daniel Richard G) - - - Portability: - Bug 676544 - fails to build with --without-sax1 (Akira TAGOH), - fix builds not having stdint.h (Rob Richards), - GetProcAddressA is available only on WinCE (Daniel Veillard), - More updates and cleanups on autotools and Makefiles (Daniel Richard G), - More changes for Win32 compilation (Eric Zurcher), - Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher), - Bundles all generated files for python into the distribution (Daniel Richard G), - Fix compiler warnings of wincecompat.c (Patrick Gansterer), - Fix non __GNUC__ build (Patrick Gansterer), - Fix windows unicode build (Patrick Gansterer), - clean redefinition of {v}snprintf in C-source (Roumen Petrov), - use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov), - fix runtests to use pthreads support for various Unix platforms (Daniel Richard G), - Various "make distcheck" and portability fixups 2nd part (Daniel Richard G), - Various "make distcheck" and portability fixups (Daniel Richard G), - Fix compilation on older Visual Studio (Daniel Veillard) - - - Bug Fixes: - Change the XPath code to percolate allocation errors (Daniel Veillard), - Fix reuse of xmlInitParser (Daniel Veillard), - Fix potential crash on entities errors (Daniel Veillard), - initialize var (Rob Richards), - Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard), - Fix problem with specific and generic error handlers (Pietro Cerutti), - Avoid a potential infinite recursion (Daniel Veillard), - Fix an XSD error when generating internal automata (Daniel Veillard), - Patch for xinclude of text using multibyte characters (Vitaly Ostanin), - Fix a segfault on XSD validation on pattern error (Daniel Veillard), - Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard), - Add a missing element check (Daniel Veillard), - Adding various checks on node type though the API (Daniel Veillard), - Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard), - Fix make dist to include new private header files (Daniel Veillard), - More fixups on the push parser behaviour (Daniel Veillard), - Strengthen behaviour of the push parser in problematic situations (Daniel Veillard), - Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard), - Fixup limits parser (Daniel Veillard), - Do not fetch external parsed entities (Daniel Veillard), - Fix an error in previous commit (Aron Xu), - Fix entities local buffers size problems (Daniel Veillard), - Fix parser local buffers size problems (Daniel Veillard), - Fix a failure to report xmlreader parsing failures (Daniel Veillard) - - - Improvements: - Keep libxml2.syms when running "make distclean" (Daniel Veillard), - Allow to set the quoting character of an xmlWriter (Csaba Raduly), - Keep non-significant blanks node in HTML parser (Daniel Veillard), - Add a forbidden variable error number and message to XPath (Daniel Veillard), - Support long path names on WNT (Michael Stahl), - Improve HTML escaping of attribute on output (Daniel Veillard), - Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis), - Switching XPath node sorting to Timsort (Vojtech Fried), - Optimizing '//' in XPath expressions (Nick Wellnhofer), - Expose xmlBufShrink in the public tree API (Daniel Veillard), - Visible HTML elements close the head tag (Conrad Irwin), - Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard), - Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard), - minimize use of HAVE_CONFIG_H (Roumen Petrov), - fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov), - Add support for big line numbers in error reporting (Daniel Veillard), - Avoid using xmlBuffer for serialization (Daniel Veillard), - Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard), - Provide new accessors for xmlOutputBuffer (Daniel Veillard), - Improvements for old buffer compatibility (Daniel Veillard), - Expand the limit test program (Daniel Veillard), - Improve error reporting on parser errors (Daniel Veillard), - Implement some default limits in the XPath module (Daniel Veillard), - Introduce some default parser limits (Daniel Veillard), - Cleanups and new limit APIs for dictionaries (Daniel Veillard), - Fixup for buf.c (Daniel Veillard), - Cleanup URI module memory allocation code (Daniel Veillard), - Extend testlimits (Daniel Veillard), - More avoid quadratic behaviour (Daniel Veillard), - Impose a reasonable limit on PI size (Daniel Veillard), - first version of testlimits new test (Daniel Veillard), - Avoid quadratic behaviour in some push parsing cases (Daniel Veillard), - Impose a reasonable limit on comment size (Daniel Veillard), - Impose a reasonable limit on attribute size (Daniel Veillard), - Harden the buffer code and make it more compatible (Daniel Veillard), - More cleanups for input/buffers code (Daniel Veillard), - Cleanup function xmlBufResetInput(), to set input from Buffer (Daniel Veillard) - Switch the test program for characters to new input buffers (Daniel Veillard), - Convert the HTML tree module to the new buffers (Daniel Veillard), - Convert of the HTML parser to new input buffers (Daniel Veillard), - Convert the writer to new output buffer and save APIs (Daniel Veillard), - Convert XMLReader to the new input buffers (Daniel Veillard), - New saving functions using xmlBuf and conversion (Daniel Veillard), - Provide new xmlBuf based saving functions (Daniel Veillard), - Convert XInclude to the new input buffers (Daniel Veillard), - Convert catalog code to the new input buffers (Daniel Veillard), - Convert C14N to the new Input buffer (Daniel Veillard), - Convert xmlIO.c to the new input and output buffers (Daniel Veillard), - Convert XML parser to the new input buffers (Daniel Veillard), - Incompatible change to the Input and Output buffers (Daniel Veillard), - Adding new encoding function to deal with the new structures (Daniel Veillard), - Convert XPath to xmlBuf (Daniel Veillard), - Adding a new buf module for buffers (Daniel Veillard), - Memory error within SAX2 reuse common framework (Daniel Veillard), - Fix xmllint --xpath node initialization (Daniel Veillard) - - - Cleanups: - Various cleanups to avoid compiler warnings (Daniel Veillard), - Big space and tab cleanup (Daniel Veillard), - Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard), - Second round of cleanups for LibXML2 docs/examples (Daniel Richard), - Remove all .cvsignore as they are not used anymore (Daniel Veillard), - Fix a Timsort function helper comment (Daniel Veillard), - Small cleanup for valgrind target (Daniel Veillard), - Patch for portability of latin characters in C files (Daniel Veillard), - Cleanup some of the parser code (Daniel Veillard), - Fix a variable name in comment (Daniel Veillard), - Regenerated testapi.c (Daniel Veillard), - Regenerating docs and API files (Daniel Veillard), - Small cleanup of unused variables in test (Daniel Veillard), - Expand .gitignore with more files (Daniel Veillard) - - - -2.8.0: May 23 2012: - - Features: - add lzma compression support (Anders F Bjorklund) - - - Documentation: - xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä), - Update README.tests (Daniel Veillard), - URI handling code is not OOM resilient (Daniel Veillard), - Fix an error in comment (Daniel Veillard), - Fixed bug #617016 (Daniel Mustieles), - Fixed two typos in the README document (Daniel Neel), - add generated html files (Anders F Bjorklund), - Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard), - Improve documentation a bit (Daniel Veillard), - Updated URL for lxml python bindings (Daniel Veillard) - - - Portability: - Restore code for Windows compilation (Daniel Veillard), - Remove git error message during configure (Christian Dywan), - xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer), - remove a bashism in confgure.in (John Hein), - undef ERROR if already defined (Patrick R. Gansterer), - Fix library problems with mingw-w64 (Michael Cronenworth), - fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards), - prefer native threads on win32 (Sam Thursfield), - Allow to compile with Visual Studio 2010 (Thomas Lemm), - Fix mingw's snprintf configure check (Andoni Morales), - fixed a 64bit big endian issue (Marcus Meissner), - Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard), - Fix windows build from lzma addition (Rob Richards), - autogen: Only check for libtoolize (Colin Walters), - Fix the Windows build files (Patrick von Reth), - 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard), - 599241 fix an initialization problem on Win64 (Andrew W. Nosenko), - fix win build (Rob Richards) - - - Bug fixes: - Part for rand_r checking missing (Daniel Veillard), - Cleanup on randomization (Daniel Veillard), - Fix undefined reference in python module (Pacho Ramos), - Fix a race in xmlNewInputStream (Daniel Veillard), - Fix weird streaming RelaxNG errors (Noam), - Fix various bugs in new code raised by the API checking (Daniel Veillard), - Fix various problems with "make dist" (Daniel Veillard), - Fix a memory leak in the xzlib code (Daniel Veillard), - HTML parser error with