Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 6f28f70

Browse files
committed
[[ libxml ]] Update libxml to version 2.9.4
1 parent 75439a4 commit 6f28f70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3385
-2112
lines changed

libxml/ORIGIN

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Files in this folder are based on libxml2-2.6.23
1+
Files in this folder are based on libxml2-2.9.4
22

3-
Original source archives are available from <http://www.xmlsoft.org/>
3+
Original source archives are available from <http://www.xmlsoft.org/>

libxml/include/libxml/SAX2.h

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,95 +23,97 @@ extern "C" {
2323
#endif
2424
XMLPUBFUN const xmlChar * XMLCALL
2525
xmlSAX2GetPublicId (void *ctx);
26-
XMLPUBFUN const xmlChar * XMLCALL
26+
XMLPUBFUN const xmlChar * XMLCALL
2727
xmlSAX2GetSystemId (void *ctx);
28-
XMLPUBFUN void XMLCALL
28+
XMLPUBFUN void XMLCALL
2929
xmlSAX2SetDocumentLocator (void *ctx,
3030
xmlSAXLocatorPtr loc);
31-
32-
XMLPUBFUN int XMLCALL
31+
32+
XMLPUBFUN int XMLCALL
3333
xmlSAX2GetLineNumber (void *ctx);
34-
XMLPUBFUN int XMLCALL
34+
XMLPUBFUN int XMLCALL
3535
xmlSAX2GetColumnNumber (void *ctx);
3636

37-
XMLPUBFUN int XMLCALL
37+
XMLPUBFUN int XMLCALL
3838
xmlSAX2IsStandalone (void *ctx);
39-
XMLPUBFUN int XMLCALL
39+
XMLPUBFUN int XMLCALL
4040
xmlSAX2HasInternalSubset (void *ctx);
41-
XMLPUBFUN int XMLCALL
41+
XMLPUBFUN int XMLCALL
4242
xmlSAX2HasExternalSubset (void *ctx);
4343

44-
XMLPUBFUN void XMLCALL
44+
XMLPUBFUN void XMLCALL
4545
xmlSAX2InternalSubset (void *ctx,
4646
const xmlChar *name,
4747
const xmlChar *ExternalID,
4848
const xmlChar *SystemID);
49-
XMLPUBFUN void XMLCALL
49+
XMLPUBFUN void XMLCALL
5050
xmlSAX2ExternalSubset (void *ctx,
5151
const xmlChar *name,
5252
const xmlChar *ExternalID,
5353
const xmlChar *SystemID);
54-
XMLPUBFUN xmlEntityPtr XMLCALL
54+
XMLPUBFUN xmlEntityPtr XMLCALL
5555
xmlSAX2GetEntity (void *ctx,
5656
const xmlChar *name);
57-
XMLPUBFUN xmlEntityPtr XMLCALL
57+
XMLPUBFUN xmlEntityPtr XMLCALL
5858
xmlSAX2GetParameterEntity (void *ctx,
5959
const xmlChar *name);
60-
XMLPUBFUN xmlParserInputPtr XMLCALL
60+
XMLPUBFUN xmlParserInputPtr XMLCALL
6161
xmlSAX2ResolveEntity (void *ctx,
6262
const xmlChar *publicId,
6363
const xmlChar *systemId);
6464

65-
XMLPUBFUN void XMLCALL
65+
XMLPUBFUN void XMLCALL
6666
xmlSAX2EntityDecl (void *ctx,
6767
const xmlChar *name,
6868
int type,
6969
const xmlChar *publicId,
7070
const xmlChar *systemId,
7171
xmlChar *content);
72-
XMLPUBFUN void XMLCALL
72+
XMLPUBFUN void XMLCALL
7373
xmlSAX2AttributeDecl (void *ctx,
7474
const xmlChar *elem,
7575
const xmlChar *fullname,
7676
int type,
7777
int def,
7878
const xmlChar *defaultValue,
7979
xmlEnumerationPtr tree);
80-
XMLPUBFUN void XMLCALL
80+
XMLPUBFUN void XMLCALL
8181
xmlSAX2ElementDecl (void *ctx,
8282
const xmlChar *name,
8383
int type,
8484
xmlElementContentPtr content);
85-
XMLPUBFUN void XMLCALL
85+
XMLPUBFUN void XMLCALL
8686
xmlSAX2NotationDecl (void *ctx,
8787
const xmlChar *name,
8888
const xmlChar *publicId,
8989
const xmlChar *systemId);
90-
XMLPUBFUN void XMLCALL
90+
XMLPUBFUN void XMLCALL
9191
xmlSAX2UnparsedEntityDecl (void *ctx,
9292
const xmlChar *name,
9393
const xmlChar *publicId,
9494
const xmlChar *systemId,
9595
const xmlChar *notationName);
9696

97-
XMLPUBFUN void XMLCALL
97+
XMLPUBFUN void XMLCALL
9898
xmlSAX2StartDocument (void *ctx);
99-
XMLPUBFUN void XMLCALL
99+
XMLPUBFUN void XMLCALL
100100
xmlSAX2EndDocument (void *ctx);
101-
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
102-
XMLPUBFUN void XMLCALL
101+
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
102+
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
103+
defined(LIBXML_LEGACY_ENABLED)
104+
XMLPUBFUN void XMLCALL
103105
xmlSAX2StartElement (void *ctx,
104106
const xmlChar *fullname,
105107
const xmlChar **atts);
106108
// HS-2010-06-09: [[ Bug 7586 ]] Prevent libxml2 from trying to create name spaces
107-
XMLPUBFUN void XMLCALL
109+
XMLPUBFUN void XMLCALL
108110
xmlSAX2StartElementNoNS (void *ctx,
109111
const xmlChar *fullname,
110112
const xmlChar **atts);
111-
XMLPUBFUN void XMLCALL
113+
XMLPUBFUN void XMLCALL
112114
xmlSAX2EndElement (void *ctx,
113115
const xmlChar *name);
114-
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
116+
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
115117
XMLPUBFUN void XMLCALL
116118
xmlSAX2StartElementNs (void *ctx,
117119
const xmlChar *localname,
@@ -127,25 +129,25 @@ XMLPUBFUN void XMLCALL
127129
const xmlChar *localname,
128130
const xmlChar *prefix,
129131
const xmlChar *URI);
130-
XMLPUBFUN void XMLCALL
132+
XMLPUBFUN void XMLCALL
131133
xmlSAX2Reference (void *ctx,
132134
const xmlChar *name);
133-
XMLPUBFUN void XMLCALL
135+
XMLPUBFUN void XMLCALL
134136
xmlSAX2Characters (void *ctx,
135137
const xmlChar *ch,
136138
int len);
137-
XMLPUBFUN void XMLCALL
139+
XMLPUBFUN void XMLCALL
138140
xmlSAX2IgnorableWhitespace (void *ctx,
139141
const xmlChar *ch,
140142
int len);
141-
XMLPUBFUN void XMLCALL
143+
XMLPUBFUN void XMLCALL
142144
xmlSAX2ProcessingInstruction (void *ctx,
143145
const xmlChar *target,
144146
const xmlChar *data);
145-
XMLPUBFUN void XMLCALL
147+
XMLPUBFUN void XMLCALL
146148
xmlSAX2Comment (void *ctx,
147149
const xmlChar *value);
148-
XMLPUBFUN void XMLCALL
150+
XMLPUBFUN void XMLCALL
149151
xmlSAX2CDataBlock (void *ctx,
150152
const xmlChar *value,
151153
int len);
@@ -158,22 +160,22 @@ XMLPUBFUN int XMLCALL
158160
XMLPUBFUN int XMLCALL
159161
xmlSAXVersion (xmlSAXHandler *hdlr,
160162
int version);
161-
XMLPUBFUN void XMLCALL
163+
XMLPUBFUN void XMLCALL
162164
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
163165
int warning);
164166
#ifdef LIBXML_HTML_ENABLED
165-
XMLPUBFUN void XMLCALL
167+
XMLPUBFUN void XMLCALL
166168
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
167-
XMLPUBFUN void XMLCALL
169+
XMLPUBFUN void XMLCALL
168170
htmlDefaultSAXHandlerInit (void);
169171
#endif
170172
#ifdef LIBXML_DOCB_ENABLED
171-
XMLPUBFUN void XMLCALL
173+
XMLPUBFUN void XMLCALL
172174
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
173-
XMLPUBFUN void XMLCALL
175+
XMLPUBFUN void XMLCALL
174176
docbDefaultSAXHandlerInit (void);
175177
#endif
176-
XMLPUBFUN void XMLCALL
178+
XMLPUBFUN void XMLCALL
177179
xmlDefaultSAXHandlerInit (void);
178180
#ifdef __cplusplus
179181
}

