https://git.reactos.org/?p=reactos.git;a=commitdiff;h=911153da108e4ff040bc3…
commit 911153da108e4ff040bc330595b6358b086c7e0e
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sun Nov 20 10:17:45 2022 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Wed Nov 23 22:02:47 2022 -0500
[LIBXML2] Update to version 2.10.0. CORE-17766
---
media/doc/3rd Party Files.txt | 2 +-
sdk/include/reactos/libs/libxml/SAX.h | 41 +-
sdk/include/reactos/libs/libxml/SAX2.h | 12 +-
sdk/include/reactos/libs/libxml/dict.h | 2 +
sdk/include/reactos/libs/libxml/encoding.h | 23 +-
sdk/include/reactos/libs/libxml/entities.h | 2 +
sdk/include/reactos/libs/libxml/globals.h | 15 +-
sdk/include/reactos/libs/libxml/nanoftp.h | 27 +-
sdk/include/reactos/libs/libxml/parser.h | 7 +-
sdk/include/reactos/libs/libxml/parserInternals.h | 12 +
sdk/include/reactos/libs/libxml/relaxng.h | 1 +
sdk/include/reactos/libs/libxml/schematron.h | 2 +-
sdk/include/reactos/libs/libxml/threads.h | 2 +
sdk/include/reactos/libs/libxml/tree.h | 9 +-
sdk/include/reactos/libs/libxml/valid.h | 19 +-
sdk/include/reactos/libs/libxml/xmlerror.h | 2 +
sdk/include/reactos/libs/libxml/xmlmemory.h | 2 +
sdk/include/reactos/libs/libxml/xmlschemastypes.h | 1 +
sdk/include/reactos/libs/libxml/xmlversion.h | 50 +-
sdk/include/reactos/libs/libxml/xmlversion.h.in | 36 +-
sdk/include/reactos/libs/libxml/xpath.h | 11 +
sdk/include/reactos/libs/libxml/xpointer.h | 23 +
sdk/lib/3rdparty/libxml2/CMakeLists.txt | 1 -
sdk/lib/3rdparty/libxml2/COPYING | 23 -
sdk/lib/3rdparty/libxml2/DOCBparser.c | 305 -
sdk/lib/3rdparty/libxml2/HTMLparser.c | 457 +-
sdk/lib/3rdparty/libxml2/HTMLtree.c | 16 +-
sdk/lib/3rdparty/libxml2/NEWS | 188 +-
sdk/lib/3rdparty/libxml2/README.md | 5 +
sdk/lib/3rdparty/libxml2/SAX.c | 49 -
sdk/lib/3rdparty/libxml2/SAX2.c | 191 +-
sdk/lib/3rdparty/libxml2/buf.c | 221 +-
sdk/lib/3rdparty/libxml2/buf.h | 5 -
sdk/lib/3rdparty/libxml2/c14n.c | 8 +-
sdk/lib/3rdparty/libxml2/catalog.c | 20 +-
sdk/lib/3rdparty/libxml2/chvalid.c | 2 -
sdk/lib/3rdparty/libxml2/config.h | 83 +-
sdk/lib/3rdparty/libxml2/debugXML.c | 27 +-
sdk/lib/3rdparty/libxml2/dict.c | 42 +-
sdk/lib/3rdparty/libxml2/elfgcchack.h | 17830 --------------------
sdk/lib/3rdparty/libxml2/encoding.c | 85 +-
sdk/lib/3rdparty/libxml2/entities.c | 28 +-
sdk/lib/3rdparty/libxml2/error.c | 2 -
sdk/lib/3rdparty/libxml2/globals.c | 65 +-
sdk/lib/3rdparty/libxml2/hash.c | 9 +-
sdk/lib/3rdparty/libxml2/include/win32config.h | 109 +-
sdk/lib/3rdparty/libxml2/include/wsockcompat.h | 4 -
sdk/lib/3rdparty/libxml2/legacy.c | 5 +-
sdk/lib/3rdparty/libxml2/libxml.h | 29 +-
sdk/lib/3rdparty/libxml2/list.c | 2 -
sdk/lib/3rdparty/libxml2/nanoftp.c | 16 +-
sdk/lib/3rdparty/libxml2/nanohttp.c | 15 +-
sdk/lib/3rdparty/libxml2/parser.c | 89 +-
sdk/lib/3rdparty/libxml2/parserInternals.c | 219 +-
sdk/lib/3rdparty/libxml2/pattern.c | 14 -
sdk/lib/3rdparty/libxml2/relaxng.c | 9 +-
sdk/lib/3rdparty/libxml2/schematron.c | 1325 +-
sdk/lib/3rdparty/libxml2/threads.c | 48 +-
sdk/lib/3rdparty/libxml2/tree.c | 241 +-
sdk/lib/3rdparty/libxml2/trio.c | 3 -
sdk/lib/3rdparty/libxml2/uri.c | 8 +-
sdk/lib/3rdparty/libxml2/valid.c | 66 +-
sdk/lib/3rdparty/libxml2/xinclude.c | 33 +-
sdk/lib/3rdparty/libxml2/xlink.c | 18 -
sdk/lib/3rdparty/libxml2/xmlIO.c | 80 +-
sdk/lib/3rdparty/libxml2/xmlcatalog.c | 5 +-
sdk/lib/3rdparty/libxml2/xmllint.c | 74 +-
sdk/lib/3rdparty/libxml2/xmlmemory.c | 39 +-
sdk/lib/3rdparty/libxml2/xmlmodule.c | 11 +-
sdk/lib/3rdparty/libxml2/xmlreader.c | 210 +-
sdk/lib/3rdparty/libxml2/xmlregexp.c | 79 +-
sdk/lib/3rdparty/libxml2/xmlsave.c | 8 +-
sdk/lib/3rdparty/libxml2/xmlschemas.c | 42 +-
sdk/lib/3rdparty/libxml2/xmlschemastypes.c | 25 +-
sdk/lib/3rdparty/libxml2/xmlstring.c | 10 +-
sdk/lib/3rdparty/libxml2/xmlunicode.c | 62 +-
sdk/lib/3rdparty/libxml2/xmlwriter.c | 6 +-
sdk/lib/3rdparty/libxml2/xpath.c | 158 +-
sdk/lib/3rdparty/libxml2/xpointer.c | 32 +-
sdk/lib/3rdparty/libxml2/xzlib.c | 15 +-
80 files changed, 2344 insertions(+), 20728 deletions(-)
diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt
index 6f56690318c..8b7b4e319ac 100644
--- a/media/doc/3rd Party Files.txt
+++ b/media/doc/3rd Party Files.txt
@@ -239,7 +239,7 @@ URL:
https://github.com/win-iconv/win-iconv
Title: LibXML
Path: sdk/lib/3rdparty/libxml2
-Used Version: 2.9.14
+Used Version: 2.10.0
License: MIT (
https://spdx.org/licenses/MIT.htmlf)
URL:
http://xmlsoft.org,
ftp://xmlsoft.org/libxml2/
diff --git a/sdk/include/reactos/libs/libxml/SAX.h
b/sdk/include/reactos/libs/libxml/SAX.h
index 20093ceb685..fa50568f253 100644
--- a/sdk/include/reactos/libs/libxml/SAX.h
+++ b/sdk/include/reactos/libs/libxml/SAX.h
@@ -16,54 +16,67 @@
#include <stdlib.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
-#include <libxml/xlink.h>
#ifdef LIBXML_LEGACY_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
+XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL
getPublicId (void *ctx);
+XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL
getSystemId (void *ctx);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
getLineNumber (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
getColumnNumber (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
isStandalone (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
hasInternalSubset (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
hasExternalSubset (void *ctx);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
+XML_DEPRECATED
XMLPUBFUN xmlEntityPtr XMLCALL
getEntity (void *ctx,
const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN xmlEntityPtr XMLCALL
getParameterEntity (void *ctx,
const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr XMLCALL
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
entityDecl (void *ctx,
const xmlChar *name,
@@ -71,6 +84,7 @@ XMLPUBFUN void XMLCALL
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
attributeDecl (void *ctx,
const xmlChar *elem,
@@ -79,16 +93,19 @@ XMLPUBFUN void XMLCALL
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
unparsedEntityDecl (void *ctx,
const xmlChar *name,
@@ -96,72 +113,86 @@ XMLPUBFUN void XMLCALL
const xmlChar *systemId,
const xmlChar *notationName);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
startDocument (void *ctx);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
endDocument (void *ctx);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
endElement (void *ctx,
const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
reference (void *ctx,
const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
characters (void *ctx,
const xmlChar *ch,
int len);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
setNamespace (void *ctx,
const xmlChar *name);
+XML_DEPRECATED
XMLPUBFUN xmlNsPtr XMLCALL
getNamespace (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
checkNamespace (void *ctx,
xmlChar *nameSpace);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
comment (void *ctx,
const xmlChar *value);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL
- initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
-#endif
#endif /* LIBXML_SAX1_ENABLED */
#ifdef __cplusplus
diff --git a/sdk/include/reactos/libs/libxml/SAX2.h
b/sdk/include/reactos/libs/libxml/SAX2.h
index a55212eb554..8e9b0b95fe5 100644
--- a/sdk/include/reactos/libs/libxml/SAX2.h
+++ b/sdk/include/reactos/libs/libxml/SAX2.h
@@ -16,7 +16,6 @@
#include <stdlib.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
-#include <libxml/xlink.h>
#ifdef __cplusplus
extern "C" {
@@ -99,8 +98,7 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
- defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
- defined(LIBXML_LEGACY_ENABLED)
+ defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
XMLPUBFUN void XMLCALL
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
@@ -161,15 +159,11 @@ XMLPUBFUN void XMLCALL
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
htmlDefaultSAXHandlerInit (void);
#endif
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN void XMLCALL
- xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
-XMLPUBFUN void XMLCALL
- docbDefaultSAXHandlerInit (void);
-#endif
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
diff --git a/sdk/include/reactos/libs/libxml/dict.h
b/sdk/include/reactos/libs/libxml/dict.h
index cf54af1f252..91f74d1b8ff 100644
--- a/sdk/include/reactos/libs/libxml/dict.h
+++ b/sdk/include/reactos/libs/libxml/dict.h
@@ -27,6 +27,7 @@ typedef xmlDict *xmlDictPtr;
/*
* Initializer
*/
+XML_DEPRECATED
XMLPUBFUN int XMLCALL xmlInitializeDict(void);
/*
@@ -70,6 +71,7 @@ XMLPUBFUN int XMLCALL
/*
* Cleanup function
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlDictCleanup (void);
diff --git a/sdk/include/reactos/libs/libxml/encoding.h
b/sdk/include/reactos/libs/libxml/encoding.h
index c875af6fb7c..381e1886bf8 100644
--- a/sdk/include/reactos/libs/libxml/encoding.h
+++ b/sdk/include/reactos/libs/libxml/encoding.h
@@ -27,9 +27,7 @@
#ifdef LIBXML_ICONV_ENABLED
#include <iconv.h>
#endif
-#ifdef LIBXML_ICU_ENABLED
-#include <unicode/ucnv.h>
-#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -128,19 +126,6 @@ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int
*outlen,
* Block defining the handlers for non UTF-8 encodings.
* If iconv is supported, there are two extra fields.
*/
-#ifdef LIBXML_ICU_ENABLED
-/* Size of pivot buffer, same as icu/source/common/ucnv.cpp CHUNK_SIZE */
-#define ICU_PIVOT_BUF_SIZE 1024
-struct _uconv_t {
- UConverter *uconv; /* for conversion between an encoding and UTF-16 */
- UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
- UChar pivot_buf[ICU_PIVOT_BUF_SIZE];
- UChar *pivot_source;
- UChar *pivot_target;
-};
-typedef struct _uconv_t uconv_t;
-#endif
-
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
struct _xmlCharEncodingHandler {
@@ -152,8 +137,8 @@ struct _xmlCharEncodingHandler {
iconv_t iconv_out;
#endif /* LIBXML_ICONV_ENABLED */
#ifdef LIBXML_ICU_ENABLED
- uconv_t *uconv_in;
- uconv_t *uconv_out;
+ struct _uconv_t *uconv_in;
+ struct _uconv_t *uconv_out;
#endif /* LIBXML_ICU_ENABLED */
};
@@ -168,8 +153,10 @@ extern "C" {
/*
* Interfaces for encoding handlers.
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlInitCharEncodingHandlers (void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlCleanupCharEncodingHandlers (void);
XMLPUBFUN void XMLCALL
diff --git a/sdk/include/reactos/libs/libxml/entities.h
b/sdk/include/reactos/libs/libxml/entities.h
index 47b4573eba6..2b60d9e6228 100644
--- a/sdk/include/reactos/libs/libxml/entities.h
+++ b/sdk/include/reactos/libs/libxml/entities.h
@@ -75,6 +75,7 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
*/
#ifdef LIBXML_LEGACY_ENABLED
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
@@ -112,6 +113,7 @@ XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
+XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
diff --git a/sdk/include/reactos/libs/libxml/globals.h
b/sdk/include/reactos/libs/libxml/globals.h
index 5e41b7bb5f8..d57ccb05415 100644
--- a/sdk/include/reactos/libs/libxml/globals.h
+++ b/sdk/include/reactos/libs/libxml/globals.h
@@ -24,7 +24,9 @@
extern "C" {
#endif
+XML_DEPRECATED
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
/**
@@ -67,7 +69,6 @@ XMLCALL xmlOutputBufferCreateFilenameDefault
(xmlOutputBufferCreateFilenameFunc
* compatibility support.
*/
-#undef docbDefaultSAXHandler
#undef htmlDefaultSAXHandler
#undef oldXMLWDcompatibility
#undef xmlBufferAllocScheme
@@ -124,7 +125,7 @@ struct _xmlGlobalState
xmlSAXLocator xmlDefaultSAXLocator;
xmlSAXHandlerV1 xmlDefaultSAXHandler;
- xmlSAXHandlerV1 docbDefaultSAXHandler;
+ xmlSAXHandlerV1 docbDefaultSAXHandler; /* unused */
xmlSAXHandlerV1 htmlDefaultSAXHandler;
xmlFreeFunc xmlFree;
@@ -251,16 +252,6 @@ XMLPUBVAR xmlFreeFunc xmlFree;
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
-#ifdef LIBXML_DOCB_ENABLED
-XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
-#ifdef LIBXML_THREAD_ENABLED
-#define docbDefaultSAXHandler \
-(*(__docbDefaultSAXHandler()))
-#else
-XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
-#endif
-#endif
-
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
diff --git a/sdk/include/reactos/libs/libxml/nanoftp.h
b/sdk/include/reactos/libs/libxml/nanoftp.h
index 7335faf1075..f39bde5be07 100644
--- a/sdk/include/reactos/libs/libxml/nanoftp.h
+++ b/sdk/include/reactos/libs/libxml/nanoftp.h
@@ -1,7 +1,8 @@
/*
* Summary: minimal FTP implementation
* Description: minimal FTP implementation allowing to fetch resources
- * like external subset.
+ * like external subset. This module is DEPRECATED, do not
+ * use any of its functions.
*
* Copy: See Copyright for the status of this software.
*
@@ -16,7 +17,7 @@
#ifdef LIBXML_FTP_ENABLED
/* Needed for portability to Windows 64 bits */
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32)
#include <winsock2.h>
#else
/**
@@ -78,40 +79,52 @@ typedef void (*ftpDataCallback) (void *userData,
/*
* Init
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlNanoFTPInit (void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlNanoFTPCleanup (void);
/*
* Creating/freeing contexts.
*/
+XML_DEPRECATED
XMLPUBFUN void * XMLCALL
xmlNanoFTPNewCtxt (const char *URL);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlNanoFTPFreeCtxt (void * ctx);
+XML_DEPRECATED
XMLPUBFUN void * XMLCALL
xmlNanoFTPConnectTo (const char *server,
int port);
/*
* Opening/closing session connections.
*/
+XML_DEPRECATED
XMLPUBFUN void * XMLCALL
xmlNanoFTPOpen (const char *URL);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPConnect (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPClose (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPQuit (void *ctx);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlNanoFTPScanProxy (const char *URL);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlNanoFTPProxy (const char *host,
int port,
const char *user,
const char *passwd,
int type);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPUpdateURL (void *ctx,
const char *URL);
@@ -119,38 +132,48 @@ XMLPUBFUN int XMLCALL
/*
* Rather internal commands.
*/
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPGetResponse (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPCheckResponse (void *ctx);
/*
* CD/DIR/GET handlers.
*/
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPCwd (void *ctx,
const char *directory);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPDele (void *ctx,
const char *file);
+XML_DEPRECATED
XMLPUBFUN SOCKET XMLCALL
xmlNanoFTPGetConnection (void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPCloseConnection(void *ctx);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPList (void *ctx,
ftpListCallback callback,
void *userData,
const char *filename);
+XML_DEPRECATED
XMLPUBFUN SOCKET XMLCALL
xmlNanoFTPGetSocket (void *ctx,
const char *filename);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPGet (void *ctx,
ftpDataCallback callback,
void *userData,
const char *filename);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlNanoFTPRead (void *ctx,
void *dest,
diff --git a/sdk/include/reactos/libs/libxml/parser.h
b/sdk/include/reactos/libs/libxml/parser.h
index 0ba1c387a97..82c61d67e92 100644
--- a/sdk/include/reactos/libs/libxml/parser.h
+++ b/sdk/include/reactos/libs/libxml/parser.h
@@ -10,8 +10,6 @@
#ifndef __XML_PARSER_H__
#define __XML_PARSER_H__
-#include <stdarg.h>
-
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/dict.h>
@@ -192,7 +190,7 @@ struct _xmlParserCtxt {
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* the declared encoding, if any */
int standalone; /* standalone document */
- int html; /* an HTML(1)/Docbook(2) document
+ int html; /* an HTML(1) document
* 3 is HTML after <head>
* 10 is HTML after <body>
*/
@@ -996,13 +994,16 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
/*
* Reading/setting optional parsing features.
*/
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlGetFeaturesList (int *len,
const char **result);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
diff --git a/sdk/include/reactos/libs/libxml/parserInternals.h
b/sdk/include/reactos/libs/libxml/parserInternals.h
index 1f26ce20810..656ee4625c3 100644
--- a/sdk/include/reactos/libs/libxml/parserInternals.h
+++ b/sdk/include/reactos/libs/libxml/parserInternals.h
@@ -339,6 +339,7 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
@@ -574,6 +575,7 @@ XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
/*
* Actually comes from the HTML parser but launched from the init stuff.
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
const char *encoding);
@@ -597,25 +599,34 @@ typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlParseNamespace (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlScanName (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
* Entities
*/
+XML_DEPRECATED
XMLPUBFUN xmlChar * XMLCALL
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
@@ -623,6 +634,7 @@ XMLPUBFUN xmlChar * XMLCALL
xmlChar end,
xmlChar end2,
xmlChar end3);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
diff --git a/sdk/include/reactos/libs/libxml/relaxng.h
b/sdk/include/reactos/libs/libxml/relaxng.h
index f269c9ec0db..6369785cef0 100644
--- a/sdk/include/reactos/libs/libxml/relaxng.h
+++ b/sdk/include/reactos/libs/libxml/relaxng.h
@@ -118,6 +118,7 @@ typedef enum {
XMLPUBFUN int XMLCALL
xmlRelaxNGInitTypes (void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlRelaxNGCleanupTypes (void);
diff --git a/sdk/include/reactos/libs/libxml/schematron.h
b/sdk/include/reactos/libs/libxml/schematron.h
index 364eaecde6b..c61e61b3cf5 100644
--- a/sdk/include/reactos/libs/libxml/schematron.h
+++ b/sdk/include/reactos/libs/libxml/schematron.h
@@ -1,5 +1,5 @@
/*
- * Summary: XML Schemastron implementation
+ * Summary: XML Schematron implementation
* Description: interface to the XML Schematron validity checking.
*
* Copy: See Copyright for the status of this software.
diff --git a/sdk/include/reactos/libs/libxml/threads.h
b/sdk/include/reactos/libs/libxml/threads.h
index 9969ae7cfd0..6eedac1f374 100644
--- a/sdk/include/reactos/libs/libxml/threads.h
+++ b/sdk/include/reactos/libs/libxml/threads.h
@@ -57,6 +57,7 @@ XMLPUBFUN void XMLCALL
/*
* Library wide APIs.
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlInitThreads (void);
XMLPUBFUN void XMLCALL
@@ -67,6 +68,7 @@ XMLPUBFUN int XMLCALL
xmlGetThreadId (void);
XMLPUBFUN int XMLCALL
xmlIsMainThread (void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlCleanupThreads(void);
XMLPUBFUN xmlGlobalStatePtr XMLCALL
diff --git a/sdk/include/reactos/libs/libxml/tree.h
b/sdk/include/reactos/libs/libxml/tree.h
index 1e79be92ea9..98e208745a9 100644
--- a/sdk/include/reactos/libs/libxml/tree.h
+++ b/sdk/include/reactos/libs/libxml/tree.h
@@ -177,11 +177,11 @@ typedef enum {
XML_NAMESPACE_DECL= 18,
XML_XINCLUDE_START= 19,
XML_XINCLUDE_END= 20
-#ifdef LIBXML_DOCB_ENABLED
- ,XML_DOCB_DOCUMENT_NODE= 21
-#endif
+ /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
} xmlElementType;
+/* For backward compatibility */
+#define XML_DOCB_DOCUMENT_NODE 21
/**
* xmlNotation:
@@ -659,7 +659,7 @@ struct _xmlDOMWrapCtxt {
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \
defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
- defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+ defined(LIBXML_LEGACY_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateNCName (const xmlChar *value,
int space);
@@ -763,6 +763,7 @@ XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
+XML_DEPRECATED
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
diff --git a/sdk/include/reactos/libs/libxml/valid.h
b/sdk/include/reactos/libs/libxml/valid.h
index 2bc7b380c1e..3eaf84adcb4 100644
--- a/sdk/include/reactos/libs/libxml/valid.h
+++ b/sdk/include/reactos/libs/libxml/valid.h
@@ -60,17 +60,17 @@ typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
#ifdef IN_LIBXML
/**
- * XML_CTXT_FINISH_DTD_0:
+ * XML_VCTXT_DTD_VALIDATED:
*
- * Special value for finishDtd field when embedded in an xmlParserCtxt
+ * Set after xmlValidateDtdFinal was called.
*/
-#define XML_CTXT_FINISH_DTD_0 0xabcd1234
+#define XML_VCTXT_DTD_VALIDATED (1u << 0)
/**
- * XML_CTXT_FINISH_DTD_1:
+ * XML_VCTXT_USE_PCTXT:
*
- * Special value for finishDtd field when embedded in an xmlParserCtxt
+ * Set if the validation context is part of a parser context.
*/
-#define XML_CTXT_FINISH_DTD_1 0xabcd1235
+#define XML_VCTXT_USE_PCTXT (1u << 1)
#endif
/*
@@ -90,7 +90,7 @@ struct _xmlValidCtxt {
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
- unsigned int finishDtd; /* finished validating the Dtd ? */
+ unsigned int flags; /* internal flags */
xmlDocPtr doc; /* the document */
int valid; /* temporary validity check result */
@@ -283,20 +283,25 @@ XMLPUBFUN int XMLCALL
xmlAttrPtr attr);
/* IDREFs */
+XML_DEPRECATED
XMLPUBFUN xmlRefPtr XMLCALL
xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlFreeRefTable (xmlRefTablePtr table);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr);
+XML_DEPRECATED
XMLPUBFUN xmlListPtr XMLCALL
xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID);
diff --git a/sdk/include/reactos/libs/libxml/xmlerror.h
b/sdk/include/reactos/libs/libxml/xmlerror.h
index c1019971f24..ee95be9c9c2 100644
--- a/sdk/include/reactos/libs/libxml/xmlerror.h
+++ b/sdk/include/reactos/libs/libxml/xmlerror.h
@@ -209,6 +209,7 @@ typedef enum {
XML_ERR_VERSION_MISMATCH, /* 109 */
XML_ERR_NAME_TOO_LONG, /* 110 */
XML_ERR_USER_STOP, /* 111 */
+ XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
XML_NS_ERR_XML_NAMESPACE = 200,
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
XML_NS_ERR_QNAME, /* 202 */
@@ -259,6 +260,7 @@ typedef enum {
XML_DTD_DUP_TOKEN, /* 541 */
XML_HTML_STRUCURE_ERROR = 800,
XML_HTML_UNKNOWN_TAG, /* 801 */
+ XML_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
XML_RNGP_ATTR_CONFLICT, /* 1001 */
XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
diff --git a/sdk/include/reactos/libs/libxml/xmlmemory.h
b/sdk/include/reactos/libs/libxml/xmlmemory.h
index 17e375a3c9a..ae2a4275a3b 100644
--- a/sdk/include/reactos/libs/libxml/xmlmemory.h
+++ b/sdk/include/reactos/libs/libxml/xmlmemory.h
@@ -126,12 +126,14 @@ XMLPUBFUN int XMLCALL
/*
* Initialization of the memory layer.
*/
+XML_DEPRECATED
XMLPUBFUN int XMLCALL
xmlInitMemory (void);
/*
* Cleanup of the memory layer.
*/
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlCleanupMemory (void);
/*
diff --git a/sdk/include/reactos/libs/libxml/xmlschemastypes.h
b/sdk/include/reactos/libs/libxml/xmlschemastypes.h
index 35d48d414be..5d588f92ea3 100644
--- a/sdk/include/reactos/libs/libxml/xmlschemastypes.h
+++ b/sdk/include/reactos/libs/libxml/xmlschemastypes.h
@@ -32,6 +32,7 @@ typedef enum {
XMLPUBFUN void XMLCALL
xmlSchemaInitTypes (void);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlSchemaCleanupTypes (void);
XMLPUBFUN xmlSchemaTypePtr XMLCALL
diff --git a/sdk/include/reactos/libs/libxml/xmlversion.h
b/sdk/include/reactos/libs/libxml/xmlversion.h
index 9cd054df70e..ad9a2cb82b6 100644
--- a/sdk/include/reactos/libs/libxml/xmlversion.h
+++ b/sdk/include/reactos/libs/libxml/xmlversion.h
@@ -29,28 +29,28 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
-#define LIBXML_DOTTED_VERSION "2.9.14"
+#define LIBXML_DOTTED_VERSION "2.10.0"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
-#define LIBXML_VERSION 20914
+#define LIBXML_VERSION 21000
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
-#define LIBXML_VERSION_STRING "20914"
+#define LIBXML_VERSION_STRING "21000"
/**
* LIBXML_VERSION_EXTRA:
*
* extra version information, used to show a git commit description
*/
-#define LIBXML_VERSION_EXTRA "-GITv2.9.13-22-g7846b0a67"
+#define LIBXML_VERSION_EXTRA "-GITv2.9.13-209-gae383bdb7"
/**
* LIBXML_TEST_VERSION:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int 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(20914);
+#define LIBXML_TEST_VERSION xmlCheckVersion(21000);
#ifndef VMS
#if 0
@@ -171,7 +171,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the FTP support is configured in
*/
-#if 1
+#if 0
#define LIBXML_FTP_ENABLED
#endif
@@ -207,7 +207,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the deprecated APIs are compiled in for compatibility
*/
-#if 1
+#if 0
#define LIBXML_LEGACY_ENABLED
#endif
@@ -229,15 +229,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_CATALOG_ENABLED
#endif
-/**
- * LIBXML_DOCB_ENABLED:
- *
- * Whether the SGML Docbook support is configured in
- */
-#if 1
-#define LIBXML_DOCB_ENABLED
-#endif
-
/**
* LIBXML_XPATH_ENABLED:
*
@@ -256,6 +247,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_XPTR_ENABLED
#endif
+/**
+ * LIBXML_XPTR_LOCS_ENABLED:
+ *
+ * Whether support for XPointer locations is configured in
+ */
+#if 0
+#define LIBXML_XPTR_LOCS_ENABLED
+#endif
+
/**
* LIBXML_XINCLUDE_ENABLED:
*
@@ -456,6 +456,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
# 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:
@@ -475,6 +484,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* 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
diff --git a/sdk/include/reactos/libs/libxml/xmlversion.h.in
b/sdk/include/reactos/libs/libxml/xmlversion.h.in
index f9f79a2f2ac..bdebfe3b0c9 100644
--- a/sdk/include/reactos/libs/libxml/xmlversion.h.in
+++ b/sdk/include/reactos/libs/libxml/xmlversion.h.in
@@ -229,15 +229,6 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#define LIBXML_CATALOG_ENABLED
#endif
-/**
- * LIBXML_DOCB_ENABLED:
- *
- * Whether the SGML Docbook support is configured in
- */
-#if @WITH_DOCB@
-#define LIBXML_DOCB_ENABLED
-#endif
-
/**
* LIBXML_XPATH_ENABLED:
*
@@ -256,6 +247,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#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:
*
@@ -456,6 +456,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
# 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:
@@ -475,6 +484,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* 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
diff --git a/sdk/include/reactos/libs/libxml/xpath.h
b/sdk/include/reactos/libs/libxml/xpath.h
index 539593fa506..bfbc5d6d995 100644
--- a/sdk/include/reactos/libs/libxml/xpath.h
+++ b/sdk/include/reactos/libs/libxml/xpath.h
@@ -104,13 +104,23 @@ typedef enum {
XPATH_BOOLEAN = 2,
XPATH_NUMBER = 3,
XPATH_STRING = 4,
+#ifdef LIBXML_XPTR_LOCS_ENABLED
XPATH_POINT = 5,
XPATH_RANGE = 6,
XPATH_LOCATIONSET = 7,
+#endif
XPATH_USERS = 8,
XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
} xmlXPathObjectType;
+#ifndef LIBXML_XPTR_LOCS_ENABLED
+/** DOC_DISABLE */
+#define XPATH_POINT 5
+#define XPATH_RANGE 6
+#define XPATH_LOCATIONSET 7
+/** DOC_ENABLE */
+#endif
+
typedef struct _xmlXPathObject xmlXPathObject;
typedef xmlXPathObject *xmlXPathObjectPtr;
struct _xmlXPathObject {
@@ -549,6 +559,7 @@ XMLPUBFUN void XMLCALL
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
#endif /* LIBXML_XPATH_ENABLED */
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPathInit (void);
XMLPUBFUN int XMLCALL
diff --git a/sdk/include/reactos/libs/libxml/xpointer.h
b/sdk/include/reactos/libs/libxml/xpointer.h
index b99112b87a1..ca7bdbe085f 100644
--- a/sdk/include/reactos/libs/libxml/xpointer.h
+++ b/sdk/include/reactos/libs/libxml/xpointer.h
@@ -28,6 +28,7 @@
extern "C" {
#endif
+#ifdef LIBXML_XPTR_LOCS_ENABLED
/*
* A Location Set
*/
@@ -43,51 +44,68 @@ struct _xmlLocationSet {
* Handling of location sets.
*/
+XML_DEPRECATED
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
+XML_DEPRECATED
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewCollapsedRange (xmlNodePtr start);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
+XML_DEPRECATED
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val);
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
/*
* Functions.
@@ -99,13 +117,18 @@ XMLPUBFUN xmlXPathContextPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrEval (const xmlChar *str,
xmlXPathContextPtr ctx);
+#ifdef LIBXML_XPTR_LOCS_ENABLED
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs);
+XML_DEPRECATED
XMLPUBFUN xmlNodePtr XMLCALL
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
+XML_DEPRECATED
XMLPUBFUN void XMLCALL
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
#ifdef __cplusplus
}
#endif
diff --git a/sdk/lib/3rdparty/libxml2/CMakeLists.txt
b/sdk/lib/3rdparty/libxml2/CMakeLists.txt
index e56e434d3e8..ba32c6a732a 100644
--- a/sdk/lib/3rdparty/libxml2/CMakeLists.txt
+++ b/sdk/lib/3rdparty/libxml2/CMakeLists.txt
@@ -23,7 +23,6 @@ list(APPEND SOURCE
chvalid.c
debugXML.c
dict.c
- DOCBparser.c
encoding.c
entities.c
error.c
diff --git a/sdk/lib/3rdparty/libxml2/COPYING b/sdk/lib/3rdparty/libxml2/COPYING
deleted file mode 100644
index d61318502ca..00000000000
--- a/sdk/lib/3rdparty/libxml2/COPYING
+++ /dev/null
@@ -1,23 +0,0 @@
-Except where otherwise noted in the source code (e.g. the files hash.c,
-list.c and the trio files, which are covered by a similar licence but
-with different Copyright notices) all the files are:
-
- Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is fur-
-nished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
-NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/sdk/lib/3rdparty/libxml2/DOCBparser.c
b/sdk/lib/3rdparty/libxml2/DOCBparser.c
deleted file mode 100644
index f12511b9e8a..00000000000
--- a/sdk/lib/3rdparty/libxml2/DOCBparser.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * DOCBparser.c : an attempt to parse SGML Docbook documents
- *
- * This is deprecated !!!
- * Code removed with release 2.6.0 it was broken.
- * The doc are expect to be migrated to XML DocBook
- *
- * See Copyright for the status of this software.
- *
- * daniel(a)veillard.com
- */
-
-#define IN_LIBXML
-#include "libxml.h"
-#ifdef LIBXML_DOCB_ENABLED
-
-#include <libxml/xmlerror.h>
-#include <libxml/DOCBparser.h>
-
-/**
- * docbEncodeEntities:
- * @out: a pointer to an array of bytes to store the result
- * @outlen: the length of @out
- * @in: a pointer to an array of UTF-8 chars
- * @inlen: the length of @in
- * @quoteChar: the quote character to escape (' or ") or zero.
- *
- * Take a block of UTF-8 chars in and try to convert it to an ASCII
- * plus SGML entities block of chars out.
- *
- * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
- * The value of @inlen after return is the number of octets consumed
- * as the return value is positive, else unpredictable.
- * The value of @outlen after return is the number of octets consumed.
- */
-int
-docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
- int *outlen ATTRIBUTE_UNUSED,
- const unsigned char *in ATTRIBUTE_UNUSED,
- int *inlen ATTRIBUTE_UNUSED,
- int quoteChar ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbEncodeEntities() deprecated function reached\n");
- deprecated = 1;
- }
- return(-1);
-}
-
-/**
- * docbParseDocument:
- * @ctxt: an SGML parser context
- *
- * parse an SGML document (and build a tree if using the standard SAX
- * interface).
- *
- * Returns 0, -1 in case of error. the parser context is augmented
- * as a result of the parsing.
- */
-
-int
-docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseDocument() deprecated function reached\n");
- deprecated = 1;
- }
- return (xmlParseDocument(ctxt));
-}
-
-/**
- * docbFreeParserCtxt:
- * @ctxt: an SGML parser context
- *
- * Free all the memory used by a parser context. However the parsed
- * document in ctxt->myDoc is not freed.
- */
-
-void
-docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbFreeParserCtxt() deprecated function reached\n");
- deprecated = 1;
- }
- xmlFreeParserCtxt(ctxt);
-}
-
-/**
- * docbParseChunk:
- * @ctxt: an XML parser context
- * @chunk: an char array
- * @size: the size in byte of the chunk
- * @terminate: last chunk indicator
- *
- * Parse a Chunk of memory
- *
- * Returns zero if no error, the xmlParserErrors otherwise.
- */
-int
-docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
- const char *chunk ATTRIBUTE_UNUSED,
- int size ATTRIBUTE_UNUSED,
- int terminate ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseChunk() deprecated function reached\n");
- deprecated = 1;
- }
-
- return (xmlParseChunk(ctxt, chunk, size, terminate));
-}
-
-/**
- * docbCreatePushParserCtxt:
- * @sax: a SAX handler
- * @user_data: The user data returned on SAX callbacks
- * @chunk: a pointer to an array of chars
- * @size: number of chars in the array
- * @filename: an optional file name or URI
- * @enc: an optional encoding
- *
- * Create a parser context for using the DocBook SGML parser in push mode
- * To allow content encoding detection, @size should be >= 4
- * The value of @filename is used for fetching external entities
- * and error/warning reports.
- *
- * Returns the new parser context or NULL
- */
-docbParserCtxtPtr
-docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
- void *user_data ATTRIBUTE_UNUSED,
- const char *chunk ATTRIBUTE_UNUSED,
- int size ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED,
- xmlCharEncoding enc ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseChunk() deprecated function reached\n");
- deprecated = 1;
- }
-
- return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
-}
-
-/**
- * docbSAXParseDoc:
- * @cur: a pointer to an array of xmlChar
- * @encoding: a free form C string describing the SGML document encoding, or NULL
- * @sax: the SAX handler block
- * @userData: if using SAX, this pointer will be provided on callbacks.
- *
- * parse an SGML in-memory document and build a tree.
- * It use the given SAX function block to handle the parsing callback.
- * If sax is NULL, fallback to the default DOM tree building routines.
- *
- * Returns the resulting document tree
- */
-
-docbDocPtr
-docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
- const char *encoding ATTRIBUTE_UNUSED,
- docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseChunk() deprecated function reached\n");
- deprecated = 1;
- }
-
- return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
- xmlStrlen((const xmlChar *) cur), 0, userData));
-}
-
-/**
- * docbParseDoc:
- * @cur: a pointer to an array of xmlChar
- * @encoding: a free form C string describing the SGML document encoding, or NULL
- *
- * parse an SGML in-memory document and build a tree.
- *
- * Returns the resulting document tree
- */
-
-docbDocPtr
-docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
- const char *encoding ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseChunk() deprecated function reached\n");
- deprecated = 1;
- }
-
- return (xmlParseDoc(cur));
-}
-
-
-/**
- * docbCreateFileParserCtxt:
- * @filename: the filename
- * @encoding: the SGML document encoding, or NULL
- *
- * Create a parser context for a file content.
- * Automatic support for ZLIB/Compress compressed document is provided
- * by default if found at compile-time.
- *
- * Returns the new parser context or NULL
- */
-docbParserCtxtPtr
-docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
- const char *encoding ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbCreateFileParserCtxt() deprecated function
reached\n");
- deprecated = 1;
- }
-
- return (xmlCreateFileParserCtxt(filename));
-}
-
-/**
- * docbSAXParseFile:
- * @filename: the filename
- * @encoding: a free form C string describing the SGML document encoding, or NULL
- * @sax: the SAX handler block
- * @userData: if using SAX, this pointer will be provided on callbacks.
- *
- * parse an SGML 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.
- * If sax is NULL, fallback to the default DOM tree building routines.
- *
- * Returns the resulting document tree
- */
-
-docbDocPtr
-docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
- const char *encoding ATTRIBUTE_UNUSED,
- docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbSAXParseFile() deprecated function reached\n");
- deprecated = 1;
- }
-
- return (xmlSAXParseFileWithData(sax, filename, 0, userData));
-}
-
-/**
- * docbParseFile:
- * @filename: the filename
- * @encoding: a free form C string describing document encoding, or NULL
- *
- * parse a Docbook SGML file and build a tree. Automatic support for
- * ZLIB/Compress compressed document is provided by default if found
- * at compile-time.
- *
- * Returns the resulting document tree
- */
-
-docbDocPtr
-docbParseFile(const char *filename ATTRIBUTE_UNUSED,
- const char *encoding ATTRIBUTE_UNUSED)
-{
- static int deprecated = 0;
-
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "docbParseFile() deprecated function reached\n");
- deprecated = 1;
- }
-
- return (xmlParseFile(filename));
-}
-#define bottom_DOCBparser
-#include "elfgcchack.h"
-#endif /* LIBXML_DOCB_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/HTMLparser.c
b/sdk/lib/3rdparty/libxml2/HTMLparser.c
index e720bb2013d..abc4e90575c 100644
--- a/sdk/lib/3rdparty/libxml2/HTMLparser.c
+++ b/sdk/lib/3rdparty/libxml2/HTMLparser.c
@@ -11,24 +11,8 @@
#ifdef LIBXML_HTML_ENABLED
#include <string.h>
-#ifdef HAVE_CTYPE_H
#include <ctype.h>
-#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include <zlib.h>
-#endif
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
@@ -1411,6 +1395,9 @@ static const elementPriority htmlEndPriority[] = {
/**
* htmlInitAutoClose:
*
+ * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * initialize the library.
+ *
* This is a no-op now.
*/
void
@@ -2558,6 +2545,21 @@ htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) {
static const xmlChar * htmlParseNameComplex(xmlParserCtxtPtr ctxt);
+static void
+htmlSkipBogusComment(htmlParserCtxtPtr ctxt) {
+ int c;
+
+ htmlParseErr(ctxt, XML_HTML_INCORRECTLY_OPENED_COMMENT,
+ "Incorrectly opened comment\n", NULL, NULL);
+
+ do {
+ c = CUR;
+ if (c == 0)
+ break;
+ NEXT;
+ } while (c != '>');
+}
+
/**
* htmlParseHTMLName:
* @ctxt: an HTML parser context
@@ -3488,10 +3490,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
q = CUR_CHAR(ql);
if (q == 0)
goto unfinished;
+ if (q == '>') {
+ htmlParseErr(ctxt, XML_ERR_COMMENT_ABRUPTLY_ENDED, "Comment abruptly
ended", NULL, NULL);
+ cur = '>';
+ goto finished;
+ }
NEXTL(ql);
r = CUR_CHAR(rl);
if (r == 0)
goto unfinished;
+ if (q == '-' && r == '>') {
+ htmlParseErr(ctxt, XML_ERR_COMMENT_ABRUPTLY_ENDED, "Comment abruptly
ended", NULL, NULL);
+ cur = '>';
+ goto finished;
+ }
NEXTL(rl);
cur = CUR_CHAR(l);
while ((cur != 0) &&
@@ -3539,6 +3551,7 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
cur = next;
l = nl;
}
+finished:
buf[len] = 0;
if (cur == '>') {
NEXT;
@@ -4380,72 +4393,74 @@ htmlParseContent(htmlParserCtxtPtr ctxt) {
* Handle SCRIPT/STYLE separately
*/
htmlParseScript(ctxt);
- } else {
- /*
- * Sometimes DOCTYPE arrives in the middle of the document
- */
- if ((CUR == '<') && (NXT(1) == '!') &&
- (UPP(2) == 'D') && (UPP(3) == 'O') &&
- (UPP(4) == 'C') && (UPP(5) == 'T') &&
- (UPP(6) == 'Y') && (UPP(7) == 'P') &&
- (UPP(8) == 'E')) {
- htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
- "Misplaced DOCTYPE declaration\n",
- BAD_CAST "DOCTYPE" , NULL);
- htmlParseDocTypeDecl(ctxt);
- }
+ }
- /*
- * First case : a comment
- */
- if ((CUR == '<') && (NXT(1) == '!') &&
- (NXT(2) == '-') && (NXT(3) == '-')) {
- htmlParseComment(ctxt);
- }
+ else if ((CUR == '<') && (NXT(1) == '!')) {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ }
+ /*
+ * First case : a comment
+ */
+ else if ((NXT(2) == '-') && (NXT(3) == '-')) {
+ htmlParseComment(ctxt);
+ }
+ else {
+ htmlSkipBogusComment(ctxt);
+ }
+ }
- /*
- * Second case : a Processing Instruction.
- */
- else if ((CUR == '<') && (NXT(1) == '?')) {
- htmlParsePI(ctxt);
- }
+ /*
+ * Second case : a Processing Instruction.
+ */
+ else if ((CUR == '<') && (NXT(1) == '?')) {
+ htmlParsePI(ctxt);
+ }
- /*
- * Third case : a sub-element.
- */
- else if ((CUR == '<') && IS_ASCII_LETTER(NXT(1))) {
- htmlParseElement(ctxt);
- }
- else if (CUR == '<') {
- if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
- (ctxt->sax->characters != NULL))
- ctxt->sax->characters(ctxt->userData, BAD_CAST
"<", 1);
- NEXT;
- }
+ /*
+ * Third case : a sub-element.
+ */
+ else if ((CUR == '<') && IS_ASCII_LETTER(NXT(1))) {
+ htmlParseElement(ctxt);
+ }
+ else if (CUR == '<') {
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, BAD_CAST "<",
1);
+ NEXT;
+ }
- /*
- * Fourth case : a reference. If if has not been resolved,
- * parsing returns it's Name, create the node
- */
- else if (CUR == '&') {
- htmlParseReference(ctxt);
- }
+ /*
+ * Fourth case : a reference. If if has not been resolved,
+ * parsing returns it's Name, create the node
+ */
+ else if (CUR == '&') {
+ htmlParseReference(ctxt);
+ }
- /*
- * Fifth case : end of the resource
- */
- else if (CUR == 0) {
- htmlAutoCloseOnEnd(ctxt);
- break;
- }
+ /*
+ * Fifth case : end of the resource
+ */
+ else if (CUR == 0) {
+ htmlAutoCloseOnEnd(ctxt);
+ break;
+ }
- /*
- * Last case, text. Note that References are handled directly.
- */
- else {
- htmlParseCharData(ctxt);
- }
- }
+ /*
+ * Last case, text. Note that References are handled directly.
+ */
+ else {
+ htmlParseCharData(ctxt);
+ }
GROW;
}
if (currentNode != NULL) xmlFree(currentNode);
@@ -4785,76 +4800,78 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
* Handle SCRIPT/STYLE separately
*/
htmlParseScript(ctxt);
- } else {
- /*
- * Sometimes DOCTYPE arrives in the middle of the document
- */
- if ((CUR == '<') && (NXT(1) == '!') &&
- (UPP(2) == 'D') && (UPP(3) == 'O') &&
- (UPP(4) == 'C') && (UPP(5) == 'T') &&
- (UPP(6) == 'Y') && (UPP(7) == 'P') &&
- (UPP(8) == 'E')) {
- htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
- "Misplaced DOCTYPE declaration\n",
- BAD_CAST "DOCTYPE" , NULL);
- htmlParseDocTypeDecl(ctxt);
- }
+ }
- /*
- * First case : a comment
- */
- if ((CUR == '<') && (NXT(1) == '!') &&
- (NXT(2) == '-') && (NXT(3) == '-')) {
- htmlParseComment(ctxt);
- }
+ else if ((CUR == '<') && (NXT(1) == '!')) {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ }
+ /*
+ * First case : a comment
+ */
+ else if ((NXT(2) == '-') && (NXT(3) == '-')) {
+ htmlParseComment(ctxt);
+ }
+ else {
+ htmlSkipBogusComment(ctxt);
+ }
+ }
- /*
- * Second case : a Processing Instruction.
- */
- else if ((CUR == '<') && (NXT(1) == '?')) {
- htmlParsePI(ctxt);
- }
+ /*
+ * Second case : a Processing Instruction.
+ */
+ else if ((CUR == '<') && (NXT(1) == '?')) {
+ htmlParsePI(ctxt);
+ }
- /*
- * Third case : a sub-element.
- */
- else if ((CUR == '<') && IS_ASCII_LETTER(NXT(1))) {
- htmlParseElementInternal(ctxt);
- if (currentNode != NULL) xmlFree(currentNode);
+ /*
+ * Third case : a sub-element.
+ */
+ else if ((CUR == '<') && IS_ASCII_LETTER(NXT(1))) {
+ htmlParseElementInternal(ctxt);
+ if (currentNode != NULL) xmlFree(currentNode);
- currentNode = xmlStrdup(ctxt->name);
- depth = ctxt->nameNr;
- }
- else if (CUR == '<') {
- if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
- (ctxt->sax->characters != NULL))
- ctxt->sax->characters(ctxt->userData, BAD_CAST
"<", 1);
- NEXT;
- }
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ }
+ else if (CUR == '<') {
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, BAD_CAST "<",
1);
+ NEXT;
+ }
- /*
- * Fourth case : a reference. If if has not been resolved,
- * parsing returns it's Name, create the node
- */
- else if (CUR == '&') {
- htmlParseReference(ctxt);
- }
+ /*
+ * Fourth case : a reference. If if has not been resolved,
+ * parsing returns it's Name, create the node
+ */
+ else if (CUR == '&') {
+ htmlParseReference(ctxt);
+ }
- /*
- * Fifth case : end of the resource
- */
- else if (CUR == 0) {
- htmlAutoCloseOnEnd(ctxt);
- break;
- }
+ /*
+ * Fifth case : end of the resource
+ */
+ else if (CUR == 0) {
+ htmlAutoCloseOnEnd(ctxt);
+ break;
+ }
- /*
- * Last case, text. Note that References are handled directly.
- */
- else {
- htmlParseCharData(ctxt);
- }
- }
+ /*
+ * Last case, text. Note that References are handled directly.
+ */
+ else {
+ htmlParseCharData(ctxt);
+ }
GROW;
}
if (currentNode != NULL) xmlFree(currentNode);
@@ -5111,7 +5128,7 @@ htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
ctxt->linenumbers = xmlLineNumbersDefaultValue;
ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
ctxt->html = 1;
- ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_0;
+ ctxt->vctxt.flags = XML_VCTXT_USE_PCTXT;
ctxt->vctxt.userData = ctxt;
ctxt->vctxt.error = xmlParserValidityError;
ctxt->vctxt.warning = xmlParserValidityWarning;
@@ -5951,93 +5968,97 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
#endif
break;
}
- } else {
- /*
- * Sometimes DOCTYPE arrives in the middle of the document
- */
- if ((cur == '<') && (next == '!') &&
- (UPP(2) == 'D') && (UPP(3) == 'O') &&
- (UPP(4) == 'C') && (UPP(5) == 'T') &&
- (UPP(6) == 'Y') && (UPP(7) == 'P') &&
- (UPP(8) == 'E')) {
- if ((!terminate) &&
- (htmlParseLookupSequence(ctxt, '>', 0, 0, 1) < 0))
- goto done;
- htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
- "Misplaced DOCTYPE declaration\n",
- BAD_CAST "DOCTYPE" , NULL);
- htmlParseDocTypeDecl(ctxt);
- } else if ((cur == '<') && (next == '!') &&
- (in->cur[2] == '-') && (in->cur[3] == '-')) {
- if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0))
- goto done;
+ } else if ((cur == '<') && (next == '!')) {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((UPP(2) == 'D') && (UPP(3) == 'O')
&&
+ (UPP(4) == 'C') && (UPP(5) == 'T')
&&
+ (UPP(6) == 'Y') && (UPP(7) == 'P')
&&
+ (UPP(8) == 'E')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 1) <
0))
+ goto done;
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ } else if ((in->cur[2] == '-') && (in->cur[3]
== '-')) {
+ if ((!terminate) &&
+ (htmlParseLookupCommentEnd(ctxt) < 0))
+ goto done;
#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "HPP: Parsing Comment\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Comment\n");
#endif
- htmlParseComment(ctxt);
- ctxt->instate = XML_PARSER_CONTENT;
- } else if ((cur == '<') && (next == '?')) {
- if ((!terminate) &&
- (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0))
- goto done;
+ htmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ } else {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) <
0))
+ goto done;
+ htmlSkipBogusComment(ctxt);
+ }
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0) < 0))
+ goto done;
#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "HPP: Parsing PI\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing PI\n");
#endif
- htmlParsePI(ctxt);
- 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;
+ htmlParsePI(ctxt);
+ 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");
+ 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;
+ 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");
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering START_TAG\n");
#endif
- break;
- } else if (cur == '<') {
- if ((ctxt->sax != NULL) && (!ctxt->disableSAX)
&&
- (ctxt->sax->characters != NULL))
- ctxt->sax->characters(ctxt->userData,
- BAD_CAST "<", 1);
- NEXT;
- } else {
- /*
- * check that the text sequence is complete
- * before handing out the data to the parser
- * to avoid problems with erroneous end of
- * data detection.
- */
- if ((!terminate) &&
- (htmlParseLookupSequence(ctxt, '<', 0, 0, 0) <
0))
- goto done;
- ctxt->checkIndex = 0;
+ break;
+ } else if (cur == '<') {
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)
&&
+ (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData,
+ BAD_CAST "<", 1);
+ NEXT;
+ } else {
+ /*
+ * check that the text sequence is complete
+ * before handing out the data to the parser
+ * to avoid problems with erroneous end of
+ * data detection.
+ */
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '<', 0, 0, 0) < 0))
+ goto done;
+ ctxt->checkIndex = 0;
#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "HPP: Parsing char data\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing char data\n");
#endif
- while ((ctxt->instate != XML_PARSER_EOF) &&
- (cur != '<') && (in->cur <
in->end)) {
- if (cur == '&') {
- htmlParseReference(ctxt);
- } else {
- htmlParseCharData(ctxt);
- }
- cur = in->cur[0];
+ while ((ctxt->instate != XML_PARSER_EOF) &&
+ (cur != '<') && (in->cur <
in->end)) {
+ if (cur == '&') {
+ htmlParseReference(ctxt);
+ } else {
+ htmlParseCharData(ctxt);
}
- }
+ cur = in->cur[0];
+ }
}
break;
@@ -6745,6 +6766,8 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt)
ctxt->nameNr = 0;
ctxt->name = NULL;
+ ctxt->nsNr = 0;
+
DICT_FREE(ctxt->version);
ctxt->version = NULL;
DICT_FREE(ctxt->encoding);
@@ -7278,6 +7301,4 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
return (htmlDoRead(ctxt, URL, encoding, options, 1));
}
-#define bottom_HTMLparser
-#include "elfgcchack.h"
#endif /* LIBXML_HTML_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/HTMLtree.c b/sdk/lib/3rdparty/libxml2/HTMLtree.c
index 7a2b8558389..3dd78a91eba 100644
--- a/sdk/lib/3rdparty/libxml2/HTMLtree.c
+++ b/sdk/lib/3rdparty/libxml2/HTMLtree.c
@@ -12,13 +12,8 @@
#ifdef LIBXML_HTML_ENABLED
#include <string.h> /* for memset() only ! */
-
-#ifdef HAVE_CTYPE_H
#include <ctype.h>
-#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include <libxml/xmlmemory.h>
#include <libxml/HTMLparser.h>
@@ -304,7 +299,7 @@ create:
* output as <option selected>, as per XSLT 1.0 16.2 "HTML Output
Method"
*
*/
-static const char* htmlBooleanAttrs[] = {
+static const char* const htmlBooleanAttrs[] = {
"checked", "compact", "declare", "defer",
"disabled", "ismap",
"multiple", "nohref", "noresize", "noshade",
"nowrap", "readonly",
"selected", NULL
@@ -992,7 +987,14 @@ void
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
const char *encoding ATTRIBUTE_UNUSED,
int format) {
+ int type = 0;
+ if (cur) {
+ type = cur->type;
+ cur->type = XML_HTML_DOCUMENT_NODE;
+ }
htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr) cur, NULL, format);
+ if (cur)
+ cur->type = (xmlElementType) type;
}
/**
@@ -1195,6 +1197,4 @@ htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char
*encoding) {
#endif /* LIBXML_OUTPUT_ENABLED */
-#define bottom_HTMLtree
-#include "elfgcchack.h"
#endif /* LIBXML_HTML_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/NEWS b/sdk/lib/3rdparty/libxml2/NEWS
index c33d32a1727..0a3dd6b03bf 100644
--- a/sdk/lib/3rdparty/libxml2/NEWS
+++ b/sdk/lib/3rdparty/libxml2/NEWS
@@ -1,5 +1,191 @@
+NEWS file for libxml2
+
+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
- NEWS file for libxml2
v2.9.14: May 02 2022:
- Security:
diff --git a/sdk/lib/3rdparty/libxml2/README.md b/sdk/lib/3rdparty/libxml2/README.md
index ce83d6201fc..ad423e686f9 100644
--- a/sdk/lib/3rdparty/libxml2/README.md
+++ b/sdk/lib/3rdparty/libxml2/README.md
@@ -44,6 +44,11 @@ configure and build the library:
./configure [possible options]
make
+Note that by default, no optimization options are used. You have to
+enable them manually, for example with:
+
+ CFLAGS='-O2 -fno-semantic-interposition' ./configure
+
Now you can run the test suite with:
make check
diff --git a/sdk/lib/3rdparty/libxml2/SAX.c b/sdk/lib/3rdparty/libxml2/SAX.c
index 292af57e97b..d8e972b84c2 100644
--- a/sdk/lib/3rdparty/libxml2/SAX.c
+++ b/sdk/lib/3rdparty/libxml2/SAX.c
@@ -126,55 +126,6 @@ inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
#endif /* LIBXML_HTML_ENABLED */
-#ifdef LIBXML_DOCB_ENABLED
-/**
- * initdocbDefaultSAXHandler:
- * @hdlr: the SAX handler
- *
- * Initialize the default DocBook SAX version 1 handler
- * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
- */
-void
-initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
-{
- if(hdlr->initialized == 1)
- return;
-
- hdlr->internalSubset = xmlSAX2InternalSubset;
- hdlr->externalSubset = NULL;
- hdlr->isStandalone = xmlSAX2IsStandalone;
- hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
- hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
- hdlr->resolveEntity = xmlSAX2ResolveEntity;
- hdlr->getEntity = xmlSAX2GetEntity;
- hdlr->getParameterEntity = NULL;
- hdlr->entityDecl = xmlSAX2EntityDecl;
- hdlr->attributeDecl = NULL;
- hdlr->elementDecl = NULL;
- hdlr->notationDecl = NULL;
- hdlr->unparsedEntityDecl = NULL;
- hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
- hdlr->startDocument = xmlSAX2StartDocument;
- hdlr->endDocument = xmlSAX2EndDocument;
- hdlr->startElement = xmlSAX2StartElement;
- hdlr->endElement = xmlSAX2EndElement;
- hdlr->reference = xmlSAX2Reference;
- hdlr->characters = xmlSAX2Characters;
- hdlr->cdataBlock = NULL;
- hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
- hdlr->processingInstruction = NULL;
- hdlr->comment = xmlSAX2Comment;
- hdlr->warning = xmlParserWarning;
- hdlr->error = xmlParserError;
- hdlr->fatalError = xmlParserError;
-
- hdlr->initialized = 1;
-}
-
-#endif /* LIBXML_DOCB_ENABLED */
-
#endif /* LIBXML_SAX1_ENABLED */
-#define bottom_SAX
-#include "elfgcchack.h"
#endif /* LIBXML_LEGACY_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/SAX2.c b/sdk/lib/3rdparty/libxml2/SAX2.c
index 031924652a4..ec89046b1d6 100644
--- a/sdk/lib/3rdparty/libxml2/SAX2.c
+++ b/sdk/lib/3rdparty/libxml2/SAX2.c
@@ -180,31 +180,6 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
NULL, 0, 0, msg, str1);
}
-/**
- * xmlNsErrMsg:
- * @ctxt: an XML parser context
- * @error: the error number
- * @msg: the error message
- * @str1: an error string
- * @str2: an error string
- *
- * Handle a namespace error
- */
-static void LIBXML_ATTR_FORMAT(3,0)
-xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
- const char *msg, const xmlChar *str1, const xmlChar *str2)
-{
- if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
- (ctxt->instate == XML_PARSER_EOF))
- return;
- if (ctxt != NULL)
- ctxt->errNo = error;
- __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
- XML_ERR_ERROR, NULL, 0,
- (const char *) str1, (const char *) str2,
- NULL, 0, 0, msg, str1, str2);
-}
-
/**
* xmlNsWarnMsg:
* @ctxt: an XML parser context
@@ -709,6 +684,9 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar
*fullname,
xmlAttributePtr attr;
xmlChar *name = NULL, *prefix = NULL;
+ /* Avoid unused variable warning if features are disabled. */
+ (void) attr;
+
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
@@ -776,6 +754,9 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlElementPtr elem = NULL;
+ /* Avoid unused variable warning if features are disabled. */
+ (void) elem;
+
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
@@ -822,6 +803,9 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNotationPtr nota = NULL;
+ /* Avoid unused variable warning if features are disabled. */
+ (void) nota;
+
if ((ctxt == NULL) || (ctxt->myDoc == NULL))
return;
@@ -1050,7 +1034,32 @@ xmlSAX2EndDocument(void *ctx)
}
}
-#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) ||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) ||
defined(LIBXML_LEGACY_ENABLED)
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) ||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+/**
+ * xmlNsErrMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an error string
+ * @str2: an error string
+ *
+ * Handle a namespace error
+ */
+static void LIBXML_ATTR_FORMAT(3,0)
+xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ NULL, 0, 0, msg, str1, str2);
+}
+
/**
* xmlSAX2AttributeInternal:
* @ctx: the user data (XML parser context)
@@ -1144,6 +1153,9 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlNsPtr nsret;
xmlChar *val;
+ /* Avoid unused variable warning if features are disabled. */
+ (void) nsret;
+
if (!ctxt->replaceEntities) {
ctxt->depth++;
val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
@@ -1206,6 +1218,9 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlNsPtr nsret;
xmlChar *val;
+ /* Avoid unused variable warning if features are disabled. */
+ (void) nsret;
+
if (!ctxt->replaceEntities) {
ctxt->depth++;
val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
@@ -1368,7 +1383,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
#endif /* LIBXML_VALID_ENABLED */
if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) &&
(((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
- ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) {
+ ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))
&&
+ /* Don't create IDs containing entity references */
+ (ret->children != NULL) &&
+ (ret->children->type == XML_TEXT_NODE) &&
+ (ret->children->next == NULL)) {
+ xmlChar *content = ret->children->content;
/*
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.
@@ -1379,16 +1399,16 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
*
* Open issue: normalization of the value.
*/
- if (xmlValidateNCName(value, 1) != 0) {
+ if (xmlValidateNCName(content, 1) != 0) {
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
"xml:id : attribute value %s is not an NCName\n",
- (const char *) value, NULL);
+ (const char *) content, NULL);
}
- xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
- xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
- xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ xmlAddRef(&ctxt->vctxt, ctxt->myDoc, content, ret);
}
error:
@@ -1747,7 +1767,8 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const
xmlChar **atts)
* If it's the Document root, finish the DTD validation and
* check the document root element for validity
*/
- if ((ctxt->validate) && (ctxt->vctxt.finishDtd ==
XML_CTXT_FINISH_DTD_0)) {
+ if ((ctxt->validate) &&
+ ((ctxt->vctxt.flags & XML_VCTXT_DTD_VALIDATED) == 0)) {
int chk;
chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc);
@@ -1756,7 +1777,7 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const
xmlChar **atts)
if (chk < 0)
ctxt->wellFormed = 0;
ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
- ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1;
+ ctxt->vctxt.flags |= XML_VCTXT_DTD_VALIDATED;
}
#endif /* LIBXML_VALID_ENABLED */
@@ -2120,7 +2141,12 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
#endif /* LIBXML_VALID_ENABLED */
if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) &&
(((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
- ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) {
+ ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))
&&
+ /* Don't create IDs containing entity references */
+ (ret->children != NULL) &&
+ (ret->children->type == XML_TEXT_NODE) &&
+ (ret->children->next == NULL)) {
+ xmlChar *content = ret->children->content;
/*
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.
@@ -2133,27 +2159,20 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
*
* Open issue: normalization of the value.
*/
- if (dup == NULL)
- dup = xmlStrndup(value, valueend - value);
-#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) ||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) ||
defined(LIBXML_LEGACY_ENABLED)
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) ||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
#ifdef LIBXML_VALID_ENABLED
- if (xmlValidateNCName(dup, 1) != 0) {
+ if (xmlValidateNCName(content, 1) != 0) {
xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
"xml:id : attribute value %s is not an NCName\n",
- (const char *) dup, NULL);
+ (const char *) content, NULL);
}
#endif
#endif
- xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
} else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
- /* might be worth duplicate entry points and not copy */
- if (dup == NULL)
- dup = xmlStrndup(value, valueend - value);
- xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret);
} else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) {
- if (dup == NULL)
- dup = xmlStrndup(value, valueend - value);
- xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ xmlAddRef(&ctxt->vctxt, ctxt->myDoc, content, ret);
}
}
if (dup != NULL)
@@ -2405,7 +2424,8 @@ xmlSAX2StartElementNs(void *ctx,
* If it's the Document root, finish the DTD validation and
* check the document root element for validity
*/
- if ((ctxt->validate) && (ctxt->vctxt.finishDtd ==
XML_CTXT_FINISH_DTD_0)) {
+ if ((ctxt->validate) &&
+ ((ctxt->vctxt.flags & XML_VCTXT_DTD_VALIDATED) == 0)) {
int chk;
chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc);
@@ -2414,7 +2434,7 @@ xmlSAX2StartElementNs(void *ctx,
if (chk < 0)
ctxt->wellFormed = 0;
ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
- ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1;
+ ctxt->vctxt.flags |= XML_VCTXT_DTD_VALIDATED;
}
#endif /* LIBXML_VALID_ENABLED */
}
@@ -2613,9 +2633,10 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
}
} else {
/* Mixed content, first time */
- if (type == XML_TEXT_NODE)
+ if (type == XML_TEXT_NODE) {
lastChild = xmlSAX2TextNode(ctxt, ch, len);
- else
+ lastChild->doc = ctxt->myDoc;
+ } else
lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len);
if (lastChild != NULL) {
xmlAddChild(ctxt->node, lastChild);
@@ -2908,6 +2929,9 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
/**
* xmlDefaultSAXHandlerInit:
*
+ * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * initialize the library.
+ *
* Initialize the default SAX2 handler
*/
void
@@ -2966,6 +2990,9 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
/**
* htmlDefaultSAXHandlerInit:
*
+ * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * initialize the library.
+ *
* Initialize the default SAX handler
*/
void
@@ -2975,63 +3002,3 @@ htmlDefaultSAXHandlerInit(void)
}
#endif /* LIBXML_HTML_ENABLED */
-
-#ifdef LIBXML_DOCB_ENABLED
-
-/**
- * xmlSAX2InitDocbDefaultSAXHandler:
- * @hdlr: the SAX handler
- *
- * Initialize the default DocBook SAX2 handler
- */
-void
-xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr)
-{
- if ((hdlr == NULL) || (hdlr->initialized != 0))
- return;
-
- hdlr->internalSubset = xmlSAX2InternalSubset;
- hdlr->externalSubset = NULL;
- hdlr->isStandalone = xmlSAX2IsStandalone;
- hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
- hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
- hdlr->resolveEntity = xmlSAX2ResolveEntity;
- hdlr->getEntity = xmlSAX2GetEntity;
- hdlr->getParameterEntity = NULL;
- hdlr->entityDecl = xmlSAX2EntityDecl;
- hdlr->attributeDecl = NULL;
- hdlr->elementDecl = NULL;
- hdlr->notationDecl = NULL;
- hdlr->unparsedEntityDecl = NULL;
- hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
- hdlr->startDocument = xmlSAX2StartDocument;
- hdlr->endDocument = xmlSAX2EndDocument;
- hdlr->startElement = xmlSAX2StartElement;
- hdlr->endElement = xmlSAX2EndElement;
- hdlr->reference = xmlSAX2Reference;
- hdlr->characters = xmlSAX2Characters;
- hdlr->cdataBlock = NULL;
- hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
- hdlr->processingInstruction = NULL;
- hdlr->comment = xmlSAX2Comment;
- hdlr->warning = xmlParserWarning;
- hdlr->error = xmlParserError;
- hdlr->fatalError = xmlParserError;
-
- hdlr->initialized = 1;
-}
-
-/**
- * docbDefaultSAXHandlerInit:
- *
- * Initialize the default SAX handler
- */
-void
-docbDefaultSAXHandlerInit(void)
-{
- xmlSAX2InitDocbDefaultSAXHandler((xmlSAXHandlerPtr) &docbDefaultSAXHandler);
-}
-
-#endif /* LIBXML_DOCB_ENABLED */
-#define bottom_SAX2
-#include "elfgcchack.h"
diff --git a/sdk/lib/3rdparty/libxml2/buf.c b/sdk/lib/3rdparty/libxml2/buf.c
index 40a5ee068b1..6749d975717 100644
--- a/sdk/lib/3rdparty/libxml2/buf.c
+++ b/sdk/lib/3rdparty/libxml2/buf.c
@@ -17,12 +17,8 @@
#include <string.h> /* for memset() only ! */
#include <limits.h>
-#ifdef HAVE_CTYPE_H
#include <ctype.h>
-#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include <libxml/tree.h>
#include <libxml/globals.h>
@@ -131,12 +127,11 @@ xmlBufCreate(void) {
xmlBufMemoryError(NULL, "creating buffer");
return(NULL);
}
- ret->compat_use = 0;
ret->use = 0;
ret->error = 0;
ret->buffer = NULL;
ret->size = xmlDefaultBufferSize;
- ret->compat_size = xmlDefaultBufferSize;
+ UPDATE_COMPAT(ret);
ret->alloc = xmlBufferAllocScheme;
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
if (ret->content == NULL) {
@@ -167,13 +162,12 @@ xmlBufCreateSize(size_t size) {
xmlBufMemoryError(NULL, "creating buffer");
return(NULL);
}
- ret->compat_use = 0;
ret->use = 0;
ret->error = 0;
ret->buffer = NULL;
ret->alloc = xmlBufferAllocScheme;
ret->size = (size ? size + 1 : 0); /* +1 for ending null */
- ret->compat_size = (ret->size > INT_MAX ? INT_MAX : ret->size);
+ UPDATE_COMPAT(ret);
if (ret->size){
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
if (ret->content == NULL) {
@@ -215,8 +209,7 @@ xmlBufDetach(xmlBufPtr buf) {
buf->content = NULL;
buf->size = 0;
buf->use = 0;
- buf->compat_use = 0;
- buf->compat_size = 0;
+ UPDATE_COMPAT(buf);
return ret;
}
@@ -245,15 +238,9 @@ xmlBufCreateStatic(void *mem, size_t size) {
xmlBufMemoryError(NULL, "creating buffer");
return(NULL);
}
- if (size < INT_MAX) {
- ret->compat_use = size;
- ret->compat_size = size;
- } else {
- ret->compat_use = INT_MAX;
- ret->compat_size = INT_MAX;
- }
ret->use = size;
ret->size = size;
+ UPDATE_COMPAT(ret);
ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
ret->content = (xmlChar *) mem;
ret->error = 0;
@@ -449,9 +436,11 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use)
- return(buf->size - buf->use);
- if (len > SIZE_MAX - buf->use)
+ return(buf->size - buf->use - 1);
+ if (len >= SIZE_MAX - buf->use) {
+ xmlBufMemoryError(buf, "growing buffer past SIZE_MAX");
return(0);
+ }
if (buf->size > (size_t) len) {
size = buf->size > SIZE_MAX / 2 ? SIZE_MAX : buf->size * 2;
@@ -464,7 +453,7 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
/*
* Used to provide parsing limits
*/
- if ((buf->use + len >= XML_MAX_TEXT_LENGTH) ||
+ if ((buf->use + len + 1 >= XML_MAX_TEXT_LENGTH) ||
(buf->size >= XML_MAX_TEXT_LENGTH)) {
xmlBufMemoryError(buf, "buffer error: text too long\n");
return(0);
@@ -492,7 +481,7 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
}
buf->size = size;
UPDATE_COMPAT(buf)
- return(buf->size - buf->use);
+ return(buf->size - buf->use - 1);
}
/**
@@ -518,24 +507,6 @@ xmlBufGrow(xmlBufPtr buf, int len) {
return((int) ret);
}
-/**
- * xmlBufInflate:
- * @buf: the buffer
- * @len: the minimum extra free size to allocate
- *
- * Grow the available space of an XML buffer, adding at least @len bytes
- *
- * Returns 0 if successful or -1 in case of error
- */
-int
-xmlBufInflate(xmlBufPtr buf, size_t len) {
- if (buf == NULL) return(-1);
- xmlBufGrowInternal(buf, len + buf->size);
- if (buf->error)
- return(-1);
- return(0);
-}
-
/**
* xmlBufDump:
* @file: the file output
@@ -622,34 +593,9 @@ xmlBufAddLen(xmlBufPtr buf, size_t len) {
if ((buf == NULL) || (buf->error))
return(-1);
CHECK_COMPAT(buf)
- if (len > (buf->size - buf->use))
+ if (len >= (buf->size - buf->use))
return(-1);
buf->use += len;
- UPDATE_COMPAT(buf)
- if (buf->size > buf->use)
- buf->content[buf->use] = 0;
- else
- return(-1);
- return(0);
-}
-
-/**
- * xmlBufErase:
- * @buf: the buffer
- * @len: the size to erase at the end
- *
- * Sometime data need to be erased at the end of the buffer
- *
- * Returns -1 in case of error and 0 otherwise
- */
-int
-xmlBufErase(xmlBufPtr buf, size_t len) {
- if ((buf == NULL) || (buf->error))
- return(-1);
- CHECK_COMPAT(buf)
- if (len > buf->use)
- return(-1);
- buf->use -= len;
buf->content[buf->use] = 0;
UPDATE_COMPAT(buf)
return(0);
@@ -698,10 +644,11 @@ xmlBufUse(const xmlBufPtr buf)
* @buf: the buffer
*
* Function to find how much free space is allocated but not
- * used in the buffer. It does not account for the terminating zero
- * usually needed
+ * used in the buffer. It reserves one byte for the NUL
+ * terminator character that is usually needed, so there is
+ * no need to subtract 1 from the result anymore.
*
- * Returns the amount or 0 if none or an error occurred
+ * Returns the amount, or 0 if none or if an error occurred.
*/
size_t
@@ -711,7 +658,7 @@ xmlBufAvail(const xmlBufPtr buf)
return 0;
CHECK_COMPAT(buf)
- return(buf->size - buf->use);
+ return((buf->size > buf->use) ? (buf->size - buf->use - 1) : 0);
}
/**
@@ -829,6 +776,8 @@ xmlBufResize(xmlBufPtr buf, size_t size)
} else {
if (buf->content == NULL) {
rebuf = (xmlChar *) xmlMallocAtomic(newSize);
+ buf->use = 0;
+ rebuf[buf->use] = 0;
} else if (buf->size - buf->use < 100) {
rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
} else {
@@ -892,9 +841,12 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
if (len < 0) return -1;
if (len == 0) return 0;
+ /* Note that both buf->size and buf->use can be zero here. */
if ((size_t) len >= buf->size - buf->use) {
- if ((size_t) len >= SIZE_MAX - buf->use)
+ if ((size_t) len >= SIZE_MAX - buf->use) {
+ xmlBufMemoryError(buf, "growing buffer past SIZE_MAX");
return(-1);
+ }
needSize = buf->use + len + 1;
if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
/*
@@ -918,87 +870,6 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
return 0;
}
-/**
- * xmlBufAddHead:
- * @buf: the buffer
- * @str: the #xmlChar string
- * @len: the number of #xmlChar to add
- *
- * Add a string range to the beginning of an XML buffer.
- * if len == -1, the length of @str is recomputed.
- *
- * Returns 0 successful, a positive error code number otherwise
- * and -1 in case of internal or API error.
- */
-int
-xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
- unsigned int needSize;
-
- if ((buf == NULL) || (buf->error))
- return(-1);
- CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
- if (str == NULL) {
-#ifdef DEBUG_BUFFER
- xmlGenericError(xmlGenericErrorContext,
- "xmlBufAddHead: str == NULL\n");
-#endif
- return -1;
- }
- if (len < -1) {
-#ifdef DEBUG_BUFFER
- xmlGenericError(xmlGenericErrorContext,
- "xmlBufAddHead: len < 0\n");
-#endif
- return -1;
- }
- if (len == 0) return 0;
-
- if (len < 0)
- len = xmlStrlen(str);
-
- if (len <= 0) return -1;
-
- if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
- size_t start_buf = buf->content - buf->contentIO;
-
- if (start_buf > (unsigned int) len) {
- /*
- * We can add it in the space previously shrunk
- */
- buf->content -= len;
- memmove(&buf->content[0], str, len);
- buf->use += len;
- buf->size += len;
- UPDATE_COMPAT(buf)
- return(0);
- }
- }
- needSize = buf->use + len + 2;
- if (needSize > buf->size){
- if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
- /*
- * Used to provide parsing limits
- */
- if (needSize >= XML_MAX_TEXT_LENGTH) {
- xmlBufMemoryError(buf, "buffer error: text too long\n");
- return(-1);
- }
- }
- if (!xmlBufResize(buf, needSize)){
- xmlBufMemoryError(buf, "growing buffer");
- return XML_ERR_NO_MEMORY;
- }
- }
-
- memmove(&buf->content[len], &buf->content[0], buf->use);
- memmove(&buf->content[0], str, len);
- buf->use += len;
- buf->content[buf->use] = 0;
- UPDATE_COMPAT(buf)
- return 0;
-}
-
/**
* xmlBufCat:
* @buf: the buffer to add to
@@ -1034,49 +905,6 @@ xmlBufCCat(xmlBufPtr buf, const char *str) {
return xmlBufCat(buf, (const xmlChar *) str);
}
-/**
- * xmlBufWriteCHAR:
- * @buf: the XML buffer
- * @string: the string to add
- *
- * routine which manages and grows an output buffer. This one adds
- * xmlChars at the end of the buffer.
- *
- * Returns 0 if successful, a positive error code number otherwise
- * and -1 in case of internal or API error.
- */
-int
-xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string) {
- if ((buf == NULL) || (buf->error))
- return(-1);
- CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
- return(-1);
- return(xmlBufCat(buf, string));
-}
-
-/**
- * xmlBufWriteChar:
- * @buf: the XML buffer output
- * @string: the string to add
- *
- * routine which manage and grows an output buffer. This one add
- * C chars at the end of the array.
- *
- * Returns 0 if successful, a positive error code number otherwise
- * and -1 in case of internal or API error.
- */
-int
-xmlBufWriteChar(xmlBufPtr buf, const char *string) {
- if ((buf == NULL) || (buf->error))
- return(-1);
- CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
- return(-1);
- return(xmlBufCCat(buf, string));
-}
-
-
/**
* xmlBufWriteQuotedString:
* @buf: the XML buffer output
@@ -1159,8 +987,7 @@ xmlBufFromBuffer(xmlBufferPtr buffer) {
}
ret->use = buffer->use;
ret->size = buffer->size;
- ret->compat_use = buffer->use;
- ret->compat_size = buffer->size;
+ UPDATE_COMPAT(ret);
ret->error = 0;
ret->buffer = buffer;
ret->alloc = buffer->alloc;
@@ -1329,5 +1156,3 @@ xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
return(0);
}
-#define bottom_buf
-#include "elfgcchack.h"
diff --git a/sdk/lib/3rdparty/libxml2/buf.h b/sdk/lib/3rdparty/libxml2/buf.h
index ebdc9781213..b7bcf61fe2e 100644
--- a/sdk/lib/3rdparty/libxml2/buf.h
+++ b/sdk/lib/3rdparty/libxml2/buf.h
@@ -32,15 +32,11 @@ void xmlBufEmpty(xmlBufPtr buf);
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
int xmlBufGrow(xmlBufPtr buf, int len);
-int xmlBufInflate(xmlBufPtr buf, size_t len);
int xmlBufResize(xmlBufPtr buf, size_t len);
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
-int xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len);
int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
int xmlBufCCat(xmlBufPtr buf, const char *str);
-int xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string);
-int xmlBufWriteChar(xmlBufPtr buf, const char *string);
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
size_t xmlBufAvail(const xmlBufPtr buf);
@@ -48,7 +44,6 @@ size_t xmlBufLength(const xmlBufPtr buf);
/* size_t xmlBufUse(const xmlBufPtr buf); */
int xmlBufIsEmpty(const xmlBufPtr buf);
int xmlBufAddLen(xmlBufPtr buf, size_t len);
-int xmlBufErase(xmlBufPtr buf, size_t len);
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
diff --git a/sdk/lib/3rdparty/libxml2/c14n.c b/sdk/lib/3rdparty/libxml2/c14n.c
index 3efcd92eefa..d55729ccc59 100644
--- a/sdk/lib/3rdparty/libxml2/c14n.c
+++ b/sdk/lib/3rdparty/libxml2/c14n.c
@@ -14,9 +14,7 @@
#ifdef LIBXML_C14N_ENABLED
#ifdef LIBXML_OUTPUT_ENABLED
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include <string.h>
#include <libxml/tree.h>
@@ -1659,9 +1657,6 @@ xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
break;
case XML_DOCUMENT_NODE:
case XML_DOCUMENT_FRAG_NODE: /* should be processed as document? */
-#ifdef LIBXML_DOCB_ENABLED
- case XML_DOCB_DOCUMENT_NODE: /* should be processed as document? */
-#endif
#ifdef LIBXML_HTML_ENABLED
case XML_HTML_DOCUMENT_NODE: /* should be processed as document? */
#endif
@@ -2229,6 +2224,5 @@ xmlC11NNormalizeString(const xmlChar * input,
return (buffer);
}
#endif /* LIBXML_OUTPUT_ENABLED */
-#define bottom_c14n
-#include "elfgcchack.h"
+
#endif /* LIBXML_C14N_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/catalog.c b/sdk/lib/3rdparty/libxml2/catalog.c
index e071b4939fc..b7837e3da75 100644
--- a/sdk/lib/3rdparty/libxml2/catalog.c
+++ b/sdk/lib/3rdparty/libxml2/catalog.c
@@ -16,6 +16,8 @@
#include "libxml.h"
#ifdef LIBXML_CATALOG_ENABLED
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -28,10 +30,6 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/hash.h>
#include <libxml/uri.h>
@@ -70,26 +68,20 @@
#define XML_URN_PUBID "urn:publicid:"
#define XML_CATAL_BREAK ((xmlChar *) -1)
#ifndef XML_XML_DEFAULT_CATALOG
-#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
+#define XML_XML_DEFAULT_CATALOG "file://" SYSCONFDIR "/xml/catalog"
#endif
#ifndef XML_SGML_DEFAULT_CATALOG
-#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
+#define XML_SGML_DEFAULT_CATALOG "file://" SYSCONFDIR
"/sgml/catalog"
#endif
#if defined(_WIN32) && defined(_MSC_VER)
#undef XML_XML_DEFAULT_CATALOG
-static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
-#if defined(_WIN32_WCE)
-/* Windows CE don't have a A variant */
-#define GetModuleHandleA GetModuleHandle
-#define GetModuleFileNameA GetModuleFileName
-#else
+static char XML_XML_DEFAULT_CATALOG[256] = "file://" SYSCONFDIR
"/xml/catalog";
#if !defined(_WINDOWS_)
void* __stdcall GetModuleHandleA(const char*);
unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
#endif
#endif
-#endif
static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
@@ -3825,6 +3817,4 @@ xmlCatalogGetPublic(const xmlChar *pubID) {
return(NULL);
}
-#define bottom_catalog
-#include "elfgcchack.h"
#endif /* LIBXML_CATALOG_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/chvalid.c b/sdk/lib/3rdparty/libxml2/chvalid.c
index 06e8db06422..f4fa44acbb8 100644
--- a/sdk/lib/3rdparty/libxml2/chvalid.c
+++ b/sdk/lib/3rdparty/libxml2/chvalid.c
@@ -332,5 +332,3 @@ xmlIsPubidChar(unsigned int ch) {
return(xmlIsPubidCharQ(ch));
}
-#define bottom_chvalid
-#include "elfgcchack.h"
diff --git a/sdk/lib/3rdparty/libxml2/config.h b/sdk/lib/3rdparty/libxml2/config.h
index 596556c11d3..613a0f4c4e7 100644
--- a/sdk/lib/3rdparty/libxml2/config.h
+++ b/sdk/lib/3rdparty/libxml2/config.h
@@ -19,13 +19,6 @@
/* Whether struct sockaddr::__ss_family exists */
/* #undef HAVE_BROKEN_SS_FAMILY */
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-#define HAVE_DIRENT_H 1
-
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
@@ -35,18 +28,9 @@
/* Define to 1 if you have the <dl.h> header file. */
/* #undef HAVE_DL_H */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
-/* Define to 1 if you have the <float.h> header file. */
-#define HAVE_FLOAT_H 1
-
-/* Define to 1 if you have the `fprintf' function. */
-#define HAVE_FPRINTF 1
-
/* Define to 1 if you have the `ftime' function. */
#define HAVE_FTIME 1
@@ -68,21 +52,9 @@
/* Define if readline library is there (-lreadline) */
/* #undef HAVE_LIBREADLINE */
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the `localtime' function. */
-#define HAVE_LOCALTIME 1
-
/* Define to 1 if you have the <lzma.h> header file. */
/* #undef HAVE_LZMA_H */
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the <math.h> header file. */
-#define HAVE_MATH_H 1
-
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
@@ -97,9 +69,6 @@
# undef /**/ HAVE_MMAP
#endif
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
/* Define to 1 if you have the <netdb.h> header file. */
/* #undef HAVE_NETDB_H */
@@ -109,18 +78,12 @@
/* Define to 1 if you have the <poll.h> header file. */
/* #undef HAVE_POLL_H */
-/* Define to 1 if you have the `printf' function. */
-#define HAVE_PRINTF 1
-
/* Define if <pthread.h> is there */
/* #undef HAVE_PTHREAD_H */
/* Define to 1 if you have the `putenv' function. */
/* #undef HAVE_PUTENV */
-/* Define to 1 if you have the `rand' function. */
-#define HAVE_RAND 1
-
/* Define to 1 if you have the `rand_r' function. */
/* #undef HAVE_RAND_R */
@@ -130,56 +93,27 @@
/* Have shl_load based dso */
/* #undef HAVE_SHLLOAD */
-/* Define to 1 if you have the `signal' function. */
-#define HAVE_SIGNAL 1
-
-/* Define to 1 if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
-/* Define to 1 if you have the `sprintf' function. */
-#define HAVE_SPRINTF 1
-
-/* Define to 1 if you have the `srand' function. */
-#define HAVE_SRAND 1
-
-/* Define to 1 if you have the `sscanf' function. */
-#define HAVE_SSCANF 1
-
/* Define to 1 if you have the `stat' function. */
#define HAVE_STAT 1
-/* Define to 1 if you have the <stdarg.h> header file. */
-#define HAVE_STDARG_H 1
-
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define to 1 if you have the `strftime' function. */
-#define HAVE_STRFTIME 1
-
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */
@@ -198,36 +132,21 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
-/* Define to 1 if you have the `time' function. */
-#define HAVE_TIME 1
-
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Whether va_copy() is available */
#define HAVE_VA_COPY 1
-/* Define to 1 if you have the `vfprintf' function. */
-#define HAVE_VFPRINTF 1
-
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
-/* Define to 1 if you have the `vsprintf' function. */
-#define HAVE_VSPRINTF 1
-
/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1
/* Whether __va_copy() is available */
#define HAVE___VA_COPY 1
-/* Define as const if the declaration of iconv() needs const. */
-/* #undef ICONV_CONST */
-
/* Define to the sub-directory where libtool stores uninstalled libraries. */
/* #undef LT_OBJDIR */
@@ -265,7 +184,7 @@
/* #undef VA_LIST_IS_ARRAY */
/* Version number of package */
-#define VERSION "2.9.14"
+#define VERSION "2.10.0"
/* Determine what socket length (socklen_t) data type is */
#define XML_SOCKLEN_T int
diff --git a/sdk/lib/3rdparty/libxml2/debugXML.c b/sdk/lib/3rdparty/libxml2/debugXML.c
index 7a2ca47d225..f451c9d5c41 100644
--- a/sdk/lib/3rdparty/libxml2/debugXML.c
+++ b/sdk/lib/3rdparty/libxml2/debugXML.c
@@ -12,12 +12,8 @@
#ifdef LIBXML_DEBUG_ENABLED
#include <string.h>
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
+
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -409,9 +405,6 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
case XML_NAMESPACE_DECL:
case XML_XINCLUDE_START:
case XML_XINCLUDE_END:
-#ifdef LIBXML_DOCB_ENABLED
- case XML_DOCB_DOCUMENT_NODE:
-#endif
case XML_DOCUMENT_NODE:
case XML_HTML_DOCUMENT_NODE:
break;
@@ -1615,9 +1608,6 @@ xmlLsCountNode(xmlNodePtr node) {
break;
case XML_DOCUMENT_NODE:
case XML_HTML_DOCUMENT_NODE:
-#ifdef LIBXML_DOCB_ENABLED
- case XML_DOCB_DOCUMENT_NODE:
-#endif
list = ((xmlDocPtr) node)->children;
break;
case XML_ATTRIBUTE_NODE:
@@ -1850,6 +1840,7 @@ xmlShellPrintXPathError(int errorType, const char *arg)
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -1862,6 +1853,7 @@ xmlShellPrintXPathError(int errorType, const char *arg)
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3008,6 +3000,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -3020,6 +3013,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3125,6 +3119,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -3137,6 +3132,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3202,6 +3198,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -3214,6 +3211,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3287,6 +3285,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -3299,6 +3298,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3365,6 +3365,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a string\n", arg);
break;
+#ifdef LIBXML_XPTR_LOCS_ENABLED
case XPATH_POINT:
xmlGenericError(xmlGenericErrorContext,
"%s is a point\n", arg);
@@ -3377,6 +3378,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
xmlGenericError(xmlGenericErrorContext,
"%s is a range\n", arg);
break;
+#endif /* LIBXML_XPTR_LOCS_ENABLED */
case XPATH_USERS:
xmlGenericError(xmlGenericErrorContext,
"%s is user-defined\n", arg);
@@ -3418,6 +3420,5 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
}
#endif /* LIBXML_XPATH_ENABLED */
-#define bottom_debugXML
-#include "elfgcchack.h"
+
#endif /* LIBXML_DEBUG_ENABLED */
diff --git a/sdk/lib/3rdparty/libxml2/dict.c b/sdk/lib/3rdparty/libxml2/dict.c
index 90e4d81403c..c29d2af77a7 100644
--- a/sdk/lib/3rdparty/libxml2/dict.c
+++ b/sdk/lib/3rdparty/libxml2/dict.c
@@ -20,12 +20,8 @@
#include "libxml.h"
#include <limits.h>
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-#ifdef HAVE_TIME_H
#include <time.h>
-#endif
/*
* Following
http://www.ocert.org/advisories/ocert-2011-003.html
@@ -38,8 +34,7 @@
* list we will use the BigKey algo as soon as the hash size grows
* over MIN_DICT_SIZE so this actually works
*/
-#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
&& \
- !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
#define DICT_RANDOMIZATION
#endif
@@ -132,7 +127,7 @@ struct _xmlDict {
* A mutex for modifying the reference counter for shared
* dictionaries.
*/
-static xmlRMutexPtr xmlDictMutex = NULL;
+static xmlMutexPtr xmlDictMutex = NULL;
/*
* Whether the dictionary mutex was initialized.
@@ -151,8 +146,10 @@ static unsigned int rand_seed = 0;
/**
* xmlInitializeDict:
*
+ * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * initialize the library.
+ *
* Do the dictionary mutex initialization.
- * this function is deprecated
*
* Returns 0 if initialization was already done, and 1 if that
* call led to the initialization
@@ -177,9 +174,9 @@ int __xmlInitializeDict(void) {
if (xmlDictInitialized)
return(1);
- if ((xmlDictMutex = xmlNewRMutex()) == NULL)
+ if ((xmlDictMutex = xmlNewMutex()) == NULL)
return(0);
- xmlRMutexLock(xmlDictMutex);
+ xmlMutexLock(xmlDictMutex);
#ifdef DICT_RANDOMIZATION
#ifdef HAVE_RAND_R
@@ -190,7 +187,7 @@ int __xmlInitializeDict(void) {
#endif
#endif
xmlDictInitialized = 1;
- xmlRMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(xmlDictMutex);
return(1);
}
@@ -201,13 +198,13 @@ int __xmlRandom(void) {
if (xmlDictInitialized == 0)
__xmlInitializeDict();
- xmlRMutexLock(xmlDictMutex);
+ xmlMutexLock(xmlDictMutex);
#ifdef HAVE_RAND_R
ret = rand_r(& rand_seed);
#else
ret = rand();
#endif
- xmlRMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(xmlDictMutex);
return(ret);
}
#endif
@@ -215,6 +212,11 @@ int __xmlRandom(void) {
/**
* xmlDictCleanup:
*
+ * DEPRECATED: This function will be made private. Call xmlCleanupParser
+ * to free global state but see the warnings there. xmlCleanupParser
+ * should be only called once at program exit. In most cases, you don't
+ * have call cleanup functions at all.
+ *
* Free the dictionary mutex. Do not call unless sure the library
* is not in use anymore !
*/
@@ -223,7 +225,7 @@ xmlDictCleanup(void) {
if (!xmlDictInitialized)
return;
- xmlFreeRMutex(xmlDictMutex);
+ xmlFreeMutex(xmlDictMutex);
xmlDictInitialized = 0;
}
@@ -648,9 +650,9 @@ xmlDictReference(xmlDictPtr dict) {
return(-1);
if (dict == NULL) return -1;
- xmlRMutexLock(xmlDictMutex);
+ xmlMutexLock(xmlDictMutex);
dict->ref_counter++;
- xmlRMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(xmlDictMutex);
return(0);
}
@@ -812,14 +814,14 @@ xmlDictFree(xmlDictPtr dict) {
return;
/* decrement the counter, it may be shared by a parser and docs */
- xmlRMutexLock(xmlDictMutex);
+ xmlMutexLock(xmlDictMutex);
dict->ref_counter--;
if (dict->ref_counter > 0) {
- xmlRMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(xmlDictMutex);
return;
}
- xmlRMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(xmlDictMutex);
if (dict->subdict != NULL) {
xmlDictFree(dict->subdict);
@@ -1294,5 +1296,3 @@ xmlDictGetUsage(xmlDictPtr dict) {
return(limit);
}
-#define bottom_dict
-#include "elfgcchack.h"
diff --git a/sdk/lib/3rdparty/libxml2/elfgcchack.h
b/sdk/lib/3rdparty/libxml2/elfgcchack.h
deleted file mode 100644
index 301daf303ec..00000000000
--- a/sdk/lib/3rdparty/libxml2/elfgcchack.h
+++ /dev/null
@@ -1,17830 +0,0 @@
-/*
- * elfgcchack.h: hack by Arjan van de Ven <arjanv(a)redhat.com> to speed
- * up the code when using gcc for call within the library.
- *
- * Based on the analysis
http://people.redhat.com/drepper/dsohowto.pdf
- * from Ulrich drepper. Rewritten to be generated from the XML description
- * file for libxml2 API
- * autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
- */
-
-#ifdef IN_LIBXML
-#ifdef __GNUC__
-#ifdef PIC
-#ifdef __linux__
-#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
-
-#include "libxml/c14n.h"
-#include "libxml/catalog.h"
-#include "libxml/chvalid.h"
-#include "libxml/debugXML.h"
-#include "libxml/dict.h"
-#include "libxml/DOCBparser.h"
-#include "libxml/encoding.h"
-#include "libxml/entities.h"
-#include "libxml/globals.h"
-#include "libxml/hash.h"
-#include "libxml/HTMLparser.h"
-#include "libxml/HTMLtree.h"
-#include "libxml/list.h"
-#include "libxml/nanoftp.h"
-#include "libxml/nanohttp.h"
-#include "libxml/parser.h"
-#include "libxml/parserInternals.h"
-#include "libxml/pattern.h"
-#include "libxml/relaxng.h"
-#include "libxml/SAX2.h"
-#include "libxml/SAX.h"
-#include "libxml/schemasInternals.h"
-#include "libxml/schematron.h"
-#include "libxml/threads.h"
-#include "libxml/tree.h"
-#include "libxml/uri.h"
-#include "libxml/valid.h"
-#include "libxml/xinclude.h"
-#include "libxml/xlink.h"
-#include "libxml/xmlautomata.h"
-#include "libxml/xmlerror.h"
-#include "libxml/xmlexports.h"
-#include "libxml/xmlIO.h"
-#include "libxml/xmlmemory.h"
-#include "libxml/xmlreader.h"
-#include "libxml/xmlregexp.h"
-#include "libxml/xmlsave.h"
-#include "libxml/xmlschemas.h"
-#include "libxml/xmlschemastypes.h"
-#include "libxml/xmlstring.h"
-#include "libxml/xmlunicode.h"
-#include "libxml/xmlversion.h"
-#include "libxml/xmlwriter.h"
-#include "libxml/xpath.h"
-#include "libxml/xpathInternals.h"
-#include "libxml/xpointer.h"
-#include "libxml/xmlmodule.h"
-
-/* special hot spot not exported ones */
-
-#ifdef bottom_globals
-#undef __xmlGenericError
-extern __typeof (__xmlGenericError) __xmlGenericError
__attribute((alias("__xmlGenericError__internal_alias")));
-#else
-#ifndef __xmlGenericError
-extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias
__attribute((visibility("hidden")));
-#define __xmlGenericError __xmlGenericError__internal_alias
-#endif
-#endif
-
-#ifdef bottom_globals
-#undef __xmlGenericErrorContext
-extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext
__attribute((alias("__xmlGenericErrorContext__internal_alias")));
-#else
-#ifndef __xmlGenericErrorContext
-extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias
__attribute((visibility("hidden")));
-#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
-#endif
-#endif
-
-/* list generated from libxml2-api.xml */
-#if defined(LIBXML_DOCB_ENABLED)
-#ifdef bottom_DOCBparser
-#undef docbCreatePushParserCtxt
-extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt
__attribute((alias("docbCreatePushParserCtxt__internal_alias")));
-#else
-#ifndef docbCreatePushParserCtxt
-extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define docbCreatePushParserCtxt docbCreatePushParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlAttrAllowed
-extern __typeof (htmlAttrAllowed) htmlAttrAllowed
__attribute((alias("htmlAttrAllowed__internal_alias")));
-#else
-#ifndef htmlAttrAllowed
-extern __typeof (htmlAttrAllowed) htmlAttrAllowed__internal_alias
__attribute((visibility("hidden")));
-#define htmlAttrAllowed htmlAttrAllowed__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlAutoCloseTag
-extern __typeof (htmlAutoCloseTag) htmlAutoCloseTag
__attribute((alias("htmlAutoCloseTag__internal_alias")));
-#else
-#ifndef htmlAutoCloseTag
-extern __typeof (htmlAutoCloseTag) htmlAutoCloseTag__internal_alias
__attribute((visibility("hidden")));
-#define htmlAutoCloseTag htmlAutoCloseTag__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCreateFileParserCtxt
-extern __typeof (htmlCreateFileParserCtxt) htmlCreateFileParserCtxt
__attribute((alias("htmlCreateFileParserCtxt__internal_alias")));
-#else
-#ifndef htmlCreateFileParserCtxt
-extern __typeof (htmlCreateFileParserCtxt) htmlCreateFileParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define htmlCreateFileParserCtxt htmlCreateFileParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCreateMemoryParserCtxt
-extern __typeof (htmlCreateMemoryParserCtxt) htmlCreateMemoryParserCtxt
__attribute((alias("htmlCreateMemoryParserCtxt__internal_alias")));
-#else
-#ifndef htmlCreateMemoryParserCtxt
-extern __typeof (htmlCreateMemoryParserCtxt) htmlCreateMemoryParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define htmlCreateMemoryParserCtxt htmlCreateMemoryParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCreatePushParserCtxt
-extern __typeof (htmlCreatePushParserCtxt) htmlCreatePushParserCtxt
__attribute((alias("htmlCreatePushParserCtxt__internal_alias")));
-#else
-#ifndef htmlCreatePushParserCtxt
-extern __typeof (htmlCreatePushParserCtxt) htmlCreatePushParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define htmlCreatePushParserCtxt htmlCreatePushParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReadDoc
-extern __typeof (htmlCtxtReadDoc) htmlCtxtReadDoc
__attribute((alias("htmlCtxtReadDoc__internal_alias")));
-#else
-#ifndef htmlCtxtReadDoc
-extern __typeof (htmlCtxtReadDoc) htmlCtxtReadDoc__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReadDoc htmlCtxtReadDoc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReadFd
-extern __typeof (htmlCtxtReadFd) htmlCtxtReadFd
__attribute((alias("htmlCtxtReadFd__internal_alias")));
-#else
-#ifndef htmlCtxtReadFd
-extern __typeof (htmlCtxtReadFd) htmlCtxtReadFd__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReadFd htmlCtxtReadFd__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReadFile
-extern __typeof (htmlCtxtReadFile) htmlCtxtReadFile
__attribute((alias("htmlCtxtReadFile__internal_alias")));
-#else
-#ifndef htmlCtxtReadFile
-extern __typeof (htmlCtxtReadFile) htmlCtxtReadFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReadFile htmlCtxtReadFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReadIO
-extern __typeof (htmlCtxtReadIO) htmlCtxtReadIO
__attribute((alias("htmlCtxtReadIO__internal_alias")));
-#else
-#ifndef htmlCtxtReadIO
-extern __typeof (htmlCtxtReadIO) htmlCtxtReadIO__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReadIO htmlCtxtReadIO__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReadMemory
-extern __typeof (htmlCtxtReadMemory) htmlCtxtReadMemory
__attribute((alias("htmlCtxtReadMemory__internal_alias")));
-#else
-#ifndef htmlCtxtReadMemory
-extern __typeof (htmlCtxtReadMemory) htmlCtxtReadMemory__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReadMemory htmlCtxtReadMemory__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtReset
-extern __typeof (htmlCtxtReset) htmlCtxtReset
__attribute((alias("htmlCtxtReset__internal_alias")));
-#else
-#ifndef htmlCtxtReset
-extern __typeof (htmlCtxtReset) htmlCtxtReset__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtReset htmlCtxtReset__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlCtxtUseOptions
-extern __typeof (htmlCtxtUseOptions) htmlCtxtUseOptions
__attribute((alias("htmlCtxtUseOptions__internal_alias")));
-#else
-#ifndef htmlCtxtUseOptions
-extern __typeof (htmlCtxtUseOptions) htmlCtxtUseOptions__internal_alias
__attribute((visibility("hidden")));
-#define htmlCtxtUseOptions htmlCtxtUseOptions__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_SAX2
-#undef htmlDefaultSAXHandlerInit
-extern __typeof (htmlDefaultSAXHandlerInit) htmlDefaultSAXHandlerInit
__attribute((alias("htmlDefaultSAXHandlerInit__internal_alias")));
-#else
-#ifndef htmlDefaultSAXHandlerInit
-extern __typeof (htmlDefaultSAXHandlerInit) htmlDefaultSAXHandlerInit__internal_alias
__attribute((visibility("hidden")));
-#define htmlDefaultSAXHandlerInit htmlDefaultSAXHandlerInit__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlDocContentDumpFormatOutput
-extern __typeof (htmlDocContentDumpFormatOutput) htmlDocContentDumpFormatOutput
__attribute((alias("htmlDocContentDumpFormatOutput__internal_alias")));
-#else
-#ifndef htmlDocContentDumpFormatOutput
-extern __typeof (htmlDocContentDumpFormatOutput)
htmlDocContentDumpFormatOutput__internal_alias
__attribute((visibility("hidden")));
-#define htmlDocContentDumpFormatOutput htmlDocContentDumpFormatOutput__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlDocContentDumpOutput
-extern __typeof (htmlDocContentDumpOutput) htmlDocContentDumpOutput
__attribute((alias("htmlDocContentDumpOutput__internal_alias")));
-#else
-#ifndef htmlDocContentDumpOutput
-extern __typeof (htmlDocContentDumpOutput) htmlDocContentDumpOutput__internal_alias
__attribute((visibility("hidden")));
-#define htmlDocContentDumpOutput htmlDocContentDumpOutput__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlDocDump
-extern __typeof (htmlDocDump) htmlDocDump
__attribute((alias("htmlDocDump__internal_alias")));
-#else
-#ifndef htmlDocDump
-extern __typeof (htmlDocDump) htmlDocDump__internal_alias
__attribute((visibility("hidden")));
-#define htmlDocDump htmlDocDump__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlDocDumpMemory
-extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory
__attribute((alias("htmlDocDumpMemory__internal_alias")));
-#else
-#ifndef htmlDocDumpMemory
-extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias
__attribute((visibility("hidden")));
-#define htmlDocDumpMemory htmlDocDumpMemory__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlDocDumpMemoryFormat
-extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat
__attribute((alias("htmlDocDumpMemoryFormat__internal_alias")));
-#else
-#ifndef htmlDocDumpMemoryFormat
-extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias
__attribute((visibility("hidden")));
-#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlElementAllowedHere
-extern __typeof (htmlElementAllowedHere) htmlElementAllowedHere
__attribute((alias("htmlElementAllowedHere__internal_alias")));
-#else
-#ifndef htmlElementAllowedHere
-extern __typeof (htmlElementAllowedHere) htmlElementAllowedHere__internal_alias
__attribute((visibility("hidden")));
-#define htmlElementAllowedHere htmlElementAllowedHere__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlElementStatusHere
-extern __typeof (htmlElementStatusHere) htmlElementStatusHere
__attribute((alias("htmlElementStatusHere__internal_alias")));
-#else
-#ifndef htmlElementStatusHere
-extern __typeof (htmlElementStatusHere) htmlElementStatusHere__internal_alias
__attribute((visibility("hidden")));
-#define htmlElementStatusHere htmlElementStatusHere__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlEncodeEntities
-extern __typeof (htmlEncodeEntities) htmlEncodeEntities
__attribute((alias("htmlEncodeEntities__internal_alias")));
-#else
-#ifndef htmlEncodeEntities
-extern __typeof (htmlEncodeEntities) htmlEncodeEntities__internal_alias
__attribute((visibility("hidden")));
-#define htmlEncodeEntities htmlEncodeEntities__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlEntityLookup
-extern __typeof (htmlEntityLookup) htmlEntityLookup
__attribute((alias("htmlEntityLookup__internal_alias")));
-#else
-#ifndef htmlEntityLookup
-extern __typeof (htmlEntityLookup) htmlEntityLookup__internal_alias
__attribute((visibility("hidden")));
-#define htmlEntityLookup htmlEntityLookup__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlEntityValueLookup
-extern __typeof (htmlEntityValueLookup) htmlEntityValueLookup
__attribute((alias("htmlEntityValueLookup__internal_alias")));
-#else
-#ifndef htmlEntityValueLookup
-extern __typeof (htmlEntityValueLookup) htmlEntityValueLookup__internal_alias
__attribute((visibility("hidden")));
-#define htmlEntityValueLookup htmlEntityValueLookup__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlFreeParserCtxt
-extern __typeof (htmlFreeParserCtxt) htmlFreeParserCtxt
__attribute((alias("htmlFreeParserCtxt__internal_alias")));
-#else
-#ifndef htmlFreeParserCtxt
-extern __typeof (htmlFreeParserCtxt) htmlFreeParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define htmlFreeParserCtxt htmlFreeParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlGetMetaEncoding
-extern __typeof (htmlGetMetaEncoding) htmlGetMetaEncoding
__attribute((alias("htmlGetMetaEncoding__internal_alias")));
-#else
-#ifndef htmlGetMetaEncoding
-extern __typeof (htmlGetMetaEncoding) htmlGetMetaEncoding__internal_alias
__attribute((visibility("hidden")));
-#define htmlGetMetaEncoding htmlGetMetaEncoding__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlHandleOmittedElem
-extern __typeof (htmlHandleOmittedElem) htmlHandleOmittedElem
__attribute((alias("htmlHandleOmittedElem__internal_alias")));
-#else
-#ifndef htmlHandleOmittedElem
-extern __typeof (htmlHandleOmittedElem) htmlHandleOmittedElem__internal_alias
__attribute((visibility("hidden")));
-#define htmlHandleOmittedElem htmlHandleOmittedElem__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlInitAutoClose
-extern __typeof (htmlInitAutoClose) htmlInitAutoClose
__attribute((alias("htmlInitAutoClose__internal_alias")));
-#else
-#ifndef htmlInitAutoClose
-extern __typeof (htmlInitAutoClose) htmlInitAutoClose__internal_alias
__attribute((visibility("hidden")));
-#define htmlInitAutoClose htmlInitAutoClose__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlIsAutoClosed
-extern __typeof (htmlIsAutoClosed) htmlIsAutoClosed
__attribute((alias("htmlIsAutoClosed__internal_alias")));
-#else
-#ifndef htmlIsAutoClosed
-extern __typeof (htmlIsAutoClosed) htmlIsAutoClosed__internal_alias
__attribute((visibility("hidden")));
-#define htmlIsAutoClosed htmlIsAutoClosed__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlIsBooleanAttr
-extern __typeof (htmlIsBooleanAttr) htmlIsBooleanAttr
__attribute((alias("htmlIsBooleanAttr__internal_alias")));
-#else
-#ifndef htmlIsBooleanAttr
-extern __typeof (htmlIsBooleanAttr) htmlIsBooleanAttr__internal_alias
__attribute((visibility("hidden")));
-#define htmlIsBooleanAttr htmlIsBooleanAttr__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlIsScriptAttribute
-extern __typeof (htmlIsScriptAttribute) htmlIsScriptAttribute
__attribute((alias("htmlIsScriptAttribute__internal_alias")));
-#else
-#ifndef htmlIsScriptAttribute
-extern __typeof (htmlIsScriptAttribute) htmlIsScriptAttribute__internal_alias
__attribute((visibility("hidden")));
-#define htmlIsScriptAttribute htmlIsScriptAttribute__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlNewDoc
-extern __typeof (htmlNewDoc) htmlNewDoc
__attribute((alias("htmlNewDoc__internal_alias")));
-#else
-#ifndef htmlNewDoc
-extern __typeof (htmlNewDoc) htmlNewDoc__internal_alias
__attribute((visibility("hidden")));
-#define htmlNewDoc htmlNewDoc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlNewDocNoDtD
-extern __typeof (htmlNewDocNoDtD) htmlNewDocNoDtD
__attribute((alias("htmlNewDocNoDtD__internal_alias")));
-#else
-#ifndef htmlNewDocNoDtD
-extern __typeof (htmlNewDocNoDtD) htmlNewDocNoDtD__internal_alias
__attribute((visibility("hidden")));
-#define htmlNewDocNoDtD htmlNewDocNoDtD__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlNewParserCtxt
-extern __typeof (htmlNewParserCtxt) htmlNewParserCtxt
__attribute((alias("htmlNewParserCtxt__internal_alias")));
-#else
-#ifndef htmlNewParserCtxt
-extern __typeof (htmlNewParserCtxt) htmlNewParserCtxt__internal_alias
__attribute((visibility("hidden")));
-#define htmlNewParserCtxt htmlNewParserCtxt__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlNodeDump
-extern __typeof (htmlNodeDump) htmlNodeDump
__attribute((alias("htmlNodeDump__internal_alias")));
-#else
-#ifndef htmlNodeDump
-extern __typeof (htmlNodeDump) htmlNodeDump__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeDump htmlNodeDump__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlNodeDumpFile
-extern __typeof (htmlNodeDumpFile) htmlNodeDumpFile
__attribute((alias("htmlNodeDumpFile__internal_alias")));
-#else
-#ifndef htmlNodeDumpFile
-extern __typeof (htmlNodeDumpFile) htmlNodeDumpFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeDumpFile htmlNodeDumpFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlNodeDumpFileFormat
-extern __typeof (htmlNodeDumpFileFormat) htmlNodeDumpFileFormat
__attribute((alias("htmlNodeDumpFileFormat__internal_alias")));
-#else
-#ifndef htmlNodeDumpFileFormat
-extern __typeof (htmlNodeDumpFileFormat) htmlNodeDumpFileFormat__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeDumpFileFormat htmlNodeDumpFileFormat__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlNodeDumpFormatOutput
-extern __typeof (htmlNodeDumpFormatOutput) htmlNodeDumpFormatOutput
__attribute((alias("htmlNodeDumpFormatOutput__internal_alias")));
-#else
-#ifndef htmlNodeDumpFormatOutput
-extern __typeof (htmlNodeDumpFormatOutput) htmlNodeDumpFormatOutput__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeDumpFormatOutput htmlNodeDumpFormatOutput__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlNodeDumpOutput
-extern __typeof (htmlNodeDumpOutput) htmlNodeDumpOutput
__attribute((alias("htmlNodeDumpOutput__internal_alias")));
-#else
-#ifndef htmlNodeDumpOutput
-extern __typeof (htmlNodeDumpOutput) htmlNodeDumpOutput__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeDumpOutput htmlNodeDumpOutput__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlNodeStatus
-extern __typeof (htmlNodeStatus) htmlNodeStatus
__attribute((alias("htmlNodeStatus__internal_alias")));
-#else
-#ifndef htmlNodeStatus
-extern __typeof (htmlNodeStatus) htmlNodeStatus__internal_alias
__attribute((visibility("hidden")));
-#define htmlNodeStatus htmlNodeStatus__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseCharRef
-extern __typeof (htmlParseCharRef) htmlParseCharRef
__attribute((alias("htmlParseCharRef__internal_alias")));
-#else
-#ifndef htmlParseCharRef
-extern __typeof (htmlParseCharRef) htmlParseCharRef__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseCharRef htmlParseCharRef__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseChunk
-extern __typeof (htmlParseChunk) htmlParseChunk
__attribute((alias("htmlParseChunk__internal_alias")));
-#else
-#ifndef htmlParseChunk
-extern __typeof (htmlParseChunk) htmlParseChunk__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseChunk htmlParseChunk__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseDoc
-extern __typeof (htmlParseDoc) htmlParseDoc
__attribute((alias("htmlParseDoc__internal_alias")));
-#else
-#ifndef htmlParseDoc
-extern __typeof (htmlParseDoc) htmlParseDoc__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseDoc htmlParseDoc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseDocument
-extern __typeof (htmlParseDocument) htmlParseDocument
__attribute((alias("htmlParseDocument__internal_alias")));
-#else
-#ifndef htmlParseDocument
-extern __typeof (htmlParseDocument) htmlParseDocument__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseDocument htmlParseDocument__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseElement
-extern __typeof (htmlParseElement) htmlParseElement
__attribute((alias("htmlParseElement__internal_alias")));
-#else
-#ifndef htmlParseElement
-extern __typeof (htmlParseElement) htmlParseElement__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseElement htmlParseElement__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseEntityRef
-extern __typeof (htmlParseEntityRef) htmlParseEntityRef
__attribute((alias("htmlParseEntityRef__internal_alias")));
-#else
-#ifndef htmlParseEntityRef
-extern __typeof (htmlParseEntityRef) htmlParseEntityRef__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseEntityRef htmlParseEntityRef__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlParseFile
-extern __typeof (htmlParseFile) htmlParseFile
__attribute((alias("htmlParseFile__internal_alias")));
-#else
-#ifndef htmlParseFile
-extern __typeof (htmlParseFile) htmlParseFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlParseFile htmlParseFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlReadDoc
-extern __typeof (htmlReadDoc) htmlReadDoc
__attribute((alias("htmlReadDoc__internal_alias")));
-#else
-#ifndef htmlReadDoc
-extern __typeof (htmlReadDoc) htmlReadDoc__internal_alias
__attribute((visibility("hidden")));
-#define htmlReadDoc htmlReadDoc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlReadFd
-extern __typeof (htmlReadFd) htmlReadFd
__attribute((alias("htmlReadFd__internal_alias")));
-#else
-#ifndef htmlReadFd
-extern __typeof (htmlReadFd) htmlReadFd__internal_alias
__attribute((visibility("hidden")));
-#define htmlReadFd htmlReadFd__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlReadFile
-extern __typeof (htmlReadFile) htmlReadFile
__attribute((alias("htmlReadFile__internal_alias")));
-#else
-#ifndef htmlReadFile
-extern __typeof (htmlReadFile) htmlReadFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlReadFile htmlReadFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlReadIO
-extern __typeof (htmlReadIO) htmlReadIO
__attribute((alias("htmlReadIO__internal_alias")));
-#else
-#ifndef htmlReadIO
-extern __typeof (htmlReadIO) htmlReadIO__internal_alias
__attribute((visibility("hidden")));
-#define htmlReadIO htmlReadIO__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlReadMemory
-extern __typeof (htmlReadMemory) htmlReadMemory
__attribute((alias("htmlReadMemory__internal_alias")));
-#else
-#ifndef htmlReadMemory
-extern __typeof (htmlReadMemory) htmlReadMemory__internal_alias
__attribute((visibility("hidden")));
-#define htmlReadMemory htmlReadMemory__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlSAXParseDoc
-extern __typeof (htmlSAXParseDoc) htmlSAXParseDoc
__attribute((alias("htmlSAXParseDoc__internal_alias")));
-#else
-#ifndef htmlSAXParseDoc
-extern __typeof (htmlSAXParseDoc) htmlSAXParseDoc__internal_alias
__attribute((visibility("hidden")));
-#define htmlSAXParseDoc htmlSAXParseDoc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlSAXParseFile
-extern __typeof (htmlSAXParseFile) htmlSAXParseFile
__attribute((alias("htmlSAXParseFile__internal_alias")));
-#else
-#ifndef htmlSAXParseFile
-extern __typeof (htmlSAXParseFile) htmlSAXParseFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlSAXParseFile htmlSAXParseFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlSaveFile
-extern __typeof (htmlSaveFile) htmlSaveFile
__attribute((alias("htmlSaveFile__internal_alias")));
-#else
-#ifndef htmlSaveFile
-extern __typeof (htmlSaveFile) htmlSaveFile__internal_alias
__attribute((visibility("hidden")));
-#define htmlSaveFile htmlSaveFile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlSaveFileEnc
-extern __typeof (htmlSaveFileEnc) htmlSaveFileEnc
__attribute((alias("htmlSaveFileEnc__internal_alias")));
-#else
-#ifndef htmlSaveFileEnc
-extern __typeof (htmlSaveFileEnc) htmlSaveFileEnc__internal_alias
__attribute((visibility("hidden")));
-#define htmlSaveFileEnc htmlSaveFileEnc__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlSaveFileFormat
-extern __typeof (htmlSaveFileFormat) htmlSaveFileFormat
__attribute((alias("htmlSaveFileFormat__internal_alias")));
-#else
-#ifndef htmlSaveFileFormat
-extern __typeof (htmlSaveFileFormat) htmlSaveFileFormat__internal_alias
__attribute((visibility("hidden")));
-#define htmlSaveFileFormat htmlSaveFileFormat__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLtree
-#undef htmlSetMetaEncoding
-extern __typeof (htmlSetMetaEncoding) htmlSetMetaEncoding
__attribute((alias("htmlSetMetaEncoding__internal_alias")));
-#else
-#ifndef htmlSetMetaEncoding
-extern __typeof (htmlSetMetaEncoding) htmlSetMetaEncoding__internal_alias
__attribute((visibility("hidden")));
-#define htmlSetMetaEncoding htmlSetMetaEncoding__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_HTML_ENABLED)
-#ifdef bottom_HTMLparser
-#undef htmlTagLookup
-extern __typeof (htmlTagLookup) htmlTagLookup
__attribute((alias("htmlTagLookup__internal_alias")));
-#else
-#ifndef htmlTagLookup
-extern __typeof (htmlTagLookup) htmlTagLookup__internal_alias
__attribute((visibility("hidden")));
-#define htmlTagLookup htmlTagLookup__internal_alias
-#endif
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef inputPop
-extern __typeof (inputPop) inputPop
__attribute((alias("inputPop__internal_alias")));
-#else
-#ifndef inputPop
-extern __typeof (inputPop) inputPop__internal_alias
__attribute((visibility("hidden")));
-#define inputPop inputPop__internal_alias
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef inputPush
-extern __typeof (inputPush) inputPush
__attribute((alias("inputPush__internal_alias")));
-#else
-#ifndef inputPush
-extern __typeof (inputPush) inputPush__internal_alias
__attribute((visibility("hidden")));
-#define inputPush inputPush__internal_alias
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef namePop
-extern __typeof (namePop) namePop
__attribute((alias("namePop__internal_alias")));
-#else
-#ifndef namePop
-extern __typeof (namePop) namePop__internal_alias
__attribute((visibility("hidden")));
-#define namePop namePop__internal_alias
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef namePush
-extern __typeof (namePush) namePush
__attribute((alias("namePush__internal_alias")));
-#else
-#ifndef namePush
-extern __typeof (namePush) namePush__internal_alias
__attribute((visibility("hidden")));
-#define namePush namePush__internal_alias
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef nodePop
-extern __typeof (nodePop) nodePop
__attribute((alias("nodePop__internal_alias")));
-#else
-#ifndef nodePop
-extern __typeof (nodePop) nodePop__internal_alias
__attribute((visibility("hidden")));
-#define nodePop nodePop__internal_alias
-#endif
-#endif
-
-#ifdef bottom_parser
-#undef nodePush
-extern __typeof (nodePush) nodePush
__attribute((alias("nodePush__internal_alias")));
-#else
-#ifndef nodePush
-extern __typeof (nodePush) nodePush__internal_alias
__attribute((visibility("hidden")));
-#define nodePush nodePush__internal_alias
-#endif
-#endif
-
-#if defined(LIBXML_XPATH_ENABLED)
-#ifdef bottom_xpath
-#undef valuePop
-extern __typeof (valuePop) valuePop
__attribute((alias("valuePop__internal_alias")));
-#else
-#ifndef valuePop
-extern __typeof (valuePop) valuePop__internal_alias
__attribute((visibility("hidden")));
-#define valuePop valuePop__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_XPATH_ENABLED)
-#ifdef bottom_xpath
-#undef valuePush
-extern __typeof (valuePush) valuePush
__attribute((alias("valuePush__internal_alias")));
-#else
-#ifndef valuePush
-extern __typeof (valuePush) valuePush__internal_alias
__attribute((visibility("hidden")));
-#define valuePush valuePush__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogAdd
-extern __typeof (xmlACatalogAdd) xmlACatalogAdd
__attribute((alias("xmlACatalogAdd__internal_alias")));
-#else
-#ifndef xmlACatalogAdd
-extern __typeof (xmlACatalogAdd) xmlACatalogAdd__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogAdd xmlACatalogAdd__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogDump
-extern __typeof (xmlACatalogDump) xmlACatalogDump
__attribute((alias("xmlACatalogDump__internal_alias")));
-#else
-#ifndef xmlACatalogDump
-extern __typeof (xmlACatalogDump) xmlACatalogDump__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogDump xmlACatalogDump__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogRemove
-extern __typeof (xmlACatalogRemove) xmlACatalogRemove
__attribute((alias("xmlACatalogRemove__internal_alias")));
-#else
-#ifndef xmlACatalogRemove
-extern __typeof (xmlACatalogRemove) xmlACatalogRemove__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogRemove xmlACatalogRemove__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogResolve
-extern __typeof (xmlACatalogResolve) xmlACatalogResolve
__attribute((alias("xmlACatalogResolve__internal_alias")));
-#else
-#ifndef xmlACatalogResolve
-extern __typeof (xmlACatalogResolve) xmlACatalogResolve__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogResolve xmlACatalogResolve__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogResolvePublic
-extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic
__attribute((alias("xmlACatalogResolvePublic__internal_alias")));
-#else
-#ifndef xmlACatalogResolvePublic
-extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogResolvePublic xmlACatalogResolvePublic__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogResolveSystem
-extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem
__attribute((alias("xmlACatalogResolveSystem__internal_alias")));
-#else
-#ifndef xmlACatalogResolveSystem
-extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogResolveSystem xmlACatalogResolveSystem__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_CATALOG_ENABLED)
-#ifdef bottom_catalog
-#undef xmlACatalogResolveURI
-extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI
__attribute((alias("xmlACatalogResolveURI__internal_alias")));
-#else
-#ifndef xmlACatalogResolveURI
-extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI__internal_alias
__attribute((visibility("hidden")));
-#define xmlACatalogResolveURI xmlACatalogResolveURI__internal_alias
-#endif
-#endif
-#endif
-
-#ifdef bottom_valid
-#undef xmlAddAttributeDecl
-extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl
__attribute((alias("xmlAddAttributeDecl__internal_alias")));
-#else
-#ifndef xmlAddAttributeDecl
-extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddAttributeDecl xmlAddAttributeDecl__internal_alias
-#endif
-#endif
-
-#ifdef bottom_tree
-#undef xmlAddChild
-extern __typeof (xmlAddChild) xmlAddChild
__attribute((alias("xmlAddChild__internal_alias")));
-#else
-#ifndef xmlAddChild
-extern __typeof (xmlAddChild) xmlAddChild__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddChild xmlAddChild__internal_alias
-#endif
-#endif
-
-#ifdef bottom_tree
-#undef xmlAddChildList
-extern __typeof (xmlAddChildList) xmlAddChildList
__attribute((alias("xmlAddChildList__internal_alias")));
-#else
-#ifndef xmlAddChildList
-extern __typeof (xmlAddChildList) xmlAddChildList__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddChildList xmlAddChildList__internal_alias
-#endif
-#endif
-
-#ifdef bottom_entities
-#undef xmlAddDocEntity
-extern __typeof (xmlAddDocEntity) xmlAddDocEntity
__attribute((alias("xmlAddDocEntity__internal_alias")));
-#else
-#ifndef xmlAddDocEntity
-extern __typeof (xmlAddDocEntity) xmlAddDocEntity__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddDocEntity xmlAddDocEntity__internal_alias
-#endif
-#endif
-
-#ifdef bottom_entities
-#undef xmlAddDtdEntity
-extern __typeof (xmlAddDtdEntity) xmlAddDtdEntity
__attribute((alias("xmlAddDtdEntity__internal_alias")));
-#else
-#ifndef xmlAddDtdEntity
-extern __typeof (xmlAddDtdEntity) xmlAddDtdEntity__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddDtdEntity xmlAddDtdEntity__internal_alias
-#endif
-#endif
-
-#ifdef bottom_valid
-#undef xmlAddElementDecl
-extern __typeof (xmlAddElementDecl) xmlAddElementDecl
__attribute((alias("xmlAddElementDecl__internal_alias")));
-#else
-#ifndef xmlAddElementDecl
-extern __typeof (xmlAddElementDecl) xmlAddElementDecl__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddElementDecl xmlAddElementDecl__internal_alias
-#endif
-#endif
-
-#ifdef bottom_encoding
-#undef xmlAddEncodingAlias
-extern __typeof (xmlAddEncodingAlias) xmlAddEncodingAlias
__attribute((alias("xmlAddEncodingAlias__internal_alias")));
-#else
-#ifndef xmlAddEncodingAlias
-extern __typeof (xmlAddEncodingAlias) xmlAddEncodingAlias__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddEncodingAlias xmlAddEncodingAlias__internal_alias
-#endif
-#endif
-
-#ifdef bottom_valid
-#undef xmlAddID
-extern __typeof (xmlAddID) xmlAddID
__attribute((alias("xmlAddID__internal_alias")));
-#else
-#ifndef xmlAddID
-extern __typeof (xmlAddID) xmlAddID__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddID xmlAddID__internal_alias
-#endif
-#endif
-
-#ifdef bottom_tree
-#undef xmlAddNextSibling
-extern __typeof (xmlAddNextSibling) xmlAddNextSibling
__attribute((alias("xmlAddNextSibling__internal_alias")));
-#else
-#ifndef xmlAddNextSibling
-extern __typeof (xmlAddNextSibling) xmlAddNextSibling__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddNextSibling xmlAddNextSibling__internal_alias
-#endif
-#endif
-
-#ifdef bottom_valid
-#undef xmlAddNotationDecl
-extern __typeof (xmlAddNotationDecl) xmlAddNotationDecl
__attribute((alias("xmlAddNotationDecl__internal_alias")));
-#else
-#ifndef xmlAddNotationDecl
-extern __typeof (xmlAddNotationDecl) xmlAddNotationDecl__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddNotationDecl xmlAddNotationDecl__internal_alias
-#endif
-#endif
-
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) ||
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
-#ifdef bottom_tree
-#undef xmlAddPrevSibling
-extern __typeof (xmlAddPrevSibling) xmlAddPrevSibling
__attribute((alias("xmlAddPrevSibling__internal_alias")));
-#else
-#ifndef xmlAddPrevSibling
-extern __typeof (xmlAddPrevSibling) xmlAddPrevSibling__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddPrevSibling xmlAddPrevSibling__internal_alias
-#endif
-#endif
-#endif
-
-#ifdef bottom_valid
-#undef xmlAddRef
-extern __typeof (xmlAddRef) xmlAddRef
__attribute((alias("xmlAddRef__internal_alias")));
-#else
-#ifndef xmlAddRef
-extern __typeof (xmlAddRef) xmlAddRef__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddRef xmlAddRef__internal_alias
-#endif
-#endif
-
-#ifdef bottom_tree
-#undef xmlAddSibling
-extern __typeof (xmlAddSibling) xmlAddSibling
__attribute((alias("xmlAddSibling__internal_alias")));
-#else
-#ifndef xmlAddSibling
-extern __typeof (xmlAddSibling) xmlAddSibling__internal_alias
__attribute((visibility("hidden")));
-#define xmlAddSibling xmlAddSibling__internal_alias
-#endif
-#endif
-
-#if defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_xmlIO
-#undef xmlAllocOutputBuffer
-extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer
__attribute((alias("xmlAllocOutputBuffer__internal_alias")));
-#else
-#ifndef xmlAllocOutputBuffer
-extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer__internal_alias
__attribute((visibility("hidden")));
-#define xmlAllocOutputBuffer xmlAllocOutputBuffer__internal_alias
-#endif
-#endif
-#endif
-
-#ifdef bottom_xmlIO
-#undef xmlAllocParserInputBuffer
-extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer
__attribute((alias("xmlAllocParserInputBuffer__internal_alias")));
-#else
-#ifndef xmlAllocParserInputBuffer
-extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer__internal_alias
__attribute((visibility("hidden")));
-#define xmlAllocParserInputBuffer xmlAllocParserInputBuffer__internal_alias
-#endif
-#endif
-
-#if defined(LIBXML_OUTPUT_ENABLED)
-#ifdef bottom_xmlsave
-#undef xmlAttrSerializeTxtContent
-extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent
__attribute((alias("xmlAttrSerializeTxtContent__internal_alias")));
-#else
-#ifndef xmlAttrSerializeTxtContent
-extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent__internal_alias
__attribute((visibility("hidden")));
-#define xmlAttrSerializeTxtContent xmlAttrSerializeTxtContent__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataCompile
-extern __typeof (xmlAutomataCompile) xmlAutomataCompile
__attribute((alias("xmlAutomataCompile__internal_alias")));
-#else
-#ifndef xmlAutomataCompile
-extern __typeof (xmlAutomataCompile) xmlAutomataCompile__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataCompile xmlAutomataCompile__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataGetInitState
-extern __typeof (xmlAutomataGetInitState) xmlAutomataGetInitState
__attribute((alias("xmlAutomataGetInitState__internal_alias")));
-#else
-#ifndef xmlAutomataGetInitState
-extern __typeof (xmlAutomataGetInitState) xmlAutomataGetInitState__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataGetInitState xmlAutomataGetInitState__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataIsDeterminist
-extern __typeof (xmlAutomataIsDeterminist) xmlAutomataIsDeterminist
__attribute((alias("xmlAutomataIsDeterminist__internal_alias")));
-#else
-#ifndef xmlAutomataIsDeterminist
-extern __typeof (xmlAutomataIsDeterminist) xmlAutomataIsDeterminist__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataIsDeterminist xmlAutomataIsDeterminist__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataNewAllTrans
-extern __typeof (xmlAutomataNewAllTrans) xmlAutomataNewAllTrans
__attribute((alias("xmlAutomataNewAllTrans__internal_alias")));
-#else
-#ifndef xmlAutomataNewAllTrans
-extern __typeof (xmlAutomataNewAllTrans) xmlAutomataNewAllTrans__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataNewAllTrans xmlAutomataNewAllTrans__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataNewCountTrans
-extern __typeof (xmlAutomataNewCountTrans) xmlAutomataNewCountTrans
__attribute((alias("xmlAutomataNewCountTrans__internal_alias")));
-#else
-#ifndef xmlAutomataNewCountTrans
-extern __typeof (xmlAutomataNewCountTrans) xmlAutomataNewCountTrans__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataNewCountTrans xmlAutomataNewCountTrans__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataNewCountTrans2
-extern __typeof (xmlAutomataNewCountTrans2) xmlAutomataNewCountTrans2
__attribute((alias("xmlAutomataNewCountTrans2__internal_alias")));
-#else
-#ifndef xmlAutomataNewCountTrans2
-extern __typeof (xmlAutomataNewCountTrans2) xmlAutomataNewCountTrans2__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataNewCountTrans2 xmlAutomataNewCountTrans2__internal_alias
-#endif
-#endif
-#endif
-
-#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
-#ifdef bottom_xmlregexp
-#undef xmlAutomataNewCountedTrans
-extern __typeof (xmlAutomataNewCountedTrans) xmlAutomataNewCountedTrans
__attribute((alias("xmlAutomataNewCountedTrans__internal_alias")));
-#else
-#ifndef xmlAutomataNewCountedTrans
-extern __typeof (xmlAutomataNewCountedTrans) xmlAutomataNewCountedTrans__internal_alias
__attribute((visibility("hidden")));
-#define xmlAutomataNewCountedTrans xmlAutomataNewCountedTrans__internal_alias
-#endif
... 23900 lines suppressed ...