libxml/include/libxml/dict.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Summary: string dictionnary
2+
* Summary: string dictionary
33
* Description: dictionary of reusable strings, just used to avoid allocation
44
* and freeing operations.
55
*
@@ -11,6 +11,18 @@
1111
#ifndef __XML_DICT_H__
1212
#define __XML_DICT_H__
1313

14+
#ifdef __cplusplus
15+
#define __XML_EXTERNC extern "C"
16+
#else
17+
#define __XML_EXTERNC
18+
#endif
19+
20+
/*
21+
* The dictionary.
22+
*/
23+
__XML_EXTERNC typedef struct _xmlDict xmlDict;
24+
__XML_EXTERNC typedef xmlDict *xmlDictPtr;
25+
1426
#include <limits.h>
1527
#include <libxml/xmlversion.h>
1628
#include <libxml/tree.h>
@@ -19,14 +31,6 @@
1931
extern "C" {
2032
#endif
2133

22-
// typedef unsigned int uint32_t;
23-
24-
/*
25-
* The dictionnary.
26-
*/
27-
typedef struct _xmlDict xmlDict;
28-
typedef xmlDict *xmlDictPtr;
29-
3034
/*
3135
* Initializer
3236
*/
@@ -50,7 +54,7 @@ XMLPUBFUN void XMLCALL
5054
xmlDictFree (xmlDictPtr dict);
5155

5256
/*
53-
* Lookup of entry in the dictionnary.
57+
* Lookup of entry in the dictionary.
5458
*/
5559
XMLPUBFUN const xmlChar * XMLCALL
5660
xmlDictLookup (xmlDictPtr dict,

libxml/include/libxml/entities.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct _xmlEntity {
5757
const xmlChar *URI; /* the full URI as computed */
5858
int owner; /* does the entity own the childrens */
5959
int checked; /* was the entity content checked */
60-
/* this is also used to count entites
60+
/* this is also used to count entities
6161
* references done from that entity
6262
* and if it contains '<' */
6363
};
@@ -103,7 +103,7 @@ XMLPUBFUN xmlEntityPtr XMLCALL
103103
XMLPUBFUN xmlEntityPtr XMLCALL
104104
xmlGetPredefinedEntity (const xmlChar *name);
105105
XMLPUBFUN xmlEntityPtr XMLCALL
106-
xmlGetDocEntity (xmlDocPtr doc,
106+
xmlGetDocEntity (const xmlDoc *doc,
107107
const xmlChar *name);
108108
XMLPUBFUN xmlEntityPtr XMLCALL
109109
xmlGetDtdEntity (xmlDocPtr doc,
@@ -120,7 +120,7 @@ XMLPUBFUN xmlChar * XMLCALL
120120
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
121121
const xmlChar *input);
122122
XMLPUBFUN xmlChar * XMLCALL
123-
xmlEncodeSpecialChars (xmlDocPtr doc,
123+
xmlEncodeSpecialChars (const xmlDoc *doc,
124124
const xmlChar *input);
125125
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
126126
xmlCreateEntitiesTable (void);

libxml/include/libxml/globals.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
3939
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
4040
* method was found.
4141
*/
42-
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
42+
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,
43+
xmlCharEncoding enc);
44+
4345

4446
/**
4547
* xmlOutputBufferCreateFilenameFunc:
@@ -52,7 +54,9 @@ typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const
5254
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
5355
* method was found.
5456
*/
55-
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
57+
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,
58+
xmlCharEncodingHandlerPtr encoder,
59+
int compression);
5660

5761
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
5862
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
@@ -185,7 +189,8 @@ XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregi
185189
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
186190
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
187191
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
188-
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
192+
xmlThrDefParserInputBufferCreateFilenameDefault(
193+
xmlParserInputBufferCreateFilenameFunc func);
189194

190195
/** DOC_DISABLE */
191196
/*
@@ -297,7 +302,8 @@ XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
297302
#else
298303
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
299304
#endif
300-
XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
305+
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
306+
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
301307

302308
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
303309
#ifdef LIBXML_THREAD_ENABLED
@@ -479,7 +485,8 @@ XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
479485
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
480486
#endif
481487

482-
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
488+
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
489+
__xmlParserInputBufferCreateFilenameValue(void);
483490
#ifdef LIBXML_THREAD_ENABLED
484491
#define xmlParserInputBufferCreateFilenameValue \
485492
(*(__xmlParserInputBufferCreateFilenameValue()))

libxml/include/libxml/parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ struct _xmlParserCtxt {
260260
void *catalogs; /* document's own catalog */
261261
int recovery; /* run in recovery mode */
262262
int progressive; /* is this a progressive parsing */
263-
xmlDictPtr dict; /* dictionnary for the parser */
263+
xmlDictPtr dict; /* dictionary for the parser */
264264
const xmlChar * *atts; /* array for the attributes callbacks */
265265
int maxatts; /* the size of the array */
266266
int docdict; /* use strings from dict to build tree */
@@ -1115,7 +1115,7 @@ typedef enum {
11151115
XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
11161116
XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
11171117
XML_PARSE_NONET = 1<<11,/* Forbid network access */
1118-
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
1118+
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
11191119
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
11201120
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
11211121
XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */

libxml/include/libxml/parserInternals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ XMLPUBFUN void XMLCALL
351351
xmlParserErrors xmlerr,
352352
const char *msg,
353353
const xmlChar * str1,
354-
const xmlChar * str2);
354+
const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0);
355355
#endif
356356

357357
/**

libxml/include/libxml/relaxng.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
3232
*
3333
* Signature of an error callback from a Relax-NG validation
3434
*/
35-
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
35+
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
36+
const char *msg,
37+
...) LIBXML_ATTR_FORMAT(2,3);
3638

3739
/**
3840
* xmlRelaxNGValidityWarningFunc:
@@ -42,7 +44,9 @@ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg
4244
*
4345
* Signature of a warning callback from a Relax-NG validation
4446
*/
45-
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
47+
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
48+
const char *msg,
49+
...) LIBXML_ATTR_FORMAT(2,3);
4650

4751
/**
4852
* A schemas validation context

0 commit comments

Comments
 (0)