summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2023-05-04 13:15:21 +0200
committerMichael BrĂ¼ning <michael.bruning@qt.io>2023-05-05 07:37:00 +0000
commitb3010ad699b05b928359e7bd27cc623f789b6f12 (patch)
tree8dd9dcde540eff80f4530037ec1ab7d2b7338ef6
parent49fb5fe113f79575614e5dd183e05222c7749c75 (diff)
downloadqtwebengine-chromium-b3010ad699b05b928359e7bd27cc623f789b6f12.tar.gz
[Backport] CVE-2023-29469 / Security bug 1433328
Manual roll of libxml to include cherry-picked security fix. Originally reviewed on: https://chromium-review.googlesource.com/c/chromium/src/+/4457227 Change-Id: If4241792fd07d82d57ecd4b82b928f070a1c43e0 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/475993 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--chromium/third_party/libxml/BUILD.gn5
-rw-r--r--chromium/third_party/libxml/README.chromium11
-rw-r--r--chromium/third_party/libxml/chromium/libxml_utils.cc2
-rw-r--r--chromium/third_party/libxml/chromium/libxml_utils.h2
-rwxr-xr-xchromium/third_party/libxml/chromium/roll.py11
-rw-r--r--chromium/third_party/libxml/chromium/undo-sax-deprecation.patch6
-rw-r--r--chromium/third_party/libxml/chromium/xml_reader.cc2
-rw-r--r--chromium/third_party/libxml/chromium/xml_reader.h2
-rw-r--r--chromium/third_party/libxml/chromium/xml_writer.cc2
-rw-r--r--chromium/third_party/libxml/chromium/xml_writer.h2
-rw-r--r--chromium/third_party/libxml/libxml_visibility.gni2
-rw-r--r--chromium/third_party/libxml/linux/config.h4
-rw-r--r--chromium/third_party/libxml/linux/include/libxml/xmlversion.h31
-rw-r--r--chromium/third_party/libxml/linux/include/private/Makefile545
-rw-r--r--chromium/third_party/libxml/linux/xstc/Makefile657
-rw-r--r--chromium/third_party/libxml/mac/config.h4
-rw-r--r--chromium/third_party/libxml/mac/include/libxml/xmlversion.h31
-rw-r--r--chromium/third_party/libxml/src/CMakeLists.txt17
-rw-r--r--chromium/third_party/libxml/src/HTMLparser.c180
-rw-r--r--chromium/third_party/libxml/src/HTMLtree.c11
-rw-r--r--chromium/third_party/libxml/src/Makefile.am24
-rw-r--r--chromium/third_party/libxml/src/NEWS41
-rw-r--r--chromium/third_party/libxml/src/README.md14
-rw-r--r--chromium/third_party/libxml/src/SAX2.c72
-rw-r--r--chromium/third_party/libxml/src/buf.c61
-rwxr-xr-xchromium/third_party/libxml/src/check-relaxng-test-suite.py2
-rwxr-xr-xchromium/third_party/libxml/src/check-relaxng-test-suite2.py2
-rwxr-xr-xchromium/third_party/libxml/src/check-xinclude-test-suite.py2
-rwxr-xr-xchromium/third_party/libxml/src/check-xml-test-suite.py2
-rwxr-xr-xchromium/third_party/libxml/src/check-xsddata-test-suite.py2
-rw-r--r--chromium/third_party/libxml/src/chvalid.c2
-rw-r--r--chromium/third_party/libxml/src/configure.ac2
-rw-r--r--chromium/third_party/libxml/src/dict.c87
-rw-r--r--chromium/third_party/libxml/src/encoding.c264
-rw-r--r--chromium/third_party/libxml/src/entities.c14
-rw-r--r--chromium/third_party/libxml/src/error.c74
-rwxr-xr-xchromium/third_party/libxml/src/genUnicode.py10
-rwxr-xr-xchromium/third_party/libxml/src/gentest.py9
-rw-r--r--chromium/third_party/libxml/src/globals.c127
-rw-r--r--chromium/third_party/libxml/src/include/libxml/HTMLparser.h82
-rw-r--r--chromium/third_party/libxml/src/include/libxml/HTMLtree.h36
-rw-r--r--chromium/third_party/libxml/src/include/libxml/SAX.h72
-rw-r--r--chromium/third_party/libxml/src/include/libxml/SAX2.h72
-rw-r--r--chromium/third_party/libxml/src/include/libxml/c14n.h8
-rw-r--r--chromium/third_party/libxml/src/include/libxml/catalog.h72
-rw-r--r--chromium/third_party/libxml/src/include/libxml/chvalid.h18
-rw-r--r--chromium/third_party/libxml/src/include/libxml/debugXML.h56
-rw-r--r--chromium/third_party/libxml/src/include/libxml/dict.h26
-rw-r--r--chromium/third_party/libxml/src/include/libxml/encoding.h38
-rw-r--r--chromium/third_party/libxml/src/include/libxml/entities.h48
-rw-r--r--chromium/third_party/libxml/src/include/libxml/globals.h116
-rw-r--r--chromium/third_party/libxml/src/include/libxml/hash.h50
-rw-r--r--chromium/third_party/libxml/src/include/libxml/list.h52
-rw-r--r--chromium/third_party/libxml/src/include/libxml/nanoftp.h44
-rw-r--r--chromium/third_party/libxml/src/include/libxml/nanohttp.h34
-rw-r--r--chromium/third_party/libxml/src/include/libxml/parser.h161
-rw-r--r--chromium/third_party/libxml/src/include/libxml/parserInternals.h176
-rw-r--r--chromium/third_party/libxml/src/include/libxml/pattern.h30
-rw-r--r--chromium/third_party/libxml/src/include/libxml/relaxng.h52
-rw-r--r--chromium/third_party/libxml/src/include/libxml/schemasInternals.h4
-rw-r--r--chromium/third_party/libxml/src/include/libxml/schematron.h36
-rw-r--r--chromium/third_party/libxml/src/include/libxml/threads.h37
-rw-r--r--chromium/third_party/libxml/src/include/libxml/tree.h328
-rw-r--r--chromium/third_party/libxml/src/include/libxml/uri.h30
-rw-r--r--chromium/third_party/libxml/src/include/libxml/valid.h144
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xinclude.h20
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xlink.h10
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlIO.h119
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlautomata.h38
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlerror.h34
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlexports.h53
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlmemory.h48
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlmodule.h8
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlreader.h174
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlregexp.h60
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlsave.h20
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlschemas.h60
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlschemastypes.h68
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlstring.h60
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlunicode.h332
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlversion.h.in29
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xmlwriter.h160
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xpath.h80
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xpathInternals.h237
-rw-r--r--chromium/third_party/libxml/src/include/libxml/xpointer.h42
-rw-r--r--chromium/third_party/libxml/src/include/private/Makefile.am4
-rw-r--r--chromium/third_party/libxml/src/include/private/Makefile.in4
-rw-r--r--chromium/third_party/libxml/src/include/private/buf.h76
-rw-r--r--chromium/third_party/libxml/src/include/private/dict.h8
-rw-r--r--chromium/third_party/libxml/src/include/private/enc.h12
-rw-r--r--chromium/third_party/libxml/src/include/private/entities.h16
-rw-r--r--chromium/third_party/libxml/src/include/private/error.h6
-rw-r--r--chromium/third_party/libxml/src/include/private/globals.h9
-rw-r--r--chromium/third_party/libxml/src/include/private/html.h3
-rw-r--r--chromium/third_party/libxml/src/include/private/io.h11
-rw-r--r--chromium/third_party/libxml/src/include/private/memory.h9
-rw-r--r--chromium/third_party/libxml/src/include/private/parser.h10
-rw-r--r--chromium/third_party/libxml/src/include/private/regexp.h3
-rw-r--r--chromium/third_party/libxml/src/include/private/save.h8
-rw-r--r--chromium/third_party/libxml/src/include/private/string.h3
-rw-r--r--chromium/third_party/libxml/src/include/private/threads.h48
-rw-r--r--chromium/third_party/libxml/src/include/private/tree.h9
-rw-r--r--chromium/third_party/libxml/src/include/private/xinclude.h9
-rw-r--r--chromium/third_party/libxml/src/include/private/xpath.h7
-rw-r--r--chromium/third_party/libxml/src/include/private/xzlib.h15
-rw-r--r--chromium/third_party/libxml/src/include/win32config.h14
-rw-r--r--chromium/third_party/libxml/src/libxml.h53
-rw-r--r--chromium/third_party/libxml/src/libxml.m4189
-rw-r--r--chromium/third_party/libxml/src/libxml2.syms2351
-rw-r--r--chromium/third_party/libxml/src/nanoftp.c2
-rw-r--r--chromium/third_party/libxml/src/nanohttp.c114
-rw-r--r--chromium/third_party/libxml/src/parser.c2322
-rw-r--r--chromium/third_party/libxml/src/parserInternals.c239
-rw-r--r--chromium/third_party/libxml/src/pattern.c22
-rw-r--r--chromium/third_party/libxml/src/runsuite.c42
-rw-r--r--chromium/third_party/libxml/src/runtest.c389
-rw-r--r--chromium/third_party/libxml/src/runxmlconf.c4
-rw-r--r--chromium/third_party/libxml/src/testModule.c30
-rw-r--r--chromium/third_party/libxml/src/testThreads.c3
-rw-r--r--chromium/third_party/libxml/src/testapi.c273
-rw-r--r--chromium/third_party/libxml/src/testchar.c28
-rw-r--r--chromium/third_party/libxml/src/testdict.c6
-rw-r--r--chromium/third_party/libxml/src/testlimits.c12
-rw-r--r--chromium/third_party/libxml/src/testrecurse.c371
-rw-r--r--chromium/third_party/libxml/src/threads.c332
-rw-r--r--chromium/third_party/libxml/src/tree.c139
-rw-r--r--chromium/third_party/libxml/src/uri.c60
-rw-r--r--chromium/third_party/libxml/src/valid.c45
-rw-r--r--chromium/third_party/libxml/src/win32/libxml2.def.src1
-rw-r--r--chromium/third_party/libxml/src/xmlIO.c145
-rw-r--r--chromium/third_party/libxml/src/xmlmemory.c179
-rw-r--r--chromium/third_party/libxml/src/xmlreader.c71
-rw-r--r--chromium/third_party/libxml/src/xmlsave.c1
-rw-r--r--chromium/third_party/libxml/src/xmlstring.c7
-rw-r--r--chromium/third_party/libxml/src/xmlwriter.c26
-rw-r--r--chromium/third_party/libxml/src/xpath.c205
-rw-r--r--chromium/third_party/libxml/win32/config.h14
-rw-r--r--chromium/third_party/libxml/win32/include/libxml/xmlversion.h31
138 files changed, 6590 insertions, 7212 deletions
diff --git a/chromium/third_party/libxml/BUILD.gn b/chromium/third_party/libxml/BUILD.gn
index 560e44975a0..242f3a73e42 100644
--- a/chromium/third_party/libxml/BUILD.gn
+++ b/chromium/third_party/libxml/BUILD.gn
@@ -1,4 +1,4 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Copyright 2013 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -79,6 +79,7 @@ config("libxml_warnings") {
}
}
+# Please keep in sync with //build/linux/unbundle/libxml.gn.
static_library("xml_reader") {
# Do not expand this visibility list without first consulting with the
# Security Team.
@@ -102,6 +103,7 @@ static_library("xml_reader") {
configs += [ ":libxml_config" ]
}
+# Please keep in sync with //build/linux/unbundle/libxml.gn.
static_library("xml_writer") {
# The XmlWriter is considered safe to use from any target.
visibility = [ "*" ]
@@ -116,6 +118,7 @@ static_library("xml_writer") {
configs += [ ":libxml_config" ]
}
+# Please keep in sync with //build/linux/unbundle/libxml.gn.
static_library("libxml_utils") {
# Do not expand this visibility list without first consulting with the
# Security Team.
diff --git a/chromium/third_party/libxml/README.chromium b/chromium/third_party/libxml/README.chromium
index 9813d7cd51b..27a4cba069d 100644
--- a/chromium/third_party/libxml/README.chromium
+++ b/chromium/third_party/libxml/README.chromium
@@ -1,7 +1,7 @@
Name: libxml
URL: http://xmlsoft.org
-Version: e85f9b98a5389c69167176ae6600091e719ec38f
-CPEPrefix: cpe:/a:xmlsoft:libxml2:2.9.13
+Version: f931178e5f46da72843c675b217db94cf9df70ee
+CPEPrefix: cpe:/a:xmlsoft:libxml2:2.11.0
License: MIT
License File: src/Copyright
Security Critical: yes
@@ -12,18 +12,13 @@ libxml2 from libxml.org.
Modifications:
-- chromium-issue-628581.patch: See https://crbug.com/628581#c18
- chromium-issue-894933.patch: Use ptrdiff_t instead of unsigned long for
pointer differences in parser.c
-- libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch:
- See https://crbug.com/708433
- libxml2-2.9.4-security-xpath-nodetab-uaf.patch: See https://crbug.com/705445
-- chromium-issue-708434.patch: Guard against input counter overflow.
-- chromium-issue-1138555.patch: Change TRUE to 1 for ICU68 which remove the
- #define of TRUE.
- undo-sax-deprecation.patch: Un-deprecate xmlSAXParseMemory because it is used
in chromium's copy of maldoca. See https://github.com/google/maldoca/issues/87
- Add helper classes in the chromium/ subdirectory.
- Delete various unused files, see chromium/roll.py
+- Cherry picked fix for CVE-2023-29469
This import was generated by the chromium/roll.py script.
diff --git a/chromium/third_party/libxml/chromium/libxml_utils.cc b/chromium/third_party/libxml/chromium/libxml_utils.cc
index 917564c3e79..f49b981060a 100644
--- a/chromium/third_party/libxml/chromium/libxml_utils.cc
+++ b/chromium/third_party/libxml/chromium/libxml_utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/chromium/libxml_utils.h b/chromium/third_party/libxml/chromium/libxml_utils.h
index 8b2383f9c8b..f1674ecf43c 100644
--- a/chromium/third_party/libxml/chromium/libxml_utils.h
+++ b/chromium/third_party/libxml/chromium/libxml_utils.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/chromium/roll.py b/chromium/third_party/libxml/chromium/roll.py
index 273dd24590b..9fc5a974802 100755
--- a/chromium/third_party/libxml/chromium/roll.py
+++ b/chromium/third_party/libxml/chromium/roll.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright 2017 The Chromium Authors. All rights reserved.
+# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -66,9 +66,7 @@ import tempfile
# e. Complete the review as usual
PATCHES = [
- 'chromium-issue-628581.patch',
'libxml2-2.9.4-security-xpath-nodetab-uaf.patch',
- 'chromium-issue-708434.patch',
'undo-sax-deprecation.patch',
]
@@ -90,6 +88,7 @@ SHARED_XML_CONFIGURE_OPTIONS = [
('--with-python', 'python=yes'),
('--with-reader', 'reader=yes'),
('--with-sax1', 'sax1=yes'),
+ ('--with-threads', 'threads=yes'),
('--with-tree', 'tree=yes'),
('--with-writer', 'writer=yes'),
('--with-xpath', 'xpath=yes'),
@@ -109,7 +108,6 @@ SHARED_XML_CONFIGURE_OPTIONS = [
('--without-regexps', 'regexps=no'),
('--without-schemas', 'schemas=no'),
('--without-schematron', 'schematron=no'),
- ('--without-threads', 'threads=no'),
('--without-valid', 'valid=no'),
('--without-xinclude', 'xinclude=no'),
('--without-xptr', 'xptr=no'),
@@ -216,6 +214,11 @@ FILES_TO_REMOVE = [
'src/xpointer.c',
'src/xstc',
'src/xzlib.c',
+ 'linux/.deps',
+ 'linux/doc',
+ 'linux/example',
+ 'linux/fuzz',
+ 'linux/python',
]
diff --git a/chromium/third_party/libxml/chromium/undo-sax-deprecation.patch b/chromium/third_party/libxml/chromium/undo-sax-deprecation.patch
index 51f68b94ab7..d618d46ceae 100644
--- a/chromium/third_party/libxml/chromium/undo-sax-deprecation.patch
+++ b/chromium/third_party/libxml/chromium/undo-sax-deprecation.patch
@@ -1,8 +1,8 @@
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
-index f96148b5..1587b9d0 100644
+index d104b874..6dc4ca9b 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
-@@ -897,7 +897,9 @@ XMLPUBFUN xmlDocPtr XMLCALL
+@@ -899,7 +899,9 @@ XMLPUBFUN xmlDocPtr
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
@@ -10,6 +10,6 @@ index f96148b5..1587b9d0 100644
+// TODO(https://github.com/google/maldoca/issues/87): Re-Deprecate this when
+// maldoca stops using xmlSAXParseMemory.
+//XML_DEPRECATED
- XMLPUBFUN xmlDocPtr XMLCALL
+ XMLPUBFUN xmlDocPtr
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
diff --git a/chromium/third_party/libxml/chromium/xml_reader.cc b/chromium/third_party/libxml/chromium/xml_reader.cc
index 65b1b2c8dee..4f15c50e692 100644
--- a/chromium/third_party/libxml/chromium/xml_reader.cc
+++ b/chromium/third_party/libxml/chromium/xml_reader.cc
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/chromium/xml_reader.h b/chromium/third_party/libxml/chromium/xml_reader.h
index d9acd782ff4..c8bf2f8025d 100644
--- a/chromium/third_party/libxml/chromium/xml_reader.h
+++ b/chromium/third_party/libxml/chromium/xml_reader.h
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/chromium/xml_writer.cc b/chromium/third_party/libxml/chromium/xml_writer.cc
index 7c58031fe2d..46bd4ff72cc 100644
--- a/chromium/third_party/libxml/chromium/xml_writer.cc
+++ b/chromium/third_party/libxml/chromium/xml_writer.cc
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/chromium/xml_writer.h b/chromium/third_party/libxml/chromium/xml_writer.h
index 9b65e759d44..f2d33d702a9 100644
--- a/chromium/third_party/libxml/chromium/xml_writer.h
+++ b/chromium/third_party/libxml/chromium/xml_writer.h
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/chromium/third_party/libxml/libxml_visibility.gni b/chromium/third_party/libxml/libxml_visibility.gni
index 6a5240276b2..dde4235abe7 100644
--- a/chromium/third_party/libxml/libxml_visibility.gni
+++ b/chromium/third_party/libxml/libxml_visibility.gni
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium Authors. All rights reserved.
+# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/chromium/third_party/libxml/linux/config.h b/chromium/third_party/libxml/linux/config.h
index 62bfa6b69e6..964ffe59e2c 100644
--- a/chromium/third_party/libxml/linux/config.h
+++ b/chromium/third_party/libxml/linux/config.h
@@ -66,8 +66,8 @@
/* Define to 1 if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
-/* Define if <pthread.h> is there */
-/* #undef HAVE_PTHREAD_H */
+/* Define to 1 if you have the <pthread.h> header file. */
+#define HAVE_PTHREAD_H /**/
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
diff --git a/chromium/third_party/libxml/linux/include/libxml/xmlversion.h b/chromium/third_party/libxml/linux/include/libxml/xmlversion.h
index ce0d40b2d5f..b6bc5b7f500 100644
--- a/chromium/third_party/libxml/linux/include/libxml/xmlversion.h
+++ b/chromium/third_party/libxml/linux/include/libxml/xmlversion.h
@@ -21,7 +21,7 @@ extern "C" {
* your library and includes mismatch
*/
#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+XMLPUBFUN void xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */
/**
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the thread support is configured in
*/
-#if 0
+#if 1
#define LIBXML_THREAD_ENABLED
#endif
@@ -440,10 +440,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif
#ifndef XML_DEPRECATED
-# ifdef IN_LIBXML
+# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
# define XML_DEPRECATED
-# else
/* Available since at least GCC 3.1 */
+# else
# define XML_DEPRECATED __attribute__((deprecated))
# endif
#endif
@@ -487,20 +487,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* is deprecated.
*/
#ifndef XML_DEPRECATED
-#define XML_DEPRECATED
+# if defined (IN_LIBXML) || !defined (_MSC_VER)
+# define XML_DEPRECATED
+/* Available since Visual Studio 2005 */
+# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_DEPRECATED __declspec(deprecated)
+# endif
#endif
/**
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
*
* Macro used to ignore pointer cast warnings that can't be worked around.
*/
-#define XML_IGNORE_FPTR_CAST_WARNINGS
+#if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
+#else
+# define XML_IGNORE_FPTR_CAST_WARNINGS
+#endif
/**
- * LIBXML_POP_WARNINGS:
+ * XML_POP_WARNINGS:
*
* Macro used to restore warnings state.
*/
-#define XML_POP_WARNINGS
+#ifndef XML_POP_WARNINGS
+# if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_POP_WARNINGS __pragma(warning(pop))
+# else
+# define XML_POP_WARNINGS
+# endif
+#endif
#endif /* __GNUC__ */
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/linux/include/private/Makefile b/chromium/third_party/libxml/linux/include/private/Makefile
new file mode 100644
index 00000000000..99296fc2296
--- /dev/null
+++ b/chromium/third_party/libxml/linux/include/private/Makefile
@@ -0,0 +1,545 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# include/private/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+VPATH = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/include/private
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/libxml2
+pkgincludedir = $(includedir)/libxml2
+pkglibdir = $(libdir)/libxml2
+pkglibexecdir = $(libexecdir)/libxml2
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-pc-linux-gnu
+host_triplet = x86_64-pc-linux-gnu
+subdir = include/private
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_try_compile2.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' aclocal-1.16
+AMTAR = $${TAR-tar}
+AM_CFLAGS = -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wno-long-long -Wno-format-extra-args
+AM_DEFAULT_VERBOSITY = 0
+AM_LDFLAGS =
+AR = ar
+AUTOCONF = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' autoconf
+AUTOHEADER = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' autoheader
+AUTOMAKE = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' automake-1.16
+AWK = gawk
+BASE_THREAD_LIBS =
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPPFLAGS =
+CSCOPE = cscope
+CTAGS = ctags
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = false
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /usr/bin/grep -E
+ETAGS = etags
+EXEEXT =
+FGREP = /usr/bin/grep -F
+FILECMD = file
+GREP = /usr/bin/grep
+ICU_CFLAGS =
+ICU_DEFS =
+ICU_LIBS = -licui18n -licuuc -licudata
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS =
+LIBM = -lm
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBXML_MAJOR_VERSION = 2
+LIBXML_MICRO_VERSION = 0
+LIBXML_MINOR_VERSION = 11
+LIBXML_VERSION = 2.11.0
+LIBXML_VERSION_EXTRA =
+LIBXML_VERSION_INFO = 13:0:11
+LIBXML_VERSION_NUMBER = 21100
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+LT_SYS_LIBRARY_PATH =
+LZMA_CFLAGS =
+LZMA_LIBS =
+MAINT =
+MAKEINFO = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+MODULE_EXTENSION =
+MODULE_PLATFORM_LIBS =
+NM = /usr/bin/nm -B
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = libxml2
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = libxml2
+PACKAGE_STRING = libxml2 2.11.0
+PACKAGE_TARNAME = libxml2
+PACKAGE_URL =
+PACKAGE_VERSION = 2.11.0
+PATH_SEPARATOR = :
+PERL = /usr/bin/perl
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR =
+PKG_CONFIG_PATH =
+PYTHON = /usr/bin/python
+PYTHON_CFLAGS = -I/usr/include/python3.10 -I/usr/include/x86_64-linux-gnu/python3.10
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_LDFLAGS =
+PYTHON_LIBS =
+PYTHON_PLATFORM = linux
+PYTHON_PREFIX = ${prefix}
+PYTHON_VERSION = 3.10
+RANLIB = ranlib
+RDL_CFLAGS =
+RDL_LIBS =
+RELDATE = Thu Apr 20 2023
+SED = /usr/bin/sed
+SET_MAKE =
+SHELL = /bin/sh
+STRIP = strip
+TAR = /usr/bin/tar
+THREAD_CFLAGS = -D_REENTRANT
+THREAD_LIBS =
+VERSION = 2.11.0
+VERSION_SCRIPT_FLAGS = -Wl,--version-script=
+WGET = /usr/bin/wget
+WITH_C14N = 0
+WITH_CATALOG = 0
+WITH_DEBUG = 0
+WITH_FTP = 0
+WITH_HTML = 1
+WITH_HTTP = 0
+WITH_ICONV = 0
+WITH_ICU = 1
+WITH_ISO8859X = 0
+WITH_LEGACY = 0
+WITH_LZMA = 0
+WITH_MEM_DEBUG = 0
+WITH_MODULES = 0
+WITH_OUTPUT = 1
+WITH_PATTERN = 0
+WITH_PUSH = 1
+WITH_READER = 1
+WITH_REGEXPS = 0
+WITH_SAX1 = 1
+WITH_SCHEMAS = 0
+WITH_SCHEMATRON = 0
+WITH_THREADS = 1
+WITH_THREAD_ALLOC = 0
+WITH_TREE = 1
+WITH_TRIO = 0
+WITH_VALID = 0
+WITH_WRITER = 1
+WITH_XINCLUDE = 0
+WITH_XPATH = 1
+WITH_XPTR = 0
+WITH_XPTR_LOCS = 0
+WITH_ZLIB = 0
+XML_CFLAGS =
+XML_INCLUDEDIR = -I${includedir}/libxml2
+XML_LIBDIR = -L${libdir}
+XML_LIBS = -lxml2
+XML_LIBTOOLLIBS = libxml2.la
+XML_PRIVATE_CFLAGS = -D_REENTRANT
+XML_PRIVATE_LIBS = -licui18n -licuuc -licudata -lm
+XSLTPROC = /usr/bin/xsltproc
+Z_CFLAGS =
+Z_LIBS =
+abs_builddir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/linux/include/private
+abs_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/include/private
+abs_top_builddir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/linux
+abs_top_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_DUMPBIN =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-pc-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-pc-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/libxml2
+pkgpythondir = ${pythondir}/libxml2
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages
+pythondir = ${PYTHON_PREFIX}/lib/python3.10/site-packages
+runstatedir = ${localstatedir}/run
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/include/private
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src
+EXTRA_DIST = \
+ buf.h \
+ dict.h \
+ enc.h \
+ entities.h \
+ error.h \
+ globals.h \
+ html.h \
+ io.h \
+ memory.h \
+ parser.h \
+ regexp.h \
+ save.h \
+ string.h \
+ threads.h \
+ tree.h \
+ xinclude.h \
+ xpath.h \
+ xzlib.h
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/private/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign include/private/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/chromium/third_party/libxml/linux/xstc/Makefile b/chromium/third_party/libxml/linux/xstc/Makefile
new file mode 100644
index 00000000000..51c32e7a2ef
--- /dev/null
+++ b/chromium/third_party/libxml/linux/xstc/Makefile
@@ -0,0 +1,657 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# xstc/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+VPATH = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/xstc
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/libxml2
+pkgincludedir = $(includedir)/libxml2
+pkglibdir = $(libdir)/libxml2
+pkglibexecdir = $(libexecdir)/libxml2
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-pc-linux-gnu
+host_triplet = x86_64-pc-linux-gnu
+subdir = xstc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_try_compile2.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' aclocal-1.16
+AMTAR = $${TAR-tar}
+AM_CFLAGS = -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wno-long-long -Wno-format-extra-args
+AM_DEFAULT_VERBOSITY = 0
+AM_LDFLAGS =
+AR = ar
+AUTOCONF = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' autoconf
+AUTOHEADER = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' autoheader
+AUTOMAKE = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' automake-1.16
+AWK = gawk
+BASE_THREAD_LIBS =
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPPFLAGS =
+CSCOPE = cscope
+CTAGS = ctags
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = false
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /usr/bin/grep -E
+ETAGS = etags
+EXEEXT =
+FGREP = /usr/bin/grep -F
+FILECMD = file
+GREP = /usr/bin/grep
+ICU_CFLAGS =
+ICU_DEFS =
+ICU_LIBS = -licui18n -licuuc -licudata
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS =
+LIBM = -lm
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBXML_MAJOR_VERSION = 2
+LIBXML_MICRO_VERSION = 0
+LIBXML_MINOR_VERSION = 11
+LIBXML_VERSION = 2.11.0
+LIBXML_VERSION_EXTRA =
+LIBXML_VERSION_INFO = 13:0:11
+LIBXML_VERSION_NUMBER = 21100
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+LT_SYS_LIBRARY_PATH =
+LZMA_CFLAGS =
+LZMA_LIBS =
+MAINT =
+MAKEINFO = ${SHELL} '/usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/missing' makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+MODULE_EXTENSION =
+MODULE_PLATFORM_LIBS =
+NM = /usr/bin/nm -B
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = libxml2
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = libxml2
+PACKAGE_STRING = libxml2 2.11.0
+PACKAGE_TARNAME = libxml2
+PACKAGE_URL =
+PACKAGE_VERSION = 2.11.0
+PATH_SEPARATOR = :
+PERL = /usr/bin/perl
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR =
+PKG_CONFIG_PATH =
+PYTHON = /usr/bin/python
+PYTHON_CFLAGS = -I/usr/include/python3.10 -I/usr/include/x86_64-linux-gnu/python3.10
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_LDFLAGS =
+PYTHON_LIBS =
+PYTHON_PLATFORM = linux
+PYTHON_PREFIX = ${prefix}
+PYTHON_VERSION = 3.10
+RANLIB = ranlib
+RDL_CFLAGS =
+RDL_LIBS =
+RELDATE = Thu Apr 20 2023
+SED = /usr/bin/sed
+SET_MAKE =
+SHELL = /bin/sh
+STRIP = strip
+TAR = /usr/bin/tar
+THREAD_CFLAGS = -D_REENTRANT
+THREAD_LIBS =
+VERSION = 2.11.0
+VERSION_SCRIPT_FLAGS = -Wl,--version-script=
+WGET = /usr/bin/wget
+WITH_C14N = 0
+WITH_CATALOG = 0
+WITH_DEBUG = 0
+WITH_FTP = 0
+WITH_HTML = 1
+WITH_HTTP = 0
+WITH_ICONV = 0
+WITH_ICU = 1
+WITH_ISO8859X = 0
+WITH_LEGACY = 0
+WITH_LZMA = 0
+WITH_MEM_DEBUG = 0
+WITH_MODULES = 0
+WITH_OUTPUT = 1
+WITH_PATTERN = 0
+WITH_PUSH = 1
+WITH_READER = 1
+WITH_REGEXPS = 0
+WITH_SAX1 = 1
+WITH_SCHEMAS = 0
+WITH_SCHEMATRON = 0
+WITH_THREADS = 1
+WITH_THREAD_ALLOC = 0
+WITH_TREE = 1
+WITH_TRIO = 0
+WITH_VALID = 0
+WITH_WRITER = 1
+WITH_XINCLUDE = 0
+WITH_XPATH = 1
+WITH_XPTR = 0
+WITH_XPTR_LOCS = 0
+WITH_ZLIB = 0
+XML_CFLAGS =
+XML_INCLUDEDIR = -I${includedir}/libxml2
+XML_LIBDIR = -L${libdir}
+XML_LIBS = -lxml2
+XML_LIBTOOLLIBS = libxml2.la
+XML_PRIVATE_CFLAGS = -D_REENTRANT
+XML_PRIVATE_LIBS = -licui18n -licuuc -licudata -lm
+XSLTPROC = /usr/bin/xsltproc
+Z_CFLAGS =
+Z_LIBS =
+abs_builddir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/linux/xstc
+abs_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/xstc
+abs_top_builddir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/linux
+abs_top_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_DUMPBIN =
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-pc-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-pc-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/libxml2
+pkgpythondir = ${pythondir}/libxml2
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${PYTHON_EXEC_PREFIX}/lib/python3.10/site-packages
+pythondir = ${PYTHON_PREFIX}/lib/python3.10/site-packages
+runstatedir = ${localstatedir}/run
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src/xstc
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = /usr/local/google/home/jarhar/chromium/src/third_party/libxml/src
+
+#
+# Definition for the tests from W3C
+#
+PYSCRIPTS = nist-test.py ms-test.py sun-test.py
+TESTDIR = Tests
+TESTDIRS = $(TESTDIR)/msxsdtest $(TESTDIR)/suntest $(TESTDIR)/Datatypes
+TARBALL = xsts-2002-01-16.tar.gz
+TARBALL_2 = xsts-2004-01-14.tar.gz
+TSNAME = xmlschema2002-01-16
+TSNAME_2 = xmlschema2004-01-14
+TARBALLURL = http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME)/$(TARBALL)
+TARBALLURL_2 = http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME_2)/$(TARBALL_2)
+MSTESTDEF = MSXMLSchema1-0-20020116.testSet
+SUNTESTDEF = SunXMLSchema1-0-20020116.testSet
+NISTTESTDEF = NISTXMLSchema1-0-20020116.testSet
+NISTTESTDEF_2 = NISTXMLSchemaDatatypes.testSet
+
+#
+# The local data and scripts
+#
+EXTRA_DIST = xstc.py xstc-to-python.xsl
+CLEANFILES = $(PYSCRIPTS) test.log
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xstc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign xstc/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+#
+# Nothing is done by make, only make tests and
+# only if Python and Schemas are enabled.
+#
+all:
+
+#
+# Rule to load the test description and extract the information
+#
+$(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Metadata/$(MSTTESTDEF) Tests/Metadata/$(SUNTESTDEF):
+ -@(if [ ! -d Tests ] ; then \
+ mkdir Tests ; \
+ fi)
+ -@(if [ ! -f $(TARBALL_2) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL_2) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL_2) $(TARBALL_2) ; else \
+ echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL_2) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL_2) ] ; then \
+ echo -n "extracting test data (NIST)..." ; \
+ $(TAR) -xzf $(TARBALL_2) --wildcards '*/Datatypes' '*/Metadata/$(NISTTESTDEF_2)' ; \
+ echo "done" ; \
+ fi)
+ -@(if [ ! -f $(TARBALL) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL) $(TARBALL) ; else \
+ echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL) ] ; then \
+ echo -n "extracting test data (Sun, Microsoft)..." ; \
+ $(TAR) -C Tests -xzf $(TARBALL) --wildcards '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
+ if [ -d Tests/suntest ] ; then rm -r Tests/suntest ; fi ; \
+ if [ -d Tests/msxsdtest ] ; then rm -r Tests/msxsdtest ; fi ; \
+ mv Tests/xmlschema2002-01-16/* Tests ; \
+ mv Tests/*.testSet Tests/Metadata ; \
+ rm -r Tests/xmlschema2002-01-16 ; \
+ echo "done" ; \
+ fi)
+
+#
+# The python tests are generated via XSLT
+#
+nist-test.py: Tests/Metadata/$(NISTTESTDEF_2) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (NIST)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor NIST-2 \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(NISTTESTDEF_2) > $@ ; \
+ chmod +x $@ ; fi )
+
+ms-test.py: Tests/Metadata/$(MSTTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Microsoft)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor MS \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(MSTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+sun-test.py: Tests/Metadata/$(SUNTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Sun)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor SUN \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(SUNTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+#
+# The actual test run if present. PYTHONPATH is updated to make sure
+# we run the version from the loacl build and not preinstalled bindings
+#
+pytests: $(PYSCRIPTS) $(TESTDIRS)
+ -@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then \
+ echo "## Running XML Schema tests (NIST)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then \
+ echo "## Running Schema tests (Sun)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then \
+ echo "## Running Schema tests (Microsoft)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi)
+
+tests:
+ -@(if [ -x $(PYTHON) ] ; then \
+ $(MAKE) pytests ; fi);
+
+#
+# Heavy, works well only on RHEL3
+#
+valgrind:
+ -@(if [ -x $(PYTHON) ] ; then \
+ echo '## Running the regression tests under Valgrind' ; \
+ $(MAKE) CHECKER='valgrind -q' pytests ; fi);
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/chromium/third_party/libxml/mac/config.h b/chromium/third_party/libxml/mac/config.h
index 62bfa6b69e6..964ffe59e2c 100644
--- a/chromium/third_party/libxml/mac/config.h
+++ b/chromium/third_party/libxml/mac/config.h
@@ -66,8 +66,8 @@
/* Define to 1 if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
-/* Define if <pthread.h> is there */
-/* #undef HAVE_PTHREAD_H */
+/* Define to 1 if you have the <pthread.h> header file. */
+#define HAVE_PTHREAD_H /**/
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
diff --git a/chromium/third_party/libxml/mac/include/libxml/xmlversion.h b/chromium/third_party/libxml/mac/include/libxml/xmlversion.h
index ce0d40b2d5f..b6bc5b7f500 100644
--- a/chromium/third_party/libxml/mac/include/libxml/xmlversion.h
+++ b/chromium/third_party/libxml/mac/include/libxml/xmlversion.h
@@ -21,7 +21,7 @@ extern "C" {
* your library and includes mismatch
*/
#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+XMLPUBFUN void xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */
/**
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the thread support is configured in
*/
-#if 0
+#if 1
#define LIBXML_THREAD_ENABLED
#endif
@@ -440,10 +440,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif
#ifndef XML_DEPRECATED
-# ifdef IN_LIBXML
+# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
# define XML_DEPRECATED
-# else
/* Available since at least GCC 3.1 */
+# else
# define XML_DEPRECATED __attribute__((deprecated))
# endif
#endif
@@ -487,20 +487,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* is deprecated.
*/
#ifndef XML_DEPRECATED
-#define XML_DEPRECATED
+# if defined (IN_LIBXML) || !defined (_MSC_VER)
+# define XML_DEPRECATED
+/* Available since Visual Studio 2005 */
+# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_DEPRECATED __declspec(deprecated)
+# endif
#endif
/**
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
*
* Macro used to ignore pointer cast warnings that can't be worked around.
*/
-#define XML_IGNORE_FPTR_CAST_WARNINGS
+#if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
+#else
+# define XML_IGNORE_FPTR_CAST_WARNINGS
+#endif
/**
- * LIBXML_POP_WARNINGS:
+ * XML_POP_WARNINGS:
*
* Macro used to restore warnings state.
*/
-#define XML_POP_WARNINGS
+#ifndef XML_POP_WARNINGS
+# if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_POP_WARNINGS __pragma(warning(pop))
+# else
+# define XML_POP_WARNINGS
+# endif
+#endif
#endif /* __GNUC__ */
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/CMakeLists.txt b/chromium/third_party/libxml/src/CMakeLists.txt
index ccb225407b6..39d36234c0c 100644
--- a/chromium/third_party/libxml/src/CMakeLists.txt
+++ b/chromium/third_party/libxml/src/CMakeLists.txt
@@ -356,14 +356,16 @@ target_include_directories(
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}/libxml2>
)
-if(HAVE_DLOPEN)
- target_link_libraries(LibXml2 PRIVATE dl)
- set(MODULE_PLATFORM_LIBS "-ldl")
-endif()
+if(LIBXML2_WITH_MODULES)
+ if(HAVE_DLOPEN)
+ target_link_libraries(LibXml2 PRIVATE dl)
+ set(MODULE_PLATFORM_LIBS "-ldl")
+ endif()
-if(HAVE_SHLLOAD)
- target_link_libraries(LibXml2 PRIVATE dld)
- set(MODULE_PLATFORM_LIBS "-ldld")
+ if(HAVE_SHLLOAD)
+ target_link_libraries(LibXml2 PRIVATE dld)
+ set(MODULE_PLATFORM_LIBS "-ldld")
+ endif()
endif()
if(UNIX)
@@ -498,6 +500,7 @@ if(LIBXML2_WITH_TESTS)
endforeach()
endif()
add_test(NAME runtest COMMAND runtest --out ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ add_test(NAME runsuite COMMAND runsuite WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
if(EXISTS ${LIBXML2_XMLCONF_WORKING_DIR}/xmlconf/xmlconf.xml)
add_test(NAME runxmlconf COMMAND runxmlconf WORKING_DIRECTORY ${LIBXML2_XMLCONF_WORKING_DIR})
endif()
diff --git a/chromium/third_party/libxml/src/HTMLparser.c b/chromium/third_party/libxml/src/HTMLparser.c
index 93b6661ba93..7e91384b502 100644
--- a/chromium/third_party/libxml/src/HTMLparser.c
+++ b/chromium/third_party/libxml/src/HTMLparser.c
@@ -149,7 +149,7 @@ htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Pushes a new element name on top of the name stack
*
- * Returns 0 in case of error, the index in the stack otherwise
+ * Returns -1 in case of error, the index in the stack otherwise
*/
static int
htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value)
@@ -159,15 +159,17 @@ htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value)
if ((ctxt->html < 10) && (xmlStrEqual(value, BAD_CAST "body")))
ctxt->html = 10;
if (ctxt->nameNr >= ctxt->nameMax) {
- ctxt->nameMax *= 2;
- ctxt->nameTab = (const xmlChar * *)
- xmlRealloc((xmlChar * *)ctxt->nameTab,
- ctxt->nameMax *
- sizeof(ctxt->nameTab[0]));
- if (ctxt->nameTab == NULL) {
+ size_t newSize = ctxt->nameMax * 2;
+ const xmlChar **tmp;
+
+ tmp = xmlRealloc((xmlChar **) ctxt->nameTab,
+ newSize * sizeof(ctxt->nameTab[0]));
+ if (tmp == NULL) {
htmlErrMemory(ctxt, NULL);
- return (0);
+ return (-1);
}
+ ctxt->nameTab = tmp;
+ ctxt->nameMax = newSize;
}
ctxt->nameTab[ctxt->nameNr] = value;
ctxt->name = value;
@@ -1222,7 +1224,6 @@ static const htmlStartCloseEntry htmlStartClose[] = {
{ "menu", "form" },
{ "menu", "ul" },
{ "ol", "form" },
- { "ol", "ul" },
{ "option", "optgroup" },
{ "option", "option" },
{ "p", "address" },
@@ -1306,7 +1307,6 @@ static const htmlStartCloseEntry htmlStartClose[] = {
{ "ul", "address" },
{ "ul", "form" },
{ "ul", "menu" },
- { "ul", "ol" },
{ "ul", "pre" },
{ "xmp", "dd" },
{ "xmp", "dl" },
@@ -1394,10 +1394,7 @@ static const elementPriority htmlEndPriority[] = {
/**
* htmlInitAutoClose:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
- *
- * This is a no-op now.
+ * DEPRECATED: This is a no-op.
*/
void
htmlInitAutoClose(void) {
@@ -2319,7 +2316,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen,
else
cp = ent->name;
len = strlen(cp);
- if (out + 2 + len > outend)
+ if (outend - out < len + 2)
break;
*out++ = '&';
memcpy(out, cp, len);
@@ -2571,6 +2568,7 @@ htmlSkipBogusComment(htmlParserCtxtPtr ctxt) {
static const xmlChar *
htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
+ const xmlChar *ret;
int i = 0;
xmlChar loc[HTML_PARSER_BUFFER_SIZE];
@@ -2588,7 +2586,11 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
NEXT;
}
- return(xmlDictLookup(ctxt->dict, loc, i));
+ ret = xmlDictLookup(ctxt->dict, loc, i);
+ if (ret == NULL)
+ htmlErrMemory(ctxt, NULL);
+
+ return(ret);
}
@@ -3704,7 +3706,8 @@ htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
htmlParseErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED,
"DOCTYPE improperly terminated\n", NULL, NULL);
/* Ignore bogus content */
- while ((CUR != 0) && (CUR != '>'))
+ while ((CUR != 0) && (CUR != '>') &&
+ (ctxt->instate != XML_PARSER_EOF))
NEXT;
}
if (CUR == '>')
@@ -4036,7 +4039,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
SKIP_BLANKS;
while ((CUR != 0) &&
(CUR != '>') &&
- ((CUR != '/') || (NXT(1) != '>'))) {
+ ((CUR != '/') || (NXT(1) != '>')) &&
+ (ctxt->instate != XML_PARSER_EOF)) {
GROW;
attname = htmlParseAttribute(ctxt, &attvalue);
if (attname != NULL) {
@@ -4097,7 +4101,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
* the end of the tag. */
while ((CUR != 0) &&
!(IS_BLANK_CH(CUR)) && (CUR != '>') &&
- ((CUR != '/') || (NXT(1) != '>')))
+ ((CUR != '/') || (NXT(1) != '>')) &&
+ (ctxt->instate != XML_PARSER_EOF))
NEXT;
}
@@ -4732,8 +4737,16 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
int depth;
const xmlChar *name;
- currentNode = xmlStrdup(ctxt->name);
depth = ctxt->nameNr;
+ if (depth <= 0) {
+ currentNode = NULL;
+ } else {
+ currentNode = xmlStrdup(ctxt->name);
+ if (currentNode == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ return;
+ }
+ }
while (1) {
GROW;
@@ -4749,8 +4762,16 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
if (currentNode != NULL)
xmlFree(currentNode);
- currentNode = xmlStrdup(ctxt->name);
depth = ctxt->nameNr;
+ if (depth <= 0) {
+ currentNode = NULL;
+ } else {
+ currentNode = xmlStrdup(ctxt->name);
+ if (currentNode == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ break;
+ }
+ }
}
continue; /* while */
}
@@ -4772,6 +4793,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
xmlFree(currentNode);
currentNode = xmlStrdup(ctxt->name);
+ if (currentNode == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ break;
+ }
depth = ctxt->nameNr;
continue;
}
@@ -4795,6 +4820,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
if (currentNode != NULL) xmlFree(currentNode);
currentNode = xmlStrdup(ctxt->name);
+ if (currentNode == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ break;
+ }
depth = ctxt->nameNr;
continue;
}
@@ -4846,6 +4875,10 @@ htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
if (currentNode != NULL) xmlFree(currentNode);
currentNode = xmlStrdup(ctxt->name);
+ if (currentNode == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ break;
+ }
depth = ctxt->nameNr;
}
else if (CUR == '<') {
@@ -5226,7 +5259,10 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) {
return(NULL);
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
- if (buf == NULL) return(NULL);
+ if (buf == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
input = xmlNewInputStream(ctxt);
if (input == NULL) {
@@ -5334,30 +5370,17 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
int base, len;
htmlParserInputPtr in;
const xmlChar *buf;
- int invalue = 0;
- char valdellim = 0x0;
+ int quote;
in = ctxt->input;
if (in == NULL)
return (-1);
- base = in->cur - in->base;
- if (base < 0)
- return (-1);
+ base = ctxt->checkIndex;
+ quote = ctxt->endCheckState;
- if (ctxt->checkIndex > base) {
- base = ctxt->checkIndex;
- /* Abuse hasPErefs member to restore current state. */
- invalue = ctxt->hasPErefs & 1 ? 1 : 0;
- }
-
- if (in->buf == NULL) {
- buf = in->base;
- len = in->length;
- } else {
- buf = xmlBufContent(in->buf->buffer);
- len = xmlBufUse(in->buf->buffer);
- }
+ buf = in->cur;
+ len = in->end - in->cur;
/* take into account the sequence length */
if (third)
@@ -5366,18 +5389,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
len--;
for (; base < len; base++) {
if (ignoreattrval) {
+ if (quote) {
+ if (buf[base] == quote)
+ quote = 0;
+ continue;
+ }
if (buf[base] == '"' || buf[base] == '\'') {
- if (invalue) {
- if (buf[base] == valdellim) {
- invalue = 0;
- continue;
- }
- } else {
- valdellim = buf[base];
- invalue = 1;
- continue;
- }
- } else if (invalue) {
+ quote = buf[base];
continue;
}
}
@@ -5390,29 +5408,12 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
continue;
}
ctxt->checkIndex = 0;
-#ifdef DEBUG_PUSH
- if (next == 0)
- xmlGenericError(xmlGenericErrorContext,
- "HPP: lookup '%c' found at %d\n",
- first, base);
- else if (third == 0)
- xmlGenericError(xmlGenericErrorContext,
- "HPP: lookup '%c%c' found at %d\n",
- first, next, base);
- else
- xmlGenericError(xmlGenericErrorContext,
- "HPP: lookup '%c%c%c' found at %d\n",
- first, next, third, base);
-#endif
- return (base - (in->cur - in->base));
+ ctxt->endCheckState = 0;
+ return (base);
}
}
ctxt->checkIndex = base;
- /* Abuse hasPErefs member to track current state. */
- if (invalue)
- ctxt->hasPErefs |= 1;
- else
- ctxt->hasPErefs &= ~1;
+ ctxt->endCheckState = quote;
#ifdef DEBUG_PUSH
if (next == 0)
xmlGenericError(xmlGenericErrorContext,
@@ -5446,16 +5447,23 @@ static int
htmlParseLookupCommentEnd(htmlParserCtxtPtr ctxt)
{
int mark = 0;
- int cur = CUR_PTR - BASE_PTR;
+ int offset;
- while (mark >= 0) {
+ while (1) {
mark = htmlParseLookupSequence(ctxt, '-', '-', 0, 0);
- if ((mark < 0) ||
- (NXT(mark+2) == '>') ||
+ if (mark < 0)
+ break;
+ if ((NXT(mark+2) == '>') ||
((NXT(mark+2) == '!') && (NXT(mark+3) == '>'))) {
- return mark;
+ ctxt->checkIndex = 0;
+ break;
}
- ctxt->checkIndex = cur + mark + 1;
+ offset = (NXT(mark+2) == '!') ? 3 : 2;
+ if (mark + offset >= ctxt->input->end - ctxt->input->cur) {
+ ctxt->checkIndex = mark;
+ return(-1);
+ }
+ ctxt->checkIndex = mark + 1;
}
return mark;
}
@@ -5990,6 +5998,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
break;
}
} else if ((cur == '<') && (next == '!')) {
+ if (avail < 4)
+ goto done;
/*
* Sometimes DOCTYPE arrives in the middle of the document
*/
@@ -6030,8 +6040,6 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
#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;
@@ -6272,9 +6280,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
if (res < 0) {
- ctxt->errNo = XML_PARSER_EOF;
- ctxt->disableSAX = 1;
- return (XML_PARSER_EOF);
+ htmlErrMemory(ctxt, NULL);
+ return (ctxt->errNo);
}
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
@@ -6370,7 +6377,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
inputStream = htmlNewInputStream(ctxt);
if (inputStream == NULL) {
xmlFreeParserCtxt(ctxt);
- xmlFree(buf);
+ xmlFreeParserInputBuffer(buf);
return(NULL);
}
@@ -6802,10 +6809,12 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt)
ctxt->disableSAX = 0;
ctxt->valid = 1;
ctxt->vctxt.userData = ctxt;
+ ctxt->vctxt.flags = XML_VCTXT_USE_PCTXT;
ctxt->vctxt.error = xmlParserValidityError;
ctxt->vctxt.warning = xmlParserValidityWarning;
ctxt->record_info = 0;
ctxt->checkIndex = 0;
+ ctxt->endCheckState = 0;
ctxt->inSubset = 0;
ctxt->errNo = XML_ERR_OK;
ctxt->depth = 0;
@@ -6821,6 +6830,11 @@ htmlCtxtReset(htmlParserCtxtPtr ctxt)
xmlHashFree(ctxt->attsSpecial, NULL);
ctxt->attsSpecial = NULL;
}
+
+ ctxt->nbErrors = 0;
+ ctxt->nbWarnings = 0;
+ if (ctxt->lastError.code != XML_ERR_OK)
+ xmlResetError(&ctxt->lastError);
}
/**
diff --git a/chromium/third_party/libxml/src/HTMLtree.c b/chromium/third_party/libxml/src/HTMLtree.c
index b442dd01958..fa3a0ed38a8 100644
--- a/chromium/third_party/libxml/src/HTMLtree.c
+++ b/chromium/third_party/libxml/src/HTMLtree.c
@@ -701,10 +701,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
while (IS_BLANK_CH(*tmp)) tmp++;
/*
- * the < and > have already been escaped at the entity level
- * And doing so here breaks server side includes
+ * Angle brackets are technically illegal in URIs, but they're
+ * used in server side includes, for example. Curly brackets
+ * are illegal as well and often used in templates.
+ * Don't escape non-whitespace, printable ASCII chars for
+ * improved interoperability. Only escape space, control
+ * and non-ASCII chars.
*/
- escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>");
+ escaped = xmlURIEscapeStr(tmp,
+ BAD_CAST "\"#$%&+,/:;<=>?@[\\]^`{|}");
if (escaped != NULL) {
xmlBufWriteQuotedString(buf->buffer, escaped);
xmlFree(escaped);
diff --git a/chromium/third_party/libxml/src/Makefile.am b/chromium/third_party/libxml/src/Makefile.am
index d567c07cc6b..a5627280f28 100644
--- a/chromium/third_party/libxml/src/Makefile.am
+++ b/chromium/third_party/libxml/src/Makefile.am
@@ -189,12 +189,13 @@ check-local:
[ -d result ] || $(LN_S) $(srcdir)/result .
$(CHECKER) ./runtest$(EXEEXT)
$(CHECKER) ./testrecurse$(EXEEXT)
- ASAN_OPTIONS="$$ASAN_OPTIONS:detect_leaks=0" $(CHECKER) ./testapi$(EXEEXT)
+ $(CHECKER) ./testapi$(EXEEXT)
$(CHECKER) ./testchar$(EXEEXT)
$(CHECKER) ./testdict$(EXEEXT)
$(CHECKER) ./testModule$(EXEEXT)
$(CHECKER) ./testThreads$(EXEEXT)
$(CHECKER) ./runxmlconf$(EXEEXT)
+ $(CHECKER) ./runsuite$(EXEEXT)
# Compatibility name of the check target
runtests: check
@@ -401,22 +402,7 @@ cleanup:
dist-hook: cleanup
(cd $(srcdir) ; tar -cf - --exclude .git win32 os400 vms test result) | (cd $(distdir); tar xf -)
-dist-source: distdir
- $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz
-
-dist-test: distdir
- (mkdir -p $(distdir))
- (cd $(srcdir) ; tar -cf - --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
- tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README.md $(distdir)/README.tests $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
- @(rm -rf $(distdir)/xstc/Test)
-
-cleantar:
- @(rm -f libxml*.tar.gz COPYING.LIB)
-
-rpm: cleanup cleantar
- @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz)
-
-CLEANFILES = runxmlconf.log test.out *.gcda *.gcno *.res
+CLEANFILES = runsuite.log runxmlconf.log test.out *.gcda *.gcno *.res
DISTCLEANFILES = COPYING missing.lst
EXTRA_DIST = Copyright check-xml-test-suite.py gentest.py \
@@ -426,9 +412,9 @@ EXTRA_DIST = Copyright check-xml-test-suite.py gentest.py \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h \
- genUnicode.py TODO_SCHEMAS \
+ genUnicode.py \
dbgen.pl dbgenattr.pl \
- README.tests Makefile.tests libxml2.syms timsort.h \
+ libxml2.syms timsort.h \
README.zOS README.md \
CMakeLists.txt config.h.cmake.in libxml2-config.cmake.cmake.in
diff --git a/chromium/third_party/libxml/src/NEWS b/chromium/third_party/libxml/src/NEWS
index 0a3dd6b03bf..3e6bbe6a387 100644
--- a/chromium/third_party/libxml/src/NEWS
+++ b/chromium/third_party/libxml/src/NEWS
@@ -2,6 +2,47 @@ NEWS file for libxml2
v2.10.0: Aug 17 2022
+### Breaking changes
+
+The Docbook parser module and all related symbols habe been removed completely.
+This was experimental code which never worked and generated a deprecation
+warning for 15+ years. The library's soname wasn't changed in order to allow
+seamless upgrades to later versions. If this concerns you, consider bumping
+soname yourself.
+
+Some other modules are now disabled by default and will eventually be removed
+completely:
+
+- Support for XPointer locations (ranges and points): This was based on
+ a W3C specification which never got beyond Working Draft status. To my
+ knowledge, there's no software supporting this spec which is still
+ maintained. You now have to enable this code by passing the
+ `--with-xptr-locs` configuration option. Be warned that this part of
+ the code base is buggy and had many security issues in the past.
+
+- Support for the built-in FTP client (`--with-ftp`).
+
+- Support for "legacy" functions (`--with-legacy`).
+
+If you're concerned about ABI stability and haven't disabled these modules
+already, add the following configuration options or bump soname yourself:
+
+ --with-ftp
+ --with-legacy
+ --with-xptr-locs
+
+Several functions of the public API were deprecated. Most of them should be
+completely unused and will generate a deprecation warning now.
+
+The autoconf build now uses the sysconfdir variable for the location of
+the default catalog file. The path changed from hardcoded /etc/xml/catalog
+to ${sysconfdir}/xml/catalog. The sysconfdir variable defaults to
+${prefix}/etc, prefix defaults to /usr/local, so without other options
+the path becomes /usr/local/etc/xml/catalog. If you want the old behavior,
+configure with
+
+ --sysconfdir=/etc
+
### Security
- [CVE-2022-2309] Reset nsNr in xmlCtxtReset
diff --git a/chromium/third_party/libxml/src/README.md b/chromium/third_party/libxml/src/README.md
index ad423e686f9..f8c6aacf2d2 100644
--- a/chromium/third_party/libxml/src/README.md
+++ b/chromium/third_party/libxml/src/README.md
@@ -3,15 +3,17 @@
libxml2 is an XML toolkit implemented in C, originally developed for
the GNOME Project.
-Full documentation is available at
-<https://gitlab.gnome.org/GNOME/libxml2/-/wikis>.
+Official releases can be downloaded from
+<https://download.gnome.org/sources/libxml2/>
+
+The git repository is hosted on GNOME's GitLab server:
+<https://gitlab.gnome.org/GNOME/libxml2>
Bugs should be reported at
-<https://gitlab.gnome.org/GNOME/libxml2/-/issues>.
+<https://gitlab.gnome.org/GNOME/libxml2/-/issues>
-A mailing list xml@gnome.org is available. You can subscribe at
-<https://mail.gnome.org/mailman/listinfo/xml>. The list archive is at
-<https://mail.gnome.org/archives/xml/>.
+Documentation is available at
+<https://gitlab.gnome.org/GNOME/libxml2/-/wikis>
## License
diff --git a/chromium/third_party/libxml/src/SAX2.c b/chromium/third_party/libxml/src/SAX2.c
index 3d75751e4be..b3dd89b164f 100644
--- a/chromium/third_party/libxml/src/SAX2.c
+++ b/chromium/third_party/libxml/src/SAX2.c
@@ -387,6 +387,9 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
xmlCharEncoding enc;
int oldcharset;
const xmlChar *oldencoding;
+ int oldprogressive;
+ unsigned long consumed;
+ size_t buffered;
/*
* Ask the Entity resolver to load the damn thing
@@ -409,18 +412,22 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
oldinputTab = ctxt->inputTab;
oldcharset = ctxt->charset;
oldencoding = ctxt->encoding;
+ oldprogressive = ctxt->progressive;
ctxt->encoding = NULL;
+ ctxt->progressive = 0;
ctxt->inputTab = (xmlParserInputPtr *)
xmlMalloc(5 * sizeof(xmlParserInputPtr));
if (ctxt->inputTab == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset");
+ xmlFreeInputStream(input);
ctxt->input = oldinput;
ctxt->inputNr = oldinputNr;
ctxt->inputMax = oldinputMax;
ctxt->inputTab = oldinputTab;
ctxt->charset = oldcharset;
ctxt->encoding = oldencoding;
+ ctxt->progressive = oldprogressive;
return;
}
ctxt->inputNr = 0;
@@ -455,6 +462,18 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
while (ctxt->inputNr > 1)
xmlPopInput(ctxt);
+
+ consumed = ctxt->input->consumed;
+ buffered = ctxt->input->cur - ctxt->input->base;
+ if (buffered > ULONG_MAX - consumed)
+ consumed = ULONG_MAX;
+ else
+ consumed += buffered;
+ if (consumed > ULONG_MAX - ctxt->sizeentities)
+ ctxt->sizeentities = ULONG_MAX;
+ else
+ ctxt->sizeentities += consumed;
+
xmlFreeInputStream(ctxt->input);
xmlFree(ctxt->inputTab);
@@ -471,6 +490,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
(!xmlDictOwns(ctxt->dict, ctxt->encoding))))
xmlFree((xmlChar *) ctxt->encoding);
ctxt->encoding = oldencoding;
+ ctxt->progressive = oldprogressive;
/* ctxt->wellFormed = oldwellFormed; */
}
}
@@ -1315,25 +1335,25 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
/* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */
ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL);
+ if (ret == NULL)
+ goto error;
- if (ret != NULL) {
- if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
- xmlNodePtr tmp;
-
- ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
- tmp = ret->children;
- while (tmp != NULL) {
- tmp->parent = (xmlNodePtr) ret;
- if (tmp->next == NULL)
- ret->last = tmp;
- tmp = tmp->next;
- }
- } else if (value != NULL) {
- ret->children = xmlNewDocText(ctxt->myDoc, value);
- ret->last = ret->children;
- if (ret->children != NULL)
- ret->children->parent = (xmlNodePtr) ret;
- }
+ if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
+ xmlNodePtr tmp;
+
+ ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
+ tmp = ret->children;
+ while (tmp != NULL) {
+ tmp->parent = (xmlNodePtr) ret;
+ if (tmp->next == NULL)
+ ret->last = tmp;
+ tmp = tmp->next;
+ }
+ } else if (value != NULL) {
+ ret->children = xmlNewDocText(ctxt->myDoc, value);
+ ret->last = ret->children;
+ if (ret->children != NULL)
+ ret->children->parent = (xmlNodePtr) ret;
}
#ifdef LIBXML_VALID_ENABLED
@@ -2264,6 +2284,7 @@ xmlSAX2StartElementNs(void *ctx,
ret->name = lname;
if (ret->name == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
+ xmlFree(ret);
return;
}
}
@@ -2635,7 +2656,8 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
/* Mixed content, first time */
if (type == XML_TEXT_NODE) {
lastChild = xmlSAX2TextNode(ctxt, ch, len);
- lastChild->doc = ctxt->myDoc;
+ if (lastChild != NULL)
+ lastChild->doc = ctxt->myDoc;
} else
lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len);
if (lastChild != NULL) {
@@ -2931,7 +2953,7 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
/**
* xmlDefaultSAXHandlerInit:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library.
*
* Initialize the default SAX2 handler
@@ -2939,9 +2961,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
void
xmlDefaultSAXHandlerInit(void)
{
-#ifdef LIBXML_SAX1_ENABLED
- xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
-#endif /* LIBXML_SAX1_ENABLED */
}
#ifdef LIBXML_HTML_ENABLED
@@ -2992,17 +3011,12 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
/**
* htmlDefaultSAXHandlerInit:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
+ * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library.
- *
- * Initialize the default SAX handler
*/
void
htmlDefaultSAXHandlerInit(void)
{
-#ifdef LIBXML_SAX1_ENABLED
- xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
-#endif
}
#endif /* LIBXML_HTML_ENABLED */
diff --git a/chromium/third_party/libxml/src/buf.c b/chromium/third_party/libxml/src/buf.c
index 9b2a7d198ff..f876ea99fa9 100644
--- a/chromium/third_party/libxml/src/buf.c
+++ b/chromium/third_party/libxml/src/buf.c
@@ -200,8 +200,6 @@ xmlBufDetach(xmlBufPtr buf) {
if (buf == NULL)
return(NULL);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
- return(NULL);
if (buf->buffer != NULL)
return(NULL);
if (buf->error)
@@ -216,40 +214,6 @@ xmlBufDetach(xmlBufPtr buf) {
return ret;
}
-
-/**
- * xmlBufCreateStatic:
- * @mem: the memory area
- * @size: the size in byte
- *
- * routine to create an XML buffer from an immutable memory area.
- * The area won't be modified nor copied, and is expected to be
- * present until the end of the buffer lifetime.
- *
- * returns the new structure.
- */
-xmlBufPtr
-xmlBufCreateStatic(void *mem, size_t size) {
- xmlBufPtr ret;
-
- if (mem == NULL)
- return(NULL);
-
- ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
- if (ret == NULL) {
- xmlBufMemoryError(NULL, "creating buffer");
- return(NULL);
- }
- ret->use = size;
- ret->size = size;
- UPDATE_COMPAT(ret);
- ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
- ret->content = (xmlChar *) mem;
- ret->error = 0;
- ret->buffer = NULL;
- return(ret);
-}
-
/**
* xmlBufGetAllocationScheme:
* @buf: the buffer
@@ -289,13 +253,11 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
#endif
return(-1);
}
- if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
- (buf->alloc == XML_BUFFER_ALLOC_IO))
+ if (buf->alloc == XML_BUFFER_ALLOC_IO)
return(-1);
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
(scheme == XML_BUFFER_ALLOC_EXACT) ||
(scheme == XML_BUFFER_ALLOC_HYBRID) ||
- (scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
(scheme == XML_BUFFER_ALLOC_BOUNDED)) {
buf->alloc = scheme;
if (buf->buffer)
@@ -333,8 +295,7 @@ xmlBufFree(xmlBufPtr buf) {
if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) {
xmlFree(buf->contentIO);
- } else if ((buf->content != NULL) &&
- (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
+ } else if (buf->content != NULL) {
xmlFree(buf->content);
}
xmlFree(buf);
@@ -352,9 +313,7 @@ xmlBufEmpty(xmlBufPtr buf) {
if (buf->content == NULL) return;
CHECK_COMPAT(buf)
buf->use = 0;
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
- buf->content = BAD_CAST "";
- } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) {
size_t start_buf = buf->content - buf->contentIO;
@@ -387,8 +346,7 @@ xmlBufShrink(xmlBufPtr buf, size_t len) {
if (len > buf->use) return(0);
buf->use -= len;
- if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
- ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
/*
* we just move the content pointer, but also make sure
* the perceived buffer size has shrunk accordingly
@@ -436,7 +394,6 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
if ((buf == NULL) || (buf->error != 0)) return(0);
CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use)
return(buf->size - buf->use - 1);
if (len >= SIZE_MAX - buf->use) {
@@ -701,7 +658,6 @@ xmlBufResize(xmlBufPtr buf, size_t size)
return(0);
CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
/*
* Used to provide parsing limits
@@ -779,7 +735,8 @@ xmlBufResize(xmlBufPtr buf, size_t size)
if (buf->content == NULL) {
rebuf = (xmlChar *) xmlMallocAtomic(newSize);
buf->use = 0;
- rebuf[buf->use] = 0;
+ if (rebuf != NULL)
+ rebuf[buf->use] = 0;
} else if (buf->size - buf->use < 100) {
rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
} else {
@@ -827,7 +784,6 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
return -1;
CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (len < -1) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -887,7 +843,6 @@ xmlBufCat(xmlBufPtr buf, const xmlChar *str) {
if ((buf == NULL) || (buf->error))
return(-1);
CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (str == NULL) return -1;
return xmlBufAdd(buf, str, -1);
}
@@ -925,8 +880,6 @@ xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) {
if ((buf == NULL) || (buf->error))
return(-1);
CHECK_COMPAT(buf)
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
- return(-1);
if (xmlStrchr(string, '\"')) {
if (xmlStrchr(string, '\'')) {
#ifdef DEBUG_BUFFER
@@ -1116,7 +1069,7 @@ xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) {
size_t base;
if ((input == NULL) || (buf == NULL) || (buf->error))
- return(-1);
+ return(0);
CHECK_COMPAT(buf)
base = input->base - buf->content;
/*
diff --git a/chromium/third_party/libxml/src/check-relaxng-test-suite.py b/chromium/third_party/libxml/src/check-relaxng-test-suite.py
index 87ec05005cd..4372ddc35be 100755
--- a/chromium/third_party/libxml/src/check-relaxng-test-suite.py
+++ b/chromium/third_party/libxml/src/check-relaxng-test-suite.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import time
import os
diff --git a/chromium/third_party/libxml/src/check-relaxng-test-suite2.py b/chromium/third_party/libxml/src/check-relaxng-test-suite2.py
index 559503a1297..5f286ce2e23 100755
--- a/chromium/third_party/libxml/src/check-relaxng-test-suite2.py
+++ b/chromium/third_party/libxml/src/check-relaxng-test-suite2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import time
import os
diff --git a/chromium/third_party/libxml/src/check-xinclude-test-suite.py b/chromium/third_party/libxml/src/check-xinclude-test-suite.py
index 926ceb3c957..a0ee028b898 100755
--- a/chromium/third_party/libxml/src/check-xinclude-test-suite.py
+++ b/chromium/third_party/libxml/src/check-xinclude-test-suite.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import time
import os
diff --git a/chromium/third_party/libxml/src/check-xml-test-suite.py b/chromium/third_party/libxml/src/check-xml-test-suite.py
index cecb59b77f2..284f7f0fe1d 100755
--- a/chromium/third_party/libxml/src/check-xml-test-suite.py
+++ b/chromium/third_party/libxml/src/check-xml-test-suite.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import time
import os
diff --git a/chromium/third_party/libxml/src/check-xsddata-test-suite.py b/chromium/third_party/libxml/src/check-xsddata-test-suite.py
index c34560ea900..69c43ff2e59 100755
--- a/chromium/third_party/libxml/src/check-xsddata-test-suite.py
+++ b/chromium/third_party/libxml/src/check-xsddata-test-suite.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import time
import os
diff --git a/chromium/third_party/libxml/src/chvalid.c b/chromium/third_party/libxml/src/chvalid.c
index f4fa44acbb8..fb2c715a875 100644
--- a/chromium/third_party/libxml/src/chvalid.c
+++ b/chromium/third_party/libxml/src/chvalid.c
@@ -14,6 +14,8 @@
#include "libxml.h"
#include <libxml/chvalid.h>
+#include <stddef.h>
+
/*
* The initial tables ({func_name}_tab) are used to validate whether a
* single-byte character is within the specified group. Each table
diff --git a/chromium/third_party/libxml/src/configure.ac b/chromium/third_party/libxml/src/configure.ac
index 13f7a1e76c1..fa24ca669bc 100644
--- a/chromium/third_party/libxml/src/configure.ac
+++ b/chromium/third_party/libxml/src/configure.ac
@@ -1136,7 +1136,7 @@ RELDATE=`date +'%a %b %e %Y'`
AC_SUBST(RELDATE)
# keep on one line for cygwin c.f. #130896
-AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile include/private/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile fuzz/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
+AC_CONFIG_FILES([Makefile include/Makefile include/libxml/Makefile include/private/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile fuzz/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
AC_OUTPUT
diff --git a/chromium/third_party/libxml/src/dict.c b/chromium/third_party/libxml/src/dict.c
index 5c9ca71940c..d0208da1f40 100644
--- a/chromium/third_party/libxml/src/dict.c
+++ b/chromium/third_party/libxml/src/dict.c
@@ -24,6 +24,7 @@
#include <time.h>
#include "private/dict.h"
+#include "private/threads.h"
/*
* Following http://www.ocert.org/advisories/ocert-2011-003.html
@@ -129,12 +130,7 @@ struct _xmlDict {
* A mutex for modifying the reference counter for shared
* dictionaries.
*/
-static xmlMutexPtr xmlDictMutex = NULL;
-
-/*
- * Whether the dictionary mutex was initialized.
- */
-static int xmlDictInitialized = 0;
+static xmlMutex xmlDictMutex;
#ifdef DICT_RANDOMIZATION
#ifdef HAVE_RAND_R
@@ -148,15 +144,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.
- *
- * Returns 0 if initialization was already done, and 1 if that
- * call led to the initialization
+ * DEPRECATED: Alias for xmlInitParser.
*/
int xmlInitializeDict(void) {
+ xmlInitParser();
return(0);
}
@@ -165,20 +156,9 @@ int xmlInitializeDict(void) {
*
* This function is not public
* Do the dictionary mutex initialization.
- * this function is not thread safe, initialization should
- * normally be done once at setup when called from xmlOnceInit()
- * we may also land in this code if thread support is not compiled in
- *
- * Returns 0 if initialization was already done, and 1 if that
- * call led to the initialization
*/
int __xmlInitializeDict(void) {
- if (xmlDictInitialized)
- return(1);
-
- if ((xmlDictMutex = xmlNewMutex()) == NULL)
- return(0);
- xmlMutexLock(xmlDictMutex);
+ xmlInitMutex(&xmlDictMutex);
#ifdef DICT_RANDOMIZATION
#ifdef HAVE_RAND_R
@@ -188,8 +168,6 @@ int __xmlInitializeDict(void) {
srand(time(NULL));
#endif
#endif
- xmlDictInitialized = 1;
- xmlMutexUnlock(xmlDictMutex);
return(1);
}
@@ -197,16 +175,13 @@ int __xmlInitializeDict(void) {
int __xmlRandom(void) {
int ret;
- if (xmlDictInitialized == 0)
- __xmlInitializeDict();
-
- xmlMutexLock(xmlDictMutex);
+ xmlMutexLock(&xmlDictMutex);
#ifdef HAVE_RAND_R
ret = rand_r(& rand_seed);
#else
ret = rand();
#endif
- xmlMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(&xmlDictMutex);
return(ret);
}
#endif
@@ -214,22 +189,23 @@ int __xmlRandom(void) {
/**
* xmlDictCleanup:
*
- * DEPRECATED: This function will be made private. Call xmlCleanupParser
+ * DEPRECATED: This function is a no-op. 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 !
*/
void
xmlDictCleanup(void) {
- if (!xmlDictInitialized)
- return;
-
- xmlFreeMutex(xmlDictMutex);
+}
- xmlDictInitialized = 0;
+/**
+ * xmlCleanupDictInternal:
+ *
+ * Free the dictionary mutex.
+ */
+void
+xmlCleanupDictInternal(void) {
+ xmlCleanupMutex(&xmlDictMutex);
}
/*
@@ -455,7 +431,8 @@ static unsigned long
xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
unsigned long value = seed;
- if (name == NULL) return(0);
+ if ((name == NULL) || (namelen <= 0))
+ return(value);
value += *name;
value <<= 5;
if (namelen > 10) {
@@ -579,9 +556,7 @@ xmlDictPtr
xmlDictCreate(void) {
xmlDictPtr dict;
- if (!xmlDictInitialized)
- if (!__xmlInitializeDict())
- return(NULL);
+ xmlInitParser();
#ifdef DICT_DEBUG_PATTERNS
fprintf(stderr, "C");
@@ -647,14 +622,10 @@ xmlDictCreateSub(xmlDictPtr sub) {
*/
int
xmlDictReference(xmlDictPtr dict) {
- if (!xmlDictInitialized)
- if (!__xmlInitializeDict())
- return(-1);
-
if (dict == NULL) return -1;
- xmlMutexLock(xmlDictMutex);
+ xmlMutexLock(&xmlDictMutex);
dict->ref_counter++;
- xmlMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(&xmlDictMutex);
return(0);
}
@@ -811,19 +782,15 @@ xmlDictFree(xmlDictPtr dict) {
if (dict == NULL)
return;
- if (!xmlDictInitialized)
- if (!__xmlInitializeDict())
- return;
-
/* decrement the counter, it may be shared by a parser and docs */
- xmlMutexLock(xmlDictMutex);
+ xmlMutexLock(&xmlDictMutex);
dict->ref_counter--;
if (dict->ref_counter > 0) {
- xmlMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(&xmlDictMutex);
return;
}
- xmlMutexUnlock(xmlDictMutex);
+ xmlMutexUnlock(&xmlDictMutex);
if (dict->subdict != NULL) {
xmlDictFree(dict->subdict);
@@ -1007,7 +974,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
*/
const xmlChar *
xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
- unsigned long key, okey, nbi = 0;
+ unsigned long key, okey;
xmlDictEntryPtr insert;
unsigned int l;
@@ -1042,7 +1009,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(insert->name, name, l)))
return(insert->name);
#endif
- nbi++;
}
#ifdef __GNUC__
if ((insert->okey == okey) && (insert->len == l)) {
@@ -1084,7 +1050,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(tmp->name, name, l)))
return(tmp->name);
#endif
- nbi++;
}
#ifdef __GNUC__
if ((tmp->okey == skey) && (tmp->len == l)) {
diff --git a/chromium/third_party/libxml/src/encoding.c b/chromium/third_party/libxml/src/encoding.c
index c990bcf16f0..101eba9b54f 100644
--- a/chromium/third_party/libxml/src/encoding.c
+++ b/chromium/third_party/libxml/src/encoding.c
@@ -58,9 +58,6 @@ struct _uconv_t {
};
#endif
-static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
-static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
-
typedef struct _xmlCharEncodingAlias xmlCharEncodingAlias;
typedef xmlCharEncodingAlias *xmlCharEncodingAliasPtr;
struct _xmlCharEncodingAlias {
@@ -77,9 +74,6 @@ static int xmlCharEncodingAliasesMax = 0;
#define DEBUG_ENCODING /* Define this to get encoding traces */
#endif
#else
-#ifdef LIBXML_ISO8859X_ENABLED
-static void xmlRegisterCharEncodingHandlersISO8859x (void);
-#endif
#endif
static int xmlLittleEndian = 1;
@@ -1048,7 +1042,7 @@ xmlGetEncodingAlias(const char *alias) {
return(NULL);
for (i = 0;i < 99;i++) {
- upper[i] = toupper(alias[i]);
+ upper[i] = (char) toupper((unsigned char) alias[i]);
if (upper[i] == 0) break;
}
upper[i] = 0;
@@ -1083,7 +1077,7 @@ xmlAddEncodingAlias(const char *name, const char *alias) {
return(-1);
for (i = 0;i < 99;i++) {
- upper[i] = toupper(alias[i]);
+ upper[i] = (char) toupper((unsigned char) alias[i]);
if (upper[i] == 0) break;
}
upper[i] = 0;
@@ -1185,7 +1179,7 @@ xmlParseCharEncoding(const char* name)
name = alias;
for (i = 0;i < 499;i++) {
- upper[i] = toupper(name[i]);
+ upper[i] = (char) toupper((unsigned char) name[i]);
if (upper[i] == 0) break;
}
upper[i] = 0;
@@ -1312,19 +1306,100 @@ xmlGetCharEncodingName(xmlCharEncoding enc) {
* *
************************************************************************/
+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) && \
+ defined(LIBXML_ISO8859X_ENABLED)
+
+#define DECLARE_ISO_FUNCS(n) \
+ static int ISO8859_##n##ToUTF8(unsigned char* out, int *outlen, \
+ const unsigned char* in, int *inlen); \
+ static int UTF8ToISO8859_##n(unsigned char* out, int *outlen, \
+ const unsigned char* in, int *inlen);
+
+/** DOC_DISABLE */
+DECLARE_ISO_FUNCS(2)
+DECLARE_ISO_FUNCS(3)
+DECLARE_ISO_FUNCS(4)
+DECLARE_ISO_FUNCS(5)
+DECLARE_ISO_FUNCS(6)
+DECLARE_ISO_FUNCS(7)
+DECLARE_ISO_FUNCS(8)
+DECLARE_ISO_FUNCS(9)
+DECLARE_ISO_FUNCS(10)
+DECLARE_ISO_FUNCS(11)
+DECLARE_ISO_FUNCS(13)
+DECLARE_ISO_FUNCS(14)
+DECLARE_ISO_FUNCS(15)
+DECLARE_ISO_FUNCS(16)
+/** DOC_ENABLE */
+
+#endif /* LIBXML_ISO8859X_ENABLED */
+
+#ifdef LIBXML_ICONV_ENABLED
+ #define EMPTY_ICONV , (iconv_t) 0, (iconv_t) 0
+#else
+ #define EMPTY_ICONV
+#endif
+
+#ifdef LIBXML_UCONV_ENABLED
+ #define EMPTY_UCONV , NULL, NULL
+#else
+ #define EMPTY_UCONV
+#endif
+
+#define MAKE_HANDLER(name, in, out) \
+ { (char *) name, in, out EMPTY_ICONV EMPTY_UCONV }
+
+static const xmlCharEncodingHandler defaultHandlers[] = {
+ MAKE_HANDLER("UTF-8", UTF8ToUTF8, UTF8ToUTF8)
+#ifdef LIBXML_OUTPUT_ENABLED
+ ,MAKE_HANDLER("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE)
+ ,MAKE_HANDLER("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE)
+ ,MAKE_HANDLER("UTF-16", UTF16LEToUTF8, UTF8ToUTF16)
+ ,MAKE_HANDLER("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1)
+ ,MAKE_HANDLER("ASCII", asciiToUTF8, UTF8Toascii)
+ ,MAKE_HANDLER("US-ASCII", asciiToUTF8, UTF8Toascii)
+#ifdef LIBXML_HTML_ENABLED
+ ,MAKE_HANDLER("HTML", NULL, UTF8ToHtml)
+#endif
+#else
+ ,MAKE_HANDLER("UTF-16LE", UTF16LEToUTF8, NULL)
+ ,MAKE_HANDLER("UTF-16BE", UTF16BEToUTF8, NULL)
+ ,MAKE_HANDLER("UTF-16", UTF16LEToUTF8, NULL)
+ ,MAKE_HANDLER("ISO-8859-1", isolat1ToUTF8, NULL)
+ ,MAKE_HANDLER("ASCII", asciiToUTF8, NULL)
+ ,MAKE_HANDLER("US-ASCII", asciiToUTF8, NULL)
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) && \
+ defined(LIBXML_ISO8859X_ENABLED)
+ ,MAKE_HANDLER("ISO-8859-2", ISO8859_2ToUTF8, UTF8ToISO8859_2)
+ ,MAKE_HANDLER("ISO-8859-3", ISO8859_3ToUTF8, UTF8ToISO8859_3)
+ ,MAKE_HANDLER("ISO-8859-4", ISO8859_4ToUTF8, UTF8ToISO8859_4)
+ ,MAKE_HANDLER("ISO-8859-5", ISO8859_5ToUTF8, UTF8ToISO8859_5)
+ ,MAKE_HANDLER("ISO-8859-6", ISO8859_6ToUTF8, UTF8ToISO8859_6)
+ ,MAKE_HANDLER("ISO-8859-7", ISO8859_7ToUTF8, UTF8ToISO8859_7)
+ ,MAKE_HANDLER("ISO-8859-8", ISO8859_8ToUTF8, UTF8ToISO8859_8)
+ ,MAKE_HANDLER("ISO-8859-9", ISO8859_9ToUTF8, UTF8ToISO8859_9)
+ ,MAKE_HANDLER("ISO-8859-10", ISO8859_10ToUTF8, UTF8ToISO8859_10)
+ ,MAKE_HANDLER("ISO-8859-11", ISO8859_11ToUTF8, UTF8ToISO8859_11)
+ ,MAKE_HANDLER("ISO-8859-13", ISO8859_13ToUTF8, UTF8ToISO8859_13)
+ ,MAKE_HANDLER("ISO-8859-14", ISO8859_14ToUTF8, UTF8ToISO8859_14)
+ ,MAKE_HANDLER("ISO-8859-15", ISO8859_15ToUTF8, UTF8ToISO8859_15)
+ ,MAKE_HANDLER("ISO-8859-16", ISO8859_16ToUTF8, UTF8ToISO8859_16)
+#endif
+};
+
+#define NUM_DEFAULT_HANDLERS \
+ (sizeof(defaultHandlers) / sizeof(defaultHandlers[0]))
+
+static const xmlCharEncodingHandler *xmlUTF16LEHandler = &defaultHandlers[1];
+static const xmlCharEncodingHandler *xmlUTF16BEHandler = &defaultHandlers[2];
/* the size should be growable, but it's not a big deal ... */
#define MAX_ENCODING_HANDLERS 50
static xmlCharEncodingHandlerPtr *handlers = NULL;
static int nbCharEncodingHandler = 0;
-/*
- * The default is UTF-8 for XML, that's also the default used for the
- * parser internals, so the default encoding handler is NULL
- */
-
-static xmlCharEncodingHandlerPtr xmlDefaultCharEncodingHandler = NULL;
-
/**
* xmlNewCharEncodingHandler:
* @name: the encoding name, in UTF-8 format (ASCII actually)
@@ -1361,7 +1436,7 @@ xmlNewCharEncodingHandler(const char *name,
return(NULL);
}
for (i = 0;i < 499;i++) {
- upper[i] = toupper(name[i]);
+ upper[i] = (char) toupper((unsigned char) name[i]);
if (upper[i] == 0) break;
}
upper[i] = 0;
@@ -1409,64 +1484,29 @@ xmlNewCharEncodingHandler(const char *name,
/**
* xmlInitCharEncodingHandlers:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
- *
- * Initialize the char encoding support, it registers the default
- * encoding supported.
- * NOTE: while public, this function usually doesn't need to be called
- * in normal processing.
+ * DEPRECATED: Alias for xmlInitParser.
*/
void
xmlInitCharEncodingHandlers(void) {
+ xmlInitParser();
+}
+
+/**
+ * xmlInitEncodingInternal:
+ *
+ * Initialize the char encoding support.
+ */
+void
+xmlInitEncodingInternal(void) {
unsigned short int tst = 0x1234;
unsigned char *ptr = (unsigned char *) &tst;
- if (handlers != NULL) return;
-
- handlers = (xmlCharEncodingHandlerPtr *)
- xmlMalloc(MAX_ENCODING_HANDLERS * sizeof(xmlCharEncodingHandlerPtr));
-
if (*ptr == 0x12) xmlLittleEndian = 0;
else if (*ptr == 0x34) xmlLittleEndian = 1;
else {
xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
"Odd problem at endianness detection\n", NULL);
}
-
- if (handlers == NULL) {
- xmlEncodingErrMemory("xmlInitCharEncodingHandlers : out of memory !\n");
- return;
- }
- xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
-#ifdef LIBXML_OUTPUT_ENABLED
- xmlUTF16LEHandler =
- xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE);
- xmlUTF16BEHandler =
- xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE);
- xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, UTF8ToUTF16);
- xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1);
- xmlNewCharEncodingHandler("ASCII", asciiToUTF8, UTF8Toascii);
- xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, UTF8Toascii);
-#ifdef LIBXML_HTML_ENABLED
- xmlNewCharEncodingHandler("HTML", NULL, UTF8ToHtml);
-#endif
-#else
- xmlUTF16LEHandler =
- xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, NULL);
- xmlUTF16BEHandler =
- xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, NULL);
- xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, NULL);
- xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, NULL);
- xmlNewCharEncodingHandler("ASCII", asciiToUTF8, NULL);
- xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, NULL);
-#endif /* LIBXML_OUTPUT_ENABLED */
-#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED)
-#ifdef LIBXML_ISO8859X_ENABLED
- xmlRegisterCharEncodingHandlersISO8859x ();
-#endif
-#endif
-
}
/**
@@ -1497,7 +1537,6 @@ xmlCleanupCharEncodingHandlers(void) {
xmlFree(handlers);
handlers = NULL;
nbCharEncodingHandler = 0;
- xmlDefaultCharEncodingHandler = NULL;
}
/**
@@ -1508,11 +1547,17 @@ xmlCleanupCharEncodingHandlers(void) {
*/
void
xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
- if (handlers == NULL) xmlInitCharEncodingHandlers();
- if ((handler == NULL) || (handlers == NULL)) {
+ if (handler == NULL) {
xmlEncodingErr(XML_I18N_NO_HANDLER,
- "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
- goto free_handler;
+ "xmlRegisterCharEncodingHandler: NULL handler\n", NULL);
+ return;
+ }
+ if (handlers == NULL) {
+ handlers = xmlMalloc(MAX_ENCODING_HANDLERS * sizeof(handlers[0]));
+ if (handlers == NULL) {
+ xmlEncodingErrMemory("allocating handler table");
+ goto free_handler;
+ }
}
if (nbCharEncodingHandler >= MAX_ENCODING_HANDLERS) {
@@ -1545,7 +1590,6 @@ xmlCharEncodingHandlerPtr
xmlGetCharEncodingHandler(xmlCharEncoding enc) {
xmlCharEncodingHandlerPtr handler;
- if (handlers == NULL) xmlInitCharEncodingHandlers();
switch (enc) {
case XML_CHAR_ENCODING_ERROR:
return(NULL);
@@ -1554,9 +1598,9 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) {
case XML_CHAR_ENCODING_UTF8:
return(NULL);
case XML_CHAR_ENCODING_UTF16LE:
- return(xmlUTF16LEHandler);
+ return((xmlCharEncodingHandlerPtr) xmlUTF16LEHandler);
case XML_CHAR_ENCODING_UTF16BE:
- return(xmlUTF16BEHandler);
+ return((xmlCharEncodingHandlerPtr) xmlUTF16BEHandler);
case XML_CHAR_ENCODING_EBCDIC:
handler = xmlFindCharEncodingHandler("EBCDIC");
if (handler != NULL) return(handler);
@@ -1671,7 +1715,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) {
* xmlFindCharEncodingHandler:
* @name: a string describing the char encoding.
*
- * Search in the registered set the handler able to read/write that encoding.
+ * Search in the registered set the handler able to read/write that encoding
+ * or create a new one.
*
* Returns the handler or NULL if not found
*/
@@ -1691,9 +1736,8 @@ xmlFindCharEncodingHandler(const char *name) {
char upper[100];
int i;
- if (handlers == NULL) xmlInitCharEncodingHandlers();
- if (name == NULL) return(xmlDefaultCharEncodingHandler);
- if (name[0] == 0) return(xmlDefaultCharEncodingHandler);
+ if (name == NULL) return(NULL);
+ if (name[0] == 0) return(NULL);
/*
* Do the alias resolution
@@ -1707,11 +1751,16 @@ xmlFindCharEncodingHandler(const char *name) {
* Check first for directly registered encoding names
*/
for (i = 0;i < 99;i++) {
- upper[i] = toupper(name[i]);
+ upper[i] = (char) toupper((unsigned char) name[i]);
if (upper[i] == 0) break;
}
upper[i] = 0;
+ for (i = 0; i < (int) NUM_DEFAULT_HANDLERS; i++) {
+ if (strcmp(upper, defaultHandlers[i].name) == 0)
+ return((xmlCharEncodingHandlerPtr) &defaultHandlers[i]);
+ }
+
if (handlers != NULL) {
for (i = 0;i < nbCharEncodingHandler; i++) {
if (!strcmp(upper, handlers[i]->name)) {
@@ -1744,6 +1793,12 @@ xmlFindCharEncodingHandler(const char *name) {
}
memset(enc, 0, sizeof(xmlCharEncodingHandler));
enc->name = xmlMemStrdup(name);
+ if (enc->name == NULL) {
+ xmlFree(enc);
+ iconv_close(icv_in);
+ iconv_close(icv_out);
+ return(NULL);
+ }
enc->input = NULL;
enc->output = NULL;
enc->iconv_in = icv_in;
@@ -1776,6 +1831,12 @@ xmlFindCharEncodingHandler(const char *name) {
}
memset(encu, 0, sizeof(xmlCharEncodingHandler));
encu->name = xmlMemStrdup(name);
+ if (encu->name == NULL) {
+ xmlFree(encu);
+ closeIcuConverter(ucv_in);
+ closeIcuConverter(ucv_out);
+ return(NULL);
+ }
encu->input = NULL;
encu->output = NULL;
encu->uconv_in = ucv_in;
@@ -2283,7 +2344,8 @@ xmlCharEncInput(xmlParserInputBufferPtr input, int flush)
toconv = 64 * 1024;
written = xmlBufAvail(out);
if (toconv * 2 >= written) {
- xmlBufGrow(out, toconv * 2);
+ if (xmlBufGrow(out, toconv * 2) < 0)
+ return (-1);
written = xmlBufAvail(out);
}
if ((written > 128 * 1024) && (flush == 0))
@@ -2584,8 +2646,7 @@ retry:
xmlEncodingErr(XML_I18N_CONV_FAILED,
"output conversion failed due to conv error, bytes %s\n",
buf);
- if (xmlBufGetAllocationScheme(in) != XML_BUFFER_ALLOC_IMMUTABLE)
- content[0] = ' ';
+ content[0] = ' ';
break;
}
@@ -2745,8 +2806,7 @@ retry:
xmlEncodingErr(XML_I18N_CONV_FAILED,
"output conversion failed due to conv error, bytes %s\n",
buf);
- if (in->alloc != XML_BUFFER_ALLOC_IMMUTABLE)
- in->content[0] = ' ';
+ in->content[0] = ' ';
break;
}
@@ -2771,19 +2831,19 @@ int
xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
int ret = 0;
int tofree = 0;
- int i, handler_in_list = 0;
-
- /* Avoid unused variable warning if features are disabled. */
- (void) handler_in_list;
+ int i = 0;
if (handler == NULL) return(-1);
- if (handler->name == NULL) return(-1);
+
+ for (i = 0; i < (int) NUM_DEFAULT_HANDLERS; i++) {
+ if (handler == &defaultHandlers[i])
+ return(0);
+ }
+
if (handlers != NULL) {
for (i = 0;i < nbCharEncodingHandler; i++) {
- if (handler == handlers[i]) {
- handler_in_list = 1;
- break;
- }
+ if (handler == handlers[i])
+ return(0);
}
}
#ifdef LIBXML_ICONV_ENABLED
@@ -2791,8 +2851,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
* Iconv handlers can be used only once, free the whole block.
* and the associated icon resources.
*/
- if ((handler_in_list == 0) &&
- ((handler->iconv_out != NULL) || (handler->iconv_in != NULL))) {
+ if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
tofree = 1;
if (handler->iconv_out != NULL) {
if (iconv_close(handler->iconv_out))
@@ -2807,8 +2866,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
}
#endif /* LIBXML_ICONV_ENABLED */
#ifdef LIBXML_ICU_ENABLED
- if ((handler_in_list == 0) &&
- ((handler->uconv_out != NULL) || (handler->uconv_in != NULL))) {
+ if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) {
tofree = 1;
if (handler->uconv_out != NULL) {
closeIcuConverter(handler->uconv_out);
@@ -3947,24 +4005,6 @@ static int UTF8ToISO8859_16 (unsigned char* out, int *outlen,
return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16);
}
-static void
-xmlRegisterCharEncodingHandlersISO8859x (void) {
- xmlNewCharEncodingHandler ("ISO-8859-2", ISO8859_2ToUTF8, UTF8ToISO8859_2);
- xmlNewCharEncodingHandler ("ISO-8859-3", ISO8859_3ToUTF8, UTF8ToISO8859_3);
- xmlNewCharEncodingHandler ("ISO-8859-4", ISO8859_4ToUTF8, UTF8ToISO8859_4);
- xmlNewCharEncodingHandler ("ISO-8859-5", ISO8859_5ToUTF8, UTF8ToISO8859_5);
- xmlNewCharEncodingHandler ("ISO-8859-6", ISO8859_6ToUTF8, UTF8ToISO8859_6);
- xmlNewCharEncodingHandler ("ISO-8859-7", ISO8859_7ToUTF8, UTF8ToISO8859_7);
- xmlNewCharEncodingHandler ("ISO-8859-8", ISO8859_8ToUTF8, UTF8ToISO8859_8);
- xmlNewCharEncodingHandler ("ISO-8859-9", ISO8859_9ToUTF8, UTF8ToISO8859_9);
- xmlNewCharEncodingHandler ("ISO-8859-10", ISO8859_10ToUTF8, UTF8ToISO8859_10);
- xmlNewCharEncodingHandler ("ISO-8859-11", ISO8859_11ToUTF8, UTF8ToISO8859_11);
- xmlNewCharEncodingHandler ("ISO-8859-13", ISO8859_13ToUTF8, UTF8ToISO8859_13);
- xmlNewCharEncodingHandler ("ISO-8859-14", ISO8859_14ToUTF8, UTF8ToISO8859_14);
- xmlNewCharEncodingHandler ("ISO-8859-15", ISO8859_15ToUTF8, UTF8ToISO8859_15);
- xmlNewCharEncodingHandler ("ISO-8859-16", ISO8859_16ToUTF8, UTF8ToISO8859_16);
-}
-
#endif
#endif
diff --git a/chromium/third_party/libxml/src/entities.c b/chromium/third_party/libxml/src/entities.c
index 81b75df954c..52eb9d5bdbc 100644
--- a/chromium/third_party/libxml/src/entities.c
+++ b/chromium/third_party/libxml/src/entities.c
@@ -38,35 +38,35 @@ static xmlEntity xmlEntityLt = {
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "<", BAD_CAST "<", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
- NULL, NULL, NULL, NULL, 0, 1
+ NULL, NULL, NULL, NULL, 0, 0, 0
};
static xmlEntity xmlEntityGt = {
NULL, XML_ENTITY_DECL, BAD_CAST "gt",
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST ">", BAD_CAST ">", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
- NULL, NULL, NULL, NULL, 0, 1
+ NULL, NULL, NULL, NULL, 0, 0, 0
};
static xmlEntity xmlEntityAmp = {
NULL, XML_ENTITY_DECL, BAD_CAST "amp",
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "&", BAD_CAST "&", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
- NULL, NULL, NULL, NULL, 0, 1
+ NULL, NULL, NULL, NULL, 0, 0, 0
};
static xmlEntity xmlEntityQuot = {
NULL, XML_ENTITY_DECL, BAD_CAST "quot",
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "\"", BAD_CAST "\"", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
- NULL, NULL, NULL, NULL, 0, 1
+ NULL, NULL, NULL, NULL, 0, 0, 0
};
static xmlEntity xmlEntityApos = {
NULL, XML_ENTITY_DECL, BAD_CAST "apos",
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "'", BAD_CAST "'", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
- NULL, NULL, NULL, NULL, 0, 1
+ NULL, NULL, NULL, NULL, 0, 0, 0
};
/**
@@ -163,8 +163,6 @@ xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
}
memset(ret, 0, sizeof(xmlEntity));
ret->type = XML_ENTITY_DECL;
- ret->checked = 0;
- ret->guard = XML_ENTITY_NOT_BEING_CHECKED;
/*
* fill the structure.
@@ -983,7 +981,6 @@ xmlCopyEntity(void *payload, const xmlChar *name ATTRIBUTE_UNUSED) {
cur->orig = xmlStrdup(ent->orig);
if (ent->URI != NULL)
cur->URI = xmlStrdup(ent->URI);
- cur->guard = 0;
return(cur);
}
@@ -1013,7 +1010,6 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
*/
static void
xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) {
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
if (xmlStrchr(content, '%')) {
const xmlChar * base, *cur;
diff --git a/chromium/third_party/libxml/src/error.c b/chromium/third_party/libxml/src/error.c
index c96877f4835..4de1418e147 100644
--- a/chromium/third_party/libxml/src/error.c
+++ b/chromium/third_party/libxml/src/error.c
@@ -18,6 +18,8 @@
#include "private/error.h"
+#define XML_MAX_ERRORS 100
+
#define XML_GET_VAR_STR(msg, str) { \
int size, prev_size = -1; \
int chars; \
@@ -65,7 +67,7 @@
*
* Default handler for out of context error messages.
*/
-void XMLCDECL
+void
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
@@ -163,7 +165,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
}
/**
- * xmlParserPrintFileContext:
+ * xmlParserPrintFileContextInternal:
* @input: an xmlParserInputPtr input
*
* Displays current context within the input content for error tracking
@@ -172,7 +174,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
static void
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlGenericErrorFunc channel, void *data ) {
- const xmlChar *cur, *base;
+ const xmlChar *cur, *base, *start;
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
xmlChar content[81]; /* space for 80 chars + line terminator */
xmlChar *ctnt;
@@ -188,22 +190,35 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
}
n = 0;
/* search backwards for beginning-of-line (to max buff size) */
- while ((n++ < (sizeof(content)-1)) && (cur > base) &&
- (*(cur) != '\n') && (*(cur) != '\r'))
+ while ((n < sizeof(content) - 1) && (cur > base) &&
+ (*cur != '\n') && (*cur != '\r')) {
cur--;
- if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ n++;
+ }
+ if ((n > 0) && ((*cur == '\n') || (*cur == '\r'))) {
+ cur++;
+ } else {
+ /* skip over continuation bytes */
+ while ((cur < input->cur) && ((*cur & 0xC0) == 0x80))
+ cur++;
+ }
/* calculate the error position in terms of the current position */
col = input->cur - cur;
/* search forward for end-of-line (to max buff size) */
n = 0;
- ctnt = content;
+ start = cur;
/* copy selected text to our buffer */
- while ((*cur != 0) && (*(cur) != '\n') &&
- (*(cur) != '\r') && (n < sizeof(content)-1)) {
- *ctnt++ = *cur++;
- n++;
+ while ((*cur != 0) && (*(cur) != '\n') && (*(cur) != '\r')) {
+ int len = input->end - cur;
+ int c = xmlGetUTF8Char(cur, &len);
+
+ if ((c < 0) || (n + len > sizeof(content)-1))
+ break;
+ cur += len;
+ n += len;
}
- *ctnt = 0;
+ memcpy(content, start, n);
+ content[n] = 0;
/* print out the selected text */
channel(data ,"%s\n", content);
/* create blank line with problem pointer */
@@ -451,7 +466,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
* then forward the error message down the parser or generic
* error callback handler
*/
-void XMLCDECL
+void
__xmlRaiseError(xmlStructuredErrorFunc schannel,
xmlGenericErrorFunc channel, void *data, void *ctx,
void *nod, int domain, int code, xmlErrorLevel level,
@@ -474,12 +489,25 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
(domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
ctxt = (xmlParserCtxtPtr) ctx;
- if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
- (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
- (ctxt->sax->serror != NULL)) {
- schannel = ctxt->sax->serror;
- data = ctxt->userData;
- }
+
+ if (ctxt != NULL) {
+ if (level == XML_ERR_WARNING) {
+ if (ctxt->nbWarnings >= XML_MAX_ERRORS)
+ return;
+ ctxt->nbWarnings += 1;
+ } else {
+ if (ctxt->nbErrors >= XML_MAX_ERRORS)
+ return;
+ ctxt->nbErrors += 1;
+ }
+
+ if ((schannel == NULL) && (ctxt->sax != NULL) &&
+ (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
+ (ctxt->sax->serror != NULL)) {
+ schannel = ctxt->sax->serror;
+ data = ctxt->userData;
+ }
+ }
}
/*
* Check if structured error handler set
@@ -677,7 +705,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
* Display and format an error messages, gives file, line, position and
* extra parameters.
*/
-void XMLCDECL
+void
xmlParserError(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -720,7 +748,7 @@ xmlParserError(void *ctx, const char *msg, ...)
* Display and format a warning messages, gives file, line, position and
* extra parameters.
*/
-void XMLCDECL
+void
xmlParserWarning(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -769,7 +797,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
* Display and format an validity error messages, gives file,
* line, position and extra parameters.
*/
-void XMLCDECL
+void
xmlParserValidityError(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
@@ -813,7 +841,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
* Display and format a validity warning messages, gives file, line,
* position and extra parameters.
*/
-void XMLCDECL
+void
xmlParserValidityWarning(void *ctx, const char *msg, ...)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
diff --git a/chromium/third_party/libxml/src/genUnicode.py b/chromium/third_party/libxml/src/genUnicode.py
index ebf48e6e325..c6e13a8549c 100755
--- a/chromium/third_party/libxml/src/genUnicode.py
+++ b/chromium/third_party/libxml/src/genUnicode.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Original script modified in November 2003 to take advantage of
# the character-validation range routines, and updated to the
@@ -373,7 +373,7 @@ static xmlIntFunc
for block in bkeys:
name = block.replace('-', '')
- header.write("XMLPUBFUN int XMLCALL xmlUCSIs%s\t(int code);\n" % name)
+ header.write("XMLPUBFUN int xmlUCSIs%s\t(int code);\n" % name)
output.write("/**\n * xmlUCSIs%s:\n * @code: UCS code point\n" % (name))
output.write(" *\n * Check whether the character is part of %s UCS Block\n"%
(block))
@@ -388,7 +388,7 @@ for block in bkeys:
output.write("((code >= %s) && (code <= %s))" % (start, end))
output.write(");\n}\n\n")
-header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsBlock\t(int code, const char *block);\n\n")
+header.write("\nXMLPUBFUN int xmlUCSIsBlock\t(int code, const char *block);\n\n")
output.write(
"""/**
* xmlUCSIsBlock:
@@ -413,7 +413,7 @@ xmlUCSIsBlock(int code, const char *block) {
for name in ckeys:
ranges = Categories[name]
- header.write("XMLPUBFUN int XMLCALL xmlUCSIsCat%s\t(int code);\n" % name)
+ header.write("XMLPUBFUN int xmlUCSIsCat%s\t(int code);\n" % name)
output.write("/**\n * xmlUCSIsCat%s:\n * @code: UCS code point\n" % (name))
output.write(" *\n * Check whether the character is part of %s UCS Category\n"%
(name))
@@ -438,7 +438,7 @@ for name in ckeys:
hex(begin), hex(end)))
output.write(");\n}\n\n")
-header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsCat\t(int code, const char *cat);\n")
+header.write("\nXMLPUBFUN int xmlUCSIsCat\t(int code, const char *cat);\n")
output.write(
"""/**
* xmlUCSIsCat:
diff --git a/chromium/third_party/libxml/src/gentest.py b/chromium/third_party/libxml/src/gentest.py
index 172ed7e95cf..40d963b402d 100755
--- a/chromium/third_party/libxml/src/gentest.py
+++ b/chromium/third_party/libxml/src/gentest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# generate a tester program for the API
#
@@ -261,7 +261,6 @@ extra_post_call = {
"xmlParseChunk": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
"xmlParseExtParsedEnt": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
"xmlDOMWrapAdoptNode": "if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}",
- "xmlBufferSetAllocationScheme": "if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}"
}
modules = []
@@ -800,9 +799,9 @@ test_%s(void) {
if btype == "const_char_ptr" or btype == "const_xmlChar_ptr":
test.write(
" if ((%s != NULL) &&\n"
- " (%s > (int) strlen((const char *) %s) + 1))\n"
- " continue;\n"
- % (bnam, nam, bnam))
+ " (%s > xmlStrlen(BAD_CAST %s)))\n"
+ " %s = 0;\n"
+ % (bnam, nam, bnam, nam))
break
i = i + 1;
diff --git a/chromium/third_party/libxml/src/globals.c b/chromium/third_party/libxml/src/globals.c
index 7e5c1aa9ef3..c3e10a76084 100644
--- a/chromium/third_party/libxml/src/globals.c
+++ b/chromium/third_party/libxml/src/globals.c
@@ -22,6 +22,7 @@
#include <libxml/threads.h>
#include "private/error.h"
+#include "private/globals.h"
#include "private/threads.h"
#include "private/tree.h"
@@ -39,20 +40,24 @@
/*
* Mutex to protect "ForNewThreads" variables
*/
-static xmlMutexPtr xmlThrDefMutex = NULL;
+static xmlMutex xmlThrDefMutex;
/**
* xmlInitGlobals:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
+ * DEPRECATED: Alias for xmlInitParser.
+ */
+void xmlInitGlobals(void) {
+ xmlInitParser();
+}
+
+/**
+ * xmlInitGlobalsInternal:
*
* Additional initialisation for multi-threading
*/
-void xmlInitGlobals(void)
-{
- if (xmlThrDefMutex == NULL)
- xmlThrDefMutex = xmlNewMutex();
+void xmlInitGlobalsInternal(void) {
+ xmlInitMutex(&xmlThrDefMutex);
}
/************************************************************************
@@ -427,7 +432,7 @@ xmlSAXHandlerV1 xmlDefaultSAXHandler = {
xmlSAX2GetParameterEntity,
xmlSAX2CDataBlock,
xmlSAX2ExternalSubset,
- 0,
+ 1,
};
#endif /* LIBXML_SAX1_ENABLED */
@@ -480,10 +485,10 @@ xmlSAXHandlerV1 htmlDefaultSAXHandler = {
xmlParserWarning,
xmlParserError,
xmlParserError,
- xmlSAX2GetParameterEntity,
+ NULL,
xmlSAX2CDataBlock,
NULL,
- 0,
+ 1,
};
#endif /* LIBXML_HTML_ENABLED */
@@ -502,13 +507,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
(void *) gs, xmlGetThreadId());
#endif
- /*
- * Perform initialization as required by libxml
- */
- if (xmlThrDefMutex == NULL)
- xmlInitGlobals();
-
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
@@ -563,47 +562,49 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
gs->xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
memset(&gs->xmlLastError, 0, sizeof(xmlError));
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
}
/**
* xmlCleanupGlobals:
*
- * DEPRECATED: This function will be made private. Call xmlCleanupParser
+ * DEPRECATED: This function is a no-op. 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.
+ */
+void xmlCleanupGlobals(void) {
+}
+
+/**
+ * xmlCleanupGlobalsInternal:
*
* Additional cleanup for multi-threading
*/
-void xmlCleanupGlobals(void)
-{
+void xmlCleanupGlobalsInternal(void) {
xmlResetError(&xmlLastError);
- if (xmlThrDefMutex != NULL) {
- xmlFreeMutex(xmlThrDefMutex);
- xmlThrDefMutex = NULL;
- }
+ xmlCleanupMutex(&xmlThrDefMutex);
__xmlGlobalInitMutexDestroy();
}
void
xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
xmlGenericErrorContextThrDef = ctx;
if (handler != NULL)
xmlGenericErrorThrDef = handler;
else
xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
}
void
xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
xmlStructuredErrorContextThrDef = ctx;
xmlStructuredErrorThrDef = handler;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
}
/**
@@ -629,12 +630,12 @@ xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
{
xmlRegisterNodeFunc old;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
old = xmlRegisterNodeDefaultValueThrDef;
__xmlRegisterCallbacks = 1;
xmlRegisterNodeDefaultValueThrDef = func;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return(old);
}
@@ -662,12 +663,12 @@ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
{
xmlDeregisterNodeFunc old;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
old = xmlDeregisterNodeDefaultValueThrDef;
__xmlRegisterCallbacks = 1;
xmlDeregisterNodeDefaultValueThrDef = func;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return(old);
}
@@ -677,14 +678,14 @@ xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilena
{
xmlParserInputBufferCreateFilenameFunc old;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
old = xmlParserInputBufferCreateFilenameValueThrDef;
if (old == NULL) {
old = __xmlParserInputBufferCreateFilename;
}
xmlParserInputBufferCreateFilenameValueThrDef = func;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return(old);
}
@@ -694,7 +695,7 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun
{
xmlOutputBufferCreateFilenameFunc old;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
old = xmlOutputBufferCreateFilenameValueThrDef;
#ifdef LIBXML_OUTPUT_ENABLED
if (old == NULL) {
@@ -702,7 +703,7 @@ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc fun
}
#endif
xmlOutputBufferCreateFilenameValueThrDef = func;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return(old);
}
@@ -805,10 +806,10 @@ __xmlBufferAllocScheme(void) {
}
xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
xmlBufferAllocationScheme ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlBufferAllocSchemeThrDef;
xmlBufferAllocSchemeThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -822,10 +823,10 @@ __xmlDefaultBufferSize(void) {
}
int xmlThrDefDefaultBufferSize(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlDefaultBufferSizeThrDef;
xmlDefaultBufferSizeThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -859,10 +860,10 @@ __xmlDoValidityCheckingDefaultValue(void) {
}
int xmlThrDefDoValidityCheckingDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlDoValidityCheckingDefaultValueThrDef;
xmlDoValidityCheckingDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -912,10 +913,10 @@ __xmlGetWarningsDefaultValue(void) {
}
int xmlThrDefGetWarningsDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlGetWarningsDefaultValueThrDef;
xmlGetWarningsDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -929,10 +930,10 @@ __xmlIndentTreeOutput(void) {
}
int xmlThrDefIndentTreeOutput(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlIndentTreeOutputThrDef;
xmlIndentTreeOutputThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -946,10 +947,10 @@ __xmlTreeIndentString(void) {
}
const char * xmlThrDefTreeIndentString(const char * v) {
const char * ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlTreeIndentStringThrDef;
xmlTreeIndentStringThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -963,10 +964,10 @@ __xmlKeepBlanksDefaultValue(void) {
}
int xmlThrDefKeepBlanksDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlKeepBlanksDefaultValueThrDef;
xmlKeepBlanksDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -980,10 +981,10 @@ __xmlLineNumbersDefaultValue(void) {
}
int xmlThrDefLineNumbersDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlLineNumbersDefaultValueThrDef;
xmlLineNumbersDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -997,10 +998,10 @@ __xmlLoadExtDtdDefaultValue(void) {
}
int xmlThrDefLoadExtDtdDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlLoadExtDtdDefaultValueThrDef;
xmlLoadExtDtdDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -1014,10 +1015,10 @@ __xmlParserDebugEntities(void) {
}
int xmlThrDefParserDebugEntities(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlParserDebugEntitiesThrDef;
xmlParserDebugEntitiesThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -1040,10 +1041,10 @@ __xmlPedanticParserDefaultValue(void) {
}
int xmlThrDefPedanticParserDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlPedanticParserDefaultValueThrDef;
xmlPedanticParserDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -1057,10 +1058,10 @@ __xmlSaveNoEmptyTags(void) {
}
int xmlThrDefSaveNoEmptyTags(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlSaveNoEmptyTagsThrDef;
xmlSaveNoEmptyTagsThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
@@ -1074,10 +1075,10 @@ __xmlSubstituteEntitiesDefaultValue(void) {
}
int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
int ret;
- xmlMutexLock(xmlThrDefMutex);
+ xmlMutexLock(&xmlThrDefMutex);
ret = xmlSubstituteEntitiesDefaultValueThrDef;
xmlSubstituteEntitiesDefaultValueThrDef = v;
- xmlMutexUnlock(xmlThrDefMutex);
+ xmlMutexUnlock(&xmlThrDefMutex);
return ret;
}
diff --git a/chromium/third_party/libxml/src/include/libxml/HTMLparser.h b/chromium/third_party/libxml/src/include/libxml/HTMLparser.h
index e0e96833978..e43feeea2e7 100644
--- a/chromium/third_party/libxml/src/include/libxml/HTMLparser.h
+++ b/chromium/third_party/libxml/src/include/libxml/HTMLparser.h
@@ -84,100 +84,100 @@ struct _htmlEntityDesc {
* There is only few public functions.
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlInitAutoClose (void);
-XMLPUBFUN const htmlElemDesc * XMLCALL
+XMLPUBFUN const htmlElemDesc *
htmlTagLookup (const xmlChar *tag);
-XMLPUBFUN const htmlEntityDesc * XMLCALL
+XMLPUBFUN const htmlEntityDesc *
htmlEntityLookup(const xmlChar *name);
-XMLPUBFUN const htmlEntityDesc * XMLCALL
+XMLPUBFUN const htmlEntityDesc *
htmlEntityValueLookup(unsigned int value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name,
htmlNodePtr elem);
XML_DEPRECATED
-XMLPUBFUN const htmlEntityDesc * XMLCALL
+XMLPUBFUN const htmlEntityDesc *
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
const xmlChar **str);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlParseCharRef(htmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlParseElement(htmlParserCtxtPtr ctxt);
-XMLPUBFUN htmlParserCtxtPtr XMLCALL
+XMLPUBFUN htmlParserCtxtPtr
htmlNewParserCtxt(void);
-XMLPUBFUN htmlParserCtxtPtr XMLCALL
+XMLPUBFUN htmlParserCtxtPtr
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
void *userData);
-XMLPUBFUN htmlParserCtxtPtr XMLCALL
+XMLPUBFUN htmlParserCtxtPtr
htmlCreateMemoryParserCtxt(const char *buffer,
int size);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlParseDocument(htmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlSAXParseDoc (const xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlParseDoc (const xmlChar *cur,
const char *encoding);
-XMLPUBFUN htmlParserCtxtPtr XMLCALL
+XMLPUBFUN htmlParserCtxtPtr
htmlCreateFileParserCtxt(const char *filename,
const char *encoding);
XML_DEPRECATED
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlSAXParseFile(const char *filename,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlParseFile (const char *filename,
const char *encoding);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
UTF8ToHtml (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlIsScriptAttribute(const xmlChar *name);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlHandleOmittedElem(int val);
#ifdef LIBXML_PUSH_ENABLED
/**
* Interfaces for the Push mode.
*/
-XMLPUBFUN htmlParserCtxtPtr XMLCALL
+XMLPUBFUN htmlParserCtxtPtr
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
/*
@@ -202,63 +202,63 @@ typedef enum {
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
} htmlParserOption;
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlCtxtReset (htmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlReadFile (const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
@@ -280,10 +280,10 @@ typedef enum {
/* Using htmlElemDesc rather than name here, to emphasise the fact
that otherwise there's a lookup overhead
*/
-XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
-XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
-XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
-XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
+XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
+XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
+XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
+XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
/**
* htmlDefaultSubelement:
* @elt: HTML element
diff --git a/chromium/third_party/libxml/src/include/libxml/HTMLtree.h b/chromium/third_party/libxml/src/include/libxml/HTMLtree.h
index c0e110330c5..8e1ba90e915 100644
--- a/chromium/third_party/libxml/src/include/libxml/HTMLtree.h
+++ b/chromium/third_party/libxml/src/include/libxml/HTMLtree.h
@@ -59,73 +59,73 @@ extern "C" {
*/
#define HTML_PI_NODE XML_PI_NODE
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID);
-XMLPUBFUN htmlDocPtr XMLCALL
+XMLPUBFUN htmlDocPtr
htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
htmlGetMetaEncoding (htmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlDocDump (FILE *f,
xmlDocPtr cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlSaveFile (const char *filename,
xmlDocPtr cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlNodeDumpFile (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlNodeDumpFileFormat (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlSaveFileFormat (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
@@ -133,7 +133,7 @@ XMLPUBFUN void XMLCALL
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
htmlIsBooleanAttr (const xmlChar *name);
diff --git a/chromium/third_party/libxml/src/include/libxml/SAX.h b/chromium/third_party/libxml/src/include/libxml/SAX.h
index fa50568f253..ecd3211a5af 100644
--- a/chromium/third_party/libxml/src/include/libxml/SAX.h
+++ b/chromium/third_party/libxml/src/include/libxml/SAX.h
@@ -23,61 +23,61 @@
extern "C" {
#endif
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
getPublicId (void *ctx);
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
getSystemId (void *ctx);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
getLineNumber (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
getColumnNumber (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
isStandalone (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
hasInternalSubset (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
hasExternalSubset (void *ctx);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XML_DEPRECATED
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
getEntity (void *ctx,
const xmlChar *name);
XML_DEPRECATED
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
getParameterEntity (void *ctx,
const xmlChar *name);
XML_DEPRECATED
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
entityDecl (void *ctx,
const xmlChar *name,
int type,
@@ -85,7 +85,7 @@ XMLPUBFUN void XMLCALL
const xmlChar *systemId,
xmlChar *content);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
@@ -94,19 +94,19 @@ XMLPUBFUN void XMLCALL
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
@@ -114,83 +114,83 @@ XMLPUBFUN void XMLCALL
const xmlChar *notationName);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
startDocument (void *ctx);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
endDocument (void *ctx);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
endElement (void *ctx,
const xmlChar *name);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
reference (void *ctx,
const xmlChar *name);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
characters (void *ctx,
const xmlChar *ch,
int len);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
setNamespace (void *ctx,
const xmlChar *name);
XML_DEPRECATED
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
getNamespace (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
checkNamespace (void *ctx,
xmlChar *nameSpace);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
comment (void *ctx,
const xmlChar *value);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#endif /* LIBXML_SAX1_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/libxml/SAX2.h b/chromium/third_party/libxml/src/include/libxml/SAX2.h
index 2d75f9b0f00..35e7a5f4b2a 100644
--- a/chromium/third_party/libxml/src/include/libxml/SAX2.h
+++ b/chromium/third_party/libxml/src/include/libxml/SAX2.h
@@ -20,55 +20,55 @@
#ifdef __cplusplus
extern "C" {
#endif
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlSAX2GetPublicId (void *ctx);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlSAX2GetSystemId (void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAX2GetLineNumber (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAX2GetColumnNumber (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAX2IsStandalone (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAX2HasInternalSubset (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAX2HasExternalSubset (void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2InternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2ExternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlSAX2GetEntity (void *ctx,
const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlSAX2GetParameterEntity (void *ctx,
const xmlChar *name);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlSAX2ResolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2EntityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2AttributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
@@ -76,38 +76,38 @@ XMLPUBFUN void XMLCALL
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2ElementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2NotationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2UnparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2StartDocument (void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2EndElement (void *ctx,
const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
@@ -117,55 +117,55 @@ XMLPUBFUN void XMLCALL
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2EndElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2Reference (void *ctx,
const xmlChar *name);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2Characters (void *ctx,
const xmlChar *ch,
int len);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2Comment (void *ctx,
const xmlChar *value);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2CDataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAXDefaultVersion (int version);
#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAXVersion (xmlSAXHandler *hdlr,
int version);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
htmlDefaultSAXHandlerInit (void);
#endif
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/c14n.h b/chromium/third_party/libxml/src/include/libxml/c14n.h
index af93de63a4c..51e541996a5 100644
--- a/chromium/third_party/libxml/src/include/libxml/c14n.h
+++ b/chromium/third_party/libxml/src/include/libxml/c14n.h
@@ -66,7 +66,7 @@ typedef enum {
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
} xmlC14NMode;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
@@ -74,7 +74,7 @@ XMLPUBFUN int XMLCALL
int with_comments,
xmlOutputBufferPtr buf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlC14NDocDumpMemory (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
@@ -82,7 +82,7 @@ XMLPUBFUN int XMLCALL
int with_comments,
xmlChar **doc_txt_ptr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlC14NDocSave (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
@@ -109,7 +109,7 @@ typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
xmlNodePtr node,
xmlNodePtr parent);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
void* user_data,
diff --git a/chromium/third_party/libxml/src/include/libxml/catalog.h b/chromium/third_party/libxml/src/include/libxml/catalog.h
index 26b178dbbc9..02fa7ab2a03 100644
--- a/chromium/third_party/libxml/src/include/libxml/catalog.h
+++ b/chromium/third_party/libxml/src/include/libxml/catalog.h
@@ -66,113 +66,113 @@ typedef xmlCatalog *xmlCatalogPtr;
/*
* Operations on a given catalog.
*/
-XMLPUBFUN xmlCatalogPtr XMLCALL
+XMLPUBFUN xmlCatalogPtr
xmlNewCatalog (int sgml);
-XMLPUBFUN xmlCatalogPtr XMLCALL
+XMLPUBFUN xmlCatalogPtr
xmlLoadACatalog (const char *filename);
-XMLPUBFUN xmlCatalogPtr XMLCALL
+XMLPUBFUN xmlCatalogPtr
xmlLoadSGMLSuperCatalog (const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlACatalogAdd (xmlCatalogPtr catal,
const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar *pubID,
const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar *URI);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlACatalogDump (xmlCatalogPtr catal,
FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeCatalog (xmlCatalogPtr catal);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCatalogIsEmpty (xmlCatalogPtr catal);
/*
* Global operations.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitializeCatalog (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlLoadCatalog (const char *filename);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlLoadCatalogs (const char *paths);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCatalogCleanup (void);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCatalogDump (FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogResolve (const xmlChar *pubID,
const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogResolveSystem (const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogResolvePublic (const xmlChar *pubID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogResolveURI (const xmlChar *URI);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCatalogAdd (const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCatalogRemove (const xmlChar *value);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlParseCatalogFile (const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCatalogConvert (void);
/*
* Strictly minimal interfaces for per-document catalogs used
* by the parser.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCatalogFreeLocal (void *catalogs);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlCatalogAddLocal (void *catalogs,
const xmlChar *URL);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogLocalResolve (void *catalogs,
const xmlChar *pubID,
const xmlChar *sysID);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI);
/*
* Preference settings.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCatalogSetDebug (int level);
-XMLPUBFUN xmlCatalogPrefer XMLCALL
+XMLPUBFUN xmlCatalogPrefer
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCatalogSetDefaults (xmlCatalogAllow allow);
-XMLPUBFUN xmlCatalogAllow XMLCALL
+XMLPUBFUN xmlCatalogAllow
xmlCatalogGetDefaults (void);
/* DEPRECATED interfaces */
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlCatalogGetSystem (const xmlChar *sysID);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlCatalogGetPublic (const xmlChar *pubID);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/chvalid.h b/chromium/third_party/libxml/src/include/libxml/chvalid.h
index fb43016982d..8225c95ee86 100644
--- a/chromium/third_party/libxml/src/include/libxml/chvalid.h
+++ b/chromium/third_party/libxml/src/include/libxml/chvalid.h
@@ -51,7 +51,7 @@ struct _xmlChRangeGroup {
/**
* Range checking routine
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
@@ -207,21 +207,21 @@ XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsBaseChar(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsBlank(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsChar(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsCombining(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsDigit(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsExtender(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsIdeographic(unsigned int ch);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsPubidChar(unsigned int ch);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/debugXML.h b/chromium/third_party/libxml/src/include/libxml/debugXML.h
index 5b3be13d857..82746873648 100644
--- a/chromium/third_party/libxml/src/include/libxml/debugXML.h
+++ b/chromium/third_party/libxml/src/include/libxml/debugXML.h
@@ -25,39 +25,39 @@ extern "C" {
/*
* The standard Dump routines.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpString (FILE *output,
const xmlChar *str);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpNode (FILE *output,
xmlNodePtr node,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpNodeList (FILE *output,
xmlNodePtr node,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpDocumentHead(FILE *output,
xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpDTD (FILE *output,
xmlDtdPtr dtd);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc);
@@ -67,7 +67,7 @@ XMLPUBFUN void XMLCALL
* *
****************************************************************/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDebugCheckDocument (FILE * output,
xmlDocPtr doc);
@@ -77,12 +77,12 @@ XMLPUBFUN int XMLCALL
* *
****************************************************************/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlLsOneNode (FILE *output, xmlNodePtr node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlLsCountNode (xmlNodePtr node);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlBoolToText (int boolval);
/****************************************************************
@@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlShellPrintXPathError (int errorType,
const char *arg);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellList (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellBase (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellDir (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellLoad (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlShellPrintNode (xmlNodePtr node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellCat (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellWrite (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellSave (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellValidate (xmlShellCtxtPtr ctxt,
char *dtd,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_VALID_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellDu (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr tree,
xmlNodePtr node2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlShellPwd (xmlShellCtxtPtr ctxt,
char *buffer,
xmlNodePtr node,
@@ -201,7 +201,7 @@ XMLPUBFUN int XMLCALL
/*
* The Shell interface.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlShell (xmlDocPtr doc,
char *filename,
xmlShellReadlineFunc input,
diff --git a/chromium/third_party/libxml/src/include/libxml/dict.h b/chromium/third_party/libxml/src/include/libxml/dict.h
index 91f74d1b8ff..eb8f85db6ef 100644
--- a/chromium/third_party/libxml/src/include/libxml/dict.h
+++ b/chromium/third_party/libxml/src/include/libxml/dict.h
@@ -28,51 +28,51 @@ typedef xmlDict *xmlDictPtr;
* Initializer
*/
XML_DEPRECATED
-XMLPUBFUN int XMLCALL xmlInitializeDict(void);
+XMLPUBFUN int xmlInitializeDict(void);
/*
* Constructor and destructor.
*/
-XMLPUBFUN xmlDictPtr XMLCALL
+XMLPUBFUN xmlDictPtr
xmlDictCreate (void);
-XMLPUBFUN size_t XMLCALL
+XMLPUBFUN size_t
xmlDictSetLimit (xmlDictPtr dict,
size_t limit);
-XMLPUBFUN size_t XMLCALL
+XMLPUBFUN size_t
xmlDictGetUsage (xmlDictPtr dict);
-XMLPUBFUN xmlDictPtr XMLCALL
+XMLPUBFUN xmlDictPtr
xmlDictCreateSub(xmlDictPtr sub);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDictReference(xmlDictPtr dict);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDictFree (xmlDictPtr dict);
/*
* Lookup of entry in the dictionary.
*/
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlDictLookup (xmlDictPtr dict,
const xmlChar *name,
int len);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlDictExists (xmlDictPtr dict,
const xmlChar *name,
int len);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlDictQLookup (xmlDictPtr dict,
const xmlChar *prefix,
const xmlChar *name);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDictOwns (xmlDictPtr dict,
const xmlChar *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDictSize (xmlDictPtr dict);
/*
* Cleanup function
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDictCleanup (void);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/encoding.h b/chromium/third_party/libxml/src/include/libxml/encoding.h
index 381e1886bf8..231b0be1d59 100644
--- a/chromium/third_party/libxml/src/include/libxml/encoding.h
+++ b/chromium/third_party/libxml/src/include/libxml/encoding.h
@@ -154,18 +154,18 @@ extern "C" {
* Interfaces for encoding handlers.
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitCharEncodingHandlers (void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupCharEncodingHandlers (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+XMLPUBFUN xmlCharEncodingHandlerPtr
xmlGetCharEncodingHandler (xmlCharEncoding enc);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+XMLPUBFUN xmlCharEncodingHandlerPtr
xmlFindCharEncodingHandler (const char *name);
-XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+XMLPUBFUN xmlCharEncodingHandlerPtr
xmlNewCharEncodingHandler (const char *name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output);
@@ -173,54 +173,54 @@ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
/*
* Interfaces for encoding names and aliases.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlAddEncodingAlias (const char *name,
const char *alias);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDelEncodingAlias (const char *alias);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlGetEncodingAlias (const char *alias);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupEncodingAliases (void);
-XMLPUBFUN xmlCharEncoding XMLCALL
+XMLPUBFUN xmlCharEncoding
xmlParseCharEncoding (const char *name);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlGetCharEncodingName (xmlCharEncoding enc);
/*
* Interfaces directly used by the parsers.
*/
-XMLPUBFUN xmlCharEncoding XMLCALL
+XMLPUBFUN xmlCharEncoding
xmlDetectCharEncoding (const unsigned char *in,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
/*
* Export a few useful functions
*/
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
UTF8Toisolat1 (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
isolat1ToUTF8 (unsigned char *out,
int *outlen,
const unsigned char *in,
diff --git a/chromium/third_party/libxml/src/include/libxml/entities.h b/chromium/third_party/libxml/src/include/libxml/entities.h
index 2aca52b74ee..2c69514cd20 100644
--- a/chromium/third_party/libxml/src/include/libxml/entities.h
+++ b/chromium/third_party/libxml/src/include/libxml/entities.h
@@ -35,13 +35,8 @@ typedef enum {
* and the linkind data needed for the linking in the hash table.
*/
-typedef enum {
- XML_ENTITY_NOT_BEING_CHECKED,
- XML_ENTITY_BEING_CHECKED /* entity check is in progress */
-} xmlEntityRecursionGuard;
-
struct _xmlEntity {
- void *_private; /* application data */
+ void *_private; /* application data */
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
const xmlChar *name; /* Entity name */
struct _xmlNode *children; /* First child link */
@@ -61,11 +56,8 @@ struct _xmlEntity {
struct _xmlEntity *nexte; /* unused */
const xmlChar *URI; /* the full URI as computed */
int owner; /* does the entity own the childrens */
- int checked; /* was the entity content checked and */
- /* l.o. bit: replacement contains '<' */
- /* remaining bits: one plus count of */
- /* entity references from this entity */
- xmlEntityRecursionGuard guard;
+ int flags; /* various flags */
+ unsigned long expandedSize; /* expanded size */
};
/*
@@ -82,72 +74,72 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlNewEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlGetPredefinedEntity (const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlGetDocEntity (const xmlDoc *doc,
const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name);
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlEncodeSpecialChars (const xmlDoc *doc,
const xmlChar *input);
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+XMLPUBFUN xmlEntitiesTablePtr
xmlCreateEntitiesTable (void);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+XMLPUBFUN xmlEntitiesTablePtr
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/libxml/globals.h b/chromium/third_party/libxml/src/include/libxml/globals.h
index a9ec105b38a..59697290528 100644
--- a/chromium/third_party/libxml/src/include/libxml/globals.h
+++ b/chromium/third_party/libxml/src/include/libxml/globals.h
@@ -25,9 +25,9 @@ extern "C" {
#endif
XML_DEPRECATED
-XMLPUBFUN void XMLCALL xmlInitGlobals(void);
+XMLPUBFUN void xmlInitGlobals(void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
+XMLPUBFUN void xmlCleanupGlobals(void);
/**
* xmlParserInputBufferCreateFilenameFunc:
@@ -60,9 +60,9 @@ typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI
int compression);
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
-XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
+xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
-XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
+xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
/*
* Externally global symbols which need to be protected for backwards
@@ -175,20 +175,20 @@ struct _xmlGlobalState
extern "C" {
#endif
-XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
+XMLPUBFUN void xmlInitializeGlobalState(xmlGlobalStatePtr gs);
-XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
+XMLPUBFUN void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
-XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
+XMLPUBFUN void xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
-XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
-XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
-XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
-XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+XMLPUBFUN xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
xmlThrDefParserInputBufferCreateFilenameDefault(
xmlParserInputBufferCreateFilenameFunc func);
@@ -206,7 +206,7 @@ XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
/** DOC_DISABLE */
#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
+XMLPUBFUN xmlMallocFunc * __xmlMalloc(void);
#define xmlMalloc \
(*(__xmlMalloc()))
#else
@@ -214,7 +214,7 @@ XMLPUBVAR xmlMallocFunc xmlMalloc;
#endif
#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
+XMLPUBFUN xmlMallocFunc * __xmlMallocAtomic(void);
#define xmlMallocAtomic \
(*(__xmlMallocAtomic()))
#else
@@ -222,7 +222,7 @@ XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
#endif
#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
+XMLPUBFUN xmlReallocFunc * __xmlRealloc(void);
#define xmlRealloc \
(*(__xmlRealloc()))
#else
@@ -230,7 +230,7 @@ XMLPUBVAR xmlReallocFunc xmlRealloc;
#endif
#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
+XMLPUBFUN xmlFreeFunc * __xmlFree(void);
#define xmlFree \
(*(__xmlFree()))
#else
@@ -238,7 +238,7 @@ XMLPUBVAR xmlFreeFunc xmlFree;
#endif
#ifdef LIBXML_THREAD_ENABLED
-XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
+XMLPUBFUN xmlStrdupFunc * __xmlMemStrdup(void);
#define xmlMemStrdup \
(*(__xmlMemStrdup()))
#else
@@ -256,7 +256,7 @@ XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
#ifdef LIBXML_HTML_ENABLED
XML_DEPRECATED
-XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
+XMLPUBFUN xmlSAXHandlerV1 * __htmlDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
#define htmlDefaultSAXHandler \
(*(__htmlDefaultSAXHandler()))
@@ -266,7 +266,7 @@ XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
#endif
#endif
-XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
+XMLPUBFUN xmlError * __xmlLastError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLastError \
(*(__xmlLastError()))
@@ -282,7 +282,7 @@ XMLPUBVAR xmlError xmlLastError;
XML_DEPRECATED
-XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
+XMLPUBFUN int * __oldXMLWDcompatibility(void);
#ifdef LIBXML_THREAD_ENABLED
#define oldXMLWDcompatibility \
(*(__oldXMLWDcompatibility()))
@@ -292,7 +292,7 @@ XMLPUBVAR int oldXMLWDcompatibility;
#endif
XML_DEPRECATED
-XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
+XMLPUBFUN xmlBufferAllocationScheme * __xmlBufferAllocScheme(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlBufferAllocScheme \
(*(__xmlBufferAllocScheme()))
@@ -301,11 +301,11 @@ XML_DEPRECATED
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
#endif
XML_DEPRECATED
-XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+XMLPUBFUN xmlBufferAllocationScheme
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
XML_DEPRECATED
-XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
+XMLPUBFUN int * __xmlDefaultBufferSize(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultBufferSize \
(*(__xmlDefaultBufferSize()))
@@ -314,10 +314,10 @@ XML_DEPRECATED
XMLPUBVAR int xmlDefaultBufferSize;
#endif
XML_DEPRECATED
-XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
+XMLPUBFUN int xmlThrDefDefaultBufferSize(int v);
XML_DEPRECATED
-XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
+XMLPUBFUN xmlSAXHandlerV1 * __xmlDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXHandler \
(*(__xmlDefaultSAXHandler()))
@@ -327,7 +327,7 @@ XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
#endif
XML_DEPRECATED
-XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
+XMLPUBFUN xmlSAXLocator * __xmlDefaultSAXLocator(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXLocator \
(*(__xmlDefaultSAXLocator()))
@@ -336,16 +336,16 @@ XML_DEPRECATED
XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
#endif
-XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
+XMLPUBFUN int * __xmlDoValidityCheckingDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDoValidityCheckingDefaultValue \
(*(__xmlDoValidityCheckingDefaultValue()))
#else
XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
+XMLPUBFUN int xmlThrDefDoValidityCheckingDefaultValue(int v);
-XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
+XMLPUBFUN xmlGenericErrorFunc * __xmlGenericError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericError \
(*(__xmlGenericError()))
@@ -353,7 +353,7 @@ XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
#endif
-XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
+XMLPUBFUN xmlStructuredErrorFunc * __xmlStructuredError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlStructuredError \
(*(__xmlStructuredError()))
@@ -361,7 +361,7 @@ XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
#endif
-XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
+XMLPUBFUN void * * __xmlGenericErrorContext(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericErrorContext \
(*(__xmlGenericErrorContext()))
@@ -369,7 +369,7 @@ XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
XMLPUBVAR void * xmlGenericErrorContext;
#endif
-XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
+XMLPUBFUN void * * __xmlStructuredErrorContext(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlStructuredErrorContext \
(*(__xmlStructuredErrorContext()))
@@ -377,44 +377,44 @@ XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
XMLPUBVAR void * xmlStructuredErrorContext;
#endif
-XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
+XMLPUBFUN int * __xmlGetWarningsDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGetWarningsDefaultValue \
(*(__xmlGetWarningsDefaultValue()))
#else
XMLPUBVAR int xmlGetWarningsDefaultValue;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
+XMLPUBFUN int xmlThrDefGetWarningsDefaultValue(int v);
-XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
+XMLPUBFUN int * __xmlIndentTreeOutput(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlIndentTreeOutput \
(*(__xmlIndentTreeOutput()))
#else
XMLPUBVAR int xmlIndentTreeOutput;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
+XMLPUBFUN int xmlThrDefIndentTreeOutput(int v);
-XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
+XMLPUBFUN const char * * __xmlTreeIndentString(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlTreeIndentString \
(*(__xmlTreeIndentString()))
#else
XMLPUBVAR const char * xmlTreeIndentString;
#endif
-XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
+XMLPUBFUN const char * xmlThrDefTreeIndentString(const char * v);
-XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
+XMLPUBFUN int * __xmlKeepBlanksDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlKeepBlanksDefaultValue \
(*(__xmlKeepBlanksDefaultValue()))
#else
XMLPUBVAR int xmlKeepBlanksDefaultValue;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
+XMLPUBFUN int xmlThrDefKeepBlanksDefaultValue(int v);
XML_DEPRECATED
-XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
+XMLPUBFUN int * __xmlLineNumbersDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLineNumbersDefaultValue \
(*(__xmlLineNumbersDefaultValue()))
@@ -423,27 +423,27 @@ XML_DEPRECATED
XMLPUBVAR int xmlLineNumbersDefaultValue;
#endif
XML_DEPRECATED
-XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
+XMLPUBFUN int xmlThrDefLineNumbersDefaultValue(int v);
-XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
+XMLPUBFUN int * __xmlLoadExtDtdDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLoadExtDtdDefaultValue \
(*(__xmlLoadExtDtdDefaultValue()))
#else
XMLPUBVAR int xmlLoadExtDtdDefaultValue;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
+XMLPUBFUN int xmlThrDefLoadExtDtdDefaultValue(int v);
-XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
+XMLPUBFUN int * __xmlParserDebugEntities(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserDebugEntities \
(*(__xmlParserDebugEntities()))
#else
XMLPUBVAR int xmlParserDebugEntities;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
+XMLPUBFUN int xmlThrDefParserDebugEntities(int v);
-XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
+XMLPUBFUN const char * * __xmlParserVersion(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserVersion \
(*(__xmlParserVersion()))
@@ -452,7 +452,7 @@ XMLPUBVAR const char * xmlParserVersion;
#endif
XML_DEPRECATED
-XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
+XMLPUBFUN int * __xmlPedanticParserDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlPedanticParserDefaultValue \
(*(__xmlPedanticParserDefaultValue()))
@@ -461,28 +461,28 @@ XML_DEPRECATED
XMLPUBVAR int xmlPedanticParserDefaultValue;
#endif
XML_DEPRECATED
-XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
+XMLPUBFUN int xmlThrDefPedanticParserDefaultValue(int v);
-XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
+XMLPUBFUN int * __xmlSaveNoEmptyTags(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlSaveNoEmptyTags \
(*(__xmlSaveNoEmptyTags()))
#else
XMLPUBVAR int xmlSaveNoEmptyTags;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
+XMLPUBFUN int xmlThrDefSaveNoEmptyTags(int v);
-XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
+XMLPUBFUN int * __xmlSubstituteEntitiesDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlSubstituteEntitiesDefaultValue \
(*(__xmlSubstituteEntitiesDefaultValue()))
#else
XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
#endif
-XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
+XMLPUBFUN int xmlThrDefSubstituteEntitiesDefaultValue(int v);
XML_DEPRECATED
-XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
+XMLPUBFUN xmlRegisterNodeFunc * __xmlRegisterNodeDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlRegisterNodeDefaultValue \
(*(__xmlRegisterNodeDefaultValue()))
@@ -492,7 +492,7 @@ XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
#endif
XML_DEPRECATED
-XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
+XMLPUBFUN xmlDeregisterNodeFunc * __xmlDeregisterNodeDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDeregisterNodeDefaultValue \
(*(__xmlDeregisterNodeDefaultValue()))
@@ -502,7 +502,7 @@ XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
#endif
XML_DEPRECATED
-XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * \
__xmlParserInputBufferCreateFilenameValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserInputBufferCreateFilenameValue \
@@ -513,7 +513,7 @@ XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilen
#endif
XML_DEPRECATED
-XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc * __xmlOutputBufferCreateFilenameValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlOutputBufferCreateFilenameValue \
(*(__xmlOutputBufferCreateFilenameValue()))
diff --git a/chromium/third_party/libxml/src/include/libxml/hash.h b/chromium/third_party/libxml/src/include/libxml/hash.h
index b682b6b9403..1dac035b02f 100644
--- a/chromium/third_party/libxml/src/include/libxml/hash.h
+++ b/chromium/third_party/libxml/src/include/libxml/hash.h
@@ -103,48 +103,48 @@ typedef void (*xmlHashScannerFull)(void *payload, void *data,
/*
* Constructor and destructor.
*/
-XMLPUBFUN xmlHashTablePtr XMLCALL
+XMLPUBFUN xmlHashTablePtr
xmlHashCreate (int size);
-XMLPUBFUN xmlHashTablePtr XMLCALL
+XMLPUBFUN xmlHashTablePtr
xmlHashCreateDict(int size,
xmlDictPtr dict);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashFree (xmlHashTablePtr table,
xmlHashDeallocator f);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashDefaultDeallocator(void *entry,
const xmlChar *name);
/*
* Add a new entry to the hash table.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashAddEntry (xmlHashTablePtr table,
const xmlChar *name,
void *userdata);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashUpdateEntry(xmlHashTablePtr table,
const xmlChar *name,
void *userdata,
xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashAddEntry2(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
void *userdata);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashUpdateEntry2(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
void *userdata,
xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashAddEntry3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
void *userdata);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashUpdateEntry3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
@@ -155,13 +155,13 @@ XMLPUBFUN int XMLCALL
/*
* Remove an entry from the hash table.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, xmlHashDeallocator f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3,
xmlHashDeallocator f);
@@ -169,29 +169,29 @@ XMLPUBFUN int XMLCALL
/*
* Retrieve the userdata.
*/
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashLookup (xmlHashTablePtr table,
const xmlChar *name);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashLookup2 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashLookup3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashQLookup (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashQLookup2 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix,
const xmlChar *name2,
const xmlChar *prefix2);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlHashQLookup3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix,
@@ -203,27 +203,27 @@ XMLPUBFUN void * XMLCALL
/*
* Helpers.
*/
-XMLPUBFUN xmlHashTablePtr XMLCALL
+XMLPUBFUN xmlHashTablePtr
xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHashSize (xmlHashTablePtr table);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashScan (xmlHashTablePtr table,
xmlHashScanner f,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashScan3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
xmlHashScanner f,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashScanFull (xmlHashTablePtr table,
xmlHashScannerFull f,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHashScanFull3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
diff --git a/chromium/third_party/libxml/src/include/libxml/list.h b/chromium/third_party/libxml/src/include/libxml/list.h
index 3211c755247..5eab8f59d83 100644
--- a/chromium/third_party/libxml/src/include/libxml/list.h
+++ b/chromium/third_party/libxml/src/include/libxml/list.h
@@ -52,79 +52,79 @@ typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
typedef int (*xmlListWalker) (const void *data, void *user);
/* Creation/Deletion */
-XMLPUBFUN xmlListPtr XMLCALL
+XMLPUBFUN xmlListPtr
xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListDelete (xmlListPtr l);
/* Basic Operators */
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlListSearch (xmlListPtr l,
void *data);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlListReverseSearch (xmlListPtr l,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListInsert (xmlListPtr l,
void *data) ;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListAppend (xmlListPtr l,
void *data) ;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListRemoveFirst (xmlListPtr l,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListRemoveLast (xmlListPtr l,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListRemoveAll (xmlListPtr l,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListClear (xmlListPtr l);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListEmpty (xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL
+XMLPUBFUN xmlLinkPtr
xmlListFront (xmlListPtr l);
-XMLPUBFUN xmlLinkPtr XMLCALL
+XMLPUBFUN xmlLinkPtr
xmlListEnd (xmlListPtr l);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListSize (xmlListPtr l);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListPopFront (xmlListPtr l);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListPopBack (xmlListPtr l);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListPushFront (xmlListPtr l,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListPushBack (xmlListPtr l,
void *data);
/* Advanced Operators */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListReverse (xmlListPtr l);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListSort (xmlListPtr l);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListWalk (xmlListPtr l,
xmlListWalker walker,
void *user);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker,
void *user);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlListMerge (xmlListPtr l1,
xmlListPtr l2);
-XMLPUBFUN xmlListPtr XMLCALL
+XMLPUBFUN xmlListPtr
xmlListDup (const xmlListPtr old);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlListCopy (xmlListPtr cur,
const xmlListPtr old);
/* Link operators */
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlLinkGetData (xmlLinkPtr lk);
/* xmlListUnique() */
diff --git a/chromium/third_party/libxml/src/include/libxml/nanoftp.h b/chromium/third_party/libxml/src/include/libxml/nanoftp.h
index f39bde5be07..87a22aab01f 100644
--- a/chromium/third_party/libxml/src/include/libxml/nanoftp.h
+++ b/chromium/third_party/libxml/src/include/libxml/nanoftp.h
@@ -80,52 +80,52 @@ typedef void (*ftpDataCallback) (void *userData,
* Init
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoFTPInit (void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoFTPCleanup (void);
/*
* Creating/freeing contexts.
*/
XML_DEPRECATED
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoFTPNewCtxt (const char *URL);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoFTPFreeCtxt (void * ctx);
XML_DEPRECATED
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoFTPConnectTo (const char *server,
int port);
/*
* Opening/closing session connections.
*/
XML_DEPRECATED
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoFTPOpen (const char *URL);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPConnect (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPClose (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPQuit (void *ctx);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoFTPScanProxy (const char *URL);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoFTPProxy (const char *host,
int port,
const char *user,
const char *passwd,
int type);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPUpdateURL (void *ctx,
const char *URL);
@@ -133,48 +133,48 @@ XMLPUBFUN int XMLCALL
* Rather internal commands.
*/
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPGetResponse (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPCheckResponse (void *ctx);
/*
* CD/DIR/GET handlers.
*/
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPCwd (void *ctx,
const char *directory);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPDele (void *ctx,
const char *file);
XML_DEPRECATED
-XMLPUBFUN SOCKET XMLCALL
+XMLPUBFUN SOCKET
xmlNanoFTPGetConnection (void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPCloseConnection(void *ctx);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPList (void *ctx,
ftpListCallback callback,
void *userData,
const char *filename);
XML_DEPRECATED
-XMLPUBFUN SOCKET XMLCALL
+XMLPUBFUN SOCKET
xmlNanoFTPGetSocket (void *ctx,
const char *filename);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPGet (void *ctx,
ftpDataCallback callback,
void *userData,
const char *filename);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoFTPRead (void *ctx,
void *dest,
int len);
diff --git a/chromium/third_party/libxml/src/include/libxml/nanohttp.h b/chromium/third_party/libxml/src/include/libxml/nanohttp.h
index 22b8fb43381..3b5e037fc5b 100644
--- a/chromium/third_party/libxml/src/include/libxml/nanohttp.h
+++ b/chromium/third_party/libxml/src/include/libxml/nanohttp.h
@@ -18,24 +18,24 @@
#ifdef __cplusplus
extern "C" {
#endif
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoHTTPInit (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoHTTPCleanup (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoHTTPScanProxy (const char *URL);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoHTTPFetch (const char *URL,
const char *filename,
char **contentType);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoHTTPMethod (const char *URL,
const char *method,
const char *input,
char **contentType,
const char *headers,
int ilen);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoHTTPMethodRedir (const char *URL,
const char *method,
const char *input,
@@ -43,35 +43,35 @@ XMLPUBFUN void * XMLCALL
char **redir,
const char *headers,
int ilen);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoHTTPOpen (const char *URL,
char **contentType);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlNanoHTTPOpenRedir (const char *URL,
char **contentType,
char **redir);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoHTTPReturnCode (void *ctx);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlNanoHTTPAuthHeader (void *ctx);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlNanoHTTPRedir (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoHTTPContentLength( void * ctx );
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlNanoHTTPEncoding (void *ctx);
-XMLPUBFUN const char * XMLCALL
+XMLPUBFUN const char *
xmlNanoHTTPMimeType (void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoHTTPRead (void *ctx,
void *dest,
int len);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNanoHTTPSave (void *ctxt,
const char *filename);
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNanoHTTPClose (void *ctx);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/parser.h b/chromium/third_party/libxml/src/include/libxml/parser.h
index 04c53346474..0bc3469186f 100644
--- a/chromium/third_party/libxml/src/include/libxml/parser.h
+++ b/chromium/third_party/libxml/src/include/libxml/parser.h
@@ -61,17 +61,14 @@ struct _xmlParserInput {
int length; /* length if known */
int line; /* Current line */
int col; /* Current column */
- /*
- * NOTE: consumed is only tested for equality in the parser code,
- * so even if there is an overflow this should not give troubles
- * for parsing very large instances.
- */
unsigned long consumed; /* How many xmlChars already consumed */
xmlParserInputDeallocate free; /* function to deallocate the base */
const xmlChar *encoding; /* the encoding string for entity */
const xmlChar *version; /* the version string for entity */
int standalone; /* Was that entity marked standalone */
int id; /* an unique identifier for the entity */
+ unsigned long parentConsumed; /* consumed bytes from parents */
+ xmlEntityPtr entity; /* entity, if any */
};
/**
@@ -300,7 +297,7 @@ struct _xmlParserCtxt {
*/
xmlError lastError;
xmlParserMode parseMode; /* the parser mode */
- unsigned long nbentities; /* number of entities references */
+ unsigned long nbentities; /* unused */
unsigned long sizeentities; /* size of parsed entities */
/* for use by HTML non-recursive parser */
@@ -311,6 +308,10 @@ struct _xmlParserCtxt {
int input_id; /* we need to label inputs */
unsigned long sizeentcopy; /* volume of entity copy */
+
+ int endCheckState; /* quote state for push parser */
+ unsigned short nbErrors; /* number of errors */
+ unsigned short nbWarnings; /* number of warnings */
};
/**
@@ -605,7 +606,7 @@ typedef void (*cdataBlockSAXFunc) (
*
* Display and format a warning messages, callback.
*/
-typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
+typedef void (*warningSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* errorSAXFunc:
@@ -615,7 +616,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
*
* Display and format an error messages, callback.
*/
-typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
+typedef void (*errorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* fatalErrorSAXFunc:
@@ -627,7 +628,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
*/
-typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
+typedef void (*fatalErrorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* isStandaloneSAXFunc:
@@ -819,18 +820,18 @@ extern "C" {
/*
* Init/Cleanup
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitParser (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupParser (void);
/*
* Input functions
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParserInputRead (xmlParserInputPtr in,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParserInputGrow (xmlParserInputPtr in,
int len);
@@ -838,23 +839,23 @@ XMLPUBFUN int XMLCALL
* Basic parsing Interfaces
*/
#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlParseDoc (const xmlChar *cur);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlParseFile (const char *filename);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlParseMemory (const char *buffer,
int size);
#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSubstituteEntitiesDefault(int val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlKeepBlanksDefault (int val);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlStopParser (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPedanticParserDefault(int val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlLineNumbersDefault (int val);
#ifdef LIBXML_SAX1_ENABLED
@@ -862,92 +863,92 @@ XMLPUBFUN int XMLCALL
* Recovery mode
*/
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlRecoverDoc (const xmlChar *cur);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlRecoverMemory (const char *buffer,
int size);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlRecoverFile (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
/*
* Less common routines and SAX interfaces
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseDocument (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void *user_data,
const char *filename);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void *user_data,
const char *buffer,
int size);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
// TODO(https://github.com/google/maldoca/issues/87): Re-Deprecate this when
// maldoca stops using xmlSAXParseMemory.
//XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery,
void *data);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename,
int recovery);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char *filename,
int recovery,
void *data);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char *filename);
XML_DEPRECATED
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlParseEntity (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XML_DEPRECATED
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlParseDTD (const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlIOParseDTD (xmlSAXHandlerPtr sax,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
#endif /* LIBXML_VALID_ENABLE */
#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseBalancedChunkMemory(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@@ -955,14 +956,14 @@ XMLPUBFUN int XMLCALL
const xmlChar *string,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN xmlParserErrors XMLCALL
+XMLPUBFUN xmlParserErrors
xmlParseInNodeContext (xmlNodePtr node,
const char *data,
int datalen,
int options,
xmlNodePtr *lst);
#ifdef LIBXML_SAX1_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@@ -971,7 +972,7 @@ XMLPUBFUN int XMLCALL
xmlNodePtr *lst,
int recover);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@@ -980,7 +981,7 @@ XMLPUBFUN int XMLCALL
const xmlChar *ID,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
const xmlChar *URL,
const xmlChar *ID,
@@ -989,25 +990,25 @@ XMLPUBFUN int XMLCALL
/*
* Parser contexts handling.
*/
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlNewParserCtxt (void);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
void *userData);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar* buffer,
const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateDocParserCtxt (const xmlChar *cur);
#ifdef LIBXML_LEGACY_ENABLED
@@ -1015,16 +1016,16 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
* Reading/setting optional parsing features.
*/
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGetFeaturesList (int *len,
const char **result);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *value);
@@ -1034,13 +1035,13 @@ XMLPUBFUN int XMLCALL
/*
* Interfaces for the Push mode.
*/
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseChunk (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
@@ -1051,7 +1052,7 @@ XMLPUBFUN int XMLCALL
* Special I/O mode.
*/
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
void *user_data,
xmlInputReadCallback ioread,
@@ -1059,7 +1060,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
void *ioctx,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
@@ -1067,17 +1068,17 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
/*
* Node infos.
*/
-XMLPUBFUN const xmlParserNodeInfo* XMLCALL
+XMLPUBFUN const xmlParserNodeInfo*
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
const xmlNodePtr node);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
-XMLPUBFUN unsigned long XMLCALL
+XMLPUBFUN unsigned long
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
const xmlNodePtr node);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
const xmlParserNodeInfoPtr info);
@@ -1085,11 +1086,11 @@ XMLPUBFUN void XMLCALL
* External entities handling actually implemented in xmlIO.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
-XMLPUBFUN xmlExternalEntityLoader XMLCALL
+XMLPUBFUN xmlExternalEntityLoader
xmlGetExternalEntityLoader(void);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlLoadExternalEntity (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
@@ -1097,7 +1098,7 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
/*
* Index lookup, actually implemented in the encoding module
*/
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlByteConsumed (xmlParserCtxtPtr ctxt);
/*
@@ -1137,69 +1138,69 @@ typedef enum {
XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
} xmlParserOption;
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCtxtReset (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
const char *filename,
const char *encoding);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlReadFile (const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
@@ -1255,7 +1256,7 @@ typedef enum {
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
} xmlFeature;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlHasFeature (xmlFeature feature);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/parserInternals.h b/chromium/third_party/libxml/src/include/libxml/parserInternals.h
index 7cb0f517139..55d6527d4c3 100644
--- a/chromium/third_party/libxml/src/include/libxml/parserInternals.h
+++ b/chromium/third_party/libxml/src/include/libxml/parserInternals.h
@@ -288,31 +288,31 @@ XMLPUBVAR const xmlChar xmlStringComment[];
/*
* Function to finish the work of the macros where needed.
*/
-XMLPUBFUN int XMLCALL xmlIsLetter (int c);
+XMLPUBFUN int xmlIsLetter (int c);
/**
* Parser context.
*/
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateFileParserCtxt (const char *filename);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateURLParserCtxt (const char *filename,
int options);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateMemoryParserCtxt(const char *buffer,
int size);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlCreateEntityParserCtxt(const xmlChar *URL,
const xmlChar *ID,
const xmlChar *base);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler);
@@ -320,29 +320,29 @@ XMLPUBFUN int XMLCALL
/**
* Input Streams.
*/
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
-XMLPUBFUN xmlChar XMLCALL
+XMLPUBFUN xmlChar
xmlPopInput (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeInputStream (xmlParserInputPtr input);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename);
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNewInputStream (xmlParserCtxtPtr ctxt);
/**
* Namespaces.
*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlSplitQName (xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlChar **prefix);
@@ -351,150 +351,150 @@ XMLPUBFUN xmlChar * XMLCALL
* Generic production rules.
*/
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlParseName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
xmlChar **orig);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseAttValue (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseExternalID (xmlParserCtxtPtr ctxt,
xmlChar **publicID,
int strict);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseComment (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlParsePITarget (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParsePI (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
xmlChar **value);
XML_DEPRECATED
-XMLPUBFUN xmlEnumerationPtr XMLCALL
+XMLPUBFUN xmlEnumerationPtr
xmlParseNotationType (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlEnumerationPtr XMLCALL
+XMLPUBFUN xmlEnumerationPtr
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlParseElementMixedContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XML_DEPRECATED
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlElementContentPtr *result);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseCharRef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlEntityPtr XMLCALL
+XMLPUBFUN xmlEntityPtr
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseReference (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParsePEReference (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlParseAttribute (xmlParserCtxtPtr ctxt,
xmlChar **value);
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlParseStartTag (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseEndTag (xmlParserCtxtPtr ctxt);
#endif /* LIBXML_SAX1_ENABLED */
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseCDSect (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseContent (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseElement (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseEncName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseMisc (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const xmlChar *ExternalID,
const xmlChar *SystemID);
@@ -523,14 +523,16 @@ XMLPUBFUN void XMLCALL
*/
#define XML_SUBSTITUTE_BOTH 3
-XMLPUBFUN xmlChar * XMLCALL
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
int what,
xmlChar end,
xmlChar end2,
xmlChar end3);
-XMLPUBFUN xmlChar * XMLCALL
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
const xmlChar *str,
int len,
@@ -542,38 +544,38 @@ XMLPUBFUN xmlChar * XMLCALL
/*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
*/
-XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
+XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
xmlNodePtr value);
-XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
+XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value);
-XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
-XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
+XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
const xmlChar *value);
/*
* other commodities shared between parser.c and parserInternals.
*/
-XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
+XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
int *len);
-XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
+XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
/*
* Really core function shared with HTML parser.
*/
-XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
+XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len);
-XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
+XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
int val);
-XMLPUBFUN int XMLCALL xmlCopyChar (int len,
+XMLPUBFUN int xmlCopyChar (int len,
xmlChar *out,
int val);
-XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
+XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
/*
* Specific function to keep track of entities references
@@ -594,34 +596,34 @@ typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr lastNode);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
+XMLPUBFUN void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParseNamespace (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlScanName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
* Entities
*/
XML_DEPRECATED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
int len,
int what,
@@ -629,7 +631,7 @@ XMLPUBFUN xmlChar * XMLCALL
xmlChar end2,
xmlChar end3);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
diff --git a/chromium/third_party/libxml/src/include/libxml/pattern.h b/chromium/third_party/libxml/src/include/libxml/pattern.h
index 97d2cd2bc08..72bf2390356 100644
--- a/chromium/third_party/libxml/src/include/libxml/pattern.h
+++ b/chromium/third_party/libxml/src/include/libxml/pattern.h
@@ -43,18 +43,18 @@ typedef enum {
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
} xmlPatternFlags;
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreePattern (xmlPatternPtr comp);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreePatternList (xmlPatternPtr comp);
-XMLPUBFUN xmlPatternPtr XMLCALL
+XMLPUBFUN xmlPatternPtr
xmlPatterncompile (const xmlChar *pattern,
xmlDict *dict,
int flags,
const xmlChar **namespaces);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPatternMatch (xmlPatternPtr comp,
xmlNodePtr node);
@@ -62,34 +62,34 @@ XMLPUBFUN int XMLCALL
typedef struct _xmlStreamCtxt xmlStreamCtxt;
typedef xmlStreamCtxt *xmlStreamCtxtPtr;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPatternStreamable (xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPatternMaxDepth (xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPatternMinDepth (xmlPatternPtr comp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPatternFromRoot (xmlPatternPtr comp);
-XMLPUBFUN xmlStreamCtxtPtr XMLCALL
+XMLPUBFUN xmlStreamCtxtPtr
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns,
int nodeType);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStreamPushAttr (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStreamPop (xmlStreamCtxtPtr stream);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/relaxng.h b/chromium/third_party/libxml/src/include/libxml/relaxng.h
index 6369785cef0..aecaea309ba 100644
--- a/chromium/third_party/libxml/src/include/libxml/relaxng.h
+++ b/chromium/third_party/libxml/src/include/libxml/relaxng.h
@@ -32,7 +32,7 @@ typedef xmlRelaxNG *xmlRelaxNGPtr;
*
* Signature of an error callback from a Relax-NG validation
*/
-typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
+typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
@@ -44,7 +44,7 @@ typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
*
* Signature of a warning callback from a Relax-NG validation
*/
-typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
+typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
@@ -116,95 +116,95 @@ typedef enum {
XML_RELAXNGP_CRNG = 2
} xmlRelaxNGParserFlag;
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGInitTypes (void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGCleanupTypes (void);
/*
* Interfaces for parsing.
*/
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewParserCtxt (const char *URL);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewMemParserCtxt (const char *buffer,
int size);
-XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
int flag);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGSetParserStructuredErrors(
xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
-XMLPUBFUN xmlRelaxNGPtr XMLCALL
+XMLPUBFUN xmlRelaxNGPtr
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGFree (xmlRelaxNGPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGDump (FILE *output,
xmlRelaxNGPtr schema);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGDumpTree (FILE * output,
xmlRelaxNGPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
-XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
+XMLPUBFUN xmlRelaxNGValidCtxtPtr
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc);
/*
* Interfaces for progressive validation when possible
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar *data,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
diff --git a/chromium/third_party/libxml/src/include/libxml/schemasInternals.h b/chromium/third_party/libxml/src/include/libxml/schemasInternals.h
index c521d1c184c..5806f0182c7 100644
--- a/chromium/third_party/libxml/src/include/libxml/schemasInternals.h
+++ b/chromium/third_party/libxml/src/include/libxml/schemasInternals.h
@@ -947,8 +947,8 @@ struct _xmlSchema {
void *volatiles; /* Obsolete */
};
-XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
-XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
+XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
+XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/schematron.h b/chromium/third_party/libxml/src/include/libxml/schematron.h
index c61e61b3cf5..6e3d837a1b6 100644
--- a/chromium/third_party/libxml/src/include/libxml/schematron.h
+++ b/chromium/third_party/libxml/src/include/libxml/schematron.h
@@ -69,68 +69,68 @@ typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
/*
* Interfaces for parsing.
*/
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewParserCtxt (const char *URL);
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewMemParserCtxt(const char *buffer,
int size);
-XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchematronParserCtxtPtr
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
/*****
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc * err,
xmlSchematronValidityWarningFunc * warn,
void **ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
*****/
-XMLPUBFUN xmlSchematronPtr XMLCALL
+XMLPUBFUN xmlSchematronPtr
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronFree (xmlSchematronPtr schema);
/*
* Interfaces for validating
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronSetValidStructuredErrors(
xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
/******
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc *err,
xmlSchematronValidityWarningFunc *warn,
void **ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr elem);
*******/
-XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
+XMLPUBFUN xmlSchematronValidCtxtPtr
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
int options);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr instance);
diff --git a/chromium/third_party/libxml/src/include/libxml/threads.h b/chromium/third_party/libxml/src/include/libxml/threads.h
index 5c9d0bd27b0..dd2304cc4a2 100644
--- a/chromium/third_party/libxml/src/include/libxml/threads.h
+++ b/chromium/third_party/libxml/src/include/libxml/threads.h
@@ -36,50 +36,55 @@ typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus
extern "C" {
#endif
-XMLPUBFUN xmlMutexPtr XMLCALL
+XMLPUBFUN xmlMutexPtr
xmlNewMutex (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMutexLock (xmlMutexPtr tok);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMutexUnlock (xmlMutexPtr tok);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeMutex (xmlMutexPtr tok);
-XMLPUBFUN xmlRMutexPtr XMLCALL
+XMLPUBFUN xmlRMutexPtr
xmlNewRMutex (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRMutexLock (xmlRMutexPtr tok);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRMutexUnlock (xmlRMutexPtr tok);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeRMutex (xmlRMutexPtr tok);
/*
* Library wide APIs.
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlInitThreads (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlLockLibrary (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlUnlockLibrary(void);
-XMLPUBFUN int XMLCALL
+XML_DEPRECATED
+XMLPUBFUN int
xmlGetThreadId (void);
-XMLPUBFUN int XMLCALL
+XML_DEPRECATED
+XMLPUBFUN int
xmlIsMainThread (void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupThreads(void);
-XMLPUBFUN xmlGlobalStatePtr XMLCALL
+XML_DEPRECATED
+XMLPUBFUN xmlGlobalStatePtr
xmlGetGlobalState(void);
+/** DOC_DISABLE */
#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
!defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
-int XMLCALL
+int
xmlDllMain(void *hinstDLL, unsigned long fdwReason,
void *lpvReserved);
#endif
+/** DOC_ENABLE */
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/tree.h b/chromium/third_party/libxml/src/include/libxml/tree.h
index 4147522cdba..b4989667ab1 100644
--- a/chromium/third_party/libxml/src/include/libxml/tree.h
+++ b/chromium/third_party/libxml/src/include/libxml/tree.h
@@ -74,7 +74,7 @@ typedef xmlEntity *xmlEntityPtr;
typedef enum {
XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
- XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
@@ -117,10 +117,10 @@ typedef xmlBuf *xmlBufPtr;
* A few public routines for xmlBuf. As those are expected to be used
* mostly internally the bulk of the routines are internal in buf.h
*/
-XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf);
-XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf);
-XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf);
-XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len);
+XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
+XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
+XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
+XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
/*
* LIBXML2_NEW_BUFFER:
@@ -662,32 +662,32 @@ struct _xmlDOMWrapCtxt {
defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
defined(LIBXML_LEGACY_ENABLED)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNCName (const xmlChar *value,
int space);
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateQName (const xmlChar *value,
int space);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateName (const xmlChar *value,
int space);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNMToken (const xmlChar *value,
int space);
#endif
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlBuildQName (const xmlChar *ncname,
const xmlChar *prefix,
xmlChar *memory,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlSplitQName2 (const xmlChar *name,
xmlChar **prefix);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlSplitQName3 (const xmlChar *name,
int *len);
@@ -695,318 +695,318 @@ XMLPUBFUN const xmlChar * XMLCALL
* Handling Buffers, the old ones see @xmlBuf for the new ones.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
-XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+XMLPUBFUN xmlBufferAllocationScheme
xmlGetBufferAllocationScheme(void);
-XMLPUBFUN xmlBufferPtr XMLCALL
+XMLPUBFUN xmlBufferPtr
xmlBufferCreate (void);
-XMLPUBFUN xmlBufferPtr XMLCALL
+XMLPUBFUN xmlBufferPtr
xmlBufferCreateSize (size_t size);
-XMLPUBFUN xmlBufferPtr XMLCALL
+XMLPUBFUN xmlBufferPtr
xmlBufferCreateStatic (void *mem,
size_t size);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferResize (xmlBufferPtr buf,
unsigned int size);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferFree (xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferDump (FILE *file,
xmlBufferPtr buf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferAdd (xmlBufferPtr buf,
const xmlChar *str,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar *str,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferCat (xmlBufferPtr buf,
const xmlChar *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferCCat (xmlBufferPtr buf,
const char *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferShrink (xmlBufferPtr buf,
unsigned int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferGrow (xmlBufferPtr buf,
unsigned int len);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferEmpty (xmlBufferPtr buf);
-XMLPUBFUN const xmlChar* XMLCALL
+XMLPUBFUN const xmlChar*
xmlBufferContent (const xmlBuffer *buf);
-XMLPUBFUN xmlChar* XMLCALL
+XMLPUBFUN xmlChar*
xmlBufferDetach (xmlBufferPtr buf);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufferLength (const xmlBuffer *buf);
/*
* Creating/freeing new structures.
*/
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlNewDtd (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlGetIntSubset (const xmlDoc *doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
const xmlChar *prefix);
#endif /* LIBXML_LEGACY_ENABLED */
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlNewNs (xmlNodePtr node,
const xmlChar *href,
const xmlChar *prefix);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeNs (xmlNsPtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeNsList (xmlNsPtr cur);
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlNewDoc (const xmlChar *version);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeDoc (xmlDocPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *value);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlNewProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *value);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreePropList (xmlAttrPtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeProp (xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlCopyProp (xmlNodePtr target,
xmlAttrPtr cur);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlDtdPtr XMLCALL
+XMLPUBFUN xmlDtdPtr
xmlCopyDtd (xmlDtdPtr dtd);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Creating new nodes.
*/
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocNodeEatName (xmlDocPtr doc,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewNode (xmlNsPtr ns,
const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewNodeEatName (xmlNsPtr ns,
xmlChar *name);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
#endif
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocText (const xmlDoc *doc,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewText (const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocPI (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewPI (const xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar *content,
int len);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewTextLen (const xmlChar *content,
int len);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocComment (xmlDocPtr doc,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewComment (const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar *content,
int len);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewCharRef (xmlDocPtr doc,
const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewReference (const xmlDoc *doc,
const xmlChar *name);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlCopyNode (xmlNodePtr node,
int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlDocCopyNode (xmlNodePtr node,
xmlDocPtr doc,
int recursive);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlDocCopyNodeList (xmlDocPtr doc,
xmlNodePtr node);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlCopyNodeList (xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */
/*
* Navigating.
*/
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlGetLineNo (const xmlNode *node);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlGetNodePath (const xmlNode *node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlDocGetRootElement (const xmlDoc *doc);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlGetLastChild (const xmlNode *parent);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNodeIsText (const xmlNode *node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsBlankNode (const xmlNode *node);
/*
* Changing the structure.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlAddChild (xmlNodePtr parent,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlAddNextSibling (xmlNodePtr cur,
xmlNodePtr elem);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlUnlinkNode (xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlTextMerge (xmlNodePtr first,
xmlNodePtr second);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextConcat (xmlNodePtr node,
const xmlChar *content,
int len);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeNodeList (xmlNodePtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeNode (xmlNodePtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetTreeDoc (xmlNodePtr tree,
xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc);
/*
* Namespaces.
*/
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *nameSpace);
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN xmlNsPtr * XMLCALL
+XMLPUBFUN xmlNsPtr *
xmlGetNsList (const xmlDoc *doc,
const xmlNode *node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetNs (xmlNodePtr node,
xmlNsPtr ns);
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlCopyNamespace (xmlNsPtr cur);
-XMLPUBFUN xmlNsPtr XMLCALL
+XMLPUBFUN xmlNsPtr
xmlCopyNamespaceList (xmlNsPtr cur);
/*
@@ -1014,94 +1014,94 @@ XMLPUBFUN xmlNsPtr XMLCALL
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlGetNoNsProp (const xmlNode *node,
const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlGetProp (const xmlNode *node,
const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlHasProp (const xmlNode *node,
const xmlChar *name);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlHasNsProp (const xmlNode *node,
const xmlChar *name,
const xmlChar *nameSpace);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlGetNsProp (const xmlNode *node,
const xmlChar *name,
const xmlChar *nameSpace);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlStringGetNodeList (const xmlDoc *doc,
const xmlChar *value);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlStringLenGetNodeList (const xmlDoc *doc,
const xmlChar *value,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNodeListGetString (xmlDocPtr doc,
const xmlNode *list,
int inLine);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNodeListGetRawString (const xmlDoc *doc,
const xmlNode *list,
int inLine);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetContent (xmlNodePtr cur,
const xmlChar *content);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeAddContent (xmlNodePtr cur,
const xmlChar *content);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNodeGetContent (const xmlNode *cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNodeBufGetContent (xmlBufferPtr buffer,
const xmlNode *cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlBufGetNodeContent (xmlBufPtr buf,
const xmlNode *cur);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNodeGetLang (const xmlNode *cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNodeGetSpacePreserve (const xmlNode *cur);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNodeGetBase (const xmlDoc *doc,
const xmlNode *cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
#endif
@@ -1109,14 +1109,14 @@ XMLPUBFUN void XMLCALL
/*
* Removing content.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRemoveProp (xmlAttrPtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
@@ -1124,13 +1124,13 @@ XMLPUBFUN int XMLCALL
/*
* Internal, don't use.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar *string);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferWriteChar (xmlBufferPtr buf,
const char *string);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
@@ -1145,7 +1145,7 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
/*
* Namespace handling.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree);
#endif
@@ -1154,67 +1154,67 @@ XMLPUBFUN int XMLCALL
/*
* Saving.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDocDump (FILE *f,
xmlDocPtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFile (const char *filename,
xmlDocPtr cur);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
-XMLPUBFUN size_t XMLCALL
+XMLPUBFUN size_t
xmlBufNodeDump (xmlBufPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
@@ -1222,13 +1222,13 @@ XMLPUBFUN void XMLCALL
int format,
const char *encoding);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
@@ -1237,47 +1237,47 @@ XMLPUBFUN int XMLCALL
/*
* XHTML
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsXHTML (const xmlChar *systemID,
const xmlChar *publicID);
/*
* Compression.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGetDocCompressMode (const xmlDoc *doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetDocCompressMode (xmlDocPtr doc,
int mode);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGetCompressMode (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetCompressMode (int mode);
/*
* DOM-wrapper helper functions.
*/
-XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
+XMLPUBFUN xmlDOMWrapCtxtPtr
xmlDOMWrapNewCtxt (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr elem,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr node,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
@@ -1292,15 +1292,15 @@ XMLPUBFUN int XMLCALL
* 5 interfaces from DOM ElementTraversal, but different in entities
* traversal.
*/
-XMLPUBFUN unsigned long XMLCALL
+XMLPUBFUN unsigned long
xmlChildElementCount (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlNextElementSibling (xmlNodePtr node);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlFirstElementChild (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlLastElementChild (xmlNodePtr parent);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlPreviousElementSibling (xmlNodePtr node);
#endif
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/uri.h b/chromium/third_party/libxml/src/include/libxml/uri.h
index db48262b136..0470a5d9f8d 100644
--- a/chromium/third_party/libxml/src/include/libxml/uri.h
+++ b/chromium/third_party/libxml/src/include/libxml/uri.h
@@ -49,43 +49,43 @@ struct _xmlURI {
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
* xmlNodePtr cur);
*/
-XMLPUBFUN xmlURIPtr XMLCALL
+XMLPUBFUN xmlURIPtr
xmlCreateURI (void);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlBuildURI (const xmlChar *URI,
const xmlChar *base);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlBuildRelativeURI (const xmlChar *URI,
const xmlChar *base);
-XMLPUBFUN xmlURIPtr XMLCALL
+XMLPUBFUN xmlURIPtr
xmlParseURI (const char *str);
-XMLPUBFUN xmlURIPtr XMLCALL
+XMLPUBFUN xmlURIPtr
xmlParseURIRaw (const char *str,
int raw);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParseURIReference (xmlURIPtr uri,
const char *str);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlSaveUri (xmlURIPtr uri);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlPrintURI (FILE *stream,
xmlURIPtr uri);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlURIEscapeStr (const xmlChar *str,
const xmlChar *list);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char *
xmlURIUnescapeString (const char *str,
int len,
char *target);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlNormalizeURIPath (char *path);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlURIEscape (const xmlChar *str);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeURI (xmlURIPtr uri);
-XMLPUBFUN xmlChar* XMLCALL
+XMLPUBFUN xmlChar*
xmlCanonicPath (const xmlChar *path);
-XMLPUBFUN xmlChar* XMLCALL
+XMLPUBFUN xmlChar*
xmlPathToURI (const xmlChar *path);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/valid.h b/chromium/third_party/libxml/src/include/libxml/valid.h
index 78771d449ac..b19cbacb9f5 100644
--- a/chromium/third_party/libxml/src/include/libxml/valid.h
+++ b/chromium/third_party/libxml/src/include/libxml/valid.h
@@ -39,7 +39,7 @@ typedef xmlValidState *xmlValidStatePtr;
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
-typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
+typedef void (*xmlValidityErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
@@ -54,7 +54,7 @@ typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
-typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
+typedef void (*xmlValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
@@ -135,55 +135,55 @@ typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;
/* Notation */
-XMLPUBFUN xmlNotationPtr XMLCALL
+XMLPUBFUN xmlNotationPtr
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *PublicID,
const xmlChar *SystemID);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlNotationTablePtr XMLCALL
+XMLPUBFUN xmlNotationTablePtr
xmlCopyNotationTable (xmlNotationTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlNewElementContent (const xmlChar *name,
xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlCopyElementContent (xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeElementContent (xmlElementContentPtr cur);
/* the new versions with doc argument */
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar *name,
xmlElementContentType type);
-XMLPUBFUN xmlElementContentPtr XMLCALL
+XMLPUBFUN xmlElementContentPtr
xmlCopyDocElementContent(xmlDocPtr doc,
xmlElementContentPtr content);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeDocElementContent(xmlDocPtr doc,
xmlElementContentPtr cur);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSnprintfElementContent(char *buf,
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int englob);
@@ -191,39 +191,39 @@ XMLPUBFUN void XMLCALL
/* DEPRECATED */
/* Element */
-XMLPUBFUN xmlElementPtr XMLCALL
+XMLPUBFUN xmlElementPtr
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
xmlElementTypeVal type,
xmlElementContentPtr content);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlElementTablePtr XMLCALL
+XMLPUBFUN xmlElementTablePtr
xmlCopyElementTable (xmlElementTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
-XMLPUBFUN xmlEnumerationPtr XMLCALL
+XMLPUBFUN xmlEnumerationPtr
xmlCreateEnumeration (const xmlChar *name);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeEnumeration (xmlEnumerationPtr cur);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlEnumerationPtr XMLCALL
+XMLPUBFUN xmlEnumerationPtr
xmlCopyEnumeration (xmlEnumerationPtr cur);
#endif /* LIBXML_TREE_ENABLED */
/* Attribute */
-XMLPUBFUN xmlAttributePtr XMLCALL
+XMLPUBFUN xmlAttributePtr
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *elem,
@@ -234,60 +234,60 @@ XMLPUBFUN xmlAttributePtr XMLCALL
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
#ifdef LIBXML_TREE_ENABLED
-XMLPUBFUN xmlAttributeTablePtr XMLCALL
+XMLPUBFUN xmlAttributeTablePtr
xmlCopyAttributeTable (xmlAttributeTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr);
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
-XMLPUBFUN xmlIDPtr XMLCALL
+XMLPUBFUN xmlIDPtr
xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeIDTable (xmlIDTablePtr table);
-XMLPUBFUN xmlAttrPtr XMLCALL
+XMLPUBFUN xmlAttrPtr
xmlGetID (xmlDocPtr doc,
const xmlChar *ID);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsID (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRemoveID (xmlDocPtr doc,
xmlAttrPtr attr);
/* IDREFs */
XML_DEPRECATED
-XMLPUBFUN xmlRefPtr XMLCALL
+XMLPUBFUN xmlRefPtr
xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeRefTable (xmlRefTablePtr table);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr);
XML_DEPRECATED
-XMLPUBFUN xmlListPtr XMLCALL
+XMLPUBFUN xmlListPtr
xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID);
@@ -296,146 +296,146 @@ XMLPUBFUN xmlListPtr XMLCALL
*/
#ifdef LIBXML_VALID_ENABLED
/* Allocate/Release Validation Contexts */
-XMLPUBFUN xmlValidCtxtPtr XMLCALL
+XMLPUBFUN xmlValidCtxtPtr
xmlNewValidCtxt(void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeValidCtxt(xmlValidCtxtPtr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateRoot (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlElementPtr elem);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlAttributePtr attr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateAttributeValue(xmlAttributeType type,
const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNotationPtr nota);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateDtd (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlDtdPtr dtd);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateDocument (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *prefix,
xmlNsPtr ns,
const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
#endif /* LIBXML_VALID_ENABLED */
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *notationName);
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIsMixedElement (xmlDocPtr doc,
const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL
+XMLPUBFUN xmlAttributePtr
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name);
-XMLPUBFUN xmlAttributePtr XMLCALL
+XMLPUBFUN xmlAttributePtr
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *prefix);
-XMLPUBFUN xmlNotationPtr XMLCALL
+XMLPUBFUN xmlNotationPtr
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const xmlChar *name);
-XMLPUBFUN xmlElementPtr XMLCALL
+XMLPUBFUN xmlElementPtr
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *prefix);
-XMLPUBFUN xmlElementPtr XMLCALL
+XMLPUBFUN xmlElementPtr
xmlGetDtdElementDesc (xmlDtdPtr dtd,
const xmlChar *name);
#ifdef LIBXML_VALID_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **names,
int *len,
int max);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidGetValidElements(xmlNode *prev,
xmlNode *next,
const xmlChar **names,
int max);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNameValue (const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNamesValue (const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNmtokenValue (const xmlChar *value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidateNmtokensValue(const xmlChar *value);
#ifdef LIBXML_REGEXP_ENABLED
/*
* Validation based on the regexp support
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
xmlElementPtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
const xmlChar *data,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
diff --git a/chromium/third_party/libxml/src/include/libxml/xinclude.h b/chromium/third_party/libxml/src/include/libxml/xinclude.h
index 863ab25ad9f..e1d135b3bae 100644
--- a/chromium/third_party/libxml/src/include/libxml/xinclude.h
+++ b/chromium/third_party/libxml/src/include/libxml/xinclude.h
@@ -89,35 +89,35 @@ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
/*
* standalone processing
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcess (xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
int flags,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
int flags,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessTree (xmlNodePtr tree);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
int flags);
/*
* contextual processing
*/
-XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
+XMLPUBFUN xmlXIncludeCtxtPtr
xmlXIncludeNewContext (xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr tree);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xlink.h b/chromium/third_party/libxml/src/include/libxml/xlink.h
index 04e4b32c015..106573666ae 100644
--- a/chromium/third_party/libxml/src/include/libxml/xlink.h
+++ b/chromium/third_party/libxml/src/include/libxml/xlink.h
@@ -160,23 +160,23 @@ struct _xlinkHandler {
* detection callbacks.
*/
-XMLPUBFUN xlinkNodeDetectFunc XMLCALL
+XMLPUBFUN xlinkNodeDetectFunc
xlinkGetDefaultDetect (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
/*
* Routines to set/get the default handlers.
*/
-XMLPUBFUN xlinkHandlerPtr XMLCALL
+XMLPUBFUN xlinkHandlerPtr
xlinkGetDefaultHandler (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
/*
* Link detection module itself.
*/
-XMLPUBFUN xlinkType XMLCALL
+XMLPUBFUN xlinkType
xlinkIsLink (xmlDocPtr doc,
xmlNodePtr node);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlIO.h b/chromium/third_party/libxml/src/include/libxml/xmlIO.h
index 095b2f56d96..55d25ed915c 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlIO.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlIO.h
@@ -31,7 +31,7 @@ extern "C" {
*
* Returns 1 if yes and 0 if another Input module should be used
*/
-typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
+typedef int (*xmlInputMatchCallback) (char const *filename);
/**
* xmlInputOpenCallback:
* @filename: the filename or URI
@@ -40,7 +40,7 @@ typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
*
* Returns an Input context or NULL in case or error
*/
-typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
+typedef void * (*xmlInputOpenCallback) (char const *filename);
/**
* xmlInputReadCallback:
* @context: an Input context
@@ -51,7 +51,7 @@ typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
*
* Returns the number of bytes read or -1 in case of error
*/
-typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
+typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
/**
* xmlInputCloseCallback:
* @context: an Input context
@@ -60,7 +60,7 @@ typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int
*
* Returns 0 or -1 in case of error
*/
-typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
+typedef int (*xmlInputCloseCallback) (void * context);
#ifdef LIBXML_OUTPUT_ENABLED
/*
@@ -77,7 +77,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
*
* Returns 1 if yes and 0 if another Output module should be used
*/
-typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
+typedef int (*xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @filename: the filename or URI
@@ -86,7 +86,7 @@ typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
*
* Returns an Output context or NULL in case or error
*/
-typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
+typedef void * (*xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @context: an Output context
@@ -97,7 +97,7 @@ typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
*
* Returns the number of bytes written or -1 in case of error
*/
-typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
+typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
@@ -107,7 +107,7 @@ typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buff
*
* Returns 0 or -1 in case of error
*/
-typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
+typedef int (*xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
@@ -155,53 +155,54 @@ struct _xmlOutputBuffer {
/*
* Interfaces for input
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupInputCallbacks (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPopInputCallbacks (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegisterDefaultInputCallbacks (void);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlAllocParserInputBuffer (xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFilename (const char *URI,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFile (FILE *file,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFd (int fd,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateMem (const char *mem, int size,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateStatic (const char *mem, int size,
xmlCharEncoding enc);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
int len,
const char *buf);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char *
xmlParserGetDirectory (const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
@@ -215,62 +216,62 @@ xmlParserInputBufferPtr
/*
* Interfaces for output
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupOutputCallbacks (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlPopOutputCallbacks (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegisterDefaultOutputCallbacks(void);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFilename (const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFile (FILE *file,
xmlCharEncodingHandlerPtr encoder);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder);
-XMLPUBFUN xmlOutputBufferPtr XMLCALL
+XMLPUBFUN xmlOutputBufferPtr
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
/* Couple of APIs to get the output without digging into the buffers */
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
-XMLPUBFUN size_t XMLCALL
+XMLPUBFUN size_t
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char *buf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlOutputBufferFlush (xmlOutputBufferPtr out);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlOutputBufferClose (xmlOutputBufferPtr out);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
@@ -283,20 +284,20 @@ xmlOutputBufferPtr
#ifdef LIBXML_HTTP_ENABLED
/* This function only exists if HTTP support built into the library */
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegisterHTTPPostCallbacks (void );
#endif /* LIBXML_HTTP_ENABLED */
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr ret);
/*
* A predefined entity loader disabling network accesses
*/
-XMLPUBFUN xmlParserInputPtr XMLCALL
+XMLPUBFUN xmlParserInputPtr
xmlNoNetExternalEntityLoader (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
@@ -305,43 +306,43 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
* xmlNormalizeWindowsPath is obsolete, don't use it.
* Check xmlCanonicPath in uri.h for a better alternative.
*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlNormalizeWindowsPath (const xmlChar *path);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCheckFilename (const char *path);
/**
* Default 'file://' protocol callbacks
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlFileMatch (const char *filename);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlFileOpen (const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlFileRead (void * context,
char * buffer,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlFileClose (void * context);
/**
* Default 'http://' protocol callbacks
*/
#ifdef LIBXML_HTTP_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOHTTPMatch (const char *filename);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlIOHTTPOpen (const char *filename);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlIOHTTPOpenW (const char * post_uri,
int compression );
#endif /* LIBXML_OUTPUT_ENABLED */
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOHTTPRead (void * context,
char * buffer,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOHTTPClose (void * context);
#endif /* LIBXML_HTTP_ENABLED */
@@ -349,15 +350,15 @@ XMLPUBFUN int XMLCALL
* Default 'ftp://' protocol callbacks
*/
#ifdef LIBXML_FTP_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOFTPMatch (const char *filename);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlIOFTPOpen (const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOFTPRead (void * context,
char * buffer,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlIOFTPClose (void * context);
#endif /* LIBXML_FTP_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlautomata.h b/chromium/third_party/libxml/src/include/libxml/xmlautomata.h
index c0ef44f1e6f..ea38eb37f09 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlautomata.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlautomata.h
@@ -40,32 +40,32 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
/*
* Building API
*/
-XMLPUBFUN xmlAutomataPtr XMLCALL
+XMLPUBFUN xmlAutomataPtr
xmlNewAutomata (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeAutomata (xmlAutomataPtr am);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataGetInitState (xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewState (xmlAutomataPtr am);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
const xmlChar *token2,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min,
int max,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min,
int max,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@@ -98,7 +98,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min,
int max,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@@ -107,33 +107,33 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min,
int max,
void *data);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
-XMLPUBFUN xmlAutomataStatePtr XMLCALL
+XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlAutomataNewCounter (xmlAutomataPtr am,
int min,
int max);
-XMLPUBFUN struct _xmlRegexp * XMLCALL
+XMLPUBFUN struct _xmlRegexp *
xmlAutomataCompile (xmlAutomataPtr am);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlAutomataIsDeterminist (xmlAutomataPtr am);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlerror.h b/chromium/third_party/libxml/src/include/libxml/xmlerror.h
index f8ca8ab86b9..830b4a68108 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlerror.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlerror.h
@@ -844,7 +844,7 @@ typedef enum {
* Signature of the function to use when there is an error and
* no parsing or validity context available .
*/
-typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
+typedef void (*xmlGenericErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
@@ -855,61 +855,61 @@ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
* Signature of the function to use when there is an error and
* the module handles the new error reporting mechanism.
*/
-typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
/*
* Use the following function to reset the two global variables
* xmlGenericError and xmlGenericErrorContext.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSetStructuredErrorFunc (void *ctx,
xmlStructuredErrorFunc handler);
/*
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
-XMLPUBFUN void XMLCDECL
+XMLPUBFUN void
xmlParserError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
-XMLPUBFUN void XMLCDECL
+XMLPUBFUN void
xmlParserWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
-XMLPUBFUN void XMLCDECL
+XMLPUBFUN void
xmlParserValidityError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
-XMLPUBFUN void XMLCDECL
+XMLPUBFUN void
xmlParserValidityWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParserPrintFileInfo (xmlParserInputPtr input);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlParserPrintFileContext (xmlParserInputPtr input);
/*
* Extended error information routines
*/
-XMLPUBFUN xmlErrorPtr XMLCALL
+XMLPUBFUN xmlErrorPtr
xmlGetLastError (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlResetLastError (void);
-XMLPUBFUN xmlErrorPtr XMLCALL
+XMLPUBFUN xmlErrorPtr
xmlCtxtGetLastError (void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCtxtResetLastError (void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlResetError (xmlErrorPtr err);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCopyError (xmlErrorPtr from,
xmlErrorPtr to);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlexports.h b/chromium/third_party/libxml/src/include/libxml/xmlexports.h
index e48a08b74ae..3b063e7de6a 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlexports.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlexports.h
@@ -8,50 +8,19 @@
#ifndef __XML_EXPORTS_H__
#define __XML_EXPORTS_H__
-#if defined(_WIN32) || defined(__CYGWIN__)
/** DOC_DISABLE */
-
-#ifdef LIBXML_STATIC
- #define XMLPUBLIC
-#elif defined(IN_LIBXML)
- #define XMLPUBLIC __declspec(dllexport)
-#else
- #define XMLPUBLIC __declspec(dllimport)
-#endif
-
-#if defined(LIBXML_FASTCALL)
- #define XMLCALL __fastcall
-#else
- #define XMLCALL __cdecl
-#endif
-#define XMLCDECL __cdecl
-
-/** DOC_ENABLE */
+#if defined(_WIN32) || defined(__CYGWIN__)
+ #ifdef LIBXML_STATIC
+ #define XMLPUBLIC
+ #elif defined(IN_LIBXML)
+ #define XMLPUBLIC __declspec(dllexport)
+ #else
+ #define XMLPUBLIC __declspec(dllimport)
+ #endif
#else /* not Windows */
-
-/**
- * XMLPUBLIC:
- *
- * Macro which declares a public symbol
- */
-#define XMLPUBLIC
-
-/**
- * XMLCALL:
- *
- * Macro which declares the calling convention for exported functions
- */
-#define XMLCALL
-
-/**
- * XMLCDECL:
- *
- * Macro which declares the calling convention for exported functions that
- * use '...'.
- */
-#define XMLCDECL
-
+ #define XMLPUBLIC
#endif /* platform switch */
+/** DOC_ENABLE */
/*
* XMLPUBFUN:
@@ -69,6 +38,8 @@
/** DOC_DISABLE */
/* Compatibility */
+#define XMLCALL
+#define XMLCDECL
#if !defined(LIBXML_DLL_IMPORT)
#define LIBXML_DLL_IMPORT XMLPUBVAR
#endif
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlmemory.h b/chromium/third_party/libxml/src/include/libxml/xmlmemory.h
index ae2a4275a3b..969d6877c8a 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlmemory.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlmemory.h
@@ -54,7 +54,7 @@ extern "C" {
*
* Signature for a free() implementation.
*/
-typedef void (XMLCALL *xmlFreeFunc)(void *mem);
+typedef void (*xmlFreeFunc)(void *mem);
/**
* xmlMallocFunc:
* @size: the size requested in bytes
@@ -63,7 +63,7 @@ typedef void (XMLCALL *xmlFreeFunc)(void *mem);
*
* Returns a pointer to the newly allocated block or NULL in case of error.
*/
-typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
+typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
/**
* xmlReallocFunc:
@@ -74,7 +74,7 @@ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
*
* Returns a pointer to the newly reallocated block or NULL in case of error.
*/
-typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
+typedef void *(*xmlReallocFunc)(void *mem, size_t size);
/**
* xmlStrdupFunc:
@@ -84,7 +84,7 @@ typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
*
* Returns the copy of the string or NULL in case of error.
*/
-typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
+typedef char *(*xmlStrdupFunc)(const char *str);
/*
* The 4 interfaces used for all memory handling within libxml.
@@ -100,23 +100,23 @@ LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
* The xmlGc function have an extra entry for atomic block
* allocations useful for garbage collected memory allocators
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlReallocFunc *reallocFunc,
xmlStrdupFunc *strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGcMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc,
xmlMallocFunc *mallocAtomicFunc,
@@ -127,45 +127,45 @@ XMLPUBFUN int XMLCALL
* Initialization of the memory layer.
*/
XML_DEPRECATED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlInitMemory (void);
/*
* Cleanup of the memory layer.
*/
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlCleanupMemory (void);
/*
* These are specific to the XML debug memory wrapper.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlMemUsed (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlMemBlocks (void);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMemDisplay (FILE *fp);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMemDisplayLast(FILE *fp, long nbBytes);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMemShow (FILE *fp, int nr);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMemoryDump (void);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlMemRealloc (void *ptr,size_t size);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlMemFree (void *ptr);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char *
xmlMemoryStrdup (const char *str);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
-XMLPUBFUN char * XMLCALL
+XMLPUBFUN char *
xmlMemStrdupLoc (const char *str, const char *file, int line);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlmodule.h b/chromium/third_party/libxml/src/include/libxml/xmlmodule.h
index 9667820070a..279986c1a9f 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlmodule.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlmodule.h
@@ -37,16 +37,16 @@ typedef enum {
XML_MODULE_LOCAL= 2 /* local binding */
} xmlModuleOption;
-XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
+XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
int options);
-XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
+XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
const char* name,
void **result);
-XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
+XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
-XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
+XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlreader.h b/chromium/third_party/libxml/src/include/libxml/xmlreader.h
index e8a8bcc9aab..1ac151040e8 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlreader.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlreader.h
@@ -108,16 +108,16 @@ typedef xmlTextReader *xmlTextReaderPtr;
/*
* Constructors & Destructor
*/
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlNewTextReader (xmlParserInputBufferPtr input,
const char *URI);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlNewTextReaderFilename(const char *URI);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlFreeTextReader (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderSetup(xmlTextReaderPtr reader,
xmlParserInputBufferPtr input, const char *URL,
const char *encoding, int options);
@@ -125,222 +125,222 @@ XMLPUBFUN int XMLCALL
/*
* Iterators
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderRead (xmlTextReaderPtr reader);
#ifdef LIBXML_WRITER_ENABLED
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
#endif
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderReadString (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
/*
* Attributes of the node
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderDepth (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderHasValue(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderNodeType (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderReadState (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstName (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstString (xmlTextReaderPtr reader,
const xmlChar *str);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstValue (xmlTextReaderPtr reader);
/*
* use the Const version of the routine for
* better performance and simpler code
*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderLocalName (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderName (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderPrefix (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderValue (xmlTextReaderPtr reader);
/*
* Methods of the XmlTextReader
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderClose (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
int no);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
const xmlChar *name);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
-XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+XMLPUBFUN xmlParserInputBufferPtr
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
const xmlChar *prefix);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
int no);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
const xmlChar *name);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
const xmlChar *localName,
const xmlChar *namespaceURI);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderNormalization (xmlTextReaderPtr reader);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
/*
* Extensions
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
int prop,
int value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
int prop);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlTextReaderPreserve (xmlTextReaderPtr reader);
#ifdef LIBXML_PATTERN_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
const xmlChar *pattern,
const xmlChar **namespaces);
#endif /* LIBXML_PATTERN_ENABLED */
-XMLPUBFUN xmlDocPtr XMLCALL
+XMLPUBFUN xmlDocPtr
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlTextReaderExpand (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderNext (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderIsValid (xmlTextReaderPtr reader);
#ifdef LIBXML_SCHEMAS_ENABLED
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
const char *rng);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
xmlRelaxNGValidCtxtPtr ctxt,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
xmlRelaxNGPtr schema);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
const char *xsd);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
xmlSchemaValidCtxtPtr ctxt,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
xmlSchemaPtr schema);
#endif
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderStandalone (xmlTextReaderPtr reader);
/*
* Index lookup
*/
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
/*
* New more complete APIs for simpler creation and reuse of readers
*/
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderWalker (xmlDocPtr doc);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderForDoc (const xmlChar * cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderForFile (const char *filename,
const char *encoding,
int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderForMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderForFd (int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN xmlTextReaderPtr XMLCALL
+XMLPUBFUN xmlTextReaderPtr
xmlReaderForIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
@@ -348,34 +348,34 @@ XMLPUBFUN xmlTextReaderPtr XMLCALL
const char *encoding,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewWalker (xmlTextReaderPtr reader,
xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewDoc (xmlTextReaderPtr reader,
const xmlChar * cur,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewFile (xmlTextReaderPtr reader,
const char *filename,
const char *encoding,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewMemory (xmlTextReaderPtr reader,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewFd (xmlTextReaderPtr reader,
int fd,
const char *URL,
const char *encoding,
int options);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlReaderNewIO (xmlTextReaderPtr reader,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
@@ -397,23 +397,23 @@ typedef void * xmlTextReaderLocatorPtr;
*
* Signature of an error callback from a reader parser
*/
-typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
+typedef void (*xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void *arg);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void *arg);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlregexp.h b/chromium/third_party/libxml/src/include/libxml/xmlregexp.h
index 7009645a925..39a72ab3399 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlregexp.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlregexp.h
@@ -48,16 +48,16 @@ extern "C" {
/*
* The POSIX like API
*/
-XMLPUBFUN xmlRegexpPtr XMLCALL
+XMLPUBFUN xmlRegexpPtr
xmlRegexpCompile (const xmlChar *regexp);
-XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
+XMLPUBFUN int
xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar *value);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegexpPrint (FILE *output,
xmlRegexpPtr regexp);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
/**
@@ -77,29 +77,29 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
/*
* The progressive API
*/
-XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
+XMLPUBFUN xmlRegExecCtxtPtr
xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback,
void *data);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
const xmlChar *value,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
const xmlChar *value,
const xmlChar *value2,
void *data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
int *nbval,
int *nbneg,
xmlChar **values,
int *terminal);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
const xmlChar **string,
int *nbval,
@@ -116,15 +116,15 @@ XMLPUBFUN int XMLCALL
typedef struct _xmlExpCtxt xmlExpCtxt;
typedef xmlExpCtxt *xmlExpCtxtPtr;
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
-XMLPUBFUN xmlExpCtxtPtr XMLCALL
+XMLPUBFUN xmlExpCtxtPtr
xmlExpNewCtxt (int maxNodes,
xmlDictPtr dict);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
/* Expressions are trees but the tree is opaque */
@@ -150,31 +150,31 @@ XMLPUBVAR xmlExpNodePtr emptyExp;
/*
* Expressions are reference counted internally
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlExpFree (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlExpRef (xmlExpNodePtr expr);
/*
* constructors can be either manual or from a string
*/
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpParse (xmlExpCtxtPtr ctxt,
const char *expr);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
const xmlChar *name,
int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpNewOr (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpNewRange (xmlExpCtxtPtr ctxt,
xmlExpNodePtr subset,
int min,
@@ -182,34 +182,34 @@ XMLPUBFUN xmlExpNodePtr XMLCALL
/*
* The really interesting APIs
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpIsNillable(xmlExpNodePtr expr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpMaxToken (xmlExpNodePtr expr);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**langList,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpGetStart (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**tokList,
int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar *str,
int len);
-XMLPUBFUN xmlExpNodePtr XMLCALL
+XMLPUBFUN xmlExpNodePtr
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlExpSubsume (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlExpDump (xmlBufferPtr buf,
xmlExpNodePtr expr);
#endif /* LIBXML_EXPR_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlsave.h b/chromium/third_party/libxml/src/include/libxml/xmlsave.h
index fb329b22dbc..a744b7ac276 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlsave.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlsave.h
@@ -41,42 +41,42 @@ typedef enum {
typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFd (int fd,
const char *encoding,
int options);
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFilename (const char *filename,
const char *encoding,
int options);
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToBuffer (xmlBufferPtr buffer,
const char *encoding,
int options);
-XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
const char *encoding,
int options);
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlSaveDoc (xmlSaveCtxtPtr ctxt,
xmlDocPtr doc);
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveClose (xmlSaveCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlschemas.h b/chromium/third_party/libxml/src/include/libxml/xmlschemas.h
index b90e9d18c6e..4d61ad0d3d3 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlschemas.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlschemas.h
@@ -92,7 +92,7 @@ typedef xmlSchema *xmlSchemaPtr;
*
* Signature of an error callback from an XSD validation
*/
-typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
+typedef void (*xmlSchemaValidityErrorFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
@@ -103,7 +103,7 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
*
* Signature of a warning callback from an XSD validation
*/
-typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
+typedef void (*xmlSchemaValidityWarningFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
@@ -128,95 +128,95 @@ typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
* Returns: 0 in case of success and -1 in case of error
*/
-typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
+typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
const char **file, unsigned long *line);
/*
* Interfaces for parsing.
*/
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewParserCtxt (const char *URL);
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewMemParserCtxt (const char *buffer,
int size);
-XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void **ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN xmlSchemaPtr XMLCALL
+XMLPUBFUN xmlSchemaPtr
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaFree (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaDump (FILE *output,
xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err,
xmlSchemaValidityWarningFunc *warn,
void **ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
const char *filename);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
+XMLPUBFUN xmlSchemaValidCtxtPtr
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void *user_data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename,
int options);
-XMLPUBFUN xmlParserCtxtPtr XMLCALL
+XMLPUBFUN xmlParserCtxtPtr
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
/*
@@ -225,15 +225,15 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
-XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
+XMLPUBFUN xmlSchemaSAXPlugPtr
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr *sax,
void **user_data);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f,
void *ctxt);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlschemastypes.h b/chromium/third_party/libxml/src/include/libxml/xmlschemastypes.h
index 5d588f92ea3..eb1388dbd83 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlschemastypes.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlschemastypes.h
@@ -30,118 +30,118 @@ typedef enum {
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
} xmlSchemaWhitespaceValueType;
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaInitTypes (void);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaCleanupTypes (void);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL
+XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetPredefinedType (const xmlChar *name,
const xmlChar *ns);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlNodePtr node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaFreeValue (xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaFacetPtr XMLCALL
+XMLPUBFUN xmlSchemaFacetPtr
xmlSchemaNewFacet (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr ctxt,
const xmlChar *name);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaCompareValues (xmlSchemaValPtr x,
xmlSchemaValPtr y);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL
+XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
const xmlChar *value,
unsigned long actualLen,
unsigned long *expectedLen);
-XMLPUBFUN xmlSchemaTypePtr XMLCALL
+XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInType (xmlSchemaValType type);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
int facetType);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlSchemaCollapseString (const xmlChar *value);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlSchemaWhiteSpaceReplace (const xmlChar *value);
-XMLPUBFUN unsigned long XMLCALL
+XMLPUBFUN unsigned long
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val,
unsigned long *length);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
unsigned long *length,
xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlNodePtr node);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
const xmlChar **retValue);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
const xmlChar **retValue,
xmlSchemaWhitespaceValueType ws);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValueAppend (xmlSchemaValPtr prev,
xmlSchemaValPtr cur);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
+XMLPUBFUN xmlSchemaValPtr
xmlSchemaValueGetNext (xmlSchemaValPtr cur);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlSchemaValueGetAsString (xmlSchemaValPtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
+XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewStringValue (xmlSchemaValType type,
const xmlChar *value);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
+XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewNOTATIONValue (const xmlChar *name,
const xmlChar *ns);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
+XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
const xmlChar *localName);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
xmlSchemaWhitespaceValueType xws,
xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws);
-XMLPUBFUN xmlSchemaValPtr XMLCALL
+XMLPUBFUN xmlSchemaValPtr
xmlSchemaCopyValue (xmlSchemaValPtr val);
-XMLPUBFUN xmlSchemaValType XMLCALL
+XMLPUBFUN xmlSchemaValType
xmlSchemaGetValType (xmlSchemaValPtr val);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlstring.h b/chromium/third_party/libxml/src/include/libxml/xmlstring.h
index 2d0b2d1668e..db11a0b0e50 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlstring.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlstring.h
@@ -37,100 +37,100 @@ typedef unsigned char xmlChar;
/*
* xmlChar handling
*/
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrdup (const xmlChar *cur);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrndup (const xmlChar *cur,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCharStrndup (const char *cur,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlCharStrdup (const char *cur);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrsub (const xmlChar *str,
int start,
int len);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlStrchr (const xmlChar *str,
xmlChar val);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlStrstr (const xmlChar *str,
const xmlChar *val);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlStrcasestr (const xmlChar *str,
const xmlChar *val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrcmp (const xmlChar *str1,
const xmlChar *str2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrncmp (const xmlChar *str1,
const xmlChar *str2,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrcasecmp (const xmlChar *str1,
const xmlChar *str2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrncasecmp (const xmlChar *str1,
const xmlChar *str2,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrEqual (const xmlChar *str1,
const xmlChar *str2);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrQEqual (const xmlChar *pref,
const xmlChar *name,
const xmlChar *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrlen (const xmlChar *str);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrcat (xmlChar *cur,
const xmlChar *add);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrncat (xmlChar *cur,
const xmlChar *add,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlStrncatNew (const xmlChar *str1,
const xmlChar *str2,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrPrintf (xmlChar *buf,
int len,
const char *msg,
...) LIBXML_ATTR_FORMAT(3,4);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlStrVPrintf (xmlChar *buf,
int len,
const char *msg,
va_list ap) LIBXML_ATTR_FORMAT(3,0);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlGetUTF8Char (const unsigned char *utf,
int *len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlCheckUTF8 (const unsigned char *utf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUTF8Strsize (const xmlChar *utf,
int len);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlUTF8Strndup (const xmlChar *utf,
int len);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlUTF8Strpos (const xmlChar *utf,
int pos);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlUTF8Strsub (const xmlChar *utf,
int start,
int len);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUTF8Strlen (const xmlChar *utf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUTF8Size (const xmlChar *utf);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlUTF8Charcmp (const xmlChar *utf1,
const xmlChar *utf2);
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlunicode.h b/chromium/third_party/libxml/src/include/libxml/xmlunicode.h
index 01ac8b61f56..2e50a49f9b2 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlunicode.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlunicode.h
@@ -23,175 +23,175 @@
extern "C" {
#endif
-XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
+XMLPUBFUN int xmlUCSIsAegeanNumbers (int code);
+XMLPUBFUN int xmlUCSIsAlphabeticPresentationForms (int code);
+XMLPUBFUN int xmlUCSIsArabic (int code);
+XMLPUBFUN int xmlUCSIsArabicPresentationFormsA (int code);
+XMLPUBFUN int xmlUCSIsArabicPresentationFormsB (int code);
+XMLPUBFUN int xmlUCSIsArmenian (int code);
+XMLPUBFUN int xmlUCSIsArrows (int code);
+XMLPUBFUN int xmlUCSIsBasicLatin (int code);
+XMLPUBFUN int xmlUCSIsBengali (int code);
+XMLPUBFUN int xmlUCSIsBlockElements (int code);
+XMLPUBFUN int xmlUCSIsBopomofo (int code);
+XMLPUBFUN int xmlUCSIsBopomofoExtended (int code);
+XMLPUBFUN int xmlUCSIsBoxDrawing (int code);
+XMLPUBFUN int xmlUCSIsBraillePatterns (int code);
+XMLPUBFUN int xmlUCSIsBuhid (int code);
+XMLPUBFUN int xmlUCSIsByzantineMusicalSymbols (int code);
+XMLPUBFUN int xmlUCSIsCJKCompatibility (int code);
+XMLPUBFUN int xmlUCSIsCJKCompatibilityForms (int code);
+XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographs (int code);
+XMLPUBFUN int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
+XMLPUBFUN int xmlUCSIsCJKRadicalsSupplement (int code);
+XMLPUBFUN int xmlUCSIsCJKSymbolsandPunctuation (int code);
+XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographs (int code);
+XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
+XMLPUBFUN int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
+XMLPUBFUN int xmlUCSIsCherokee (int code);
+XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarks (int code);
+XMLPUBFUN int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
+XMLPUBFUN int xmlUCSIsCombiningHalfMarks (int code);
+XMLPUBFUN int xmlUCSIsCombiningMarksforSymbols (int code);
+XMLPUBFUN int xmlUCSIsControlPictures (int code);
+XMLPUBFUN int xmlUCSIsCurrencySymbols (int code);
+XMLPUBFUN int xmlUCSIsCypriotSyllabary (int code);
+XMLPUBFUN int xmlUCSIsCyrillic (int code);
+XMLPUBFUN int xmlUCSIsCyrillicSupplement (int code);
+XMLPUBFUN int xmlUCSIsDeseret (int code);
+XMLPUBFUN int xmlUCSIsDevanagari (int code);
+XMLPUBFUN int xmlUCSIsDingbats (int code);
+XMLPUBFUN int xmlUCSIsEnclosedAlphanumerics (int code);
+XMLPUBFUN int xmlUCSIsEnclosedCJKLettersandMonths (int code);
+XMLPUBFUN int xmlUCSIsEthiopic (int code);
+XMLPUBFUN int xmlUCSIsGeneralPunctuation (int code);
+XMLPUBFUN int xmlUCSIsGeometricShapes (int code);
+XMLPUBFUN int xmlUCSIsGeorgian (int code);
+XMLPUBFUN int xmlUCSIsGothic (int code);
+XMLPUBFUN int xmlUCSIsGreek (int code);
+XMLPUBFUN int xmlUCSIsGreekExtended (int code);
+XMLPUBFUN int xmlUCSIsGreekandCoptic (int code);
+XMLPUBFUN int xmlUCSIsGujarati (int code);
+XMLPUBFUN int xmlUCSIsGurmukhi (int code);
+XMLPUBFUN int xmlUCSIsHalfwidthandFullwidthForms (int code);
+XMLPUBFUN int xmlUCSIsHangulCompatibilityJamo (int code);
+XMLPUBFUN int xmlUCSIsHangulJamo (int code);
+XMLPUBFUN int xmlUCSIsHangulSyllables (int code);
+XMLPUBFUN int xmlUCSIsHanunoo (int code);
+XMLPUBFUN int xmlUCSIsHebrew (int code);
+XMLPUBFUN int xmlUCSIsHighPrivateUseSurrogates (int code);
+XMLPUBFUN int xmlUCSIsHighSurrogates (int code);
+XMLPUBFUN int xmlUCSIsHiragana (int code);
+XMLPUBFUN int xmlUCSIsIPAExtensions (int code);
+XMLPUBFUN int xmlUCSIsIdeographicDescriptionCharacters (int code);
+XMLPUBFUN int xmlUCSIsKanbun (int code);
+XMLPUBFUN int xmlUCSIsKangxiRadicals (int code);
+XMLPUBFUN int xmlUCSIsKannada (int code);
+XMLPUBFUN int xmlUCSIsKatakana (int code);
+XMLPUBFUN int xmlUCSIsKatakanaPhoneticExtensions (int code);
+XMLPUBFUN int xmlUCSIsKhmer (int code);
+XMLPUBFUN int xmlUCSIsKhmerSymbols (int code);
+XMLPUBFUN int xmlUCSIsLao (int code);
+XMLPUBFUN int xmlUCSIsLatin1Supplement (int code);
+XMLPUBFUN int xmlUCSIsLatinExtendedA (int code);
+XMLPUBFUN int xmlUCSIsLatinExtendedB (int code);
+XMLPUBFUN int xmlUCSIsLatinExtendedAdditional (int code);
+XMLPUBFUN int xmlUCSIsLetterlikeSymbols (int code);
+XMLPUBFUN int xmlUCSIsLimbu (int code);
+XMLPUBFUN int xmlUCSIsLinearBIdeograms (int code);
+XMLPUBFUN int xmlUCSIsLinearBSyllabary (int code);
+XMLPUBFUN int xmlUCSIsLowSurrogates (int code);
+XMLPUBFUN int xmlUCSIsMalayalam (int code);
+XMLPUBFUN int xmlUCSIsMathematicalAlphanumericSymbols (int code);
+XMLPUBFUN int xmlUCSIsMathematicalOperators (int code);
+XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
+XMLPUBFUN int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
+XMLPUBFUN int xmlUCSIsMiscellaneousSymbols (int code);
+XMLPUBFUN int xmlUCSIsMiscellaneousSymbolsandArrows (int code);
+XMLPUBFUN int xmlUCSIsMiscellaneousTechnical (int code);
+XMLPUBFUN int xmlUCSIsMongolian (int code);
+XMLPUBFUN int xmlUCSIsMusicalSymbols (int code);
+XMLPUBFUN int xmlUCSIsMyanmar (int code);
+XMLPUBFUN int xmlUCSIsNumberForms (int code);
+XMLPUBFUN int xmlUCSIsOgham (int code);
+XMLPUBFUN int xmlUCSIsOldItalic (int code);
+XMLPUBFUN int xmlUCSIsOpticalCharacterRecognition (int code);
+XMLPUBFUN int xmlUCSIsOriya (int code);
+XMLPUBFUN int xmlUCSIsOsmanya (int code);
+XMLPUBFUN int xmlUCSIsPhoneticExtensions (int code);
+XMLPUBFUN int xmlUCSIsPrivateUse (int code);
+XMLPUBFUN int xmlUCSIsPrivateUseArea (int code);
+XMLPUBFUN int xmlUCSIsRunic (int code);
+XMLPUBFUN int xmlUCSIsShavian (int code);
+XMLPUBFUN int xmlUCSIsSinhala (int code);
+XMLPUBFUN int xmlUCSIsSmallFormVariants (int code);
+XMLPUBFUN int xmlUCSIsSpacingModifierLetters (int code);
+XMLPUBFUN int xmlUCSIsSpecials (int code);
+XMLPUBFUN int xmlUCSIsSuperscriptsandSubscripts (int code);
+XMLPUBFUN int xmlUCSIsSupplementalArrowsA (int code);
+XMLPUBFUN int xmlUCSIsSupplementalArrowsB (int code);
+XMLPUBFUN int xmlUCSIsSupplementalMathematicalOperators (int code);
+XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaA (int code);
+XMLPUBFUN int xmlUCSIsSupplementaryPrivateUseAreaB (int code);
+XMLPUBFUN int xmlUCSIsSyriac (int code);
+XMLPUBFUN int xmlUCSIsTagalog (int code);
+XMLPUBFUN int xmlUCSIsTagbanwa (int code);
+XMLPUBFUN int xmlUCSIsTags (int code);
+XMLPUBFUN int xmlUCSIsTaiLe (int code);
+XMLPUBFUN int xmlUCSIsTaiXuanJingSymbols (int code);
+XMLPUBFUN int xmlUCSIsTamil (int code);
+XMLPUBFUN int xmlUCSIsTelugu (int code);
+XMLPUBFUN int xmlUCSIsThaana (int code);
+XMLPUBFUN int xmlUCSIsThai (int code);
+XMLPUBFUN int xmlUCSIsTibetan (int code);
+XMLPUBFUN int xmlUCSIsUgaritic (int code);
+XMLPUBFUN int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
+XMLPUBFUN int xmlUCSIsVariationSelectors (int code);
+XMLPUBFUN int xmlUCSIsVariationSelectorsSupplement (int code);
+XMLPUBFUN int xmlUCSIsYiRadicals (int code);
+XMLPUBFUN int xmlUCSIsYiSyllables (int code);
+XMLPUBFUN int xmlUCSIsYijingHexagramSymbols (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
+XMLPUBFUN int xmlUCSIsBlock (int code, const char *block);
-XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
+XMLPUBFUN int xmlUCSIsCatC (int code);
+XMLPUBFUN int xmlUCSIsCatCc (int code);
+XMLPUBFUN int xmlUCSIsCatCf (int code);
+XMLPUBFUN int xmlUCSIsCatCo (int code);
+XMLPUBFUN int xmlUCSIsCatCs (int code);
+XMLPUBFUN int xmlUCSIsCatL (int code);
+XMLPUBFUN int xmlUCSIsCatLl (int code);
+XMLPUBFUN int xmlUCSIsCatLm (int code);
+XMLPUBFUN int xmlUCSIsCatLo (int code);
+XMLPUBFUN int xmlUCSIsCatLt (int code);
+XMLPUBFUN int xmlUCSIsCatLu (int code);
+XMLPUBFUN int xmlUCSIsCatM (int code);
+XMLPUBFUN int xmlUCSIsCatMc (int code);
+XMLPUBFUN int xmlUCSIsCatMe (int code);
+XMLPUBFUN int xmlUCSIsCatMn (int code);
+XMLPUBFUN int xmlUCSIsCatN (int code);
+XMLPUBFUN int xmlUCSIsCatNd (int code);
+XMLPUBFUN int xmlUCSIsCatNl (int code);
+XMLPUBFUN int xmlUCSIsCatNo (int code);
+XMLPUBFUN int xmlUCSIsCatP (int code);
+XMLPUBFUN int xmlUCSIsCatPc (int code);
+XMLPUBFUN int xmlUCSIsCatPd (int code);
+XMLPUBFUN int xmlUCSIsCatPe (int code);
+XMLPUBFUN int xmlUCSIsCatPf (int code);
+XMLPUBFUN int xmlUCSIsCatPi (int code);
+XMLPUBFUN int xmlUCSIsCatPo (int code);
+XMLPUBFUN int xmlUCSIsCatPs (int code);
+XMLPUBFUN int xmlUCSIsCatS (int code);
+XMLPUBFUN int xmlUCSIsCatSc (int code);
+XMLPUBFUN int xmlUCSIsCatSk (int code);
+XMLPUBFUN int xmlUCSIsCatSm (int code);
+XMLPUBFUN int xmlUCSIsCatSo (int code);
+XMLPUBFUN int xmlUCSIsCatZ (int code);
+XMLPUBFUN int xmlUCSIsCatZl (int code);
+XMLPUBFUN int xmlUCSIsCatZp (int code);
+XMLPUBFUN int xmlUCSIsCatZs (int code);
-XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
+XMLPUBFUN int xmlUCSIsCat (int code, const char *cat);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlversion.h.in b/chromium/third_party/libxml/src/include/libxml/xmlversion.h.in
index e83fb787265..166269e2545 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlversion.h.in
+++ b/chromium/third_party/libxml/src/include/libxml/xmlversion.h.in
@@ -21,7 +21,7 @@ extern "C" {
* your library and includes mismatch
*/
#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+XMLPUBFUN void xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */
/**
@@ -440,10 +440,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif
#ifndef XML_DEPRECATED
-# ifdef IN_LIBXML
+# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
# define XML_DEPRECATED
-# else
/* Available since at least GCC 3.1 */
+# else
# define XML_DEPRECATED __attribute__((deprecated))
# endif
#endif
@@ -487,20 +487,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* is deprecated.
*/
#ifndef XML_DEPRECATED
-#define XML_DEPRECATED
+# if defined (IN_LIBXML) || !defined (_MSC_VER)
+# define XML_DEPRECATED
+/* Available since Visual Studio 2005 */
+# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_DEPRECATED __declspec(deprecated)
+# endif
#endif
/**
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
*
* Macro used to ignore pointer cast warnings that can't be worked around.
*/
-#define XML_IGNORE_FPTR_CAST_WARNINGS
+#if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
+#else
+# define XML_IGNORE_FPTR_CAST_WARNINGS
+#endif
/**
- * LIBXML_POP_WARNINGS:
+ * XML_POP_WARNINGS:
*
* Macro used to restore warnings state.
*/
-#define XML_POP_WARNINGS
+#ifndef XML_POP_WARNINGS
+# if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_POP_WARNINGS __pragma(warning(pop))
+# else
+# define XML_POP_WARNINGS
+# endif
+#endif
#endif /* __GNUC__ */
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xmlwriter.h b/chromium/third_party/libxml/src/include/libxml/xmlwriter.h
index dd5add34166..339f25114b5 100644
--- a/chromium/third_party/libxml/src/include/libxml/xmlwriter.h
+++ b/chromium/third_party/libxml/src/include/libxml/xmlwriter.h
@@ -29,20 +29,20 @@ extern "C" {
/*
* Constructors & Destructor
*/
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriter(xmlOutputBufferPtr out);
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterFilename(const char *uri, int compression);
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
- XMLPUBFUN xmlTextWriterPtr XMLCALL
+ XMLPUBFUN xmlTextWriterPtr
xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
int compression);
- XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
+ XMLPUBFUN void xmlFreeTextWriter(xmlTextWriterPtr writer);
/*
* Functions
@@ -52,30 +52,30 @@ extern "C" {
/*
* Document
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
const char *version,
const char *encoding,
const char *standalone);
- XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndDocument(xmlTextWriterPtr
writer);
/*
* Comments
*/
- XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterStartComment(xmlTextWriterPtr
writer);
- XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int xmlTextWriterEndComment(xmlTextWriterPtr writer);
+ XMLPUBFUN int
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteComment(xmlTextWriterPtr
writer,
const xmlChar *
content);
@@ -83,47 +83,47 @@ extern "C" {
/*
* Elements
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartElement(xmlTextWriterPtr writer,
const xmlChar * name);
- XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterStartElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI);
- XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
- XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndElement(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterFullEndElement(xmlTextWriterPtr
writer);
/*
* Elements conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteElement(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
@@ -131,7 +131,7 @@ extern "C" {
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -144,48 +144,48 @@ extern "C" {
/*
* Text
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
const xmlChar * content, int len);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
const xmlChar * content);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteFormatString(xmlTextWriterPtr
writer,
const char
*format, ...)
LIBXML_ATTR_FORMAT(2,3);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteVFormatString(xmlTextWriterPtr
writer,
const char
*format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ XMLPUBFUN int xmlTextWriterWriteString(xmlTextWriterPtr writer,
const xmlChar *
content);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
+ XMLPUBFUN int xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
const char *data,
int start, int len);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
+ XMLPUBFUN int xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
const char *data,
int start, int len);
/*
* Attributes
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
const xmlChar * name);
- XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterStartAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -193,36 +193,36 @@ extern "C" {
name,
const xmlChar *
namespaceURI);
- XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndAttribute(xmlTextWriterPtr
writer);
/*
* Attributes conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteAttribute(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
@@ -230,7 +230,7 @@ extern "C" {
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
@@ -244,25 +244,25 @@ extern "C" {
/*
* PI's
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartPI(xmlTextWriterPtr writer,
const xmlChar * target);
- XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterEndPI(xmlTextWriterPtr writer);
/*
* PI conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWritePI(xmlTextWriterPtr writer,
const xmlChar * target,
const xmlChar * content);
@@ -277,52 +277,52 @@ extern "C" {
/*
* CDATA
*/
- XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
- XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
/*
* CDATA conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
const xmlChar * content);
/*
* DTD
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
- XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterEndDTD(xmlTextWriterPtr writer);
/*
* DTD conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
@@ -339,27 +339,27 @@ extern "C" {
/*
* DTD element definition
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
const xmlChar * name);
- XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndDTDElement(xmlTextWriterPtr
writer);
/*
* DTD element definition conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteDTDElement(xmlTextWriterPtr
writer,
const xmlChar *
name,
@@ -369,27 +369,27 @@ extern "C" {
/*
* DTD attribute list definition
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name);
- XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
writer);
/*
* DTD attribute list definition conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
writer,
const xmlChar *
name,
@@ -399,48 +399,48 @@ extern "C" {
/*
* DTD entity definition
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
int pe, const xmlChar * name);
- XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterEndDTDEntity(xmlTextWriterPtr
writer);
/*
* DTD entity definition conveniency functions
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(4,5);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(4,0);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * content);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar *
ndataid);
- XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
+ XMLPUBFUN int xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
writer, int pe,
const xmlChar * name,
const xmlChar *
@@ -455,7 +455,7 @@ extern "C" {
/*
* DTD notation definition
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
@@ -464,20 +464,20 @@ extern "C" {
/*
* Indentation
*/
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
const xmlChar * str);
- XMLPUBFUN int XMLCALL
+ XMLPUBFUN int
xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
/*
* misc
*/
- XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterFlush(xmlTextWriterPtr writer);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/xpath.h b/chromium/third_party/libxml/src/include/libxml/xpath.h
index bfbc5d6d995..8a70ddc2583 100644
--- a/chromium/third_party/libxml/src/include/libxml/xpath.h
+++ b/chromium/third_party/libxml/src/include/libxml/xpath.h
@@ -454,68 +454,68 @@ XMLPUBVAR double xmlXPathNINF;
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeObject (xmlXPathObjectPtr obj);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeSetCreate (xmlNodePtr val);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathObjectCopy (xmlXPathObjectPtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2);
/**
* Conversion functions to basic types.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCastNumberToBoolean (double val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCastStringToBoolean (const xmlChar * val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathCastBooleanToNumber (int val);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathCastStringToNumber (const xmlChar * val);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathCastNodeToNumber (xmlNodePtr node);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathCastToNumber (xmlXPathObjectPtr val);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathCastBooleanToString (int val);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathCastNumberToString (double val);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathCastNodeToString (xmlNodePtr node);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathCastToString (xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertNumber (xmlXPathObjectPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathConvertString (xmlXPathObjectPtr val);
/**
* Context handling.
*/
-XMLPUBFUN xmlXPathContextPtr XMLCALL
+XMLPUBFUN xmlXPathContextPtr
xmlXPathNewContext (xmlDocPtr doc);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
int active,
int value,
@@ -523,48 +523,48 @@ XMLPUBFUN int XMLCALL
/**
* Evaluation functions.
*/
-XMLPUBFUN long XMLCALL
+XMLPUBFUN long
xmlXPathOrderDocElems (xmlDocPtr doc);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathSetContextNode (xmlNodePtr node,
xmlXPathContextPtr ctx);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNodeEval (xmlNodePtr node,
const xmlChar *str,
xmlXPathContextPtr ctx);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathEval (const xmlChar *str,
xmlXPathContextPtr ctx);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res);
/**
* Separate compilation/evaluation entry points.
*/
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+XMLPUBFUN xmlXPathCompExprPtr
xmlXPathCompile (const xmlChar *str);
-XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+XMLPUBFUN xmlXPathCompExprPtr
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
const xmlChar *str);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctx);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
#endif /* LIBXML_XPATH_ENABLED */
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathInit (void);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathIsNaN (double val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathIsInf (double val);
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/libxml/xpathInternals.h b/chromium/third_party/libxml/src/include/libxml/xpathInternals.h
index 76a6b481572..57ff7a8da06 100644
--- a/chromium/third_party/libxml/src/include/libxml/xpathInternals.h
+++ b/chromium/third_party/libxml/src/include/libxml/xpathInternals.h
@@ -100,15 +100,15 @@ extern "C" {
*/
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void * XMLCALL
+XMLPUBFUN void *
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/**
@@ -273,7 +273,8 @@ XMLPUBFUN void * XMLCALL
* type.
*/
#define CHECK_TYPE(typeval) \
- if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ if ((ctxt->error != 0) || \
+ (ctxt->value == NULL) || (ctxt->value->type != typeval)) \
XP_ERROR(XPATH_INVALID_TYPE)
/**
@@ -331,7 +332,7 @@ XMLPUBFUN void * XMLCALL
* Variable Lookup forwarding.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f,
void *data);
@@ -340,7 +341,7 @@ XMLPUBFUN void XMLCALL
* Function Lookup forwarding.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt);
@@ -348,22 +349,22 @@ XMLPUBFUN void XMLCALL
/*
* Error reporting.
*/
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char *file,
int line,
int no);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathErr (xmlXPathParserContextPtr ctxt,
int error);
#ifdef LIBXML_DEBUG_ENABLED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathDebugDumpObject (FILE *output,
xmlXPathObjectPtr cur,
int depth);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathDebugDumpCompExpr(FILE *output,
xmlXPathCompExprPtr comp,
int depth);
@@ -371,48 +372,48 @@ XMLPUBFUN void XMLCALL
/**
* NodeSet handling.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathIntersection (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathDistinct (xmlNodeSetPtr nodes);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathLeading (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathTrailing (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
@@ -421,208 +422,208 @@ XMLPUBFUN xmlNodeSetPtr XMLCALL
* Extending a context.
*/
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
const xmlChar *prefix,
const xmlChar *ns_uri);
-XMLPUBFUN const xmlChar * XMLCALL
+XMLPUBFUN const xmlChar *
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
const xmlChar *prefix);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathFunction f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathFunction f);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathObjectPtr value);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value);
-XMLPUBFUN xmlXPathFunction XMLCALL
+XMLPUBFUN xmlXPathFunction
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
-XMLPUBFUN xmlXPathFunction XMLCALL
+XMLPUBFUN xmlXPathFunction
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
/**
* Utilities to extend XPath.
*/
-XMLPUBFUN xmlXPathParserContextPtr XMLCALL
+XMLPUBFUN xmlXPathParserContextPtr
xmlXPathNewParserContext (const xmlChar *str,
xmlXPathContextPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
/* TODO: remap to xmlXPathValuePop and Push. */
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
valuePop (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
valuePush (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr value);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewString (const xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewCString (const char *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapString (xmlChar *val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapCString (char * val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewFloat (double val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewBoolean (int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewNodeSet (xmlNodePtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewValueTree (xmlNodePtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathNodeSetSort (xmlNodeSetPtr set);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
-XMLPUBFUN xmlChar * XMLCALL
+XMLPUBFUN xmlChar *
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/*
* Existing functions.
*/
-XMLPUBFUN double XMLCALL
+XMLPUBFUN double
xmlXPathStringEvalNumber (const xmlChar *str);
-XMLPUBFUN int XMLCALL
+XMLPUBFUN int
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
-XMLPUBFUN xmlNodeSetPtr XMLCALL
+XMLPUBFUN xmlNodeSetPtr
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
xmlNodeSetPtr val2);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
xmlNodePtr val);
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
int val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPathWrapExternal (void *val);
-XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
-XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
+XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
-XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
+XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name);
/*
* Some of the axis navigation routines.
*/
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
-XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
+XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
/*
* The official core of XPath functions.
*/
-XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
-XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
/**
* Really internal functions
*/
-XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns);
#ifdef __cplusplus
}
diff --git a/chromium/third_party/libxml/src/include/libxml/xpointer.h b/chromium/third_party/libxml/src/include/libxml/xpointer.h
index ca7bdbe085f..12ce9edda63 100644
--- a/chromium/third_party/libxml/src/include/libxml/xpointer.h
+++ b/chromium/third_party/libxml/src/include/libxml/xpointer.h
@@ -45,64 +45,64 @@ struct _xmlLocationSet {
*/
XML_DEPRECATED
-XMLPUBFUN xmlLocationSetPtr XMLCALL
+XMLPUBFUN xmlLocationSetPtr
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
XML_DEPRECATED
-XMLPUBFUN xmlLocationSetPtr XMLCALL
+XMLPUBFUN xmlLocationSetPtr
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrNewCollapsedRange (xmlNodePtr start);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XML_DEPRECATED
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val);
#endif /* LIBXML_XPTR_LOCS_ENABLED */
@@ -110,23 +110,23 @@ XMLPUBFUN void XMLCALL
/*
* Functions.
*/
-XMLPUBFUN xmlXPathContextPtr XMLCALL
+XMLPUBFUN xmlXPathContextPtr
xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here,
xmlNodePtr origin);
-XMLPUBFUN xmlXPathObjectPtr XMLCALL
+XMLPUBFUN xmlXPathObjectPtr
xmlXPtrEval (const xmlChar *str,
xmlXPathContextPtr ctx);
#ifdef LIBXML_XPTR_LOCS_ENABLED
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs);
XML_DEPRECATED
-XMLPUBFUN xmlNodePtr XMLCALL
+XMLPUBFUN xmlNodePtr
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
XML_DEPRECATED
-XMLPUBFUN void XMLCALL
+XMLPUBFUN void
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
#endif /* LIBXML_XPTR_LOCS_ENABLED */
#ifdef __cplusplus
diff --git a/chromium/third_party/libxml/src/include/private/Makefile.am b/chromium/third_party/libxml/src/include/private/Makefile.am
index a1686980387..29c0bdd63d8 100644
--- a/chromium/third_party/libxml/src/include/private/Makefile.am
+++ b/chromium/third_party/libxml/src/include/private/Makefile.am
@@ -4,12 +4,16 @@ EXTRA_DIST = \
enc.h \
entities.h \
error.h \
+ globals.h \
html.h \
io.h \
+ memory.h \
parser.h \
regexp.h \
save.h \
string.h \
threads.h \
tree.h \
+ xinclude.h \
+ xpath.h \
xzlib.h
diff --git a/chromium/third_party/libxml/src/include/private/Makefile.in b/chromium/third_party/libxml/src/include/private/Makefile.in
index 2c41f374264..0e6bad535e4 100644
--- a/chromium/third_party/libxml/src/include/private/Makefile.in
+++ b/chromium/third_party/libxml/src/include/private/Makefile.in
@@ -332,14 +332,18 @@ EXTRA_DIST = \
enc.h \
entities.h \
error.h \
+ globals.h \
html.h \
io.h \
+ memory.h \
parser.h \
regexp.h \
save.h \
string.h \
threads.h \
tree.h \
+ xinclude.h \
+ xpath.h \
xzlib.h
all: all-am
diff --git a/chromium/third_party/libxml/src/include/private/buf.h b/chromium/third_party/libxml/src/include/private/buf.h
index 12f725de09b..c18eed42daa 100644
--- a/chromium/third_party/libxml/src/include/private/buf.h
+++ b/chromium/third_party/libxml/src/include/private/buf.h
@@ -3,46 +3,68 @@
#include <libxml/tree.h>
-xmlBufPtr xmlBufCreate(void);
-xmlBufPtr xmlBufCreateSize(size_t size);
-xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
+XML_HIDDEN xmlBufPtr
+xmlBufCreate(void);
+XML_HIDDEN xmlBufPtr
+xmlBufCreateSize(size_t size);
-int xmlBufSetAllocationScheme(xmlBufPtr buf,
- xmlBufferAllocationScheme scheme);
-int xmlBufGetAllocationScheme(xmlBufPtr buf);
+XML_HIDDEN int
+xmlBufSetAllocationScheme(xmlBufPtr buf, xmlBufferAllocationScheme scheme);
+XML_HIDDEN int
+xmlBufGetAllocationScheme(xmlBufPtr buf);
-void xmlBufFree(xmlBufPtr buf);
-void xmlBufEmpty(xmlBufPtr buf);
+XML_HIDDEN void
+xmlBufFree(xmlBufPtr buf);
+XML_HIDDEN void
+xmlBufEmpty(xmlBufPtr buf);
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
-int xmlBufGrow(xmlBufPtr buf, int len);
-int xmlBufResize(xmlBufPtr buf, size_t len);
+XML_HIDDEN int
+xmlBufGrow(xmlBufPtr buf, int len);
+XML_HIDDEN int
+xmlBufResize(xmlBufPtr buf, size_t len);
-int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
-int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
-int xmlBufCCat(xmlBufPtr buf, const char *str);
-int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
+XML_HIDDEN int
+xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
+XML_HIDDEN int
+xmlBufCat(xmlBufPtr buf, const xmlChar *str);
+XML_HIDDEN int
+xmlBufCCat(xmlBufPtr buf, const char *str);
+XML_HIDDEN int
+xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
-size_t xmlBufAvail(const xmlBufPtr buf);
-size_t xmlBufLength(const xmlBufPtr buf);
+XML_HIDDEN size_t
+xmlBufAvail(const xmlBufPtr buf);
+XML_HIDDEN size_t
+xmlBufLength(const xmlBufPtr buf);
/* size_t xmlBufUse(const xmlBufPtr buf); */
-int xmlBufIsEmpty(const xmlBufPtr buf);
-int xmlBufAddLen(xmlBufPtr buf, size_t len);
+XML_HIDDEN int
+xmlBufIsEmpty(const xmlBufPtr buf);
+XML_HIDDEN int
+xmlBufAddLen(xmlBufPtr buf, size_t len);
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
-xmlChar * xmlBufDetach(xmlBufPtr buf);
+XML_HIDDEN xmlChar *
+xmlBufDetach(xmlBufPtr buf);
-size_t xmlBufDump(FILE *file, xmlBufPtr buf);
+XML_HIDDEN size_t
+xmlBufDump(FILE *file, xmlBufPtr buf);
-xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
-xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
-int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
+XML_HIDDEN xmlBufPtr
+xmlBufFromBuffer(xmlBufferPtr buffer);
+XML_HIDDEN xmlBufferPtr
+xmlBufBackToBuffer(xmlBufPtr buf);
+XML_HIDDEN int
+xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
-int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
-size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
-int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
- size_t base, size_t cur);
+XML_HIDDEN int
+xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
+XML_HIDDEN size_t
+xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
+XML_HIDDEN int
+xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
+ size_t base, size_t cur);
#endif /* XML_BUF_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/dict.h b/chromium/third_party/libxml/src/include/private/dict.h
index 02b18f92f21..fcc10bac11a 100644
--- a/chromium/third_party/libxml/src/include/private/dict.h
+++ b/chromium/third_party/libxml/src/include/private/dict.h
@@ -1,7 +1,11 @@
#ifndef XML_DICT_H_PRIVATE__
#define XML_DICT_H_PRIVATE__
-int __xmlInitializeDict(void);
-int __xmlRandom(void);
+XML_HIDDEN int
+__xmlInitializeDict(void);
+XML_HIDDEN void
+xmlCleanupDictInternal(void);
+XML_HIDDEN int
+__xmlRandom(void);
#endif /* XML_DICT_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/enc.h b/chromium/third_party/libxml/src/include/private/enc.h
index 4fd32342817..ddfc8aea08e 100644
--- a/chromium/third_party/libxml/src/include/private/enc.h
+++ b/chromium/third_party/libxml/src/include/private/enc.h
@@ -4,8 +4,14 @@
#include <libxml/encoding.h>
#include <libxml/tree.h>
-int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
-int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
-int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
+XML_HIDDEN void
+xmlInitEncodingInternal(void);
+
+XML_HIDDEN int
+xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
+XML_HIDDEN int
+xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
+XML_HIDDEN int
+xmlCharEncOutput(xmlOutputBufferPtr output, int init);
#endif /* XML_ENC_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/entities.h b/chromium/third_party/libxml/src/include/private/entities.h
index 9be17bb31f4..c3f15e6812d 100644
--- a/chromium/third_party/libxml/src/include/private/entities.h
+++ b/chromium/third_party/libxml/src/include/private/entities.h
@@ -4,6 +4,20 @@
#include <libxml/tree.h>
#include <libxml/xmlstring.h>
-xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
+/*
+ * Entity flags
+ *
+ * XML_ENT_PARSED: The entity was parsed and `children` points to the
+ * content.
+ * XML_ENT_CHECKED: The entity was checked for loops.
+ */
+#define XML_ENT_PARSED (1<<0)
+#define XML_ENT_CHECKED (1<<1)
+#define XML_ENT_EXPANDING (1<<2)
+#define XML_ENT_CHECKED_LT (1<<3)
+#define XML_ENT_CONTAINS_LT (1<<4)
+
+XML_HIDDEN xmlChar *
+xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
#endif /* XML_ENTITIES_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/error.h b/chromium/third_party/libxml/src/include/private/error.h
index c76e0733227..7f284f9872a 100644
--- a/chromium/third_party/libxml/src/include/private/error.h
+++ b/chromium/third_party/libxml/src/include/private/error.h
@@ -4,17 +4,17 @@
#include <libxml/xmlerror.h>
#include <libxml/xmlversion.h>
-void
+XML_HIDDEN void
__xmlRaiseError(xmlStructuredErrorFunc schannel,
xmlGenericErrorFunc channel, void *data, void *ctx,
void *nod, int domain, int code, xmlErrorLevel level,
const char *file, int line, const char *str1,
const char *str2, const char *str3, int int1, int col,
const char *msg, ...) LIBXML_ATTR_FORMAT(16,17);
-void
+XML_HIDDEN void
__xmlSimpleError(int domain, int code, xmlNodePtr node,
const char *msg, const char *extra) LIBXML_ATTR_FORMAT(4,0);
-void
+XML_HIDDEN void
xmlGenericErrorDefaultFunc(void *ctx, const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
diff --git a/chromium/third_party/libxml/src/include/private/globals.h b/chromium/third_party/libxml/src/include/private/globals.h
new file mode 100644
index 00000000000..5f3f112207d
--- /dev/null
+++ b/chromium/third_party/libxml/src/include/private/globals.h
@@ -0,0 +1,9 @@
+#ifndef XML_GLOBALS_H_PRIVATE__
+#define XML_GLOBALS_H_PRIVATE__
+
+XML_HIDDEN void
+xmlInitGlobalsInternal(void);
+XML_HIDDEN void
+xmlCleanupGlobalsInternal(void);
+
+#endif /* XML_GLOBALS_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/html.h b/chromium/third_party/libxml/src/include/private/html.h
index 8f77d33871c..6b499296a6b 100644
--- a/chromium/third_party/libxml/src/include/private/html.h
+++ b/chromium/third_party/libxml/src/include/private/html.h
@@ -5,7 +5,8 @@
#ifdef LIBXML_HTML_ENABLED
-void __htmlParseContent(void *ctx);
+XML_HIDDEN void
+__htmlParseContent(void *ctx);
#endif /* LIBXML_HTML_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/private/io.h b/chromium/third_party/libxml/src/include/private/io.h
index d0994dbd2e1..86a72e15ec6 100644
--- a/chromium/third_party/libxml/src/include/private/io.h
+++ b/chromium/third_party/libxml/src/include/private/io.h
@@ -5,13 +5,14 @@
#include <libxml/tree.h>
#include <libxml/xmlversion.h>
-void __xmlIOErr(int domain, int code, const char *extra);
-void __xmlLoaderErr(void *ctx, const char *msg,
- const char *filename) LIBXML_ATTR_FORMAT(2,0);
-int xmlInputReadCallbackNop(void *context, char *buffer, int len);
+XML_HIDDEN void
+__xmlIOErr(int domain, int code, const char *extra);
+XML_HIDDEN void
+__xmlLoaderErr(void *ctx, const char *msg,
+ const char *filename) LIBXML_ATTR_FORMAT(2,0);
#ifdef LIBXML_OUTPUT_ENABLED
-xmlOutputBufferPtr
+XML_HIDDEN xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
#endif
diff --git a/chromium/third_party/libxml/src/include/private/memory.h b/chromium/third_party/libxml/src/include/private/memory.h
new file mode 100644
index 00000000000..ef0497c65cf
--- /dev/null
+++ b/chromium/third_party/libxml/src/include/private/memory.h
@@ -0,0 +1,9 @@
+#ifndef XML_MEMORY_H_PRIVATE__
+#define XML_MEMORY_H_PRIVATE__
+
+XML_HIDDEN void
+xmlInitMemoryInternal(void);
+XML_HIDDEN void
+xmlCleanupMemoryInternal(void);
+
+#endif /* XML_MEMORY_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/parser.h b/chromium/third_party/libxml/src/include/private/parser.h
index 1bf9ee35fe1..43945f9ef8e 100644
--- a/chromium/third_party/libxml/src/include/private/parser.h
+++ b/chromium/third_party/libxml/src/include/private/parser.h
@@ -17,9 +17,11 @@
*/
#define XML_VCTXT_USE_PCTXT (1u << 1)
-void xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
-void __xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
- const char *msg, const xmlChar *str1,
- const xmlChar *str2) LIBXML_ATTR_FORMAT(3,0);
+XML_HIDDEN void
+xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
+XML_HIDDEN void
+__xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
+ const char *msg, const xmlChar *str1,
+ const xmlChar *str2) LIBXML_ATTR_FORMAT(3,0);
#endif /* XML_PARSER_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/regexp.h b/chromium/third_party/libxml/src/include/private/regexp.h
index 3ffb378afbc..f2024939e3c 100644
--- a/chromium/third_party/libxml/src/include/private/regexp.h
+++ b/chromium/third_party/libxml/src/include/private/regexp.h
@@ -3,6 +3,7 @@
#include <libxml/xmlautomata.h>
-void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
+XML_HIDDEN void
+xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
#endif /* XML_REGEXP_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/save.h b/chromium/third_party/libxml/src/include/private/save.h
index ec970851f75..873aad766da 100644
--- a/chromium/third_party/libxml/src/include/private/save.h
+++ b/chromium/third_party/libxml/src/include/private/save.h
@@ -6,9 +6,11 @@
#ifdef LIBXML_OUTPUT_ENABLED
-void xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
- xmlAttrPtr attr, const xmlChar * string);
-void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
+XML_HIDDEN void
+xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
+ xmlAttrPtr attr, const xmlChar * string);
+XML_HIDDEN void
+xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
#endif /* LIBXML_OUTPUT_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/private/string.h b/chromium/third_party/libxml/src/include/private/string.h
index 0c4bf5413cc..9665fc47238 100644
--- a/chromium/third_party/libxml/src/include/private/string.h
+++ b/chromium/third_party/libxml/src/include/private/string.h
@@ -3,6 +3,7 @@
#include <libxml/xmlstring.h>
-xmlChar *xmlEscapeFormatString(xmlChar **msg);
+XML_HIDDEN xmlChar *
+xmlEscapeFormatString(xmlChar **msg);
#endif /* XML_STRING_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/threads.h b/chromium/third_party/libxml/src/include/private/threads.h
index c054a6fb956..b337bfa0b6d 100644
--- a/chromium/third_party/libxml/src/include/private/threads.h
+++ b/chromium/third_party/libxml/src/include/private/threads.h
@@ -1,8 +1,50 @@
#ifndef XML_THREADS_H_PRIVATE__
#define XML_THREADS_H_PRIVATE__
-void __xmlGlobalInitMutexLock(void);
-void __xmlGlobalInitMutexUnlock(void);
-void __xmlGlobalInitMutexDestroy(void);
+#include <libxml/threads.h>
+
+#ifdef LIBXML_THREAD_ENABLED
+ #ifdef HAVE_PTHREAD_H
+ #include <pthread.h>
+ #define HAVE_POSIX_THREADS
+ #elif defined(_WIN32)
+ #define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #ifndef HAVE_COMPILER_TLS
+ #include <process.h>
+ #endif
+ #define HAVE_WIN32_THREADS
+ #endif
+#endif
+
+/*
+ * xmlMutex are a simple mutual exception locks
+ */
+struct _xmlMutex {
+#ifdef HAVE_POSIX_THREADS
+ pthread_mutex_t lock;
+#elif defined HAVE_WIN32_THREADS
+ CRITICAL_SECTION cs;
+#else
+ int empty;
+#endif
+};
+
+XML_HIDDEN void
+__xmlGlobalInitMutexLock(void);
+XML_HIDDEN void
+__xmlGlobalInitMutexUnlock(void);
+XML_HIDDEN void
+__xmlGlobalInitMutexDestroy(void);
+
+XML_HIDDEN void
+xmlInitThreadsInternal(void);
+XML_HIDDEN void
+xmlCleanupThreadsInternal(void);
+
+XML_HIDDEN void
+xmlInitMutex(xmlMutexPtr mutex);
+XML_HIDDEN void
+xmlCleanupMutex(xmlMutexPtr mutex);
#endif /* XML_THREADS_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/tree.h b/chromium/third_party/libxml/src/include/private/tree.h
index 8b7f65d4b79..fb5e1623715 100644
--- a/chromium/third_party/libxml/src/include/private/tree.h
+++ b/chromium/third_party/libxml/src/include/private/tree.h
@@ -6,6 +6,13 @@
* node creation/destruction. It avoids spending a lot of time in locking
* function while checking if the callback exists.
*/
-extern int __xmlRegisterCallbacks;
+XML_HIDDEN extern int
+__xmlRegisterCallbacks;
+
+XML_HIDDEN xmlNodePtr
+xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
+ int extended);
+XML_HIDDEN xmlNodePtr
+xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
#endif /* XML_TREE_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/xinclude.h b/chromium/third_party/libxml/src/include/private/xinclude.h
new file mode 100644
index 00000000000..43c77e50618
--- /dev/null
+++ b/chromium/third_party/libxml/src/include/private/xinclude.h
@@ -0,0 +1,9 @@
+#ifndef XML_INCLUDE_H_PRIVATE__
+#define XML_INCLUDE_H_PRIVATE__
+
+#include <libxml/xinclude.h>
+
+XML_HIDDEN int
+xmlXIncludeSetStreamingMode(xmlXIncludeCtxtPtr ctxt, int mode);
+
+#endif /* XML_INCLUDE_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/xpath.h b/chromium/third_party/libxml/src/include/private/xpath.h
new file mode 100644
index 00000000000..0e8d752568e
--- /dev/null
+++ b/chromium/third_party/libxml/src/include/private/xpath.h
@@ -0,0 +1,7 @@
+#ifndef XML_XPATH_H_PRIVATE__
+#define XML_XPATH_H_PRIVATE__
+
+XML_HIDDEN void
+xmlInitXPathInternal(void);
+
+#endif /* XML_XPATH_H_PRIVATE__ */
diff --git a/chromium/third_party/libxml/src/include/private/xzlib.h b/chromium/third_party/libxml/src/include/private/xzlib.h
index 001854e5ce7..b3326980ce5 100644
--- a/chromium/third_party/libxml/src/include/private/xzlib.h
+++ b/chromium/third_party/libxml/src/include/private/xzlib.h
@@ -16,11 +16,16 @@
typedef void *xzFile; /* opaque lzma file descriptor */
-xzFile __libxml2_xzopen(const char *path, const char *mode);
-xzFile __libxml2_xzdopen(int fd, const char *mode);
-int __libxml2_xzread(xzFile file, void *buf, unsigned len);
-int __libxml2_xzclose(xzFile file);
-int __libxml2_xzcompressed(xzFile f);
+XML_HIDDEN xzFile
+__libxml2_xzopen(const char *path, const char *mode);
+XML_HIDDEN xzFile
+__libxml2_xzdopen(int fd, const char *mode);
+XML_HIDDEN int
+__libxml2_xzread(xzFile file, void *buf, unsigned len);
+XML_HIDDEN int
+__libxml2_xzclose(xzFile file);
+XML_HIDDEN int
+__libxml2_xzcompressed(xzFile f);
#endif /* LIBXML_LZMA_ENABLED */
diff --git a/chromium/third_party/libxml/src/include/win32config.h b/chromium/third_party/libxml/src/include/win32config.h
index 2b113237058..a25e0385024 100644
--- a/chromium/third_party/libxml/src/include/win32config.h
+++ b/chromium/third_party/libxml/src/include/win32config.h
@@ -6,16 +6,16 @@
#define HAVE_FCNTL_H
#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1600)
-#define HAVE_STDINT_H
+ #define HAVE_STDINT_H
#endif
#if defined(_MSC_VER)
-#if _MSC_VER < 1900
-#define snprintf _snprintf
-#endif
-#if _MSC_VER < 1500
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
-#endif
+ #if _MSC_VER < 1900
+ #define snprintf _snprintf
+ #endif
+ #if _MSC_VER < 1500
+ #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+ #endif
#endif
#endif /* __LIBXML_WIN32_CONFIG__ */
diff --git a/chromium/third_party/libxml/src/libxml.h b/chromium/third_party/libxml/src/libxml.h
index 59294473c58..c3d04bc5100 100644
--- a/chromium/third_party/libxml/src/libxml.h
+++ b/chromium/third_party/libxml/src/libxml.h
@@ -14,54 +14,49 @@
* Do not add any #include directives above this block.
*/
#ifndef NO_LARGEFILE_SOURCE
-#ifndef _LARGEFILE_SOURCE
-#define _LARGEFILE_SOURCE
-#endif
-#ifndef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
-#endif
+ #ifndef _LARGEFILE_SOURCE
+ #define _LARGEFILE_SOURCE
+ #endif
+ #ifndef _FILE_OFFSET_BITS
+ #define _FILE_OFFSET_BITS 64
+ #endif
#endif
/*
- * Currently supported platforms use either autoconf or
- * copy to config.h own "preset" configuration file.
- * As result ifdef HAVE_CONFIG_H is omitted here.
+ * These files are generated by the build system and contain private
+ * and public build configuration.
*/
#include "config.h"
#include <libxml/xmlversion.h>
+/*
+ * Due to some Autotools limitations, this variable must be passed as
+ * compiler flag. Define a default value if the macro wasn't set by the
+ * build system.
+ */
#ifndef SYSCONFDIR
#define SYSCONFDIR "/etc"
#endif
-#if defined(__Lynx__)
-#include <stdio.h> /* pull definition of size_t */
-#include <varargs.h>
-int snprintf(char *, size_t, const char *, ...);
-int vfprintf(FILE *, const char *, va_list);
+#ifdef WITH_TRIO
+ #define TRIO_REPLACE_STDIO
+ #include "trio.h"
#endif
-#ifndef WITH_TRIO
-#include <stdio.h>
+#if !defined(_WIN32) && \
+ !defined(__CYGWIN__) && \
+ (defined(__clang__) || \
+ (defined(__GNUC__) && (__GNUC__ >= 4)))
+ #define XML_HIDDEN __attribute__((visibility("hidden")))
#else
-/**
- * TRIO_REPLACE_STDIO:
- *
- * This macro is defined if the trio string formatting functions are to
- * be used instead of the default stdio ones.
- */
-#define TRIO_REPLACE_STDIO
-#include "trio.h"
+ #define XML_HIDDEN
#endif
#if defined(__clang__) || \
(defined(__GNUC__) && (__GNUC__ >= 8))
-#define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
+ #define ATTRIBUTE_NO_SANITIZE(arg) __attribute__((no_sanitize(arg)))
#else
-#define ATTRIBUTE_NO_SANITIZE(arg)
+ #define ATTRIBUTE_NO_SANITIZE(arg)
#endif
-#if !defined(PIC) && !defined(NOLIBTOOL) && !defined(LIBXML_STATIC)
-# define LIBXML_STATIC
-#endif
#endif /* ! __XML_LIBXML_H__ */
diff --git a/chromium/third_party/libxml/src/libxml.m4 b/chromium/third_party/libxml/src/libxml.m4
index fc7790c326c..622a74994bb 100644
--- a/chromium/third_party/libxml/src/libxml.m4
+++ b/chromium/third_party/libxml/src/libxml.m4
@@ -1,191 +1,14 @@
-# Configure paths for LIBXML2
-# Simon Josefsson 2020-02-12
-# Fix autoconf 2.70+ warnings
-# Mike Hommey 2004-06-19
-# use CPPFLAGS instead of CFLAGS
-# Toshio Kuratomi 2001-04-21
-# Adapted from:
-# Configure paths for GLIB
-# Owen Taylor 97-11-3
-
dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
dnl
-AC_DEFUN([AM_PATH_XML2],[
-AC_ARG_WITH(xml-prefix,
- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
- xml_config_prefix="$withval", xml_config_prefix="")
-AC_ARG_WITH(xml-exec-prefix,
- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
-AC_ARG_ENABLE(xmltest,
- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
- enable_xmltest=yes)
-
- if test x$xml_config_exec_prefix != x ; then
- xml_config_args="$xml_config_args"
- if test x${XML2_CONFIG+set} != xset ; then
- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
- fi
- fi
- if test x$xml_config_prefix != x ; then
- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
- if test x${XML2_CONFIG+set} != xset ; then
- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
- fi
- fi
-
- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
- min_xml_version=ifelse([$1], ,2.0.0,[$1])
- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
- no_xml=""
- if test "$XML2_CONFIG" = "no" ; then
- no_xml=yes
- else
- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_xmltest" = "xyes" ; then
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
- LIBS="$XML_LIBS $LIBS"
-dnl
-dnl Now check if the installed libxml is sufficiently new.
-dnl (Also sanity checks the results of xml2-config to some extent)
-dnl
- rm -f conf.xmltest
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <libxml/xmlversion.h>
-
-int
-main()
-{
- int xml_major_version, xml_minor_version, xml_micro_version;
- int major, minor, micro;
- char *tmp_version;
-
- system("touch conf.xmltest");
-
- /* Capture xml2-config output via autoconf/configure variables */
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *)strdup("$min_xml_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
- exit(1);
- }
- free(tmp_version);
-
- /* Capture the version information from the header files */
- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
- exit(1);
- }
- free(tmp_version);
-
- /* Compare xml2-config output to the libxml headers */
- if ((xml_major_version != $xml_config_major_version) ||
- (xml_minor_version != $xml_config_minor_version) ||
- (xml_micro_version != $xml_config_micro_version))
- {
- printf("*** libxml header files (version %d.%d.%d) do not match\n",
- xml_major_version, xml_minor_version, xml_micro_version);
- printf("*** xml2-config (version %d.%d.%d)\n",
- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
- return 1;
- }
-/* Compare the headers to the library to make sure we match */
- /* Less than ideal -- doesn't provide us with return value feedback,
- * only exits if there's a serious mismatch between header and library.
- */
- LIBXML_TEST_VERSION;
-
- /* Test that the library is greater than our minimum version */
- if ((xml_major_version > major) ||
- ((xml_major_version == major) && (xml_minor_version > minor)) ||
- ((xml_major_version == major) && (xml_minor_version == minor) &&
- (xml_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
- xml_major_version, xml_minor_version, xml_micro_version);
- printf("*** You need a version of libxml newer than %d.%d.%d.\n",
- major, minor, micro);
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
- printf("*** correct copy of xml2-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- return 1;
-}
-]])],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
+AC_DEFUN([AM_PATH_XML2],[
+ AC_MSG_WARN([AM_PATH_XML2 is deprecated, use PKG_CHECK_MODULES instead])
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
- if test "x$no_xml" = x ; then
- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$XML2_CONFIG" = "no" ; then
- echo "*** The xml2-config script installed by LIBXML could not be found"
- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the XML2_CONFIG environment variable to the"
- echo "*** full path to xml2-config."
- else
- if test -f conf.xmltest ; then
- :
- else
- echo "*** Could not run libxml test program, checking why..."
- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
- LIBS="$LIBS $XML_LIBS"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-#include <libxml/xmlversion.h>
-#include <stdio.h>
-]], [[ LIBXML_TEST_VERSION; return 0;]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
+ verdep=ifelse([$1], [], [], [">= $1"])
+ PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3])
- XML_CPPFLAGS=""
- XML_LIBS=""
- ifelse([$3], , :, [$3])
- fi
+ XML_CPPFLAGS=$XML_CFLAGS
AC_SUBST(XML_CPPFLAGS)
AC_SUBST(XML_LIBS)
- rm -f conf.xmltest
])
diff --git a/chromium/third_party/libxml/src/libxml2.syms b/chromium/third_party/libxml/src/libxml2.syms
index a2f7e416fe2..7794596e8cc 100644
--- a/chromium/third_party/libxml/src/libxml2.syms
+++ b/chromium/third_party/libxml/src/libxml2.syms
@@ -1,2307 +1,52 @@
#
-# Officially exported symbols, for which header
-# file definitions are installed in /usr/include/libxml2
+# Retained for backward compatibility.
#
-# Automatically generated from symbols.xml and syms.xsl
+# The original version script didn't account for configuration options.
+# Since libxml2 never made use of symbol versioning, all symbols were
+# removed in version 2.11.0. Only the version nodes are kept to avoid
+# errors when running binaries linked against older versions.
#
-# Versions here are *fixed* to match the libxml2 version
-# at which the symbol was introduced. This ensures that
-# a new client app requiring symbol foo() can't accidentally
-# run with old libxml2.so not providing foo() - the global
-# soname version info can't enforce this since we never
-# change the soname
-#
-
-LIBXML2_2.4.30 {
- global:
-
-# debugXML
- xmlBoolToText;
- xmlDebugDumpAttr;
- xmlDebugDumpAttrList;
- xmlDebugDumpDTD;
- xmlDebugDumpDocument;
- xmlDebugDumpDocumentHead;
- xmlDebugDumpEntities;
- xmlDebugDumpNode;
- xmlDebugDumpNodeList;
- xmlDebugDumpOneNode;
- xmlDebugDumpString;
- xmlLsCountNode;
- xmlLsOneNode;
- xmlShell;
- xmlShellBase;
- xmlShellCat;
- xmlShellDir;
- xmlShellDu;
- xmlShellList;
- xmlShellLoad;
- xmlShellPrintNode;
- xmlShellPrintXPathError;
- xmlShellPrintXPathResult;
- xmlShellPwd;
- xmlShellSave;
- xmlShellValidate;
- xmlShellWrite;
-
-# xpointer
- xmlXPtrBuildNodeList;
- xmlXPtrEval;
- xmlXPtrEvalRangePredicate;
- xmlXPtrFreeLocationSet;
- xmlXPtrLocationSetAdd;
- xmlXPtrLocationSetCreate;
- xmlXPtrLocationSetDel;
- xmlXPtrLocationSetMerge;
- xmlXPtrLocationSetRemove;
- xmlXPtrNewCollapsedRange;
- xmlXPtrNewContext;
- xmlXPtrNewLocationSetNodeSet;
- xmlXPtrNewLocationSetNodes;
- xmlXPtrNewRange;
- xmlXPtrNewRangeNodeObject;
- xmlXPtrNewRangeNodePoint;
- xmlXPtrNewRangeNodes;
- xmlXPtrNewRangePointNode;
- xmlXPtrNewRangePoints;
- xmlXPtrRangeToFunction;
- xmlXPtrWrapLocationSet;
-
-# SAX
- attribute;
- attributeDecl;
- cdataBlock;
- characters;
- checkNamespace;
- comment;
-
-# SAX2
-# docbDefaultSAXHandlerInit; removed in 2.10.0
-
-# SAX
- elementDecl;
- endDocument;
- endElement;
- entityDecl;
- externalSubset;
- getColumnNumber;
- getEntity;
- getLineNumber;
- getNamespace;
- getParameterEntity;
- getPublicId;
- getSystemId;
- globalNamespace;
- hasExternalSubset;
- hasInternalSubset;
-
-# SAX2
- htmlDefaultSAXHandlerInit;
-
-# SAX
- ignorableWhitespace;
-# initdocbDefaultSAXHandler; removed in 2.10.0
- inithtmlDefaultSAXHandler;
- initxmlDefaultSAXHandler;
- internalSubset;
- isStandalone;
- namespaceDecl;
- notationDecl;
- processingInstruction;
- reference;
- resolveEntity;
- setDocumentLocator;
- setNamespace;
- startDocument;
- startElement;
- unparsedEntityDecl;
-
-# SAX2
- xmlDefaultSAXHandlerInit;
-
-# HTMLparser
- htmlCreateFileParserCtxt;
- htmlInitAutoClose;
-
-# parserInternals
- inputPop;
- inputPush;
- namePop;
- namePush;
- nodePop;
- nodePush;
- xmlCheckLanguageID;
- xmlCopyChar;
- xmlCopyCharMultiByte;
- xmlCreateEntityParserCtxt;
- xmlCreateFileParserCtxt;
- xmlCreateMemoryParserCtxt;
- xmlCurrentChar;
- xmlDecodeEntities;
- xmlFreeInputStream;
- xmlHandleEntity;
-
-# chvalid
- xmlIsBaseChar;
- xmlIsBlank;
- xmlIsChar;
- xmlIsCombining;
- xmlIsDigit;
- xmlIsExtender;
- xmlIsIdeographic;
-
-# parserInternals
- xmlIsLetter;
-
-# chvalid
- xmlIsPubidChar;
-
-# parserInternals
- xmlNamespaceParseNCName;
- xmlNamespaceParseNSDef;
- xmlNamespaceParseQName;
- xmlNewEntityInputStream;
- xmlNewInputFromFile;
- xmlNewInputStream;
-
-# parser
- xmlNewParserCtxt;
-
-# parserInternals
- xmlNewStringInputStream;
- xmlNextChar;
- xmlParseAttValue;
- xmlParseAttribute;
- xmlParseAttributeListDecl;
- xmlParseAttributeType;
- xmlParseCDSect;
- xmlParseCharData;
- xmlParseCharRef;
- xmlParseComment;
- xmlParseContent;
- xmlParseDefaultDecl;
- xmlParseDocTypeDecl;
- xmlParseElement;
- xmlParseElementChildrenContentDecl;
- xmlParseElementContentDecl;
- xmlParseElementDecl;
- xmlParseElementMixedContentDecl;
- xmlParseEncName;
- xmlParseEncodingDecl;
- xmlParseEndTag;
- xmlParseEntityDecl;
- xmlParseEntityRef;
- xmlParseEntityValue;
- xmlParseEnumeratedType;
- xmlParseEnumerationType;
- xmlParseExternalID;
- xmlParseExternalSubset;
- xmlParseMarkupDecl;
- xmlParseMisc;
- xmlParseName;
- xmlParseNamespace;
- xmlParseNmtoken;
- xmlParseNotationDecl;
- xmlParseNotationType;
- xmlParsePEReference;
- xmlParsePI;
- xmlParsePITarget;
- xmlParsePubidLiteral;
- xmlParseQuotedString;
- xmlParseReference;
- xmlParseSDDecl;
- xmlParseStartTag;
- xmlParseSystemLiteral;
- xmlParseTextDecl;
- xmlParseVersionInfo;
- xmlParseVersionNum;
- xmlParseXMLDecl;
- xmlParserHandlePEReference;
- xmlParserHandleReference;
- xmlParserInputShrink;
- xmlPopInput;
- xmlPushInput;
- xmlScanName;
- xmlSetEntityReferenceFunc;
- xmlSkipBlankChars;
- xmlSplitQName;
- xmlStringComment; # variable
- xmlStringCurrentChar;
- xmlStringDecodeEntities;
- xmlStringText; # variable
- xmlStringTextNoenc; # variable
- xmlSwitchEncoding;
- xmlSwitchToEncoding;
-
-# c14n
- xmlC14NDocDumpMemory;
- xmlC14NDocSave;
- xmlC14NDocSaveTo;
- xmlC14NExecute;
-
-# catalog
- xmlACatalogAdd;
- xmlACatalogDump;
- xmlACatalogRemove;
- xmlACatalogResolve;
- xmlACatalogResolvePublic;
- xmlACatalogResolveSystem;
- xmlACatalogResolveURI;
- xmlCatalogAdd;
- xmlCatalogAddLocal;
- xmlCatalogCleanup;
- xmlCatalogConvert;
- xmlCatalogDump;
- xmlCatalogFreeLocal;
- xmlCatalogGetDefaults;
- xmlCatalogGetPublic;
- xmlCatalogGetSystem;
- xmlCatalogIsEmpty;
- xmlCatalogLocalResolve;
- xmlCatalogLocalResolveURI;
- xmlCatalogRemove;
- xmlCatalogResolve;
- xmlCatalogResolvePublic;
- xmlCatalogResolveSystem;
- xmlCatalogResolveURI;
- xmlCatalogSetDebug;
- xmlCatalogSetDefaultPrefer;
- xmlCatalogSetDefaults;
- xmlConvertSGMLCatalog;
- xmlFreeCatalog;
- xmlInitializeCatalog;
- xmlLoadACatalog;
- xmlLoadCatalog;
- xmlLoadCatalogs;
- xmlLoadSGMLSuperCatalog;
- xmlNewCatalog;
- xmlParseCatalogFile;
-
-# xpathInternals
- valuePop;
- valuePush;
- xmlXPathAddValues;
- xmlXPathBooleanFunction;
- xmlXPathCeilingFunction;
- xmlXPathCompareValues;
- xmlXPathConcatFunction;
- xmlXPathContainsFunction;
- xmlXPathCountFunction;
- xmlXPathDebugDumpCompExpr;
- xmlXPathDebugDumpObject;
- xmlXPathDifference;
- xmlXPathDistinct;
- xmlXPathDistinctSorted;
- xmlXPathDivValues;
- xmlXPathEqualValues;
- xmlXPathEvalExpr;
- xmlXPathEvaluatePredicateResult;
- xmlXPathFalseFunction;
- xmlXPathFloorFunction;
- xmlXPathFreeParserContext;
- xmlXPathFunctionLookup;
- xmlXPathFunctionLookupNS;
- xmlXPathHasSameNodes;
- xmlXPathIdFunction;
- xmlXPathIntersection;
- xmlXPathIsNodeType;
- xmlXPathLangFunction;
- xmlXPathLastFunction;
- xmlXPathLeading;
- xmlXPathLeadingSorted;
- xmlXPathLocalNameFunction;
- xmlXPathModValues;
- xmlXPathMultValues;
- xmlXPathNamespaceURIFunction;
- xmlXPathNewBoolean;
- xmlXPathNewCString;
- xmlXPathNewFloat;
- xmlXPathNewNodeSet;
- xmlXPathNewNodeSetList;
- xmlXPathNewParserContext;
- xmlXPathNewString;
- xmlXPathNewValueTree;
- xmlXPathNextAncestor;
- xmlXPathNextAncestorOrSelf;
- xmlXPathNextAttribute;
- xmlXPathNextChild;
- xmlXPathNextDescendant;
- xmlXPathNextDescendantOrSelf;
- xmlXPathNextFollowing;
- xmlXPathNextFollowingSibling;
- xmlXPathNextNamespace;
- xmlXPathNextParent;
- xmlXPathNextPreceding;
- xmlXPathNextPrecedingSibling;
- xmlXPathNextSelf;
- xmlXPathNodeLeading;
- xmlXPathNodeLeadingSorted;
- xmlXPathNodeSetAdd;
- xmlXPathNodeSetAddNs;
- xmlXPathNodeSetAddUnique;
- xmlXPathNodeSetContains;
- xmlXPathNodeSetDel;
- xmlXPathNodeSetFreeNs;
- xmlXPathNodeSetMerge;
- xmlXPathNodeSetRemove;
- xmlXPathNodeSetSort;
- xmlXPathNodeTrailing;
- xmlXPathNodeTrailingSorted;
- xmlXPathNormalizeFunction;
- xmlXPathNotEqualValues;
- xmlXPathNotFunction;
- xmlXPathNsLookup;
- xmlXPathNumberFunction;
- xmlXPathParseNCName;
- xmlXPathParseName;
- xmlXPathPopBoolean;
- xmlXPathPopExternal;
- xmlXPathPopNodeSet;
- xmlXPathPopNumber;
- xmlXPathPopString;
- xmlXPathPositionFunction;
- xmlXPathRegisterAllFunctions;
- xmlXPathRegisterFunc;
- xmlXPathRegisterFuncLookup;
- xmlXPathRegisterFuncNS;
- xmlXPathRegisterNs;
- xmlXPathRegisterVariable;
- xmlXPathRegisterVariableLookup;
- xmlXPathRegisterVariableNS;
- xmlXPathRegisteredFuncsCleanup;
- xmlXPathRegisteredNsCleanup;
- xmlXPathRegisteredVariablesCleanup;
- xmlXPathRoot;
- xmlXPathRoundFunction;
- xmlXPathStartsWithFunction;
- xmlXPathStringEvalNumber;
- xmlXPathStringFunction;
- xmlXPathStringLengthFunction;
- xmlXPathSubValues;
- xmlXPathSubstringAfterFunction;
- xmlXPathSubstringBeforeFunction;
- xmlXPathSubstringFunction;
- xmlXPathSumFunction;
- xmlXPathTrailing;
- xmlXPathTrailingSorted;
- xmlXPathTranslateFunction;
- xmlXPathTrueFunction;
- xmlXPathValueFlipSign;
- xmlXPathVariableLookup;
- xmlXPathVariableLookupNS;
- xmlXPathWrapCString;
- xmlXPathWrapExternal;
- xmlXPathWrapNodeSet;
- xmlXPathWrapString;
- xmlXPatherror;
-
-# xmlautomata
- xmlAutomataCompile;
- xmlAutomataGetInitState;
- xmlAutomataIsDeterminist;
- xmlAutomataNewAllTrans;
- xmlAutomataNewCountTrans;
- xmlAutomataNewCountedTrans;
- xmlAutomataNewCounter;
- xmlAutomataNewCounterTrans;
- xmlAutomataNewEpsilon;
- xmlAutomataNewOnceTrans;
- xmlAutomataNewState;
- xmlAutomataNewTransition;
- xmlAutomataSetFinalState;
- xmlFreeAutomata;
- xmlNewAutomata;
-
-# HTMLtree
- htmlDocContentDumpFormatOutput;
- htmlDocContentDumpOutput;
- htmlDocDump;
- htmlDocDumpMemory;
- htmlGetMetaEncoding;
- htmlIsBooleanAttr;
- htmlNewDoc;
- htmlNewDocNoDtD;
- htmlNodeDump;
- htmlNodeDumpFile;
- htmlNodeDumpFileFormat;
- htmlNodeDumpFormatOutput;
- htmlNodeDumpOutput;
- htmlSaveFile;
- htmlSaveFileEnc;
- htmlSaveFileFormat;
- htmlSetMetaEncoding;
-
-# nanoftp
- xmlNanoFTPCheckResponse;
- xmlNanoFTPCleanup;
- xmlNanoFTPClose;
- xmlNanoFTPCloseConnection;
- xmlNanoFTPConnect;
- xmlNanoFTPConnectTo;
- xmlNanoFTPCwd;
- xmlNanoFTPFreeCtxt;
- xmlNanoFTPGet;
- xmlNanoFTPGetConnection;
- xmlNanoFTPGetResponse;
- xmlNanoFTPGetSocket;
- xmlNanoFTPInit;
- xmlNanoFTPList;
- xmlNanoFTPNewCtxt;
- xmlNanoFTPOpen;
- xmlNanoFTPProxy;
- xmlNanoFTPQuit;
- xmlNanoFTPRead;
- xmlNanoFTPScanProxy;
- xmlNanoFTPUpdateURL;
-
-# DOCBparser
-# docbCreateFileParserCtxt; removed in 2.10.0
-# docbCreatePushParserCtxt; removed in 2.10.0
-# docbEncodeEntities; removed in 2.10.0
-# docbFreeParserCtxt; removed in 2.10.0
-# docbParseChunk; removed in 2.10.0
-# docbParseDoc; removed in 2.10.0
-# docbParseDocument; removed in 2.10.0
-# docbParseFile; removed in 2.10.0
-# docbSAXParseDoc; removed in 2.10.0
-# docbSAXParseFile; removed in 2.10.0
-
-# xpath
- xmlXPathCastBooleanToNumber;
- xmlXPathCastBooleanToString;
- xmlXPathCastNodeSetToBoolean;
- xmlXPathCastNodeSetToNumber;
- xmlXPathCastNodeSetToString;
- xmlXPathCastNodeToNumber;
- xmlXPathCastNodeToString;
- xmlXPathCastNumberToBoolean;
- xmlXPathCastNumberToString;
- xmlXPathCastStringToBoolean;
- xmlXPathCastStringToNumber;
- xmlXPathCastToBoolean;
- xmlXPathCastToNumber;
- xmlXPathCastToString;
- xmlXPathCmpNodes;
- xmlXPathCompile;
- xmlXPathCompiledEval;
- xmlXPathConvertBoolean;
- xmlXPathConvertNumber;
- xmlXPathConvertString;
- xmlXPathEval;
- xmlXPathEvalExpression;
- xmlXPathEvalPredicate;
- xmlXPathFreeCompExpr;
- xmlXPathFreeContext;
- xmlXPathFreeNodeSet;
- xmlXPathFreeNodeSetList;
- xmlXPathFreeObject;
- xmlXPathInit;
- xmlXPathIsInf;
- xmlXPathIsNaN;
- xmlXPathNAN; # variable
- xmlXPathNINF; # variable
- xmlXPathNewContext;
- xmlXPathNodeSetCreate;
- xmlXPathObjectCopy;
- xmlXPathPINF; # variable
-
-# xlink
- xlinkGetDefaultDetect;
- xlinkGetDefaultHandler;
- xlinkIsLink;
- xlinkSetDefaultDetect;
- xlinkSetDefaultHandler;
-
-# entities
- xmlAddDocEntity;
- xmlAddDtdEntity;
- xmlCleanupPredefinedEntities;
- xmlCopyEntitiesTable;
- xmlCreateEntitiesTable;
- xmlDumpEntitiesTable;
- xmlDumpEntityDecl;
- xmlEncodeEntities;
- xmlEncodeEntitiesReentrant;
- xmlEncodeSpecialChars;
- xmlFreeEntitiesTable;
- xmlGetDocEntity;
- xmlGetDtdEntity;
- xmlGetParameterEntity;
- xmlGetPredefinedEntity;
- xmlInitializePredefinedEntities;
-
-# xinclude
- xmlXIncludeProcess;
-
-# list
- xmlLinkGetData;
- xmlListAppend;
- xmlListClear;
- xmlListCopy;
- xmlListCreate;
- xmlListDelete;
- xmlListDup;
- xmlListEmpty;
- xmlListEnd;
- xmlListFront;
- xmlListInsert;
- xmlListMerge;
- xmlListPopBack;
- xmlListPopFront;
- xmlListPushBack;
- xmlListPushFront;
- xmlListRemoveAll;
- xmlListRemoveFirst;
- xmlListRemoveLast;
- xmlListReverse;
- xmlListReverseSearch;
- xmlListReverseWalk;
- xmlListSearch;
- xmlListSize;
- xmlListSort;
- xmlListWalk;
-
-# xmlmemory
- xmlInitMemory;
- xmlMallocLoc;
- xmlMemDisplay;
- xmlMemFree;
- xmlMemGet;
- xmlMemMalloc;
- xmlMemRealloc;
- xmlMemSetup;
- xmlMemShow;
- xmlMemStrdupLoc;
- xmlMemUsed;
- xmlMemoryDump;
- xmlMemoryStrdup;
- xmlReallocLoc;
-
-# xmlIO
- xmlAllocOutputBuffer;
- xmlAllocParserInputBuffer;
- xmlCheckFilename;
- xmlCleanupInputCallbacks;
- xmlCleanupOutputCallbacks;
- xmlFileClose;
- xmlFileMatch;
- xmlFileOpen;
- xmlFileRead;
- xmlFreeParserInputBuffer;
- xmlIOFTPClose;
- xmlIOFTPMatch;
- xmlIOFTPOpen;
- xmlIOFTPRead;
- xmlIOHTTPClose;
- xmlIOHTTPMatch;
- xmlIOHTTPOpen;
- xmlIOHTTPOpenW;
- xmlIOHTTPRead;
- xmlNoNetExternalEntityLoader;
- xmlNormalizeWindowsPath;
- xmlOutputBufferClose;
- xmlOutputBufferCreateFd;
- xmlOutputBufferCreateFile;
- xmlOutputBufferCreateFilename;
- xmlOutputBufferCreateIO;
- xmlOutputBufferFlush;
- xmlOutputBufferWrite;
- xmlOutputBufferWriteString;
- xmlParserGetDirectory;
- xmlParserInputBufferCreateFd;
- xmlParserInputBufferCreateFile;
- xmlParserInputBufferCreateFilename;
- xmlParserInputBufferCreateIO;
- xmlParserInputBufferCreateMem;
- xmlParserInputBufferGrow;
- xmlParserInputBufferPush;
- xmlParserInputBufferRead;
- xmlRegisterDefaultInputCallbacks;
- xmlRegisterDefaultOutputCallbacks;
- xmlRegisterHTTPPostCallbacks;
- xmlRegisterInputCallbacks;
- xmlRegisterOutputCallbacks;
-
-# xmlversion
- xmlCheckVersion;
-
-# valid
- xmlAddAttributeDecl;
- xmlAddElementDecl;
- xmlAddID;
- xmlAddNotationDecl;
- xmlAddRef;
- xmlCopyAttributeTable;
- xmlCopyElementContent;
- xmlCopyElementTable;
- xmlCopyEnumeration;
- xmlCopyNotationTable;
- xmlCreateEnumeration;
- xmlDumpAttributeDecl;
- xmlDumpAttributeTable;
- xmlDumpElementDecl;
- xmlDumpElementTable;
- xmlDumpNotationDecl;
- xmlDumpNotationTable;
- xmlFreeAttributeTable;
- xmlFreeElementContent;
- xmlFreeElementTable;
- xmlFreeEnumeration;
- xmlFreeIDTable;
- xmlFreeNotationTable;
- xmlFreeRefTable;
- xmlGetDtdAttrDesc;
- xmlGetDtdElementDesc;
- xmlGetDtdNotationDesc;
- xmlGetDtdQAttrDesc;
- xmlGetDtdQElementDesc;
- xmlGetID;
- xmlGetRefs;
- xmlIsID;
- xmlIsMixedElement;
- xmlIsRef;
- xmlNewElementContent;
- xmlRemoveID;
- xmlRemoveRef;
- xmlSnprintfElementContent;
-
-# tree
- xmlSplitQName2;
-
-# valid
- xmlSprintfElementContent;
- xmlValidBuildContentModel;
- xmlValidCtxtNormalizeAttributeValue;
- xmlValidGetPotentialChildren;
- xmlValidGetValidElements;
- xmlValidNormalizeAttributeValue;
- xmlValidateAttributeDecl;
- xmlValidateAttributeValue;
- xmlValidateDocument;
- xmlValidateDocumentFinal;
- xmlValidateDtd;
- xmlValidateDtdFinal;
- xmlValidateElement;
- xmlValidateElementDecl;
- xmlValidateNameValue;
- xmlValidateNamesValue;
- xmlValidateNmtokenValue;
- xmlValidateNmtokensValue;
- xmlValidateNotationDecl;
- xmlValidateNotationUse;
- xmlValidateOneAttribute;
- xmlValidateOneElement;
- xmlValidateOneNamespace;
- xmlValidateRoot;
-
-# HTMLparser
- UTF8ToHtml;
- htmlAutoCloseTag;
- htmlCreatePushParserCtxt;
- htmlEncodeEntities;
- htmlEntityLookup;
- htmlEntityValueLookup;
- htmlFreeParserCtxt;
- htmlHandleOmittedElem;
- htmlIsAutoClosed;
- htmlIsScriptAttribute;
- htmlParseCharRef;
- htmlParseChunk;
- htmlParseDoc;
- htmlParseDocument;
- htmlParseElement;
- htmlParseEntityRef;
- htmlParseFile;
- htmlSAXParseDoc;
- htmlSAXParseFile;
- htmlTagLookup;
-
-# xmlstring
- xmlCharStrdup;
- xmlCharStrndup;
-
-# parser
- xmlCleanupParser;
- xmlClearNodeInfoSeq;
- xmlClearParserCtxt;
- xmlCreateDocParserCtxt;
- xmlCreateIOParserCtxt;
- xmlCreatePushParserCtxt;
- xmlFreeParserCtxt;
- xmlGetExternalEntityLoader;
- xmlGetFeature;
- xmlGetFeaturesList;
-
-# globals
- xmlGetWarningsDefaultValue; # variable
-
-# parser
- xmlIOParseDTD;
- xmlInitNodeInfoSeq;
- xmlInitParser;
- xmlInitParserCtxt;
- xmlKeepBlanksDefault;
- xmlLineNumbersDefault;
- xmlLoadExternalEntity;
- xmlNewIOInputStream;
- xmlParseBalancedChunkMemory;
- xmlParseBalancedChunkMemoryRecover;
- xmlParseChunk;
- xmlParseCtxtExternalEntity;
- xmlParseDTD;
- xmlParseDoc;
- xmlParseDocument;
- xmlParseEntity;
- xmlParseExtParsedEnt;
- xmlParseExternalEntity;
- xmlParseFile;
- xmlParseMemory;
- xmlParserAddNodeInfo;
- xmlParserFindNodeInfo;
- xmlParserFindNodeInfoIndex;
- xmlParserInputGrow;
- xmlParserInputRead;
- xmlPedanticParserDefault;
- xmlRecoverDoc;
- xmlRecoverFile;
- xmlRecoverMemory;
- xmlSAXParseDTD;
- xmlSAXParseDoc;
- xmlSAXParseEntity;
- xmlSAXParseFile;
- xmlSAXParseFileWithData;
- xmlSAXParseMemory;
- xmlSAXParseMemoryWithData;
- xmlSAXUserParseFile;
- xmlSAXUserParseMemory;
- xmlSetExternalEntityLoader;
- xmlSetFeature;
- xmlSetupParserForBuffer;
- xmlStopParser;
-
-# xmlstring
- xmlStrEqual;
- xmlStrcasecmp;
- xmlStrcasestr;
- xmlStrcat;
- xmlStrchr;
- xmlStrcmp;
- xmlStrdup;
- xmlStrlen;
- xmlStrncasecmp;
- xmlStrncat;
- xmlStrncmp;
- xmlStrndup;
- xmlStrstr;
- xmlStrsub;
-
-# parser
- xmlSubstituteEntitiesDefault;
-
-# xmlreader
- xmlFreeTextReader;
- xmlNewTextReader;
- xmlNewTextReaderFilename;
- xmlTextReaderAttributeCount;
- xmlTextReaderBaseUri;
- xmlTextReaderDepth;
- xmlTextReaderHasAttributes;
- xmlTextReaderHasValue;
- xmlTextReaderIsDefault;
- xmlTextReaderIsEmptyElement;
- xmlTextReaderLocalName;
- xmlTextReaderName;
- xmlTextReaderNamespaceUri;
- xmlTextReaderNodeType;
- xmlTextReaderPrefix;
- xmlTextReaderQuoteChar;
- xmlTextReaderRead;
- xmlTextReaderValue;
- xmlTextReaderXmlLang;
-
-# globals
-# docbDefaultSAXHandler; removed in 2.10.0
- htmlDefaultSAXHandler; # variable
- xmlDefaultSAXHandler; # variable
- xmlDefaultSAXLocator; # variable
- xmlDoValidityCheckingDefaultValue; # variable
- xmlFree; # variable
- xmlGenericError; # variable
- xmlGenericErrorContext; # variable
- xmlInitializeGlobalState;
- xmlKeepBlanksDefaultValue; # variable
- xmlLineNumbersDefaultValue; # variable
- xmlLoadExtDtdDefaultValue; # variable
- xmlMalloc; # variable
- xmlMemStrdup; # variable
- xmlParserDebugEntities; # variable
- xmlParserVersion; # variable
- xmlPedanticParserDefaultValue; # variable
- xmlRealloc; # variable
- xmlSaveNoEmptyTags; # variable
- xmlSubstituteEntitiesDefaultValue; # variable
- xmlTreeIndentString; # variable
-
-# threads
- xmlCleanupThreads;
- xmlFreeMutex;
- xmlFreeRMutex;
- xmlGetGlobalState;
- xmlGetThreadId;
- xmlInitThreads;
- xmlIsMainThread;
- xmlLockLibrary;
- xmlMutexLock;
- xmlMutexUnlock;
- xmlNewMutex;
- xmlNewRMutex;
- xmlRMutexLock;
- xmlRMutexUnlock;
- xmlUnlockLibrary;
-
-# hash
- xmlHashAddEntry;
- xmlHashAddEntry2;
- xmlHashAddEntry3;
- xmlHashCopy;
- xmlHashCreate;
- xmlHashFree;
- xmlHashLookup;
- xmlHashLookup2;
- xmlHashLookup3;
- xmlHashRemoveEntry;
- xmlHashRemoveEntry2;
- xmlHashRemoveEntry3;
- xmlHashScan;
- xmlHashScan3;
- xmlHashScanFull;
- xmlHashScanFull3;
- xmlHashSize;
- xmlHashUpdateEntry;
- xmlHashUpdateEntry2;
- xmlHashUpdateEntry3;
-
-# xmlerror
- initGenericErrorDefaultFunc;
- xmlParserError;
- xmlParserPrintFileContext;
- xmlParserPrintFileInfo;
- xmlParserValidityError;
- xmlParserValidityWarning;
- xmlParserWarning;
- xmlSetGenericErrorFunc;
-
-# globals
- oldXMLWDcompatibility; # variable
-
-# tree
- xmlAddChild;
- xmlAddChildList;
- xmlAddNextSibling;
- xmlAddPrevSibling;
- xmlAddSibling;
- xmlBufferAdd;
- xmlBufferAddHead;
-
-# globals
- xmlBufferAllocScheme; # variable
-
-# tree
- xmlBufferCCat;
- xmlBufferCat;
- xmlBufferContent;
- xmlBufferCreate;
- xmlBufferCreateSize;
- xmlBufferDump;
- xmlBufferEmpty;
- xmlBufferFree;
- xmlBufferGrow;
- xmlBufferLength;
- xmlBufferResize;
- xmlBufferSetAllocationScheme;
- xmlBufferShrink;
- xmlBufferWriteCHAR;
- xmlBufferWriteChar;
- xmlBufferWriteQuotedString;
- xmlCopyDoc;
- xmlCopyDtd;
- xmlCopyNamespace;
- xmlCopyNamespaceList;
- xmlCopyNode;
- xmlCopyNodeList;
- xmlCopyProp;
- xmlCopyPropList;
- xmlCreateIntSubset;
-
-# globals
- xmlDefaultBufferSize; # variable
-
-# tree
- xmlDocCopyNode;
- xmlDocDump;
- xmlDocDumpFormatMemory;
- xmlDocDumpFormatMemoryEnc;
- xmlDocDumpMemory;
- xmlDocDumpMemoryEnc;
- xmlDocFormatDump;
- xmlDocGetRootElement;
- xmlDocSetRootElement;
- xmlElemDump;
- xmlFreeDoc;
- xmlFreeDtd;
- xmlFreeNode;
- xmlFreeNodeList;
- xmlFreeNs;
- xmlFreeNsList;
- xmlFreeProp;
- xmlFreePropList;
- xmlGetBufferAllocationScheme;
- xmlGetCompressMode;
- xmlGetDocCompressMode;
- xmlGetIntSubset;
- xmlGetLastChild;
- xmlGetLineNo;
- xmlGetNodePath;
- xmlGetNsList;
- xmlGetNsProp;
- xmlGetProp;
- xmlHasNsProp;
- xmlHasProp;
-
-# globals
- xmlIndentTreeOutput; # variable
-
-# tree
- xmlIsBlankNode;
- xmlIsXHTML;
- xmlNewCDataBlock;
- xmlNewCharRef;
- xmlNewChild;
- xmlNewComment;
- xmlNewDoc;
- xmlNewDocComment;
- xmlNewDocFragment;
- xmlNewDocNode;
- xmlNewDocNodeEatName;
- xmlNewDocProp;
- xmlNewDocRawNode;
- xmlNewDocText;
- xmlNewDocTextLen;
- xmlNewDtd;
- xmlNewGlobalNs;
- xmlNewNode;
- xmlNewNodeEatName;
- xmlNewNs;
- xmlNewNsProp;
- xmlNewNsPropEatName;
- xmlNewPI;
- xmlNewProp;
- xmlNewReference;
- xmlNewText;
- xmlNewTextChild;
- xmlNewTextLen;
- xmlNodeAddContent;
- xmlNodeAddContentLen;
- xmlNodeDump;
- xmlNodeDumpOutput;
- xmlNodeGetBase;
- xmlNodeGetContent;
- xmlNodeGetLang;
- xmlNodeGetSpacePreserve;
- xmlNodeIsText;
- xmlNodeListGetRawString;
- xmlNodeListGetString;
- xmlNodeSetBase;
- xmlNodeSetContent;
- xmlNodeSetContentLen;
- xmlNodeSetLang;
- xmlNodeSetName;
- xmlNodeSetSpacePreserve;
- xmlReconciliateNs;
- xmlRemoveProp;
- xmlReplaceNode;
- xmlSaveFile;
- xmlSaveFileEnc;
- xmlSaveFileTo;
- xmlSaveFormatFile;
- xmlSaveFormatFileEnc;
- xmlSaveFormatFileTo;
- xmlSearchNs;
- xmlSearchNsByHref;
- xmlSetBufferAllocationScheme;
- xmlSetCompressMode;
- xmlSetDocCompressMode;
- xmlSetListDoc;
- xmlSetNs;
- xmlSetNsProp;
- xmlSetProp;
- xmlSetTreeDoc;
- xmlStringGetNodeList;
- xmlStringLenGetNodeList;
- xmlTextConcat;
- xmlTextMerge;
- xmlUnlinkNode;
- xmlUnsetNsProp;
- xmlUnsetProp;
-
-# xmlregexp
- xmlRegExecPushString;
- xmlRegFreeExecCtxt;
- xmlRegFreeRegexp;
- xmlRegNewExecCtxt;
- xmlRegexpCompile;
- xmlRegexpExec;
- xmlRegexpIsDeterminist;
- xmlRegexpPrint;
-
-# nanohttp
- xmlNanoHTTPAuthHeader;
- xmlNanoHTTPCleanup;
- xmlNanoHTTPClose;
- xmlNanoHTTPFetch;
- xmlNanoHTTPInit;
- xmlNanoHTTPMethod;
- xmlNanoHTTPMethodRedir;
- xmlNanoHTTPOpen;
- xmlNanoHTTPOpenRedir;
- xmlNanoHTTPRead;
- xmlNanoHTTPReturnCode;
- xmlNanoHTTPSave;
- xmlNanoHTTPScanProxy;
-
-# xmlunicode
- xmlUCSIsAlphabeticPresentationForms;
- xmlUCSIsArabic;
- xmlUCSIsArabicPresentationFormsA;
- xmlUCSIsArabicPresentationFormsB;
- xmlUCSIsArmenian;
- xmlUCSIsArrows;
- xmlUCSIsBasicLatin;
- xmlUCSIsBengali;
- xmlUCSIsBlock;
- xmlUCSIsBlockElements;
- xmlUCSIsBopomofo;
- xmlUCSIsBopomofoExtended;
- xmlUCSIsBoxDrawing;
- xmlUCSIsBraillePatterns;
- xmlUCSIsByzantineMusicalSymbols;
- xmlUCSIsCJKCompatibility;
- xmlUCSIsCJKCompatibilityForms;
- xmlUCSIsCJKCompatibilityIdeographs;
- xmlUCSIsCJKCompatibilityIdeographsSupplement;
- xmlUCSIsCJKRadicalsSupplement;
- xmlUCSIsCJKSymbolsandPunctuation;
- xmlUCSIsCJKUnifiedIdeographs;
- xmlUCSIsCJKUnifiedIdeographsExtensionA;
- xmlUCSIsCJKUnifiedIdeographsExtensionB;
- xmlUCSIsCat;
- xmlUCSIsCatC;
- xmlUCSIsCatCc;
- xmlUCSIsCatCf;
- xmlUCSIsCatCo;
- xmlUCSIsCatCs;
- xmlUCSIsCatL;
- xmlUCSIsCatLl;
- xmlUCSIsCatLm;
- xmlUCSIsCatLo;
- xmlUCSIsCatLt;
- xmlUCSIsCatLu;
- xmlUCSIsCatM;
- xmlUCSIsCatMc;
- xmlUCSIsCatMe;
- xmlUCSIsCatMn;
- xmlUCSIsCatN;
- xmlUCSIsCatNd;
- xmlUCSIsCatNl;
- xmlUCSIsCatNo;
- xmlUCSIsCatP;
- xmlUCSIsCatPc;
- xmlUCSIsCatPd;
- xmlUCSIsCatPe;
- xmlUCSIsCatPf;
- xmlUCSIsCatPi;
- xmlUCSIsCatPo;
- xmlUCSIsCatPs;
- xmlUCSIsCatS;
- xmlUCSIsCatSc;
- xmlUCSIsCatSk;
- xmlUCSIsCatSm;
- xmlUCSIsCatSo;
- xmlUCSIsCatZ;
- xmlUCSIsCatZl;
- xmlUCSIsCatZp;
- xmlUCSIsCatZs;
- xmlUCSIsCherokee;
- xmlUCSIsCombiningDiacriticalMarks;
- xmlUCSIsCombiningHalfMarks;
- xmlUCSIsCombiningMarksforSymbols;
- xmlUCSIsControlPictures;
- xmlUCSIsCurrencySymbols;
- xmlUCSIsCyrillic;
- xmlUCSIsDeseret;
- xmlUCSIsDevanagari;
- xmlUCSIsDingbats;
- xmlUCSIsEnclosedAlphanumerics;
- xmlUCSIsEnclosedCJKLettersandMonths;
- xmlUCSIsEthiopic;
- xmlUCSIsGeneralPunctuation;
- xmlUCSIsGeometricShapes;
- xmlUCSIsGeorgian;
- xmlUCSIsGothic;
- xmlUCSIsGreek;
- xmlUCSIsGreekExtended;
- xmlUCSIsGujarati;
- xmlUCSIsGurmukhi;
- xmlUCSIsHalfwidthandFullwidthForms;
- xmlUCSIsHangulCompatibilityJamo;
- xmlUCSIsHangulJamo;
- xmlUCSIsHangulSyllables;
- xmlUCSIsHebrew;
- xmlUCSIsHighPrivateUseSurrogates;
- xmlUCSIsHighSurrogates;
- xmlUCSIsHiragana;
- xmlUCSIsIPAExtensions;
- xmlUCSIsIdeographicDescriptionCharacters;
- xmlUCSIsKanbun;
- xmlUCSIsKangxiRadicals;
- xmlUCSIsKannada;
- xmlUCSIsKatakana;
- xmlUCSIsKhmer;
- xmlUCSIsLao;
- xmlUCSIsLatin1Supplement;
- xmlUCSIsLatinExtendedA;
- xmlUCSIsLatinExtendedAdditional;
- xmlUCSIsLatinExtendedB;
- xmlUCSIsLetterlikeSymbols;
- xmlUCSIsLowSurrogates;
- xmlUCSIsMalayalam;
- xmlUCSIsMathematicalAlphanumericSymbols;
- xmlUCSIsMathematicalOperators;
- xmlUCSIsMiscellaneousSymbols;
- xmlUCSIsMiscellaneousTechnical;
- xmlUCSIsMongolian;
- xmlUCSIsMusicalSymbols;
- xmlUCSIsMyanmar;
- xmlUCSIsNumberForms;
- xmlUCSIsOgham;
- xmlUCSIsOldItalic;
- xmlUCSIsOpticalCharacterRecognition;
- xmlUCSIsOriya;
- xmlUCSIsPrivateUse;
- xmlUCSIsRunic;
- xmlUCSIsSinhala;
- xmlUCSIsSmallFormVariants;
- xmlUCSIsSpacingModifierLetters;
- xmlUCSIsSpecials;
- xmlUCSIsSuperscriptsandSubscripts;
- xmlUCSIsSyriac;
- xmlUCSIsTags;
- xmlUCSIsTamil;
- xmlUCSIsTelugu;
- xmlUCSIsThaana;
- xmlUCSIsThai;
- xmlUCSIsTibetan;
- xmlUCSIsUnifiedCanadianAboriginalSyllabics;
- xmlUCSIsYiRadicals;
- xmlUCSIsYiSyllables;
-
-# uri
- xmlBuildURI;
- xmlCreateURI;
- xmlFreeURI;
- xmlNormalizeURIPath;
- xmlParseURI;
- xmlParseURIReference;
- xmlPrintURI;
- xmlSaveUri;
- xmlURIEscape;
- xmlURIEscapeStr;
- xmlURIUnescapeString;
-
-# encoding
- UTF8Toisolat1;
- isolat1ToUTF8;
- xmlAddEncodingAlias;
- xmlCharEncCloseFunc;
- xmlCharEncFirstLine;
- xmlCharEncInFunc;
- xmlCharEncOutFunc;
-
-# xmlstring
- xmlCheckUTF8;
-
-# encoding
- xmlCleanupCharEncodingHandlers;
- xmlCleanupEncodingAliases;
- xmlDelEncodingAlias;
- xmlDetectCharEncoding;
- xmlFindCharEncodingHandler;
- xmlGetCharEncodingHandler;
- xmlGetCharEncodingName;
- xmlGetEncodingAlias;
-
-# xmlstring
- xmlGetUTF8Char;
-
-# encoding
- xmlInitCharEncodingHandlers;
- xmlNewCharEncodingHandler;
- xmlParseCharEncoding;
- xmlRegisterCharEncodingHandler;
-
-# xmlstring
- xmlUTF8Strlen;
- xmlUTF8Strloc;
- xmlUTF8Strndup;
- xmlUTF8Strpos;
- xmlUTF8Strsize;
- xmlUTF8Strsub;
-} ;
-
-LIBXML2_2.5.0 {
- global:
-
-# globals
- xmlDeregisterNodeDefault;
- xmlDeregisterNodeDefaultValue; # variable
- xmlRegisterNodeDefault;
- xmlRegisterNodeDefaultValue; # variable
-
-# xmlreader
- xmlTextReaderClose;
- xmlTextReaderCurrentDoc;
- xmlTextReaderCurrentNode;
- xmlTextReaderGetAttributeNo;
- xmlTextReaderGetAttributeNs;
- xmlTextReaderGetAttribute;
- xmlTextReaderGetParserProp;
- xmlTextReaderGetRemainder;
- xmlTextReaderLookupNamespace;
- xmlTextReaderMoveToAttributeNo;
- xmlTextReaderMoveToAttributeNs;
- xmlTextReaderMoveToAttribute;
- xmlTextReaderMoveToElement;
- xmlTextReaderMoveToFirstAttribute;
- xmlTextReaderMoveToNextAttribute;
- xmlTextReaderNormalization;
- xmlTextReaderReadAttributeValue;
- xmlTextReaderReadInnerXml;
- xmlTextReaderReadOuterXml;
- xmlTextReaderReadState;
- xmlTextReaderReadString;
- xmlTextReaderSetParserProp;
-
-# valid
- xmlValidatePopElement;
- xmlValidatePushCData;
- xmlValidatePushElement;
-} LIBXML2_2.4.30;
-
-LIBXML2_2.5.2 {
- global:
-
-# tree
- xmlGetNoNsProp;
-
-# HTMLparser
- htmlAttrAllowed;
- htmlElementAllowedHere;
- htmlElementStatusHere;
- htmlNodeStatus;
-
-# relaxng
- xmlRelaxNGCleanupTypes;
- xmlRelaxNGDump;
- xmlRelaxNGFreeParserCtxt;
- xmlRelaxNGFree;
- xmlRelaxNGFreeValidCtxt;
- xmlRelaxNGNewMemParserCtxt;
- xmlRelaxNGNewParserCtxt;
- xmlRelaxNGNewValidCtxt;
- xmlRelaxNGParse;
- xmlRelaxNGSetParserErrors;
- xmlRelaxNGSetValidErrors;
- xmlRelaxNGValidateDoc;
-
-# xmlreader
- xmlTextReaderGetErrorHandler;
- xmlTextReaderLocatorBaseURI;
- xmlTextReaderLocatorLineNumber;
- xmlTextReaderSetErrorHandler;
-
-# relaxng
-# xmlRelaxNGValidateStream; removed in 2.5.5
-} LIBXML2_2.5.0;
-
-LIBXML2_2.5.4 {
- global:
-
-# uri
- xmlCanonicPath;
-
-# relaxng
- xmlRelaxNGDumpTree;
-
-# tree
- xmlValidateName;
- xmlValidateNCName;
- xmlValidateNMToken;
- xmlValidateQName;
-} LIBXML2_2.5.2;
-
-LIBXML2_2.5.5 {
- global:
-
-# nanoftp
- xmlNanoFTPDele;
-} LIBXML2_2.5.4;
-
-LIBXML2_2.5.6 {
- global:
-
-# xpath
- xmlXPathOrderDocElems;
-} LIBXML2_2.5.5;
-
-LIBXML2_2.5.7 {
- global:
-
-# HTMLparser
- htmlCreateMemoryParserCtxt;
-
-# xmlautomata
- xmlAutomataNewTransition2;
-
-# tree
- xmlBuildQName;
-
-# xmlmemory
- xmlGcMemGet;
- xmlGcMemSetup;
-
-# globals
- xmlMallocAtomic; # variable
-
-# xmlregexp
- xmlRegExecPushString2;
-
-# relaxng
- xmlRelaxNGNewDocParserCtxt;
- xmlRelaxNGValidateFullElement;
- xmlRelaxNGValidatePopElement;
- xmlRelaxNGValidatePushCData;
- xmlRelaxNGValidatePushElement;
-
-# xmlreader
- xmlTextReaderExpand;
- xmlTextReaderIsValid;
- xmlTextReaderNext;
- xmlTextReaderRelaxNGSetSchema;
- xmlTextReaderRelaxNGValidate;
-} LIBXML2_2.5.6;
-
-LIBXML2_2.5.8 {
- global:
-
-# globals
- xmlCleanupGlobals;
- xmlInitGlobals;
-
-# valid
- xmlFreeValidCtxt;
- xmlNewValidCtxt;
-
-# schemasInternals
- xmlSchemaFreeType;
-
-# xmlschemas
- xmlSchemaDump;
- xmlSchemaFreeParserCtxt;
- xmlSchemaFreeValidCtxt;
- xmlSchemaFree;
- xmlSchemaNewMemParserCtxt;
- xmlSchemaNewParserCtxt;
- xmlSchemaNewValidCtxt;
- xmlSchemaParse;
- xmlSchemaSetParserErrors;
- xmlSchemaSetValidErrors;
- xmlSchemaValidateDoc;
- xmlSchemaValidateStream;
-
-# xmlschemastypes
- xmlSchemaCheckFacet;
- xmlSchemaCleanupTypes;
- xmlSchemaCompareValues;
- xmlSchemaFreeFacet;
- xmlSchemaFreeValue;
- xmlSchemaGetPredefinedType;
- xmlSchemaInitTypes;
- xmlSchemaNewFacet;
- xmlSchemaValidateFacet;
- xmlSchemaValidatePredefinedType;
- xmlSchemaValPredefTypeNode;
-
-# globals
- xmlThrDefBufferAllocScheme;
- xmlThrDefDefaultBufferSize;
- xmlThrDefDeregisterNodeDefault;
- xmlThrDefDoValidityCheckingDefaultValue;
- xmlThrDefGetWarningsDefaultValue;
- xmlThrDefIndentTreeOutput;
- xmlThrDefKeepBlanksDefaultValue;
- xmlThrDefLineNumbersDefaultValue;
- xmlThrDefLoadExtDtdDefaultValue;
- xmlThrDefParserDebugEntities;
- xmlThrDefPedanticParserDefaultValue;
- xmlThrDefRegisterNodeDefault;
- xmlThrDefSaveNoEmptyTags;
- xmlThrDefSetGenericErrorFunc;
- xmlThrDefSubstituteEntitiesDefaultValue;
- xmlThrDefTreeIndentString;
-} LIBXML2_2.5.7;
-
-LIBXML2_2.5.9 {
- global:
-
-# xmlmemory
- xmlMallocAtomicLoc;
-
-# relaxng
- xmlRelaxNGGetParserErrors;
- xmlRelaxNGGetValidErrors;
-
-# tree
- xmlSplitQName3;
-
-# xmlstring
- xmlUTF8Charcmp;
- xmlUTF8Size;
-
-# xinclude
- xmlXIncludeProcessTree;
-} LIBXML2_2.5.8;
-
-LIBXML2_2.6.0 {
- global:
-
-# SAX2
- xmlSAX2AttributeDecl;
- xmlSAX2CDataBlock;
- xmlSAX2Characters;
- xmlSAX2Comment;
- xmlSAX2ElementDecl;
- xmlSAX2EndDocument;
- xmlSAX2EndElementNs;
- xmlSAX2EndElement;
- xmlSAX2EntityDecl;
- xmlSAX2ExternalSubset;
- xmlSAX2GetColumnNumber;
- xmlSAX2GetEntity;
- xmlSAX2GetLineNumber;
- xmlSAX2GetParameterEntity;
- xmlSAX2GetPublicId;
- xmlSAX2GetSystemId;
- xmlSAX2HasExternalSubset;
- xmlSAX2HasInternalSubset;
- xmlSAX2IgnorableWhitespace;
- xmlSAX2InitDefaultSAXHandler;
-# xmlSAX2InitDocbDefaultSAXHandler; removed in 2.10.0
- xmlSAX2InitHtmlDefaultSAXHandler;
- xmlSAX2InternalSubset;
- xmlSAX2IsStandalone;
- xmlSAX2NotationDecl;
- xmlSAX2ProcessingInstruction;
- xmlSAX2Reference;
- xmlSAX2ResolveEntity;
- xmlSAX2SetDocumentLocator;
- xmlSAX2StartDocument;
- xmlSAX2StartElementNs;
- xmlSAX2StartElement;
- xmlSAX2UnparsedEntityDecl;
- xmlSAXDefaultVersion;
- xmlSAXVersion;
-
-# HTMLparser
- htmlCtxtReadDoc;
- htmlCtxtReadFd;
- htmlCtxtReadFile;
- htmlCtxtReadIO;
- htmlCtxtReadMemory;
- htmlCtxtReset;
- htmlCtxtUseOptions;
- htmlReadDoc;
- htmlReadFd;
- htmlReadFile;
- htmlReadIO;
- htmlReadMemory;
-
-# tree
- xmlBufferCreateStatic;
-
-# chvalid
- xmlCharInRange;
-
-# xmlIO
- xmlCheckHTTPInput;
-
-# xmlerror
- xmlCopyError;
- xmlCtxtGetLastError;
- xmlGetLastError;
- xmlResetError;
- xmlResetLastError;
- xmlSetStructuredErrorFunc;
-
-# parser
- xmlCtxtReadDoc;
- xmlCtxtReadFd;
- xmlCtxtReadFile;
- xmlCtxtReadIO;
- xmlCtxtReadMemory;
-
-# xmlerror
- xmlCtxtResetLastError;
-
-# parser
- xmlCtxtReset;
- xmlCtxtUseOptions;
- xmlReadDoc;
- xmlReadFd;
- xmlReadFile;
- xmlReadIO;
- xmlReadMemory;
-
-# xmlstring
- xmlStrPrintf;
- xmlStrQEqual;
-
-# dict
- xmlDictCreate;
- xmlDictFree;
- xmlDictLookup;
- xmlDictOwns;
- xmlDictQLookup;
- xmlDictReference;
- xmlDictSize;
-
-# parserInternals
-# xmlErrMemory; removed in 2.11.0
- xmlParserMaxDepth; # variable
- xmlStringLenDecodeEntities;
- xmlSwitchInputEncoding;
-
-# xmlwriter
- xmlFreeTextWriter;
- xmlNewTextWriterFilename;
- xmlNewTextWriterMemory;
- xmlNewTextWriter;
- xmlTextWriterEndAttribute;
- xmlTextWriterEndCDATA;
- xmlTextWriterEndDocument;
- xmlTextWriterEndDTD;
- xmlTextWriterEndElement;
- xmlTextWriterEndPI;
- xmlTextWriterFlush;
- xmlTextWriterFullEndElement;
- xmlTextWriterStartAttributeNS;
- xmlTextWriterStartAttribute;
- xmlTextWriterStartCDATA;
- xmlTextWriterStartDocument;
- xmlTextWriterStartDTDAttlist;
- xmlTextWriterStartDTDElement;
- xmlTextWriterStartDTDEntity;
- xmlTextWriterStartDTD;
- xmlTextWriterStartElementNS;
- xmlTextWriterStartElement;
- xmlTextWriterStartPI;
- xmlTextWriterWriteAttributeNS;
- xmlTextWriterWriteAttribute;
- xmlTextWriterWriteBase64;
- xmlTextWriterWriteBinHex;
- xmlTextWriterWriteCDATA;
- xmlTextWriterWriteComment;
- xmlTextWriterWriteDTDAttlist;
- xmlTextWriterWriteDTDElement;
- xmlTextWriterWriteDTDEntity;
- xmlTextWriterWriteDTDExternalEntity;
- xmlTextWriterWriteDTDInternalEntity;
- xmlTextWriterWriteDTDNotation;
- xmlTextWriterWriteDTD;
- xmlTextWriterWriteElementNS;
- xmlTextWriterWriteElement;
- xmlTextWriterWriteFormatAttributeNS;
- xmlTextWriterWriteFormatAttribute;
- xmlTextWriterWriteFormatCDATA;
- xmlTextWriterWriteFormatComment;
- xmlTextWriterWriteFormatDTDAttlist;
- xmlTextWriterWriteFormatDTDElement;
- xmlTextWriterWriteFormatDTDInternalEntity;
- xmlTextWriterWriteFormatDTD;
- xmlTextWriterWriteFormatElementNS;
- xmlTextWriterWriteFormatElement;
- xmlTextWriterWriteFormatPI;
- xmlTextWriterWriteFormatRaw;
- xmlTextWriterWriteFormatString;
- xmlTextWriterWritePI;
- xmlTextWriterWriteRawLen;
- xmlTextWriterWriteRaw;
- xmlTextWriterWriteString;
- xmlTextWriterWriteVFormatAttributeNS;
- xmlTextWriterWriteVFormatAttribute;
- xmlTextWriterWriteVFormatCDATA;
- xmlTextWriterWriteVFormatComment;
- xmlTextWriterWriteVFormatDTDAttlist;
- xmlTextWriterWriteVFormatDTDElement;
- xmlTextWriterWriteVFormatDTDInternalEntity;
- xmlTextWriterWriteVFormatDTD;
- xmlTextWriterWriteVFormatElementNS;
- xmlTextWriterWriteVFormatElement;
- xmlTextWriterWriteVFormatPI;
- xmlTextWriterWriteVFormatRaw;
- xmlTextWriterWriteVFormatString;
-
-# hash
- xmlHashQLookup2;
- xmlHashQLookup3;
- xmlHashQLookup;
-
-# chvalid
- xmlIsBaseCharGroup; # variable
- xmlIsCharGroup; # variable
- xmlIsCombiningGroup; # variable
- xmlIsDigitGroup; # variable
- xmlIsExtenderGroup; # variable
- xmlIsIdeographicGroup; # variable
- xmlIsPubidChar_tab; # variable
-
-# globals
- xmlLastError; # variable
-
-# nanohttp
- xmlNanoHTTPEncoding;
- xmlNanoHTTPMimeType;
- xmlNanoHTTPRedir;
-
-# tree
- xmlNodeBufGetContent;
-
-# xmlIO
- xmlParserInputBufferCreateStatic;
-
-# xmlreader
- xmlReaderForDoc;
- xmlReaderForFd;
- xmlReaderForFile;
- xmlReaderForIO;
- xmlReaderForMemory;
- xmlReaderNewDoc;
- xmlReaderNewFd;
- xmlReaderNewFile;
- xmlReaderNewIO;
- xmlReaderNewMemory;
- xmlReaderNewWalker;
- xmlReaderWalker;
- xmlTextReaderConstBaseUri;
- xmlTextReaderConstLocalName;
- xmlTextReaderConstNamespaceUri;
- xmlTextReaderConstName;
- xmlTextReaderConstPrefix;
- xmlTextReaderConstString;
- xmlTextReaderConstValue;
- xmlTextReaderConstXmlLang;
- xmlTextReaderNextSibling;
- xmlTextReaderPreserve;
-
-# globals
- xmlStructuredError; # variable
- xmlThrDefSetStructuredErrorFunc;
-
-# xpathInternals
- xmlXPathErr;
-
-# SAX2
-# xmlSAX2CheckNamespace; removed in 2.6.10
-# xmlSAX2GetNamespace; removed in 2.6.10
-# xmlSAX2GlobalNamespace; removed in 2.6.10
-# xmlSAX2NamespaceDecl; removed in 2.6.10
-# xmlSAX2SetNamespace; removed in 2.6.10
-} LIBXML2_2.5.9;
-
-LIBXML2_2.6.1 {
- global:
-
-# parser
- xmlCtxtResetPush;
-} LIBXML2_2.6.0;
-
-LIBXML2_2.6.2 {
- global:
-
-# parserInternals
- xmlCreateURLParserCtxt;
-
-# xmlschemas
- xmlSchemaNewDocParserCtxt;
-
-# xmlstring
- xmlStrVPrintf;
-
-# xinclude
- xmlXIncludeFreeContext;
- xmlXIncludeNewContext;
- xmlXIncludeProcessNode;
-} LIBXML2_2.6.1;
-
-LIBXML2_2.6.3 {
- global:
-
-# pattern
- xmlFreePatternList;
- xmlFreePattern;
- xmlPatterncompile;
- xmlPatternMatch;
-
-# xmlwriter
- xmlNewTextWriterDoc;
- xmlNewTextWriterPushParser;
- xmlNewTextWriterTree;
-
-# xmlreader
- xmlTextReaderPreservePattern;
-
-# xmlunicode
- xmlUCSIsAegeanNumbers;
- xmlUCSIsBuhid;
- xmlUCSIsCombiningDiacriticalMarksforSymbols;
- xmlUCSIsCypriotSyllabary;
- xmlUCSIsCyrillicSupplement;
- xmlUCSIsGreekandCoptic;
- xmlUCSIsHanunoo;
- xmlUCSIsKatakanaPhoneticExtensions;
- xmlUCSIsKhmerSymbols;
- xmlUCSIsLimbu;
- xmlUCSIsLinearBIdeograms;
- xmlUCSIsLinearBSyllabary;
- xmlUCSIsMiscellaneousMathematicalSymbolsA;
- xmlUCSIsMiscellaneousMathematicalSymbolsB;
- xmlUCSIsMiscellaneousSymbolsandArrows;
- xmlUCSIsOsmanya;
- xmlUCSIsPhoneticExtensions;
- xmlUCSIsPrivateUseArea;
- xmlUCSIsShavian;
- xmlUCSIsSupplementalArrowsA;
- xmlUCSIsSupplementalArrowsB;
- xmlUCSIsSupplementalMathematicalOperators;
- xmlUCSIsSupplementaryPrivateUseAreaA;
- xmlUCSIsSupplementaryPrivateUseAreaB;
- xmlUCSIsTagalog;
- xmlUCSIsTagbanwa;
- xmlUCSIsTaiLe;
- xmlUCSIsTaiXuanJingSymbols;
- xmlUCSIsUgaritic;
- xmlUCSIsVariationSelectorsSupplement;
- xmlUCSIsVariationSelectors;
- xmlUCSIsYijingHexagramSymbols;
-
-# xinclude
- xmlXIncludeProcessFlags;
- xmlXIncludeProcessTreeFlags;
- xmlXIncludeSetFlags;
-} LIBXML2_2.6.2;
-
-LIBXML2_2.6.5 {
- global:
-
-# xmlmemory
- xmlCleanupMemory;
-
-# dict
- xmlDictCreateSub;
-
-# relaxng
- xmlRelaxParserSetFlag;
-
-# xmlstring
- xmlStrncatNew;
-
-# xmlwriter
- xmlTextWriterSetIndentString;
- xmlTextWriterSetIndent;
-
-# xpath
- xmlXPathCtxtCompile;
-} LIBXML2_2.6.3;
-
-LIBXML2_2.6.6 {
- global:
-
-# tree
- xmlAttrSerializeTxtContent;
-
-# parser
- xmlByteConsumed;
-
-# xmlreader
- xmlTextReaderSetStructuredErrorHandler;
-} LIBXML2_2.6.5;
-
-LIBXML2_2.6.7 {
- global:
-
-# xmlwriter
- xmlTextWriterEndComment;
- xmlTextWriterStartComment;
-} LIBXML2_2.6.6;
-
-LIBXML2_2.6.8 {
- global:
-
-# xmlsave
- xmlSaveClose;
- xmlSaveDoc;
- xmlSaveFlush;
- xmlSaveToFd;
- xmlSaveToFilename;
- xmlSaveToIO;
- xmlSaveTree;
-
-# xmlwriter
- xmlTextWriterEndDTDAttlist;
- xmlTextWriterEndDTDElement;
- xmlTextWriterEndDTDEntity;
- xmlTextWriterWriteDTDExternalEntityContents;
-} LIBXML2_2.6.7;
-
-LIBXML2_2.6.10 {
- global:
-
-# xmlIO
- xmlOutputBufferWriteEscape;
- xmlPopInputCallbacks;
-
-# xmlsave
- xmlSaveSetAttrEscape;
- xmlSaveSetEscape;
-} LIBXML2_2.6.8;
-
-LIBXML2_2.6.11 {
- global:
-
-# uri
- xmlBuildRelativeURI;
-
-# globals
- xmlOutputBufferCreateFilenameDefault;
- xmlOutputBufferCreateFilenameValue; # variable
- xmlParserInputBufferCreateFilenameDefault;
- xmlParserInputBufferCreateFilenameValue; # variable
- xmlThrDefOutputBufferCreateFilenameDefault;
- xmlThrDefParserInputBufferCreateFilenameDefault;
-
-# schemasInternals
- xmlSchemaFreeWildcard;
-
-# xmlschemastypes
- xmlSchemaCollapseString;
- xmlSchemaGetBuiltInListSimpleTypeItemType;
- xmlSchemaGetBuiltInType;
- xmlSchemaIsBuiltInTypeFacet;
- xmlSchemaValidateListSimpleTypeFacet;
-} LIBXML2_2.6.10;
-
-LIBXML2_2.6.12 {
- global:
-
-# parser
- xmlParseInNodeContext;
-
-# xmlschemastypes
- xmlSchemaGetFacetValueAsULong;
- xmlSchemaValidateLengthFacet;
- xmlSchemaValPredefTypeNodeNoNorm;
-
-# xmlschemas
- xmlSchemaGetParserErrors;
- xmlSchemaGetValidErrors;
-} LIBXML2_2.6.11;
-
-LIBXML2_2.6.14 {
- global:
-
-# xmlautomata
- xmlAutomataNewCountTrans2;
- xmlAutomataNewOnceTrans2;
-
-# nanohttp
- xmlNanoHTTPContentLength;
-
-# xmlschemas
- xmlSchemaSetValidOptions;
- xmlSchemaValidateOneElement;
- xmlSchemaValidCtxtGetOptions;
-} LIBXML2_2.6.12;
-
-LIBXML2_2.6.15 {
- global:
-
-# debugXML
- xmlDebugCheckDocument;
-
-# tree
- xmlDocCopyNodeList;
- xmlNewDocPI;
-
-# xmlreader
- xmlTextReaderConstEncoding;
- xmlTextReaderConstXmlVersion;
- xmlTextReaderIsNamespaceDecl;
- xmlTextReaderStandalone;
-} LIBXML2_2.6.14;
-
-LIBXML2_2.6.16 {
- global:
-
-# xmlmemory
- xmlMemBlocks;
-
-# relaxng
- xmlRelaxNGInitTypes;
-} LIBXML2_2.6.15;
-
-LIBXML2_2.6.17 {
- global:
-
-# dict
- xmlDictExists;
-
-# xmlmodule
- xmlModuleClose;
- xmlModuleFree;
- xmlModuleOpen;
- xmlModuleSymbol;
-
-# xmlregexp
- xmlRegExecErrInfo;
- xmlRegExecNextValues;
-
-# xmlschemastypes
- xmlSchemaWhiteSpaceReplace;
-
-# xmlreader
- xmlTextReaderGetParserColumnNumber;
- xmlTextReaderGetParserLineNumber;
-} LIBXML2_2.6.16;
-
-LIBXML2_2.6.18 {
- global:
-
-# valid
- xmlCopyDocElementContent;
- xmlFreeDocElementContent;
- xmlNewDocElementContent;
-
-# dict
- xmlDictCleanup;
-
-# hash
- xmlHashCreateDict;
-
-# pattern
- xmlFreeStreamCtxt;
- xmlPatternFromRoot;
- xmlPatternGetStreamCtxt;
- xmlPatternMaxDepth;
- xmlPatternStreamable;
- xmlStreamPop;
- xmlStreamPushAttr;
- xmlStreamPush;
-
-# xmlschemastypes
- xmlSchemaCompareValuesWhtsp;
- xmlSchemaCopyValue;
- xmlSchemaGetCanonValue;
- xmlSchemaNewNOTATIONValue;
- xmlSchemaNewStringValue;
-
-# xmlreader
- xmlTextReaderByteConsumed;
-} LIBXML2_2.6.17;
-
-LIBXML2_2.6.19 {
- global:
-
-# xmlschemastypes
- xmlSchemaGetValType;
- xmlSchemaValidateFacetWhtsp;
- xmlSchemaValidateLengthFacetWhtsp;
-} LIBXML2_2.6.18;
-
-LIBXML2_2.6.20 {
- global:
-
-# tree
- xmlDOMWrapAdoptNode;
- xmlDOMWrapFreeCtxt;
- xmlDOMWrapNewCtxt;
- xmlDOMWrapReconcileNamespaces;
- xmlDOMWrapRemoveNode;
-
-# xmlschemastypes
- xmlSchemaGetCanonValueWhtsp;
- xmlSchemaNewQNameValue;
- xmlSchemaValueAppend;
- xmlSchemaValueGetAsBoolean;
- xmlSchemaValueGetAsString;
- xmlSchemaValueGetNext;
-
-# xmlschemas
- xmlSchemaIsValid;
- xmlSchemaSAXPlug;
- xmlSchemaSAXUnplug;
- xmlSchemaValidateFile;
-
-# xmlreader
- xmlTextReaderSchemaValidate;
- xmlTextReaderSetSchema;
-} LIBXML2_2.6.19;
-
-LIBXML2_2.6.21 {
- global:
-
-# xmlautomata
- xmlAutomataNewNegTrans;
-
-# xmlregexp
-# emptyExp; removed in 2.9.10
-# forbiddenExp; removed in 2.9.10
-# xmlExpCtxtNbCons; removed in 2.9.10
-# xmlExpCtxtNbNodes; removed in 2.9.10
-# xmlExpDump; removed in 2.9.10
-# xmlExpExpDerive; removed in 2.9.10
-# xmlExpFreeCtxt; removed in 2.9.10
-# xmlExpFree; removed in 2.9.10
-# xmlExpGetLanguage; removed in 2.9.10
-# xmlExpGetStart; removed in 2.9.10
-# xmlExpIsNillable; removed in 2.9.10
-# xmlExpMaxToken; removed in 2.9.10
-# xmlExpNewAtom; removed in 2.9.10
-# xmlExpNewCtxt; removed in 2.9.10
-# xmlExpNewOr; removed in 2.9.10
-# xmlExpNewRange; removed in 2.9.10
-# xmlExpNewSeq; removed in 2.9.10
-# xmlExpParse; removed in 2.9.10
-# xmlExpRef; removed in 2.9.10
-# xmlExpStringDerive; removed in 2.9.10
-# xmlExpSubsume; removed in 2.9.10
-
-# parser
- xmlHasFeature;
-
-# uri
- xmlParseURIRaw;
-
-# pattern
- xmlPatternMinDepth;
-
-# relaxng
- xmlRelaxNGSetValidStructuredErrors;
-
-# xmlschemas
- xmlSchemaSetValidStructuredErrors;
-
-# schematron
- xmlSchematronFreeParserCtxt;
- xmlSchematronFree;
- xmlSchematronFreeValidCtxt;
- xmlSchematronNewDocParserCtxt;
- xmlSchematronNewMemParserCtxt;
- xmlSchematronNewParserCtxt;
- xmlSchematronNewValidCtxt;
- xmlSchematronParse;
- xmlSchematronValidateDoc;
-} LIBXML2_2.6.20;
-
-LIBXML2_2.6.23 {
- global:
-
-# HTMLtree
- htmlDocDumpMemoryFormat;
-
-# xmlIO
- xmlOutputBufferCreateBuffer;
-
-# xmlsave
- xmlSaveToBuffer;# suppressed in 2.6.11, readded in 2.6.23
-
-
-# xmlschemas
- xmlSchemaSetParserStructuredErrors;
-
-# pattern
- xmlStreamPushNode;
- xmlStreamWantsAnyNode;
-
-# xmlreader
- xmlTextReaderSchemaValidateCtxt;
-} LIBXML2_2.6.21;
-
-LIBXML2_2.6.24 {
- global:
-
-# tree
- xmlDOMWrapCloneNode;
-
-# relaxng
- xmlRelaxNGSetParserStructuredErrors;
-} LIBXML2_2.6.23;
-
-LIBXML2_2.6.25 {
- global:
-
-# xpath
- xmlXPathContextSetCache;
-} LIBXML2_2.6.24;
-
-LIBXML2_2.6.27 {
- global:
-
-# HTMLparser
- htmlNewParserCtxt;
-
-# uri
- xmlPathToURI;
-
-# xinclude
- xmlXIncludeProcessFlagsData;
-
-# xpath
- xmlXPathCompiledEvalToBoolean;
-} LIBXML2_2.6.25;
-
-LIBXML2_2.6.28 {
- global:
-
-# xmlreader
- xmlTextReaderSetup;
-} LIBXML2_2.6.27;
-
-LIBXML2_2.6.29 {
- global:
-
-# threads
- xmlDllMain;
-} LIBXML2_2.6.28;
-
-LIBXML2_2.6.32 {
- global:
-
-# schematron
- xmlSchematronSetValidStructuredErrors;
-} LIBXML2_2.6.29;
-
-LIBXML2_2.7.0 {
- global:
-
-# xmlmemory
- xmlMemDisplayLast;
-
-# entities
- xmlNewEntity;
-
-# xmlschemas
- xmlSchemaValidCtxtGetParserCtxt;
-} LIBXML2_2.6.32;
-
-LIBXML2_2.7.3 {
- global:
-
-# tree
- xmlChildElementCount;
- xmlFirstElementChild;
- xmlLastElementChild;
- xmlNextElementSibling;
- xmlPreviousElementSibling;
-} LIBXML2_2.7.0;
-
-LIBXML2_2.7.4 {
- global:
-
-# globals
- xmlStructuredErrorContext; # variable
-
-# xinclude
- xmlXIncludeProcessTreeFlagsData;
-} LIBXML2_2.7.3;
-
-LIBXML2_2.8.0 {
- global:
-
-# xmlreader
- xmlTextReaderRelaxNGValidateCtxt;
-
-# tree
- xmlBufferDetach;
-
-# dict
- xmlInitializeDict;
-} LIBXML2_2.7.4;
-
-LIBXML2_2.9.0 {
- global:
-
-# tree
- xmlBufContent;
- xmlBufEnd;
- xmlBufGetNodeContent;
- xmlBufNodeDump;
- xmlBufShrink;
- xmlBufUse;
-
-# dict
- xmlDictGetUsage;
- xmlDictSetLimit;
-
-# xmlschemas
- xmlSchemaValidateSetFilename;
- xmlSchemaValidateSetLocator;
-
-# xmlIO
- xmlOutputBufferGetContent;
- xmlOutputBufferGetSize;
-
-# xmlwriter
- xmlTextWriterSetQuoteChar;
-} LIBXML2_2.8.0;
-
-LIBXML2_2.9.1 {
- global:
-
-# xpath
- xmlXPathNodeEval;
- xmlXPathSetContextNode;
-} LIBXML2_2.9.0;
-
-LIBXML2_2.9.8 {
- global:
-
-# hash
- xmlHashDefaultDeallocator;
-} LIBXML2_2.9.1;
-
-LIBXML2_2.9.11 {
- global:
-
-# xmlIO
- xmlPopOutputCallbacks;
-} LIBXML2_2.9.8;
-
-LIBXML2_2.11.0 {
- global:
-
-# HTMLparser
- htmlNewSAXParserCtxt;
-
-# parser
- xmlNewSAXParserCtxt;
-} LIBXML2_2.9.11;
+LIBXML2_2.4.30 {};
+LIBXML2_2.5.0 {} LIBXML2_2.4.30;
+LIBXML2_2.5.2 {} LIBXML2_2.5.0;
+LIBXML2_2.5.4 {} LIBXML2_2.5.2;
+LIBXML2_2.5.5 {} LIBXML2_2.5.4;
+LIBXML2_2.5.6 {} LIBXML2_2.5.5;
+LIBXML2_2.5.7 {} LIBXML2_2.5.6;
+LIBXML2_2.5.8 {} LIBXML2_2.5.7;
+LIBXML2_2.5.9 {} LIBXML2_2.5.8;
+LIBXML2_2.6.0 {} LIBXML2_2.5.9;
+LIBXML2_2.6.1 {} LIBXML2_2.6.0;
+LIBXML2_2.6.2 {} LIBXML2_2.6.1;
+LIBXML2_2.6.3 {} LIBXML2_2.6.2;
+LIBXML2_2.6.5 {} LIBXML2_2.6.3;
+LIBXML2_2.6.6 {} LIBXML2_2.6.5;
+LIBXML2_2.6.7 {} LIBXML2_2.6.6;
+LIBXML2_2.6.8 {} LIBXML2_2.6.7;
+LIBXML2_2.6.10 {} LIBXML2_2.6.8;
+LIBXML2_2.6.11 {} LIBXML2_2.6.10;
+LIBXML2_2.6.12 {} LIBXML2_2.6.11;
+LIBXML2_2.6.14 {} LIBXML2_2.6.12;
+LIBXML2_2.6.15 {} LIBXML2_2.6.14;
+LIBXML2_2.6.16 {} LIBXML2_2.6.15;
+LIBXML2_2.6.17 {} LIBXML2_2.6.16;
+LIBXML2_2.6.18 {} LIBXML2_2.6.17;
+LIBXML2_2.6.19 {} LIBXML2_2.6.18;
+LIBXML2_2.6.20 {} LIBXML2_2.6.19;
+LIBXML2_2.6.21 {} LIBXML2_2.6.20;
+LIBXML2_2.6.23 {} LIBXML2_2.6.21;
+LIBXML2_2.6.24 {} LIBXML2_2.6.23;
+LIBXML2_2.6.25 {} LIBXML2_2.6.24;
+LIBXML2_2.6.27 {} LIBXML2_2.6.25;
+LIBXML2_2.6.28 {} LIBXML2_2.6.27;
+LIBXML2_2.6.32 {} LIBXML2_2.6.28;
+LIBXML2_2.7.0 {} LIBXML2_2.6.32;
+LIBXML2_2.7.3 {} LIBXML2_2.7.0;
+LIBXML2_2.7.4 {} LIBXML2_2.7.3;
+LIBXML2_2.8.0 {} LIBXML2_2.7.4;
+LIBXML2_2.9.0 {} LIBXML2_2.8.0;
+LIBXML2_2.9.1 {} LIBXML2_2.9.0;
+LIBXML2_2.9.8 {} LIBXML2_2.9.1;
+LIBXML2_2.9.11 {} LIBXML2_2.9.8;
+LIBXML2_2.11.0 {} LIBXML2_2.9.11;
diff --git a/chromium/third_party/libxml/src/nanoftp.c b/chromium/third_party/libxml/src/nanoftp.c
index b52f9b64808..2bfba853de4 100644
--- a/chromium/third_party/libxml/src/nanoftp.c
+++ b/chromium/third_party/libxml/src/nanoftp.c
@@ -23,6 +23,8 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#elif defined (_WIN32)
+#include <io.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
diff --git a/chromium/third_party/libxml/src/nanohttp.c b/chromium/third_party/libxml/src/nanohttp.c
index 0678b730eed..e014fe48862 100644
--- a/chromium/third_party/libxml/src/nanohttp.c
+++ b/chromium/third_party/libxml/src/nanohttp.c
@@ -16,11 +16,14 @@
#ifdef LIBXML_HTTP_ENABLED
#include <string.h>
+#include <ctype.h>
#include <stdlib.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#elif defined (_WIN32)
+#include <io.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -1259,6 +1262,107 @@ xmlNanoHTTPClose(void *ctx) {
xmlNanoHTTPFreeCtxt(ctxt);
}
+
+/**
+ * xmlNanoHTTPHostnameMatch:
+ * @pattern: The pattern as it appears in no_proxy environment variable
+ * @hostname: The hostname to test as it appears in the URL
+ *
+ * This function tests whether a given hostname matches a pattern. The pattern
+ * usually is a token from the no_proxy environment variable. Wildcards in the
+ * pattern are not supported.
+ *
+ * Returns true, iff hostname matches the pattern.
+ */
+
+static int
+xmlNanoHTTPHostnameMatch(const char *pattern, const char *hostname) {
+ int idx_pattern, idx_hostname;
+ const char * pattern_start;
+
+ if (!pattern || *pattern == '\0' || !hostname)
+ return 0;
+
+ /* Ignore trailing '.' */
+ if (*pattern == '.') {
+ idx_pattern = strlen(pattern) -1;
+ pattern_start = pattern + 1;
+ }
+ else {
+ idx_pattern = strlen(pattern);
+ pattern_start = pattern;
+ }
+ idx_hostname = strlen(hostname);
+
+ for (; idx_pattern >= 0 && idx_hostname >= 0;
+ --idx_pattern, --idx_hostname) {
+ if (tolower(pattern_start[idx_pattern]) != tolower(hostname[idx_hostname]))
+ break;
+ }
+
+ return idx_pattern == -1 && (idx_hostname == -1|| hostname[idx_hostname] == '.');
+}
+
+
+/**
+ * xmlNanoHTTPBypassProxy:
+ * @hostname: The hostname as it appears in the URL
+ *
+ * This function evaluates the no_proxy environment variable and returns
+ * whether the proxy server should be bypassed for a given host.
+ *
+ * Returns true, iff a proxy server should be bypassed for the given hostname.
+ */
+
+static int
+xmlNanoHTTPBypassProxy(const char *hostname) {
+ size_t envlen;
+ char *env = getenv("no_proxy"), *cpy=NULL, *p=NULL;
+ if (!env)
+ return 0;
+
+ /* (Avoid strdup because it's not portable.) */
+ envlen = strlen(env) + 1;
+ cpy = xmlMalloc(envlen);
+ memcpy(cpy, env, envlen);
+ env = cpy;
+
+ /* The remainder of the function is basically a tokenizing: */
+ while (isspace(*env))
+ ++env;
+ if (*env == '\0') {
+ xmlFree(cpy);
+ return 0;
+ }
+
+ p = env;
+ while (*env) {
+
+ if (*env != ',') {
+ ++env;
+ continue;
+ }
+
+ *(env++) = '\0';
+ if (xmlNanoHTTPHostnameMatch(p, hostname)) {
+ xmlFree(cpy);
+ return 1;
+ }
+
+ while (isspace(*env))
+ ++env;
+ p = env;
+ }
+ if (xmlNanoHTTPHostnameMatch(p, hostname)) {
+ xmlFree(cpy);
+ return 1;
+ }
+
+ xmlFree(cpy);
+ return 0;
+}
+
+
/**
* xmlNanoHTTPMethodRedir:
* @URL: The URL to load
@@ -1286,6 +1390,7 @@ xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input,
int blen;
SOCKET ret;
int nbRedirects = 0;
+ int use_proxy;
char *redirURL = NULL;
#ifdef DEBUG_HTTP
int xmt_bytes;
@@ -1320,7 +1425,8 @@ retry:
if (redirURL != NULL) xmlFree(redirURL);
return(NULL);
}
- if (proxy) {
+ use_proxy = proxy && !xmlNanoHTTPBypassProxy(ctxt->hostname);
+ if (use_proxy) {
blen = strlen(ctxt->hostname) * 2 + 16;
ret = xmlNanoHTTPConnectHost(proxy, proxyPort);
}
@@ -1355,7 +1461,7 @@ retry:
#endif
if (ctxt->port != 80) {
/* reserve space for ':xxxxx', incl. potential proxy */
- if (proxy)
+ if (use_proxy)
blen += 17;
else
blen += 11;
@@ -1369,7 +1475,7 @@ retry:
p = bp;
- if (proxy) {
+ if (use_proxy) {
if (ctxt->port != 80) {
p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
method, ctxt->hostname,
@@ -1410,7 +1516,7 @@ retry:
#ifdef DEBUG_HTTP
xmlGenericError(xmlGenericErrorContext,
- "-> %s%s", proxy? "(Proxy) " : "", bp);
+ "-> %s%s", use_proxy ? "(Proxy) " : "", bp);
if ((blen -= strlen(bp)+1) < 0)
xmlGenericError(xmlGenericErrorContext,
"ERROR: overflowed buffer by %d bytes\n", -blen);
diff --git a/chromium/third_party/libxml/src/parser.c b/chromium/third_party/libxml/src/parser.c
index cb473fe122b..f302f34c064 100644
--- a/chromium/third_party/libxml/src/parser.c
+++ b/chromium/third_party/libxml/src/parser.c
@@ -76,12 +76,17 @@
#endif
#include "private/buf.h"
+#include "private/dict.h"
#include "private/enc.h"
+#include "private/entities.h"
#include "private/error.h"
+#include "private/globals.h"
#include "private/html.h"
#include "private/io.h"
+#include "private/memory.h"
#include "private/parser.h"
#include "private/threads.h"
+#include "private/xpath.h"
struct _xmlStartTag {
const xmlChar *prefix;
@@ -90,9 +95,6 @@ struct _xmlStartTag {
int nsNr;
};
-static void
-xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info);
-
static xmlParserCtxtPtr
xmlCreateEntityParserCtxtInternal(xmlSAXHandlerPtr sax, void *userData,
const xmlChar *URL, const xmlChar *ID, const xmlChar *base,
@@ -125,156 +127,7 @@ xmlParseElementEnd(xmlParserCtxtPtr ctxt);
*/
#define XML_PARSER_NON_LINEAR 10
-/*
- * xmlParserEntityCheck
- *
- * Function to check non-linear entity expansion behaviour
- * This is here to detect and stop exponential linear entity expansion
- * This is not a limitation of the parser but a safety
- * boundary feature. It can be disabled with the XML_PARSE_HUGE
- * parser option.
- */
-static int
-xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
- xmlEntityPtr ent, size_t replacement)
-{
- size_t consumed = 0;
- int i;
-
- if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
- return (0);
- if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
- return (1);
-
- /*
- * This may look absurd but is needed to detect
- * entities problems
- */
- if ((ent != NULL) && (ent->guard == XML_ENTITY_BEING_CHECKED)) {
- xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
- return (1);
- }
-
- if ((ent != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
- (ent->content != NULL) && (ent->checked == 0) &&
- (ctxt->errNo != XML_ERR_ENTITY_LOOP)) {
- unsigned long oldnbent = ctxt->nbentities, diff;
- xmlChar *rep;
-
- ent->guard = XML_ENTITY_BEING_CHECKED;
- ent->checked = 1;
-
- ++ctxt->depth;
- rep = xmlStringDecodeEntities(ctxt, ent->content,
- XML_SUBSTITUTE_REF, 0, 0, 0);
- --ctxt->depth;
- ent->guard = XML_ENTITY_NOT_BEING_CHECKED;
- if ((rep == NULL) || (ctxt->errNo == XML_ERR_ENTITY_LOOP)) {
- ent->content[0] = 0;
- }
-
- diff = ctxt->nbentities - oldnbent + 1;
- if (diff > INT_MAX / 2)
- diff = INT_MAX / 2;
- ent->checked = diff * 2;
- if (rep != NULL) {
- if (xmlStrchr(rep, '<'))
- ent->checked |= 1;
- xmlFree(rep);
- rep = NULL;
- }
- }
-
- /*
- * Prevent entity exponential check, not just replacement while
- * parsing the DTD
- * The check is potentially costly so do that only once in a thousand
- */
- if ((ctxt->instate == XML_PARSER_DTD) && (ctxt->nbentities > 10000) &&
- (ctxt->nbentities % 1024 == 0)) {
- for (i = 0;i < ctxt->inputNr;i++) {
- consumed += ctxt->inputTab[i]->consumed +
- (ctxt->inputTab[i]->cur - ctxt->inputTab[i]->base);
- }
- if (ctxt->nbentities > consumed * XML_PARSER_NON_LINEAR) {
- xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
- ctxt->instate = XML_PARSER_EOF;
- return (1);
- }
- consumed = 0;
- }
-
-
-
- if (replacement != 0) {
- if (replacement < XML_MAX_TEXT_LENGTH)
- return(0);
-
- /*
- * If the volume of entity copy reaches 10 times the
- * amount of parsed data and over the large text threshold
- * then that's very likely to be an abuse.
- */
- if (ctxt->input != NULL) {
- consumed = ctxt->input->consumed +
- (ctxt->input->cur - ctxt->input->base);
- }
- consumed += ctxt->sizeentities;
-
- if (replacement < XML_PARSER_NON_LINEAR * consumed)
- return(0);
- } else if (size != 0) {
- /*
- * Do the check based on the replacement size of the entity
- */
- if (size < XML_PARSER_BIG_ENTITY)
- return(0);
-
- /*
- * A limit on the amount of text data reasonably used
- */
- if (ctxt->input != NULL) {
- consumed = ctxt->input->consumed +
- (ctxt->input->cur - ctxt->input->base);
- }
- consumed += ctxt->sizeentities;
-
- if ((size < XML_PARSER_NON_LINEAR * consumed) &&
- (ctxt->nbentities * 3 < XML_PARSER_NON_LINEAR * consumed))
- return (0);
- } else if (ent != NULL) {
- /*
- * use the number of parsed entities in the replacement
- */
- size = ent->checked / 2;
-
- /*
- * The amount of data parsed counting entities size only once
- */
- if (ctxt->input != NULL) {
- consumed = ctxt->input->consumed +
- (ctxt->input->cur - ctxt->input->base);
- }
- consumed += ctxt->sizeentities;
-
- /*
- * Check the density of entities for the amount of data
- * knowing an entity reference will take at least 3 bytes
- */
- if (size * 3 < consumed * XML_PARSER_NON_LINEAR)
- return (0);
- } else {
- /*
- * strange we got no data for checking
- */
- if (((ctxt->lastError.code != XML_ERR_UNDECLARED_ENTITY) &&
- (ctxt->lastError.code != XML_WAR_UNDECLARED_ENTITY)) ||
- (ctxt->nbentities <= 10000))
- return (0);
- }
- xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
- return (1);
-}
+#define XML_ENT_FIXED_COST 50
/**
* xmlParserMaxDepth:
@@ -871,6 +724,89 @@ xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
info1, info2, info3);
}
+static void
+xmlSaturatedAdd(unsigned long *dst, unsigned long val) {
+ if (val > ULONG_MAX - *dst)
+ *dst = ULONG_MAX;
+ else
+ *dst += val;
+}
+
+static void
+xmlSaturatedAddSizeT(unsigned long *dst, unsigned long val) {
+ if (val > ULONG_MAX - *dst)
+ *dst = ULONG_MAX;
+ else
+ *dst += val;
+}
+
+/**
+ * xmlParserEntityCheck:
+ * @ctxt: parser context
+ * @extra: sum of unexpanded entity sizes
+ *
+ * Check for non-linear entity expansion behaviour.
+ *
+ * In some cases like xmlStringDecodeEntities, this function is called
+ * for each, possibly nested entity and its unexpanded content length.
+ *
+ * In other cases like xmlParseReference, it's only called for each
+ * top-level entity with its unexpanded content length plus the sum of
+ * the unexpanded content lengths (plus fixed cost) of all nested
+ * entities.
+ *
+ * Summing the unexpanded lengths also adds the length of the reference.
+ * This is by design. Taking the length of the entity name into account
+ * discourages attacks that try to waste CPU time with abusively long
+ * entity names. See test/recurse/lol6.xml for example. Each call also
+ * adds some fixed cost XML_ENT_FIXED_COST to discourage attacks with
+ * short entities.
+ *
+ * Returns 1 on error, 0 on success.
+ */
+static int
+xmlParserEntityCheck(xmlParserCtxtPtr ctxt, unsigned long extra)
+{
+ unsigned long consumed;
+ xmlParserInputPtr input = ctxt->input;
+ xmlEntityPtr entity = input->entity;
+
+ /*
+ * Compute total consumed bytes so far, including input streams of
+ * external entities.
+ */
+ consumed = input->parentConsumed;
+ if ((entity == NULL) ||
+ ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ ((entity->flags & XML_ENT_PARSED) == 0))) {
+ xmlSaturatedAdd(&consumed, input->consumed);
+ xmlSaturatedAddSizeT(&consumed, input->cur - input->base);
+ }
+ xmlSaturatedAdd(&consumed, ctxt->sizeentities);
+
+ /*
+ * Add extra cost and some fixed cost.
+ */
+ xmlSaturatedAdd(&ctxt->sizeentcopy, extra);
+ xmlSaturatedAdd(&ctxt->sizeentcopy, XML_ENT_FIXED_COST);
+
+ /*
+ * It's important to always use saturation arithmetic when tracking
+ * entity sizes to make the size checks reliable. If "sizeentcopy"
+ * overflows, we have to abort.
+ */
+ if ((ctxt->sizeentcopy > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->sizeentcopy >= ULONG_MAX) ||
+ (ctxt->sizeentcopy / XML_PARSER_NON_LINEAR > consumed))) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_LOOP,
+ "Maximum entity amplification factor exceeded");
+ xmlHaltParser(ctxt);
+ return(1);
+ }
+
+ return(0);
+}
+
/************************************************************************
* *
* Library wide options *
@@ -1338,6 +1274,8 @@ xmlAddDefAttrs(xmlParserCtxtPtr ctxt,
/* intern the string and precompute the end */
len = xmlStrlen(value);
value = xmlDictLookup(ctxt->dict, value, len);
+ if (value == NULL)
+ goto mem_error;
defaults->values[5 * defaults->nbAttrs + 2] = value;
defaults->values[5 * defaults->nbAttrs + 3] = value + len;
if (ctxt->external)
@@ -1717,25 +1655,21 @@ xmlCtxtGrowAttrs(xmlParserCtxtPtr ctxt, int nr) {
int *attallocs;
int maxatts;
- if (ctxt->atts == NULL) {
- maxatts = 55; /* allow for 10 attrs by default */
- atts = (const xmlChar **)
- xmlMalloc(maxatts * sizeof(xmlChar *));
- if (atts == NULL) goto mem_error;
- ctxt->atts = atts;
- attallocs = (int *) xmlMalloc((maxatts / 5) * sizeof(int));
- if (attallocs == NULL) goto mem_error;
- ctxt->attallocs = attallocs;
- ctxt->maxatts = maxatts;
- } else if (nr + 5 > ctxt->maxatts) {
- maxatts = (nr + 5) * 2;
- atts = (const xmlChar **) xmlRealloc((void *) ctxt->atts,
+ if (nr + 5 > ctxt->maxatts) {
+ maxatts = ctxt->maxatts == 0 ? 55 : (nr + 5) * 2;
+ atts = (const xmlChar **) xmlMalloc(
maxatts * sizeof(const xmlChar *));
if (atts == NULL) goto mem_error;
- ctxt->atts = atts;
attallocs = (int *) xmlRealloc((void *) ctxt->attallocs,
(maxatts / 5) * sizeof(int));
- if (attallocs == NULL) goto mem_error;
+ if (attallocs == NULL) {
+ xmlFree(atts);
+ goto mem_error;
+ }
+ if (ctxt->maxatts > 0)
+ memcpy(atts, ctxt->atts, ctxt->maxatts * sizeof(const xmlChar *));
+ xmlFree(ctxt->atts);
+ ctxt->atts = atts;
ctxt->attallocs = attallocs;
ctxt->maxatts = maxatts;
}
@@ -1760,16 +1694,17 @@ inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
if ((ctxt == NULL) || (value == NULL))
return(-1);
if (ctxt->inputNr >= ctxt->inputMax) {
- ctxt->inputMax *= 2;
- ctxt->inputTab =
- (xmlParserInputPtr *) xmlRealloc(ctxt->inputTab,
- ctxt->inputMax *
- sizeof(ctxt->inputTab[0]));
- if (ctxt->inputTab == NULL) {
+ size_t newSize = ctxt->inputMax * 2;
+ xmlParserInputPtr *tmp;
+
+ tmp = (xmlParserInputPtr *) xmlRealloc(ctxt->inputTab,
+ newSize * sizeof(*tmp));
+ if (tmp == NULL) {
xmlErrMemory(ctxt, NULL);
- ctxt->inputMax /= 2;
return (-1);
}
+ ctxt->inputTab = tmp;
+ ctxt->inputMax = newSize;
}
ctxt->inputTab[ctxt->inputNr] = value;
ctxt->input = value;
@@ -2122,7 +2057,10 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
xmlSHRINK (ctxt);
static void xmlSHRINK (xmlParserCtxtPtr ctxt) {
- xmlParserInputShrink(ctxt->input);
+ /* Don't shrink memory buffers. */
+ if ((ctxt->input->buf) &&
+ ((ctxt->input->buf->encoder) || (ctxt->input->buf->readcallback)))
+ xmlParserInputShrink(ctxt->input);
if (*ctxt->input->cur == 0)
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
}
@@ -2138,7 +2076,7 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
if (((curEnd > XML_MAX_LOOKUP_LIMIT) ||
(curBase > XML_MAX_LOOKUP_LIMIT)) &&
((ctxt->input->buf) &&
- (ctxt->input->buf->readcallback != xmlInputReadCallbackNop)) &&
+ (ctxt->input->buf->readcallback != NULL)) &&
((ctxt->options & XML_PARSE_HUGE) == 0)) {
xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
xmlHaltParser(ctxt);
@@ -2180,9 +2118,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
if (l == 1) b[i++] = v; \
else i += xmlCopyCharMultiByte(&b[i],v)
-#define CUR_CONSUMED \
- (ctxt->input->consumed + (ctxt->input->cur - ctxt->input->base))
-
/**
* xmlSkipBlankChars:
* @ctxt: the XML parser context
@@ -2227,7 +2162,7 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
} else {
int expandPE = ((ctxt->external != 0) || (ctxt->inputNr != 1));
- while (1) {
+ while (ctxt->instate != XML_PARSER_EOF) {
if (IS_BLANK_CH(CUR)) { /* CHECKED tstblanks.xml */
NEXT;
} else if (CUR == '%') {
@@ -2238,8 +2173,30 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
break;
xmlParsePEReference(ctxt);
} else if (CUR == 0) {
+ unsigned long consumed;
+ xmlEntityPtr ent;
+
if (ctxt->inputNr <= 1)
break;
+
+ consumed = ctxt->input->consumed;
+ xmlSaturatedAddSizeT(&consumed,
+ ctxt->input->cur - ctxt->input->base);
+
+ /*
+ * Add to sizeentities when parsing an external entity
+ * for the first time.
+ */
+ ent = ctxt->input->entity;
+ if ((ent->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ ((ent->flags & XML_ENT_PARSED) == 0)) {
+ ent->flags |= XML_ENT_PARSED;
+
+ xmlSaturatedAdd(&ctxt->sizeentities, consumed);
+ }
+
+ xmlParserEntityCheck(ctxt, consumed);
+
xmlPopInput(ctxt);
} else {
break;
@@ -2276,6 +2233,8 @@ xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
*/
xmlChar
xmlPopInput(xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr input;
+
if ((ctxt == NULL) || (ctxt->inputNr <= 1)) return(0);
if (xmlParserDebugEntities)
xmlGenericError(xmlGenericErrorContext,
@@ -2284,7 +2243,10 @@ xmlPopInput(xmlParserCtxtPtr ctxt) {
(ctxt->instate != XML_PARSER_EOF))
xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
"Unfinished entity outside the DTD");
- xmlFreeInputStream(inputPop(ctxt));
+ input = inputPop(ctxt);
+ if (input->entity != NULL)
+ input->entity->flags &= ~XML_ENT_EXPANDING;
+ xmlFreeInputStream(input);
if (*ctxt->input->cur == 0)
xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
return(CUR);
@@ -2313,7 +2275,7 @@ xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
"Pushing input %d : %.30s\n", ctxt->inputNr+1, input->cur);
}
if (((ctxt->inputNr > 40) && ((ctxt->options & XML_PARSE_HUGE) == 0)) ||
- (ctxt->inputNr > 1024)) {
+ (ctxt->inputNr > 100)) {
xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
while (ctxt->inputNr > 1)
xmlFreeInputStream(inputPop(ctxt));
@@ -2332,7 +2294,7 @@ xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse Reference declarations
+ * Parse a numeric character reference. Always consumes '&'.
*
* [66] CharRef ::= '&#' [0-9]+ ';' |
* '&#x' [0-9a-fA-F]+ ';'
@@ -2413,6 +2375,8 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) {
ctxt->input->cur++;
}
} else {
+ if (RAW == '&')
+ SKIP(1);
xmlFatalErr(ctxt, XML_ERR_INVALID_CHARREF, NULL);
}
@@ -2636,7 +2600,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
}
/**
- * xmlStringLenDecodeEntities:
+ * xmlStringDecodeEntitiesInt:
* @ctxt: the parser context
* @str: the input string
* @len: the string length
@@ -2644,19 +2608,12 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
* @end: an end marker xmlChar, 0 if none
* @end2: an end marker xmlChar, 0 if none
* @end3: an end marker xmlChar, 0 if none
- *
- * Takes a entity string content and process to do the adequate substitutions.
- *
- * [67] Reference ::= EntityRef | CharRef
- *
- * [69] PEReference ::= '%' Name ';'
- *
- * Returns A newly allocated string with the substitution done. The caller
- * must deallocate it !
+ * @check: whether to perform entity checks
*/
-xmlChar *
-xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
- int what, xmlChar end, xmlChar end2, xmlChar end3) {
+static xmlChar *
+xmlStringDecodeEntitiesInt(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ int what, xmlChar end, xmlChar end2, xmlChar end3,
+ int check) {
xmlChar *buffer = NULL;
size_t buffer_size = 0;
size_t nbchars = 0;
@@ -2667,14 +2624,15 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
xmlEntityPtr ent;
int c,l;
- if ((ctxt == NULL) || (str == NULL) || (len < 0))
- return(NULL);
+ if (str == NULL)
+ return(NULL);
last = str + len;
if (((ctxt->depth > 40) &&
((ctxt->options & XML_PARSE_HUGE) == 0)) ||
- (ctxt->depth > 1024)) {
- xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ (ctxt->depth > 100)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_LOOP,
+ "Maximum entity nesting depth exceeded");
return(NULL);
}
@@ -2712,9 +2670,6 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
"String decoding Entity Reference: %.30s\n",
str);
ent = xmlParseStringEntityRef(ctxt, &str);
- xmlParserEntityCheck(ctxt, 0, ent, 0);
- if (ent != NULL)
- ctxt->nbentities += ent->checked / 2;
if ((ent != NULL) &&
(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
if (ent->content != NULL) {
@@ -2728,10 +2683,23 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
goto int_error;
}
} else if ((ent != NULL) && (ent->content != NULL)) {
+ if ((check) && (xmlParserEntityCheck(ctxt, ent->length)))
+ goto int_error;
+
+ if (ent->flags & XML_ENT_EXPANDING) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ xmlHaltParser(ctxt);
+ ent->content[0] = 0;
+ goto int_error;
+ }
+
+ ent->flags |= XML_ENT_EXPANDING;
ctxt->depth++;
- rep = xmlStringDecodeEntities(ctxt, ent->content, what,
- 0, 0, 0);
+ rep = xmlStringDecodeEntitiesInt(ctxt, ent->content,
+ ent->length, what, 0, 0, 0, check);
ctxt->depth--;
+ ent->flags &= ~XML_ENT_EXPANDING;
+
if (rep == NULL) {
ent->content[0] = 0;
goto int_error;
@@ -2741,8 +2709,6 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
while (*current != 0) { /* non input consuming loop */
buffer[nbchars++] = *current++;
if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
- if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
- goto int_error;
growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
}
}
@@ -2765,9 +2731,6 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
xmlGenericError(xmlGenericErrorContext,
"String decoding PE Reference: %.30s\n", str);
ent = xmlParseStringPEReference(ctxt, &str);
- xmlParserEntityCheck(ctxt, 0, ent, 0);
- if (ent != NULL)
- ctxt->nbentities += ent->checked / 2;
if (ent != NULL) {
if (ent->content == NULL) {
/*
@@ -2786,10 +2749,25 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
ent->name, NULL);
}
}
+
+ if ((check) && (xmlParserEntityCheck(ctxt, ent->length)))
+ goto int_error;
+
+ if (ent->flags & XML_ENT_EXPANDING) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ xmlHaltParser(ctxt);
+ if (ent->content != NULL)
+ ent->content[0] = 0;
+ goto int_error;
+ }
+
+ ent->flags |= XML_ENT_EXPANDING;
ctxt->depth++;
- rep = xmlStringDecodeEntities(ctxt, ent->content, what,
- 0, 0, 0);
+ rep = xmlStringDecodeEntitiesInt(ctxt, ent->content,
+ ent->length, what, 0, 0, 0, check);
ctxt->depth--;
+ ent->flags &= ~XML_ENT_EXPANDING;
+
if (rep == NULL) {
if (ent->content != NULL)
ent->content[0] = 0;
@@ -2799,8 +2777,6 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
while (*current != 0) { /* non input consuming loop */
buffer[nbchars++] = *current++;
if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
- if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
- goto int_error;
growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
}
}
@@ -2833,6 +2809,37 @@ int_error:
}
/**
+ * xmlStringLenDecodeEntities:
+ * @ctxt: the parser context
+ * @str: the input string
+ * @len: the string length
+ * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
+ * @end: an end marker xmlChar, 0 if none
+ * @end2: an end marker xmlChar, 0 if none
+ * @end3: an end marker xmlChar, 0 if none
+ *
+ * DEPRECATED: Internal function, don't use.
+ *
+ * Takes a entity string content and process to do the adequate substitutions.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * Returns A newly allocated string with the substitution done. The caller
+ * must deallocate it !
+ */
+xmlChar *
+xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ int what, xmlChar end, xmlChar end2,
+ xmlChar end3) {
+ if ((ctxt == NULL) || (str == NULL) || (len < 0))
+ return(NULL);
+ return(xmlStringDecodeEntitiesInt(ctxt, str, len, what,
+ end, end2, end3, 0));
+}
+
+/**
* xmlStringDecodeEntities:
* @ctxt: the parser context
* @str: the input string
@@ -2841,6 +2848,8 @@ int_error:
* @end2: an end marker xmlChar, 0 if none
* @end3: an end marker xmlChar, 0 if none
*
+ * DEPRECATED: Internal function, don't use.
+ *
* Takes a entity string content and process to do the adequate substitutions.
*
* [67] Reference ::= EntityRef | CharRef
@@ -2854,8 +2863,8 @@ xmlChar *
xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what,
xmlChar end, xmlChar end2, xmlChar end3) {
if ((ctxt == NULL) || (str == NULL)) return(NULL);
- return(xmlStringLenDecodeEntities(ctxt, str, xmlStrlen(str), what,
- end, end2, end3));
+ return(xmlStringDecodeEntitiesInt(ctxt, str, xmlStrlen(str), what,
+ end, end2, end3, 0));
}
/************************************************************************
@@ -3908,9 +3917,10 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
* so XML_SUBSTITUTE_REF is not set here.
*/
++ctxt->depth;
- ret = xmlStringDecodeEntities(ctxt, buf, XML_SUBSTITUTE_PEREF,
- 0, 0, 0);
+ ret = xmlStringDecodeEntitiesInt(ctxt, buf, len, XML_SUBSTITUTE_PEREF,
+ 0, 0, 0, /* check */ 1);
--ctxt->depth;
+
if (orig != NULL) {
*orig = buf;
buf = NULL;
@@ -4008,9 +4018,6 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
}
} else {
ent = xmlParseEntityRef(ctxt);
- ctxt->nbentities++;
- if (ent != NULL)
- ctxt->nbentities += ent->owner;
if ((ent != NULL) &&
(ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
if (len + 10 > buf_size) {
@@ -4029,10 +4036,13 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
} else if ((ent != NULL) &&
(ctxt->replaceEntities != 0)) {
if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
+ if (xmlParserEntityCheck(ctxt, ent->length))
+ goto error;
+
++ctxt->depth;
- rep = xmlStringDecodeEntities(ctxt, ent->content,
- XML_SUBSTITUTE_REF,
- 0, 0, 0);
+ rep = xmlStringDecodeEntitiesInt(ctxt, ent->content,
+ ent->length, XML_SUBSTITUTE_REF, 0, 0, 0,
+ /* check */ 1);
--ctxt->depth;
if (rep != NULL) {
current = rep;
@@ -4062,29 +4072,47 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
const xmlChar *cur = ent->name;
/*
- * This may look absurd but is needed to detect
- * entities problems
+ * We also check for recursion and amplification
+ * when entities are not substituted. They're
+ * often expanded later.
*/
if ((ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
- (ent->content != NULL) && (ent->checked == 0)) {
- unsigned long oldnbent = ctxt->nbentities, diff;
-
- ++ctxt->depth;
- rep = xmlStringDecodeEntities(ctxt, ent->content,
- XML_SUBSTITUTE_REF, 0, 0, 0);
- --ctxt->depth;
-
- diff = ctxt->nbentities - oldnbent + 1;
- if (diff > INT_MAX / 2)
- diff = INT_MAX / 2;
- ent->checked = diff * 2;
- if (rep != NULL) {
- if (xmlStrchr(rep, '<'))
- ent->checked |= 1;
- xmlFree(rep);
- rep = NULL;
- } else {
- ent->content[0] = 0;
+ (ent->content != NULL)) {
+ if ((ent->flags & XML_ENT_CHECKED) == 0) {
+ unsigned long oldCopy = ctxt->sizeentcopy;
+
+ ctxt->sizeentcopy = ent->length;
+
+ ++ctxt->depth;
+ rep = xmlStringDecodeEntitiesInt(ctxt,
+ ent->content, ent->length,
+ XML_SUBSTITUTE_REF, 0, 0, 0,
+ /* check */ 1);
+ --ctxt->depth;
+
+ /*
+ * If we're parsing DTD content, the entity
+ * might reference other entities which
+ * weren't defined yet, so the check isn't
+ * reliable.
+ */
+ if (ctxt->inSubset == 0) {
+ ent->flags |= XML_ENT_CHECKED;
+ ent->expandedSize = ctxt->sizeentcopy;
+ }
+
+ if (rep != NULL) {
+ xmlFree(rep);
+ rep = NULL;
+ } else {
+ ent->content[0] = 0;
+ }
+
+ if (xmlParserEntityCheck(ctxt, oldCopy))
+ goto error;
+ } else {
+ if (xmlParserEntityCheck(ctxt, ent->expandedSize))
+ goto error;
}
}
@@ -4388,7 +4416,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
return(buf);
}
-static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata);
+static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt);
/*
* used for the test in the inner loop of the char data testing
@@ -4431,11 +4459,13 @@ static const unsigned char test_char_data[256] = {
/**
* xmlParseCharData:
* @ctxt: an XML parser context
- * @cdata: int indicating whether we are within a CDATA section
+ * @cdata: unused
*
* DEPRECATED: Internal function, don't use.
*
- * parse a CharData section.
+ * Parse character data. Always makes progress if the first char isn't
+ * '<' or '&'.
+ *
* if we are within a CDATA section ']]>' marks an end of section.
*
* The right angle bracket (>) may be represented using the string "&gt;",
@@ -4447,7 +4477,7 @@ static const unsigned char test_char_data[256] = {
*/
void
-xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
+xmlParseCharData(xmlParserCtxtPtr ctxt, ATTRIBUTE_UNUSED int cdata) {
const xmlChar *in;
int nbchar = 0;
int line = ctxt->input->line;
@@ -4460,132 +4490,127 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
* Accelerated common case where input don't need to be
* modified before passing it to the handler.
*/
- if (!cdata) {
- in = ctxt->input->cur;
- do {
+ in = ctxt->input->cur;
+ do {
get_more_space:
- while (*in == 0x20) { in++; ctxt->input->col++; }
- if (*in == 0xA) {
- do {
- ctxt->input->line++; ctxt->input->col = 1;
- in++;
- } while (*in == 0xA);
- goto get_more_space;
- }
- if (*in == '<') {
- nbchar = in - ctxt->input->cur;
- if (nbchar > 0) {
- const xmlChar *tmp = ctxt->input->cur;
- ctxt->input->cur = in;
-
- if ((ctxt->sax != NULL) &&
- (ctxt->sax->ignorableWhitespace !=
- ctxt->sax->characters)) {
- if (areBlanks(ctxt, tmp, nbchar, 1)) {
- if (ctxt->sax->ignorableWhitespace != NULL)
- ctxt->sax->ignorableWhitespace(ctxt->userData,
- tmp, nbchar);
- } else {
- if (ctxt->sax->characters != NULL)
- ctxt->sax->characters(ctxt->userData,
- tmp, nbchar);
- if (*ctxt->space == -1)
- *ctxt->space = -2;
- }
- } else if ((ctxt->sax != NULL) &&
- (ctxt->sax->characters != NULL)) {
- ctxt->sax->characters(ctxt->userData,
- tmp, nbchar);
- }
- }
- return;
- }
+ while (*in == 0x20) { in++; ctxt->input->col++; }
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ goto get_more_space;
+ }
+ if (*in == '<') {
+ nbchar = in - ctxt->input->cur;
+ if (nbchar > 0) {
+ const xmlChar *tmp = ctxt->input->cur;
+ ctxt->input->cur = in;
+
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->ignorableWhitespace !=
+ ctxt->sax->characters)) {
+ if (areBlanks(ctxt, tmp, nbchar, 1)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ tmp, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ if (*ctxt->space == -1)
+ *ctxt->space = -2;
+ }
+ } else if ((ctxt->sax != NULL) &&
+ (ctxt->sax->characters != NULL)) {
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ }
+ }
+ return;
+ }
get_more:
- ccol = ctxt->input->col;
- while (test_char_data[*in]) {
- in++;
- ccol++;
- }
- ctxt->input->col = ccol;
- if (*in == 0xA) {
- do {
- ctxt->input->line++; ctxt->input->col = 1;
- in++;
- } while (*in == 0xA);
- goto get_more;
- }
- if (*in == ']') {
- if ((in[1] == ']') && (in[2] == '>')) {
- xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
- ctxt->input->cur = in + 1;
- return;
- }
- in++;
- ctxt->input->col++;
- goto get_more;
- }
- nbchar = in - ctxt->input->cur;
- if (nbchar > 0) {
- if ((ctxt->sax != NULL) &&
- (ctxt->sax->ignorableWhitespace !=
- ctxt->sax->characters) &&
- (IS_BLANK_CH(*ctxt->input->cur))) {
- const xmlChar *tmp = ctxt->input->cur;
- ctxt->input->cur = in;
-
- if (areBlanks(ctxt, tmp, nbchar, 0)) {
- if (ctxt->sax->ignorableWhitespace != NULL)
- ctxt->sax->ignorableWhitespace(ctxt->userData,
- tmp, nbchar);
- } else {
- if (ctxt->sax->characters != NULL)
- ctxt->sax->characters(ctxt->userData,
- tmp, nbchar);
- if (*ctxt->space == -1)
- *ctxt->space = -2;
- }
- line = ctxt->input->line;
- col = ctxt->input->col;
- } else if (ctxt->sax != NULL) {
- if (ctxt->sax->characters != NULL)
- ctxt->sax->characters(ctxt->userData,
- ctxt->input->cur, nbchar);
- line = ctxt->input->line;
- col = ctxt->input->col;
- }
- /* something really bad happened in the SAX callback */
- if (ctxt->instate != XML_PARSER_CONTENT)
- return;
- }
- ctxt->input->cur = in;
- if (*in == 0xD) {
- in++;
- if (*in == 0xA) {
- ctxt->input->cur = in;
- in++;
- ctxt->input->line++; ctxt->input->col = 1;
- continue; /* while */
- }
- in--;
- }
- if (*in == '<') {
- return;
- }
- if (*in == '&') {
- return;
- }
- SHRINK;
- GROW;
- if (ctxt->instate == XML_PARSER_EOF)
- return;
- in = ctxt->input->cur;
- } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09) || (*in == 0x0a));
- nbchar = 0;
- }
+ ccol = ctxt->input->col;
+ while (test_char_data[*in]) {
+ in++;
+ ccol++;
+ }
+ ctxt->input->col = ccol;
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ goto get_more;
+ }
+ if (*in == ']') {
+ if ((in[1] == ']') && (in[2] == '>')) {
+ xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
+ ctxt->input->cur = in + 1;
+ return;
+ }
+ in++;
+ ctxt->input->col++;
+ goto get_more;
+ }
+ nbchar = in - ctxt->input->cur;
+ if (nbchar > 0) {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->ignorableWhitespace !=
+ ctxt->sax->characters) &&
+ (IS_BLANK_CH(*ctxt->input->cur))) {
+ const xmlChar *tmp = ctxt->input->cur;
+ ctxt->input->cur = in;
+
+ if (areBlanks(ctxt, tmp, nbchar, 0)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ tmp, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ if (*ctxt->space == -1)
+ *ctxt->space = -2;
+ }
+ line = ctxt->input->line;
+ col = ctxt->input->col;
+ } else if (ctxt->sax != NULL) {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ ctxt->input->cur, nbchar);
+ line = ctxt->input->line;
+ col = ctxt->input->col;
+ }
+ }
+ ctxt->input->cur = in;
+ if (*in == 0xD) {
+ in++;
+ if (*in == 0xA) {
+ ctxt->input->cur = in;
+ in++;
+ ctxt->input->line++; ctxt->input->col = 1;
+ continue; /* while */
+ }
+ in--;
+ }
+ if (*in == '<') {
+ return;
+ }
+ if (*in == '&') {
+ return;
+ }
+ SHRINK;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ in = ctxt->input->cur;
+ } while (((*in >= 0x20) && (*in <= 0x7F)) ||
+ (*in == 0x09) || (*in == 0x0a));
ctxt->input->line = line;
ctxt->input->col = col;
- xmlParseCharDataComplex(ctxt, cdata);
+ xmlParseCharDataComplex(ctxt);
}
/**
@@ -4593,12 +4618,14 @@ get_more:
* @ctxt: an XML parser context
* @cdata: int indicating whether we are within a CDATA section
*
+ * Always makes progress if the first char isn't '<' or '&'.
+ *
* parse a CharData section.this is the fallback function
* of xmlParseCharData() when the parsing requires handling
* of non-ASCII characters.
*/
static void
-xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
+xmlParseCharDataComplex(xmlParserCtxtPtr ctxt) {
xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5];
int nbchar = 0;
int cur, l;
@@ -4610,12 +4637,8 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
while ((cur != '<') && /* checked */
(cur != '&') &&
(IS_CHAR(cur))) /* test also done in xmlCurrentChar() */ {
- if ((cur == ']') && (NXT(1) == ']') &&
- (NXT(2) == '>')) {
- if (cdata) break;
- else {
- xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
- }
+ if ((cur == ']') && (NXT(1) == ']') && (NXT(2) == '>')) {
+ xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
}
COPY_BUF(l,buf,nbchar,cur);
/* move current position before possible calling of ctxt->sax->characters */
@@ -4673,12 +4696,12 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
}
}
}
- if ((cur != 0) && (!IS_CHAR(cur))) {
+ if ((ctxt->input->cur < ctxt->input->end) && (!IS_CHAR(cur))) {
/* Generate the error and skip the offending character */
xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
"PCDATA invalid Char value %d\n",
- cur);
- NEXTL(l);
+ cur ? cur : CUR);
+ NEXT;
}
}
@@ -4814,7 +4837,7 @@ xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf,
if (!IS_CHAR(r)) {
xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
"xmlParseComment: invalid xmlChar value %d\n",
- q);
+ r);
xmlFree (buf);
return;
}
@@ -4907,7 +4930,8 @@ not_terminated:
*
* DEPRECATED: Internal function, don't use.
*
- * Skip an XML (SGML) comment <!-- .... -->
+ * Parse an XML (SGML) comment. Always consumes '<!'.
+ *
* The spec says that "For compatibility, the string "--" (double-hyphen)
* must not occur within comments. "
*
@@ -4930,12 +4954,15 @@ xmlParseComment(xmlParserCtxtPtr ctxt) {
/*
* Check that there is a comment right here.
*/
- if ((RAW != '<') || (NXT(1) != '!') ||
- (NXT(2) != '-') || (NXT(3) != '-')) return;
+ if ((RAW != '<') || (NXT(1) != '!'))
+ return;
+ SKIP(2);
+ if ((RAW != '-') || (NXT(1) != '-'))
+ return;
state = ctxt->instate;
ctxt->instate = XML_PARSER_COMMENT;
inputid = ctxt->input->id;
- SKIP(4);
+ SKIP(2);
SHRINK;
GROW;
@@ -5349,7 +5376,7 @@ xmlParsePI(xmlParserCtxtPtr ctxt) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse a notation declaration
+ * Parse a notation declaration. Always consumes '<!'.
*
* [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
*
@@ -5367,10 +5394,14 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) {
xmlChar *Pubid;
xmlChar *Systemid;
- if (CMP10(CUR_PTR, '<', '!', 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N')) {
+ if ((CUR != '<') || (NXT(1) != '!'))
+ return;
+ SKIP(2);
+
+ if (CMP8(CUR_PTR, 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N')) {
int inputid = ctxt->input->id;
SHRINK;
- SKIP(10);
+ SKIP(8);
if (SKIP_BLANKS == 0) {
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"Space required after '<!NOTATION'\n");
@@ -5423,7 +5454,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse <!ENTITY declarations
+ * Parse an entity declaration. Always consumes '<!'.
*
* [70] EntityDecl ::= GEDecl | PEDecl
*
@@ -5450,11 +5481,15 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
int isParameter = 0;
xmlChar *orig = NULL;
+ if ((CUR != '<') || (NXT(1) != '!'))
+ return;
+ SKIP(2);
+
/* GROW; done in the caller */
- if (CMP8(CUR_PTR, '<', '!', 'E', 'N', 'T', 'I', 'T', 'Y')) {
+ if (CMP6(CUR_PTR, 'E', 'N', 'T', 'I', 'T', 'Y')) {
int inputid = ctxt->input->id;
SHRINK;
- SKIP(8);
+ SKIP(6);
if (SKIP_BLANKS == 0) {
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"Space required after '<!ENTITY'\n");
@@ -5552,7 +5587,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
ctxt->myDoc = xmlNewDoc(SAX_COMPAT_MODE);
if (ctxt->myDoc == NULL) {
xmlErrMemory(ctxt, "New Doc failed");
- return;
+ goto done;
}
ctxt->myDoc->properties = XML_DOC_INTERNAL;
}
@@ -5623,7 +5658,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
ctxt->myDoc = xmlNewDoc(SAX_COMPAT_MODE);
if (ctxt->myDoc == NULL) {
xmlErrMemory(ctxt, "New Doc failed");
- return;
+ goto done;
}
ctxt->myDoc->properties = XML_DOC_INTERNAL;
}
@@ -6013,7 +6048,7 @@ xmlParseAttributeType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
*
* DEPRECATED: Internal function, don't use.
*
- * : parse the Attribute list def for an element
+ * Parse an attribute list declaration for an element. Always consumes '<!'.
*
* [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
*
@@ -6026,10 +6061,14 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
const xmlChar *attrName;
xmlEnumerationPtr tree;
- if (CMP9(CUR_PTR, '<', '!', 'A', 'T', 'T', 'L', 'I', 'S', 'T')) {
+ if ((CUR != '<') || (NXT(1) != '!'))
+ return;
+ SKIP(2);
+
+ if (CMP7(CUR_PTR, 'A', 'T', 'T', 'L', 'I', 'S', 'T')) {
int inputid = ctxt->input->id;
- SKIP(9);
+ SKIP(7);
if (SKIP_BLANKS == 0) {
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"Space required after '<!ATTLIST'\n");
@@ -6641,7 +6680,7 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name,
*
* DEPRECATED: Internal function, don't use.
*
- * parse an Element declaration.
+ * Parse an element declaration. Always consumes '<!'.
*
* [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
*
@@ -6656,11 +6695,15 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
int ret = -1;
xmlElementContentPtr content = NULL;
+ if ((CUR != '<') || (NXT(1) != '!'))
+ return(ret);
+ SKIP(2);
+
/* GROW; done in the caller */
- if (CMP9(CUR_PTR, '<', '!', 'E', 'L', 'E', 'M', 'E', 'N', 'T')) {
+ if (CMP7(CUR_PTR, 'E', 'L', 'E', 'M', 'E', 'N', 'T')) {
int inputid = ctxt->input->id;
- SKIP(9);
+ SKIP(7);
if (SKIP_BLANKS == 0) {
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"Space required after 'ELEMENT'\n");
@@ -6748,6 +6791,8 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
* xmlParseConditionalSections
* @ctxt: an XML parser context
*
+ * Parse a conditional section. Always consumes '<!['.
+ *
* [61] conditionalSect ::= includeSect | ignoreSect
* [62] includeSect ::= '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'
* [63] ignoreSect ::= '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'
@@ -6798,8 +6843,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
inputIds[depth] = id;
depth++;
} else if (CMP6(CUR_PTR, 'I', 'G', 'N', 'O', 'R', 'E')) {
- int state;
- xmlParserInputState instate;
size_t ignoreDepth = 0;
SKIP(6);
@@ -6816,15 +6859,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
}
NEXT;
- /*
- * Parse up to the end of the conditional section but disable
- * SAX event generating DTD building in the meantime
- */
- state = ctxt->disableSAX;
- instate = ctxt->instate;
- if (ctxt->recovery == 0) ctxt->disableSAX = 1;
- ctxt->instate = XML_PARSER_IGNORE;
-
while (RAW != 0) {
if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
SKIP(3);
@@ -6845,9 +6879,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
}
}
- ctxt->disableSAX = state;
- ctxt->instate = instate;
-
if (RAW == 0) {
xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL);
goto error;
@@ -6872,17 +6903,12 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
" in the same entity\n");
}
SKIP(3);
- } else {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
-
+ } else if ((RAW == '<') && ((NXT(1) == '!') || (NXT(1) == '?'))) {
xmlParseMarkupDecl(ctxt);
-
- if ((id == ctxt->input->id) && (cons == CUR_CONSUMED)) {
- xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
- xmlHaltParser(ctxt);
- goto error;
- }
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+ xmlHaltParser(ctxt);
+ goto error;
}
if (depth == 0)
@@ -6902,7 +6928,7 @@ error:
*
* DEPRECATED: Internal function, don't use.
*
- * parse Markup declarations
+ * Parse markup declarations. Always consumes '<!' or '<?'.
*
* [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl |
* NotationDecl | PI | Comment
@@ -6931,6 +6957,8 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
xmlParseElementDecl(ctxt);
else if (NXT(3) == 'N')
xmlParseEntityDecl(ctxt);
+ else
+ SKIP(2);
break;
case 'A':
xmlParseAttributeListDecl(ctxt);
@@ -6943,6 +6971,7 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
break;
default:
/* there is an error but it will be detected later */
+ SKIP(2);
break;
}
} else if (NXT(1) == '?') {
@@ -7014,6 +7043,8 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
* We must have the encoding declaration
*/
encoding = xmlParseEncodingDecl(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
/*
* The XML REC instructs us to stop parsing right here
@@ -7103,23 +7134,18 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
ctxt->instate = XML_PARSER_DTD;
ctxt->external = 1;
SKIP_BLANKS;
- while (((RAW == '<') && (NXT(1) == '?')) ||
- ((RAW == '<') && (NXT(1) == '!')) ||
- (RAW == '%')) {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
-
+ while ((ctxt->instate != XML_PARSER_EOF) && (RAW != 0)) {
GROW;
if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
- xmlParseConditionalSections(ctxt);
- } else
- xmlParseMarkupDecl(ctxt);
+ xmlParseConditionalSections(ctxt);
+ } else if ((RAW == '<') && ((NXT(1) == '!') || (NXT(1) == '?'))) {
+ xmlParseMarkupDecl(ctxt);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+ xmlHaltParser(ctxt);
+ return;
+ }
SKIP_BLANKS;
-
- if ((id == ctxt->input->id) && (cons == CUR_CONSUMED)) {
- xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
- break;
- }
}
if (RAW != 0) {
@@ -7139,6 +7165,8 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
* CharRef, a predefined entity, if there is no reference() callback.
* or if the parser was asked to switch to that mode.
*
+ * Always consumes '&'.
+ *
* [67] Reference ::= EntityRef | CharRef
*/
void
@@ -7205,7 +7233,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
if (ent == NULL) return;
if (!ctxt->wellFormed)
return;
- was_checked = ent->checked;
+ was_checked = ent->flags & XML_ENT_PARSED;
/* special case of predefined entities */
if ((ent->name == NULL) ||
@@ -7231,11 +7259,10 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
* far more secure as the parser will only process data coming from
* the document entity by default.
*/
- if (((ent->checked == 0) ||
- ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
+ if (((ent->flags & XML_ENT_PARSED) == 0) &&
((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
(ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
- unsigned long oldnbent = ctxt->nbentities, diff;
+ unsigned long oldsizeentcopy = ctxt->sizeentcopy;
/*
* This is a bit hackish but this seems the best
@@ -7248,116 +7275,102 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
else
user_data = ctxt->userData;
+ /* Avoid overflow as much as possible */
+ ctxt->sizeentcopy = 0;
+
+ if (ent->flags & XML_ENT_EXPANDING) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ xmlHaltParser(ctxt);
+ return;
+ }
+
+ ent->flags |= XML_ENT_EXPANDING;
+
/*
* Check that this entity is well formed
* 4.3.2: An internal general parsed entity is well-formed
* if its replacement text matches the production labeled
* content.
*/
- if (ent->guard == XML_ENTITY_BEING_CHECKED) {
- ret = XML_ERR_ENTITY_LOOP;
- } else {
- ent->guard = XML_ENTITY_BEING_CHECKED;
- if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
- ctxt->depth++;
- ret = xmlParseBalancedChunkMemoryInternal(ctxt, ent->content,
- user_data, &list);
- ctxt->depth--;
- } else if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
- ctxt->depth++;
- ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt, ctxt->sax,
- user_data, ctxt->depth, ent->URI,
- ent->ExternalID, &list);
- ctxt->depth--;
- } else {
- ret = XML_ERR_ENTITY_PE_INTERNAL;
- xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
- "invalid entity type found\n", NULL);
- }
- ent->guard = XML_ENTITY_NOT_BEING_CHECKED;
- }
+ if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseBalancedChunkMemoryInternal(ctxt, ent->content,
+ user_data, &list);
+ ctxt->depth--;
+
+ } else if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt, ctxt->sax,
+ user_data, ctxt->depth, ent->URI,
+ ent->ExternalID, &list);
+ ctxt->depth--;
+ } else {
+ ret = XML_ERR_ENTITY_PE_INTERNAL;
+ xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "invalid entity type found\n", NULL);
+ }
- /*
- * Store the number of entities needing parsing for this entity
- * content and do checkings
- */
- diff = ctxt->nbentities - oldnbent + 1;
- if (diff > INT_MAX / 2)
- diff = INT_MAX / 2;
- ent->checked = diff * 2;
- if ((ent->content != NULL) && (xmlStrchr(ent->content, '<')))
- ent->checked |= 1;
+ ent->flags &= ~XML_ENT_EXPANDING;
+ ent->flags |= XML_ENT_PARSED | XML_ENT_CHECKED;
+ ent->expandedSize = ctxt->sizeentcopy;
if (ret == XML_ERR_ENTITY_LOOP) {
- xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
xmlHaltParser(ctxt);
xmlFreeNodeList(list);
return;
}
- if (xmlParserEntityCheck(ctxt, 0, ent, 0)) {
+ if (xmlParserEntityCheck(ctxt, oldsizeentcopy)) {
xmlFreeNodeList(list);
return;
}
if ((ret == XML_ERR_OK) && (list != NULL)) {
- if (((ent->etype == XML_INTERNAL_GENERAL_ENTITY) ||
- (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY))&&
- (ent->children == NULL)) {
- ent->children = list;
- /*
- * Prune it directly in the generated document
- * except for single text nodes.
- */
- if ((ctxt->replaceEntities == 0) ||
- (ctxt->parseMode == XML_PARSE_READER) ||
- ((list->type == XML_TEXT_NODE) &&
- (list->next == NULL))) {
- ent->owner = 1;
- while (list != NULL) {
- list->parent = (xmlNodePtr) ent;
- if (list->doc != ent->doc)
- xmlSetTreeDoc(list, ent->doc);
- if (list->next == NULL)
- ent->last = list;
- list = list->next;
- }
- list = NULL;
- } else {
- ent->owner = 0;
- while (list != NULL) {
- list->parent = (xmlNodePtr) ctxt->node;
- list->doc = ctxt->myDoc;
- if (list->next == NULL)
- ent->last = list;
- list = list->next;
- }
- list = ent->children;
+ ent->children = list;
+ /*
+ * Prune it directly in the generated document
+ * except for single text nodes.
+ */
+ if ((ctxt->replaceEntities == 0) ||
+ (ctxt->parseMode == XML_PARSE_READER) ||
+ ((list->type == XML_TEXT_NODE) &&
+ (list->next == NULL))) {
+ ent->owner = 1;
+ while (list != NULL) {
+ list->parent = (xmlNodePtr) ent;
+ if (list->doc != ent->doc)
+ xmlSetTreeDoc(list, ent->doc);
+ if (list->next == NULL)
+ ent->last = list;
+ list = list->next;
+ }
+ list = NULL;
+ } else {
+ ent->owner = 0;
+ while (list != NULL) {
+ list->parent = (xmlNodePtr) ctxt->node;
+ list->doc = ctxt->myDoc;
+ if (list->next == NULL)
+ ent->last = list;
+ list = list->next;
+ }
+ list = ent->children;
#ifdef LIBXML_LEGACY_ENABLED
- if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
- xmlAddEntityReference(ent, list, NULL);
+ if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
+ xmlAddEntityReference(ent, list, NULL);
#endif /* LIBXML_LEGACY_ENABLED */
- }
- } else {
- xmlFreeNodeList(list);
- list = NULL;
- }
+ }
} else if ((ret != XML_ERR_OK) &&
(ret != XML_WAR_UNDECLARED_ENTITY)) {
xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
"Entity '%s' failed to parse\n", ent->name);
if (ent->content != NULL)
ent->content[0] = 0;
- xmlParserEntityCheck(ctxt, 0, ent, 0);
} else if (list != NULL) {
xmlFreeNodeList(list);
list = NULL;
}
- if (ent->checked == 0)
- ent->checked = 2;
/* Prevent entity from being parsed and expanded twice (Bug 760367). */
was_checked = 0;
- } else if (ent->checked != 1) {
- ctxt->nbentities += ent->checked / 2;
}
/*
@@ -7384,33 +7397,34 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
else
user_data = ctxt->userData;
- if (ent->guard == XML_ENTITY_BEING_CHECKED) {
- ret = XML_ERR_ENTITY_LOOP;
- } else {
- ent->guard = XML_ENTITY_BEING_CHECKED;
- if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
- ctxt->depth++;
- ret = xmlParseBalancedChunkMemoryInternal(ctxt,
- ent->content, user_data, NULL);
- ctxt->depth--;
- } else if (ent->etype ==
- XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
- ctxt->depth++;
- ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt,
- ctxt->sax, user_data, ctxt->depth,
- ent->URI, ent->ExternalID, NULL);
- ctxt->depth--;
- } else {
- ret = XML_ERR_ENTITY_PE_INTERNAL;
- xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
- "invalid entity type found\n", NULL);
- }
- ent->guard = XML_ENTITY_NOT_BEING_CHECKED;
- }
+ if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseBalancedChunkMemoryInternal(ctxt,
+ ent->content, user_data, NULL);
+ ctxt->depth--;
+ } else if (ent->etype ==
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
+ unsigned long oldsizeentities = ctxt->sizeentities;
+
+ ctxt->depth++;
+ ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt,
+ ctxt->sax, user_data, ctxt->depth,
+ ent->URI, ent->ExternalID, NULL);
+ ctxt->depth--;
+
+ /* Undo the change to sizeentities */
+ ctxt->sizeentities = oldsizeentities;
+ } else {
+ ret = XML_ERR_ENTITY_PE_INTERNAL;
+ xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "invalid entity type found\n", NULL);
+ }
if (ret == XML_ERR_ENTITY_LOOP) {
xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
return;
}
+ if (xmlParserEntityCheck(ctxt, 0))
+ return;
}
if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) &&
(ctxt->replaceEntities == 0) && (!ctxt->disableSAX)) {
@@ -7424,6 +7438,14 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
}
/*
+ * We also check for amplification if entities aren't substituted.
+ * They might be expanded later.
+ */
+ if ((was_checked != 0) &&
+ (xmlParserEntityCheck(ctxt, ent->expandedSize)))
+ return;
+
+ /*
* If we didn't get any children for the entity being built
*/
if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) &&
@@ -7435,7 +7457,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
return;
}
- if ((ctxt->replaceEntities) || (ent->children == NULL)) {
+ if (ctxt->replaceEntities) {
/*
* There is a problem on the handling of _private for entities
* (bug 155816): Should we copy the content of the field from
@@ -7449,7 +7471,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
* hack - maybe we should have further tests to determine
* what to do.
*/
- if ((ctxt->node != NULL) && (ent->children != NULL)) {
+ if (ctxt->node != NULL) {
/*
* Seems we are generating the DOM content, do
* a simple tree copy for all references except the first
@@ -7460,13 +7482,6 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
xmlNodePtr nw = NULL, cur, firstChild = NULL;
/*
- * We are copying here, make sure there is no abuse
- */
- ctxt->sizeentcopy += ent->length + 5;
- if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
- return;
-
- /*
* when operating on a reader, the entities definitions
* are always owning the entities subtree.
if (ctxt->parseMode == XML_PARSE_READER)
@@ -7508,13 +7523,6 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
firstChild = NULL;
/*
- * We are copying here, make sure there is no abuse
- */
- ctxt->sizeentcopy += ent->length + 5;
- if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
- return;
-
- /*
* Copy the entity child list and make it the new
* entity child list. The goal is to make sure any
* ID or REF referenced will be the one from the
@@ -7536,8 +7544,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
firstChild = cur;
}
xmlAddChild((xmlNodePtr) ent, nw);
- xmlAddChild(ctxt->node, cur);
}
+ xmlAddChild(ctxt->node, cur);
if (cur == last)
break;
cur = next;
@@ -7583,7 +7591,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse ENTITY references declarations
+ * Parse an entitiy reference. Always consumes '&'.
*
* [68] EntityRef ::= '&' Name ';'
*
@@ -7641,11 +7649,6 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
}
/*
- * Increase the number of entity references parsed
- */
- ctxt->nbentities++;
-
- /*
* Ask first SAX for entity resolution, otherwise try the
* entities which may have stored in the parser context.
*/
@@ -7698,7 +7701,6 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
ctxt->sax->reference(ctxt->userData, name);
}
}
- xmlParserEntityCheck(ctxt, 0, ent, 0);
ctxt->valid = 0;
}
@@ -7729,13 +7731,16 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
* not contain a <.
*/
else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
- (ent != NULL) &&
(ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) {
- if (((ent->checked & 1) || (ent->checked == 0)) &&
- (ent->content != NULL) && (xmlStrchr(ent->content, '<'))) {
- xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
- "'<' in entity '%s' is not allowed in attributes values\n", name);
+ if ((ent->flags & XML_ENT_CHECKED_LT) == 0) {
+ if ((ent->content != NULL) && (xmlStrchr(ent->content, '<')))
+ ent->flags |= XML_ENT_CONTAINS_LT;
+ ent->flags |= XML_ENT_CHECKED_LT;
}
+ if (ent->flags & XML_ENT_CONTAINS_LT)
+ xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
+ "'<' in entity '%s' is not allowed in attributes "
+ "values\n", name);
}
/*
@@ -7838,11 +7843,6 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
}
/*
- * Increase the number of entity references parsed
- */
- ctxt->nbentities++;
-
- /*
* Ask first SAX for entity resolution, otherwise try the
* entities which may have stored in the parser context.
*/
@@ -7892,7 +7892,6 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
"Entity '%s' not defined\n",
name);
}
- xmlParserEntityCheck(ctxt, 0, ent, 0);
/* TODO ? check regressions ctxt->valid = 0; */
}
@@ -7923,12 +7922,16 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
* not contain a <.
*/
else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
- (ent != NULL) && (ent->content != NULL) &&
- (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
- (xmlStrchr(ent->content, '<'))) {
- xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
- "'<' in entity '%s' is not allowed in attributes values\n",
- name);
+ (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) {
+ if ((ent->flags & XML_ENT_CHECKED_LT) == 0) {
+ if ((ent->content != NULL) && (xmlStrchr(ent->content, '<')))
+ ent->flags |= XML_ENT_CONTAINS_LT;
+ ent->flags |= XML_ENT_CHECKED_LT;
+ }
+ if (ent->flags & XML_ENT_CONTAINS_LT)
+ xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
+ "'<' in entity '%s' is not allowed in attributes "
+ "values\n", name);
}
/*
@@ -7965,7 +7968,8 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse PEReference declarations
+ * Parse a parameter entity reference. Always consumes '%'.
+ *
* The entity content is handled directly by pushing it's content as
* a new input stream.
*
@@ -8016,11 +8020,6 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
NEXT;
/*
- * Increase the number of entity references parsed
- */
- ctxt->nbentities++;
-
- /*
* Request the entity from SAX
*/
if ((ctxt->sax != NULL) &&
@@ -8061,7 +8060,6 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
name, NULL);
ctxt->valid = 0;
}
- xmlParserEntityCheck(ctxt, 0, NULL, 0);
} else {
/*
* Internal checking in case the entity quest barfed
@@ -8074,9 +8072,8 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
} else {
xmlChar start[4];
xmlCharEncoding enc;
-
- if (xmlParserEntityCheck(ctxt, 0, entity, 0))
- return;
+ unsigned long parentConsumed;
+ xmlEntityPtr oldEnt;
if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
((ctxt->options & XML_PARSE_NOENT) == 0) &&
@@ -8087,12 +8084,33 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
(ctxt->validate == 0))
return;
+ if (entity->flags & XML_ENT_EXPANDING) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ xmlHaltParser(ctxt);
+ return;
+ }
+
+ /* Must be computed from old input before pushing new input. */
+ parentConsumed = ctxt->input->parentConsumed;
+ oldEnt = ctxt->input->entity;
+ if ((oldEnt == NULL) ||
+ ((oldEnt->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ ((oldEnt->flags & XML_ENT_PARSED) == 0))) {
+ xmlSaturatedAdd(&parentConsumed, ctxt->input->consumed);
+ xmlSaturatedAddSizeT(&parentConsumed,
+ ctxt->input->cur - ctxt->input->base);
+ }
+
input = xmlNewEntityInputStream(ctxt, entity);
if (xmlPushInput(ctxt, input) < 0) {
xmlFreeInputStream(input);
return;
}
+ entity->flags |= XML_ENT_EXPANDING;
+
+ input->parentConsumed = parentConsumed;
+
if (entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) {
/*
* Get the 4 first bytes and decode the charset
@@ -8211,6 +8229,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
}
if ((ctxt->input == input) && (ctxt->input->cur >= ctxt->input->end)) {
+ xmlSaturatedAdd(&ctxt->sizeentities, ctxt->input->consumed);
xmlPopInput(ctxt);
} else if (!IS_CHAR(c)) {
xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
@@ -8220,6 +8239,7 @@ xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
return(-1);
}
entity->content = buf->content;
+ entity->length = buf->use;
buf->content = NULL;
xmlBufferFree(buf);
@@ -8287,11 +8307,6 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
ptr++;
/*
- * Increase the number of entity references parsed
- */
- ctxt->nbentities++;
-
- /*
* Request the entity from SAX
*/
if ((ctxt->sax != NULL) &&
@@ -8328,7 +8343,6 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
name, NULL);
ctxt->valid = 0;
}
- xmlParserEntityCheck(ctxt, 0, NULL, 0);
} else {
/*
* Internal checking in case the entity quest barfed
@@ -8448,14 +8462,9 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
* PEReferences.
* Subsequence (markupdecl | PEReference | S)*
*/
+ SKIP_BLANKS;
while (((RAW != ']') || (ctxt->inputNr > baseInputNr)) &&
(ctxt->instate != XML_PARSER_EOF)) {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
-
- SKIP_BLANKS;
- xmlParseMarkupDecl(ctxt);
- xmlParsePEReference(ctxt);
/*
* Conditional sections are allowed from external entities included
@@ -8464,16 +8473,18 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
if ((ctxt->inputNr > 1) && (ctxt->input->filename != NULL) &&
(RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
xmlParseConditionalSections(ctxt);
- }
-
- if ((id == ctxt->input->id) && (cons == CUR_CONSUMED)) {
+ } else if ((RAW == '<') && ((NXT(1) == '!') || (NXT(1) == '?'))) {
+ xmlParseMarkupDecl(ctxt);
+ } else if (RAW == '%') {
+ xmlParsePEReference(ctxt);
+ } else {
xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
- "xmlParseInternalSubset: error detected in Markup declaration\n");
- if (ctxt->inputNr > baseInputNr)
- xmlPopInput(ctxt);
- else
- break;
- }
+ "xmlParseInternalSubset: error detected in"
+ " Markup declaration\n");
+ xmlHaltParser(ctxt);
+ return;
+ }
+ SKIP_BLANKS;
}
if (RAW == ']') {
NEXT;
@@ -8553,7 +8564,7 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) {
} else {
xmlFatalErrMsgStr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
"Specification mandates value for attribute %s\n", name);
- return(NULL);
+ return(name);
}
/*
@@ -8594,8 +8605,7 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) {
*
* DEPRECATED: Internal function, don't use.
*
- * parse a start of tag either for rule element or
- * EmptyElement. In both case we don't parse the tag closing chars.
+ * Parse a start tag. Always consumes '<'.
*
* [40] STag ::= '<' Name (S Attribute)* S? '>'
*
@@ -8649,11 +8659,13 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
while (((RAW != '>') &&
((RAW != '/') || (NXT(1) != '>')) &&
(IS_BYTE_CHAR(RAW))) && (ctxt->instate != XML_PARSER_EOF)) {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
-
attname = xmlParseAttribute(ctxt, &attvalue);
- if ((attname != NULL) && (attvalue != NULL)) {
+ if (attname == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlParseStartTag: problem parsing attributes\n");
+ break;
+ }
+ if (attvalue != NULL) {
/*
* [ WFC: Unique Att Spec ]
* No attribute name may appear more than once in the same
@@ -8715,12 +8727,6 @@ failed:
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"attributes construct error\n");
}
- if ((cons == CUR_CONSUMED) && (id == ctxt->input->id) &&
- (attname == NULL) && (attvalue == NULL)) {
- xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
- "xmlParseStartTag: problem parsing attributes\n");
- break;
- }
SHRINK;
GROW;
}
@@ -8751,7 +8757,7 @@ failed:
* @line: line of the start tag
* @nsNr: number of namespaces on the start tag
*
- * parse an end of tag
+ * Parse an end tag. Always consumes '</'.
*
* [42] ETag ::= '</' Name S? '>'
*
@@ -9250,6 +9256,8 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
NEXT;
SKIP_BLANKS;
val = xmlParseAttValueInternal(ctxt, len, alloc, normalize);
+ if (val == NULL)
+ return (NULL);
if (normalize) {
/*
* Sometimes a second normalisation pass for spaces is needed
@@ -9272,7 +9280,7 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
xmlFatalErrMsgStr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
"Specification mandates value for attribute %s\n",
name);
- return (NULL);
+ return (name);
}
if (*prefix == ctxt->str_xml) {
@@ -9317,8 +9325,8 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
* xmlParseStartTag2:
* @ctxt: an XML parser context
*
- * parse a start of tag either for rule element or
- * EmptyElement. In both case we don't parse the tag closing chars.
+ * Parse a start tag. Always consumes '<'.
+ *
* This routine is called when running SAX2 parsing
*
* [40] STag ::= '<' Name (S Attribute)* S? '>'
@@ -9398,13 +9406,16 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
while (((RAW != '>') &&
((RAW != '/') || (NXT(1) != '>')) &&
(IS_BYTE_CHAR(RAW))) && (ctxt->instate != XML_PARSER_EOF)) {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
int len = -1, alloc = 0;
attname = xmlParseAttribute2(ctxt, prefix, localname,
&aprefix, &attvalue, &len, &alloc);
- if ((attname == NULL) || (attvalue == NULL))
+ if (attname == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlParseStartTag: problem parsing attributes\n");
+ break;
+ }
+ if (attvalue == NULL)
goto next_attr;
if (len < 0) len = xmlStrlen(attvalue);
@@ -9580,12 +9591,6 @@ next_attr:
"attributes construct error\n");
break;
}
- if ((cons == CUR_CONSUMED) && (id == ctxt->input->id) &&
- (attname == NULL) && (attvalue == NULL)) {
- xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
- "xmlParseStartTag: problem parsing attributes\n");
- break;
- }
GROW;
}
@@ -9603,10 +9608,10 @@ next_attr:
* Arithmetic on dangling pointers is technically undefined
* behavior, but well...
*/
- ptrdiff_t offset = ctxt->input->base - atts[i+2];
+ const xmlChar *old = atts[i+2];
atts[i+2] = NULL; /* Reset repurposed namespace URI */
- atts[i+3] += offset; /* value */
- atts[i+4] += offset; /* valuend */
+ atts[i+3] = ctxt->input->base + (atts[i+3] - old); /* value */
+ atts[i+4] = ctxt->input->base + (atts[i+4] - old); /* valuend */
}
}
@@ -9650,7 +9655,7 @@ next_attr:
if (j <= nbNs) continue;
nsname = xmlGetNamespace(ctxt, attname);
- if (nsname != defaults->values[2]) {
+ if (nsname != defaults->values[5 * i + 2]) {
if (nsPush(ctxt, attname,
defaults->values[5 * i + 2]) > 0)
nbNs++;
@@ -9774,7 +9779,7 @@ done:
* @line: line of the start tag
* @nsNr: number of namespaces on the start tag
*
- * parse an end of tag
+ * Parse an end tag. Always consumes '</'.
*
* [42] ETag ::= '</' Name S? '>'
*
@@ -9843,7 +9848,7 @@ xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlStartTag *tag) {
*
* DEPRECATED: Internal function, don't use.
*
- * Parse escaped pure raw content.
+ * Parse escaped pure raw content. Always consumes '<!['.
*
* [18] CDSect ::= CDStart CData CDEnd
*
@@ -9866,32 +9871,32 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
XML_MAX_HUGE_LENGTH :
XML_MAX_TEXT_LENGTH;
- /* Check 2.6.0 was NXT(0) not RAW */
- if (CMP9(CUR_PTR, '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '[')) {
- SKIP(9);
- } else
+ if ((CUR != '<') || (NXT(1) != '!') || (NXT(2) != '['))
return;
+ SKIP(3);
+
+ if (!CMP6(CUR_PTR, 'C', 'D', 'A', 'T', 'A', '['))
+ return;
+ SKIP(6);
ctxt->instate = XML_PARSER_CDATA_SECTION;
r = CUR_CHAR(rl);
if (!IS_CHAR(r)) {
xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
- ctxt->instate = XML_PARSER_CONTENT;
- return;
+ goto out;
}
NEXTL(rl);
s = CUR_CHAR(sl);
if (!IS_CHAR(s)) {
xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
- ctxt->instate = XML_PARSER_CONTENT;
- return;
+ goto out;
}
NEXTL(sl);
cur = CUR_CHAR(l);
buf = (xmlChar *) xmlMallocAtomic(size);
if (buf == NULL) {
xmlErrMemory(ctxt, NULL);
- return;
+ goto out;
}
while (IS_CHAR(cur) &&
((r != ']') || (s != ']') || (cur != '>'))) {
@@ -9900,9 +9905,8 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
tmp = (xmlChar *) xmlRealloc(buf, size * 2);
if (tmp == NULL) {
- xmlFree(buf);
xmlErrMemory(ctxt, NULL);
- return;
+ goto out;
}
buf = tmp;
size *= 2;
@@ -9917,8 +9921,7 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
SHRINK;
GROW;
if (ctxt->instate == XML_PARSER_EOF) {
- xmlFree(buf);
- return;
+ goto out;
}
count = 0;
}
@@ -9927,17 +9930,14 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
if (len > maxLength) {
xmlFatalErrMsg(ctxt, XML_ERR_CDATA_NOT_FINISHED,
"CData section too big found\n");
- xmlFree(buf);
- return;
+ goto out;
}
}
buf[len] = 0;
- ctxt->instate = XML_PARSER_CONTENT;
if (cur != '>') {
xmlFatalErrMsgStr(ctxt, XML_ERR_CDATA_NOT_FINISHED,
"CData section not finished\n%.50s\n", buf);
- xmlFree(buf);
- return;
+ goto out;
}
NEXTL(l);
@@ -9950,6 +9950,10 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) {
else if (ctxt->sax->characters != NULL)
ctxt->sax->characters(ctxt->userData, buf, len);
}
+
+out:
+ if (ctxt->instate != XML_PARSER_EOF)
+ ctxt->instate = XML_PARSER_CONTENT;
xmlFree(buf);
}
@@ -9968,8 +9972,6 @@ xmlParseContentInternal(xmlParserCtxtPtr ctxt) {
GROW;
while ((RAW != 0) &&
(ctxt->instate != XML_PARSER_EOF)) {
- int id = ctxt->input->id;
- unsigned long cons = CUR_CONSUMED;
const xmlChar *cur = ctxt->input->cur;
/*
@@ -10027,13 +10029,6 @@ xmlParseContentInternal(xmlParserCtxtPtr ctxt) {
GROW;
SHRINK;
-
- if ((cons == CUR_CONSUMED) && (id == ctxt->input->id)) {
- xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
- "detected an error in element content\n");
- xmlHaltParser(ctxt);
- break;
- }
}
}
@@ -10104,6 +10099,8 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
*
* Parse the start of an XML element. Returns -1 in case of error, 0 if an
* opening tag was parsed, 1 if an empty element was parsed.
+ *
+ * Always consumes '<'.
*/
static int
xmlParseElementStart(xmlParserCtxtPtr ctxt) {
@@ -10232,15 +10229,18 @@ xmlParseElementStart(xmlParserCtxtPtr ctxt) {
* xmlParseElementEnd:
* @ctxt: an XML parser context
*
- * Parse the end of an XML element.
+ * Parse the end of an XML element. Always consumes '</'.
*/
static void
xmlParseElementEnd(xmlParserCtxtPtr ctxt) {
xmlParserNodeInfo node_info;
xmlNodePtr ret = ctxt->node;
- if (ctxt->nameNr <= 0)
+ if (ctxt->nameNr <= 0) {
+ if ((RAW == '<') && (NXT(1) == '/'))
+ SKIP(2);
return;
+ }
/*
* parse the end of tag: '</' should be here.
@@ -11098,142 +11098,231 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
************************************************************************/
/**
- * xmlParseLookupSequence:
+ * xmlParseLookupChar:
* @ctxt: an XML parser context
- * @first: the first char to lookup
- * @next: the next char to lookup or zero
- * @third: the next char to lookup or zero
+ * @c: character
*
- * Try to find if a sequence (first, next, third) or just (first next) or
- * (first) is available in the input stream.
- * This function has a side effect of (possibly) incrementing ctxt->checkIndex
- * to avoid rescanning sequences of bytes, it DOES change the state of the
- * parser, do not use liberally.
- *
- * Returns the index to the current parsing point if the full sequence
- * is available, -1 otherwise.
+ * Check whether the input buffer contains a character.
*/
static int
-xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first,
- xmlChar next, xmlChar third) {
- int base, len;
- xmlParserInputPtr in;
- const xmlChar *buf;
-
- in = ctxt->input;
- if (in == NULL) return(-1);
- base = in->cur - in->base;
- if (base < 0) return(-1);
- if (ctxt->checkIndex > base)
- base = ctxt->checkIndex;
- if (in->buf == NULL) {
- buf = in->base;
- len = in->length;
+xmlParseLookupChar(xmlParserCtxtPtr ctxt, int c) {
+ const xmlChar *cur;
+
+ if (ctxt->checkIndex == 0) {
+ cur = ctxt->input->cur + 1;
} else {
- buf = xmlBufContent(in->buf->buffer);
- len = xmlBufUse(in->buf->buffer);
- }
- /* take into account the sequence length */
- if (third) len -= 2;
- else if (next) len --;
- for (;base < len;base++) {
- if (buf[base] == first) {
- if (third != 0) {
- if ((buf[base + 1] != next) ||
- (buf[base + 2] != third)) continue;
- } else if (next != 0) {
- if (buf[base + 1] != next) continue;
- }
- ctxt->checkIndex = 0;
-#ifdef DEBUG_PUSH
- if (next == 0)
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c' found at %d\n",
- first, base);
- else if (third == 0)
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c%c' found at %d\n",
- first, next, base);
- else
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c%c%c' found at %d\n",
- first, next, third, base);
-#endif
- return(base - (in->cur - in->base));
- }
+ cur = ctxt->input->cur + ctxt->checkIndex;
+ }
+
+ if (memchr(cur, c, ctxt->input->end - cur) == NULL) {
+ ctxt->checkIndex = ctxt->input->end - ctxt->input->cur;
+ return(0);
+ } else {
+ ctxt->checkIndex = 0;
+ return(1);
}
- ctxt->checkIndex = base;
-#ifdef DEBUG_PUSH
- if (next == 0)
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c' failed\n", first);
- else if (third == 0)
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c%c' failed\n", first, next);
- else
- xmlGenericError(xmlGenericErrorContext,
- "PP: lookup '%c%c%c' failed\n", first, next, third);
-#endif
- return(-1);
}
/**
- * xmlParseGetLasts:
+ * xmlParseLookupString:
* @ctxt: an XML parser context
- * @lastlt: pointer to store the last '<' from the input
- * @lastgt: pointer to store the last '>' from the input
+ * @startDelta: delta to apply at the start
+ * @str: string
+ * @strLen: length of string
*
- * Lookup the last < and > in the current chunk
+ * Check whether the input buffer contains a string.
*/
-static void
-xmlParseGetLasts(xmlParserCtxtPtr ctxt, const xmlChar **lastlt,
- const xmlChar **lastgt) {
- const xmlChar *tmp;
+static const xmlChar *
+xmlParseLookupString(xmlParserCtxtPtr ctxt, size_t startDelta,
+ const char *str, size_t strLen) {
+ const xmlChar *cur, *term;
- if ((ctxt == NULL) || (lastlt == NULL) || (lastgt == NULL)) {
- xmlGenericError(xmlGenericErrorContext,
- "Internal error: xmlParseGetLasts\n");
- return;
+ if (ctxt->checkIndex == 0) {
+ cur = ctxt->input->cur + startDelta;
+ } else {
+ cur = ctxt->input->cur + ctxt->checkIndex;
}
- if ((ctxt->progressive != 0) && (ctxt->inputNr == 1)) {
- tmp = ctxt->input->end;
- tmp--;
- while ((tmp >= ctxt->input->base) && (*tmp != '<')) tmp--;
- if (tmp < ctxt->input->base) {
- *lastlt = NULL;
- *lastgt = NULL;
- } else {
- *lastlt = tmp;
- tmp++;
- while ((tmp < ctxt->input->end) && (*tmp != '>')) {
- if (*tmp == '\'') {
- tmp++;
- while ((tmp < ctxt->input->end) && (*tmp != '\'')) tmp++;
- if (tmp < ctxt->input->end) tmp++;
- } else if (*tmp == '"') {
- tmp++;
- while ((tmp < ctxt->input->end) && (*tmp != '"')) tmp++;
- if (tmp < ctxt->input->end) tmp++;
- } else
- tmp++;
- }
- if (tmp < ctxt->input->end)
- *lastgt = tmp;
- else {
- tmp = *lastlt;
- tmp--;
- while ((tmp >= ctxt->input->base) && (*tmp != '>')) tmp--;
- if (tmp >= ctxt->input->base)
- *lastgt = tmp;
- else
- *lastgt = NULL;
- }
- }
+
+ term = BAD_CAST strstr((const char *) cur, str);
+ if (term == NULL) {
+ const xmlChar *end = ctxt->input->end;
+
+ /* Rescan (strLen - 1) characters. */
+ if ((size_t) (end - cur) < strLen)
+ end = cur;
+ else
+ end -= strLen - 1;
+ ctxt->checkIndex = end - ctxt->input->cur;
+ } else {
+ ctxt->checkIndex = 0;
+ }
+
+ return(term);
+}
+
+/**
+ * xmlParseLookupCharData:
+ * @ctxt: an XML parser context
+ *
+ * Check whether the input buffer contains terminated char data.
+ */
+static int
+xmlParseLookupCharData(xmlParserCtxtPtr ctxt) {
+ const xmlChar *cur = ctxt->input->cur + ctxt->checkIndex;
+ const xmlChar *end = ctxt->input->end;
+
+ while (cur < end) {
+ if ((*cur == '<') || (*cur == '&')) {
+ ctxt->checkIndex = 0;
+ return(1);
+ }
+ cur++;
+ }
+
+ ctxt->checkIndex = cur - ctxt->input->cur;
+ return(0);
+}
+
+/**
+ * xmlParseLookupGt:
+ * @ctxt: an XML parser context
+ *
+ * Check whether there's enough data in the input buffer to finish parsing
+ * a start tag. This has to take quotes into account.
+ */
+static int
+xmlParseLookupGt(xmlParserCtxtPtr ctxt) {
+ const xmlChar *cur;
+ const xmlChar *end = ctxt->input->end;
+ int state = ctxt->endCheckState;
+
+ if (ctxt->checkIndex == 0)
+ cur = ctxt->input->cur + 1;
+ else
+ cur = ctxt->input->cur + ctxt->checkIndex;
+
+ while (cur < end) {
+ if (state) {
+ if (*cur == state)
+ state = 0;
+ } else if (*cur == '\'' || *cur == '"') {
+ state = *cur;
+ } else if (*cur == '>') {
+ ctxt->checkIndex = 0;
+ ctxt->endCheckState = 0;
+ return(1);
+ }
+ cur++;
+ }
+
+ ctxt->checkIndex = cur - ctxt->input->cur;
+ ctxt->endCheckState = state;
+ return(0);
+}
+
+/**
+ * xmlParseLookupInternalSubset:
+ * @ctxt: an XML parser context
+ *
+ * Check whether there's enough data in the input buffer to finish parsing
+ * the internal subset.
+ */
+static int
+xmlParseLookupInternalSubset(xmlParserCtxtPtr ctxt) {
+ /*
+ * Sorry, but progressive parsing of the internal subset is not
+ * supported. We first check that the full content of the internal
+ * subset is available and parsing is launched only at that point.
+ * Internal subset ends with "']' S? '>'" in an unescaped section and
+ * not in a ']]>' sequence which are conditional sections.
+ */
+ const xmlChar *cur, *start;
+ const xmlChar *end = ctxt->input->end;
+ int state = ctxt->endCheckState;
+
+ if (ctxt->checkIndex == 0) {
+ cur = ctxt->input->cur + 1;
} else {
- *lastlt = NULL;
- *lastgt = NULL;
+ cur = ctxt->input->cur + ctxt->checkIndex;
+ }
+ start = cur;
+
+ while (cur < end) {
+ if (state == '-') {
+ if ((*cur == '-') &&
+ (cur[1] == '-') &&
+ (cur[2] == '>')) {
+ state = 0;
+ cur += 3;
+ start = cur;
+ continue;
+ }
+ }
+ else if (state == ']') {
+ if (*cur == '>') {
+ ctxt->checkIndex = 0;
+ ctxt->endCheckState = 0;
+ return(1);
+ }
+ if (IS_BLANK_CH(*cur)) {
+ state = ' ';
+ } else if (*cur != ']') {
+ state = 0;
+ start = cur;
+ continue;
+ }
+ }
+ else if (state == ' ') {
+ if (*cur == '>') {
+ ctxt->checkIndex = 0;
+ ctxt->endCheckState = 0;
+ return(1);
+ }
+ if (!IS_BLANK_CH(*cur)) {
+ state = 0;
+ start = cur;
+ continue;
+ }
+ }
+ else if (state != 0) {
+ if (*cur == state) {
+ state = 0;
+ start = cur + 1;
+ }
+ }
+ else if (*cur == '<') {
+ if ((cur[1] == '!') &&
+ (cur[2] == '-') &&
+ (cur[3] == '-')) {
+ state = '-';
+ cur += 4;
+ /* Don't treat <!--> as comment */
+ start = cur;
+ continue;
+ }
+ }
+ else if ((*cur == '"') || (*cur == '\'') || (*cur == ']')) {
+ state = *cur;
+ }
+
+ cur++;
+ }
+
+ /*
+ * Rescan the three last characters to detect "<!--" and "-->"
+ * split across chunks.
+ */
+ if ((state == 0) || (state == '-')) {
+ if (cur - start < 3)
+ cur = start;
+ else
+ cur -= 3;
}
+ ctxt->checkIndex = cur - ctxt->input->cur;
+ ctxt->endCheckState = state;
+ return(0);
}
+
/**
* xmlCheckCdataPush:
* @cur: pointer to the block of characters
@@ -11316,7 +11405,6 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
int ret = 0;
int avail, tlen;
xmlChar cur, next;
- const xmlChar *lastlt, *lastgt;
if (ctxt->input == NULL)
return(0);
@@ -11376,10 +11464,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
if ((ctxt->input != NULL) &&
(ctxt->input->cur - ctxt->input->base > 4096)) {
- xmlSHRINK(ctxt);
- ctxt->checkIndex = 0;
+ xmlParserInputShrink(ctxt->input);
}
- xmlParseGetLasts(ctxt, &lastlt, &lastgt);
while (ctxt->instate != XML_PARSER_EOF) {
if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
@@ -11466,10 +11552,10 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
}
if ((cur == '<') && (next == '?')) {
/* PI or XML decl */
- if (avail < 5) return(ret);
+ if (avail < 5) goto done;
if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0))
- return(ret);
+ (!xmlParseLookupString(ctxt, 2, "?>", 2)))
+ goto done;
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
ctxt->sax->setDocumentLocator(ctxt->userData,
&xmlDefaultSAXLocator);
@@ -11550,15 +11636,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
ctxt->sax->endDocument(ctxt->userData);
goto done;
}
- if (!terminate) {
- if (ctxt->progressive) {
- /* > can be found unescaped in attribute values */
- if ((lastgt == NULL) || (ctxt->input->cur >= lastgt))
- goto done;
- } else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) {
- goto done;
- }
- }
+ if ((!terminate) && (!xmlParseLookupGt(ctxt)))
+ goto done;
if (ctxt->spaceNr == 0)
spacePush(ctxt, -1);
else if (*ctxt->space == -2)
@@ -11623,7 +11702,6 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
} else {
ctxt->instate = XML_PARSER_CONTENT;
}
- ctxt->progressive = 1;
break;
}
if (RAW == '>') {
@@ -11638,51 +11716,34 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
nameNsPush(ctxt, name, prefix, URI, line, ctxt->nsNr - nsNr);
ctxt->instate = XML_PARSER_CONTENT;
- ctxt->progressive = 1;
break;
}
case XML_PARSER_CONTENT: {
- int id;
- unsigned long cons;
if ((avail < 2) && (ctxt->inputNr == 1))
goto done;
cur = ctxt->input->cur[0];
next = ctxt->input->cur[1];
- id = ctxt->input->id;
- cons = CUR_CONSUMED;
if ((cur == '<') && (next == '/')) {
ctxt->instate = XML_PARSER_END_TAG;
break;
} else if ((cur == '<') && (next == '?')) {
if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
- ctxt->progressive = XML_PARSER_PI;
+ (!xmlParseLookupString(ctxt, 2, "?>", 2)))
goto done;
- }
xmlParsePI(ctxt);
ctxt->instate = XML_PARSER_CONTENT;
- ctxt->progressive = 1;
} else if ((cur == '<') && (next != '!')) {
ctxt->instate = XML_PARSER_START_TAG;
break;
} else if ((cur == '<') && (next == '!') &&
(ctxt->input->cur[2] == '-') &&
(ctxt->input->cur[3] == '-')) {
- int term;
-
- if (avail < 4)
- goto done;
- ctxt->input->cur += 4;
- term = xmlParseLookupSequence(ctxt, '-', '-', '>');
- ctxt->input->cur -= 4;
- if ((!terminate) && (term < 0)) {
- ctxt->progressive = XML_PARSER_COMMENT;
+ if ((!terminate) &&
+ (!xmlParseLookupString(ctxt, 4, "-->", 3)))
goto done;
- }
xmlParseComment(ctxt);
ctxt->instate = XML_PARSER_CONTENT;
- ctxt->progressive = 1;
} else if ((cur == '<') && (ctxt->input->cur[1] == '!') &&
(ctxt->input->cur[2] == '[') &&
(ctxt->input->cur[3] == 'C') &&
@@ -11697,9 +11758,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
} else if ((cur == '<') && (next == '!') &&
(avail < 9)) {
goto done;
+ } else if (cur == '<') {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n");
+ SKIP(1);
} else if (cur == '&') {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, ';', 0, 0) < 0))
+ if ((!terminate) && (!xmlParseLookupChar(ctxt, ';')))
goto done;
xmlParseReference(ctxt);
} else {
@@ -11717,40 +11781,19 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
*/
if ((ctxt->inputNr == 1) &&
(avail < XML_PARSER_BIG_BUFFER_SIZE)) {
- if (!terminate) {
- if (ctxt->progressive) {
- if ((lastlt == NULL) ||
- (ctxt->input->cur > lastlt))
- goto done;
- } else if (xmlParseLookupSequence(ctxt,
- '<', 0, 0) < 0) {
- goto done;
- }
- }
+ if ((!terminate) && (!xmlParseLookupCharData(ctxt)))
+ goto done;
}
- ctxt->checkIndex = 0;
+ ctxt->checkIndex = 0;
xmlParseCharData(ctxt, 0);
}
- if ((cons == CUR_CONSUMED) && (id == ctxt->input->id)) {
- xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
- "detected an error in element content\n");
- xmlHaltParser(ctxt);
- break;
- }
break;
}
case XML_PARSER_END_TAG:
if (avail < 2)
goto done;
- if (!terminate) {
- if (ctxt->progressive) {
- /* > can be found unescaped in attribute values */
- if ((lastgt == NULL) || (ctxt->input->cur >= lastgt))
- goto done;
- } else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) {
- goto done;
- }
- }
+ if ((!terminate) && (!xmlParseLookupChar(ctxt, '>')))
+ goto done;
if (ctxt->sax2) {
xmlParseEndTag2(ctxt, &ctxt->pushTab[ctxt->nameNr - 1]);
nameNsPop(ctxt);
@@ -11772,35 +11815,51 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
* The Push mode need to have the SAX callback for
* cdataBlock merge back contiguous callbacks.
*/
- int base;
-
- base = xmlParseLookupSequence(ctxt, ']', ']', '>');
- if (base < 0) {
- if (avail >= XML_PARSER_BIG_BUFFER_SIZE + 2) {
- int tmp;
-
- tmp = xmlCheckCdataPush(ctxt->input->cur,
- XML_PARSER_BIG_BUFFER_SIZE, 0);
- if (tmp < 0) {
- tmp = -tmp;
- ctxt->input->cur += tmp;
- goto encoding_error;
- }
- if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
- if (ctxt->sax->cdataBlock != NULL)
- ctxt->sax->cdataBlock(ctxt->userData,
- ctxt->input->cur, tmp);
- else if (ctxt->sax->characters != NULL)
- ctxt->sax->characters(ctxt->userData,
- ctxt->input->cur, tmp);
- }
- if (ctxt->instate == XML_PARSER_EOF)
- goto done;
- SKIPL(tmp);
- ctxt->checkIndex = 0;
- }
- goto done;
+ const xmlChar *term;
+
+ if (terminate) {
+ /*
+ * Don't call xmlParseLookupString. If 'terminate'
+ * is set, checkIndex is invalid.
+ */
+ term = BAD_CAST strstr((const char *) ctxt->input->cur,
+ "]]>");
+ } else {
+ term = xmlParseLookupString(ctxt, 0, "]]>", 3);
+ }
+
+ if (term == NULL) {
+ int tmp, size;
+
+ if (terminate) {
+ /* Unfinished CDATA section */
+ size = ctxt->input->end - ctxt->input->cur;
+ } else {
+ if (avail < XML_PARSER_BIG_BUFFER_SIZE + 2)
+ goto done;
+ ctxt->checkIndex = 0;
+ /* XXX: Why don't we pass the full buffer? */
+ size = XML_PARSER_BIG_BUFFER_SIZE;
+ }
+ tmp = xmlCheckCdataPush(ctxt->input->cur, size, 0);
+ if (tmp <= 0) {
+ tmp = -tmp;
+ ctxt->input->cur += tmp;
+ goto encoding_error;
+ }
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (ctxt->sax->cdataBlock != NULL)
+ ctxt->sax->cdataBlock(ctxt->userData,
+ ctxt->input->cur, tmp);
+ else if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ ctxt->input->cur, tmp);
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ SKIPL(tmp);
} else {
+ int base = term - CUR_PTR;
int tmp;
tmp = xmlCheckCdataPush(ctxt->input->cur, base, 1);
@@ -11834,7 +11893,6 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
if (ctxt->instate == XML_PARSER_EOF)
goto done;
SKIPL(base + 3);
- ctxt->checkIndex = 0;
ctxt->instate = XML_PARSER_CONTENT;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
@@ -11844,6 +11902,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
break;
}
case XML_PARSER_MISC:
+ case XML_PARSER_PROLOG:
+ case XML_PARSER_EPILOG:
SKIP_BLANKS;
if (ctxt->input->buf == NULL)
avail = ctxt->input->length -
@@ -11857,10 +11917,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
next = ctxt->input->cur[1];
if ((cur == '<') && (next == '?')) {
if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
- ctxt->progressive = XML_PARSER_PI;
+ (!xmlParseLookupString(ctxt, 2, "?>", 2)))
goto done;
- }
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
"PP: Parsing PI\n");
@@ -11868,17 +11926,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
xmlParsePI(ctxt);
if (ctxt->instate == XML_PARSER_EOF)
goto done;
- ctxt->instate = XML_PARSER_MISC;
- ctxt->progressive = 1;
- ctxt->checkIndex = 0;
} else if ((cur == '<') && (next == '!') &&
(ctxt->input->cur[2] == '-') &&
(ctxt->input->cur[3] == '-')) {
if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
- ctxt->progressive = XML_PARSER_COMMENT;
+ (!xmlParseLookupString(ctxt, 4, "-->", 3)))
goto done;
- }
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
"PP: Parsing Comment\n");
@@ -11886,10 +11939,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
xmlParseComment(ctxt);
if (ctxt->instate == XML_PARSER_EOF)
goto done;
- ctxt->instate = XML_PARSER_MISC;
- ctxt->progressive = 1;
- ctxt->checkIndex = 0;
- } else if ((cur == '<') && (next == '!') &&
+ } else if ((ctxt->instate == XML_PARSER_MISC) &&
+ (cur == '<') && (next == '!') &&
(ctxt->input->cur[2] == 'D') &&
(ctxt->input->cur[3] == 'O') &&
(ctxt->input->cur[4] == 'C') &&
@@ -11897,18 +11948,13 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
(ctxt->input->cur[6] == 'Y') &&
(ctxt->input->cur[7] == 'P') &&
(ctxt->input->cur[8] == 'E')) {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0)) {
- ctxt->progressive = XML_PARSER_DTD;
- goto done;
- }
+ if ((!terminate) && (!xmlParseLookupGt(ctxt)))
+ goto done;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
"PP: Parsing internal subset\n");
#endif
ctxt->inSubset = 1;
- ctxt->progressive = 0;
- ctxt->checkIndex = 0;
xmlParseDocTypeDecl(ctxt);
if (ctxt->instate == XML_PARSER_EOF)
goto done;
@@ -11937,120 +11983,10 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
#endif
}
} else if ((cur == '<') && (next == '!') &&
- (avail < 9)) {
+ (avail <
+ (ctxt->instate == XML_PARSER_MISC ? 9 : 4))) {
goto done;
- } else {
- ctxt->instate = XML_PARSER_START_TAG;
- ctxt->progressive = XML_PARSER_START_TAG;
- xmlParseGetLasts(ctxt, &lastlt, &lastgt);
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: entering START_TAG\n");
-#endif
- }
- break;
- case XML_PARSER_PROLOG:
- SKIP_BLANKS;
- if (ctxt->input->buf == NULL)
- avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
- else
- avail = xmlBufUse(ctxt->input->buf->buffer) -
- (ctxt->input->cur - ctxt->input->base);
- if (avail < 2)
- goto done;
- cur = ctxt->input->cur[0];
- next = ctxt->input->cur[1];
- if ((cur == '<') && (next == '?')) {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
- ctxt->progressive = XML_PARSER_PI;
- goto done;
- }
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: Parsing PI\n");
-#endif
- xmlParsePI(ctxt);
- if (ctxt->instate == XML_PARSER_EOF)
- goto done;
- ctxt->instate = XML_PARSER_PROLOG;
- ctxt->progressive = 1;
- } else if ((cur == '<') && (next == '!') &&
- (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
- ctxt->progressive = XML_PARSER_COMMENT;
- goto done;
- }
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: Parsing Comment\n");
-#endif
- xmlParseComment(ctxt);
- if (ctxt->instate == XML_PARSER_EOF)
- goto done;
- ctxt->instate = XML_PARSER_PROLOG;
- ctxt->progressive = 1;
- } else if ((cur == '<') && (next == '!') &&
- (avail < 4)) {
- goto done;
- } else {
- ctxt->instate = XML_PARSER_START_TAG;
- if (ctxt->progressive == 0)
- ctxt->progressive = XML_PARSER_START_TAG;
- xmlParseGetLasts(ctxt, &lastlt, &lastgt);
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: entering START_TAG\n");
-#endif
- }
- break;
- case XML_PARSER_EPILOG:
- SKIP_BLANKS;
- if (ctxt->input->buf == NULL)
- avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
- else
- avail = xmlBufUse(ctxt->input->buf->buffer) -
- (ctxt->input->cur - ctxt->input->base);
- if (avail < 2)
- goto done;
- cur = ctxt->input->cur[0];
- next = ctxt->input->cur[1];
- if ((cur == '<') && (next == '?')) {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
- ctxt->progressive = XML_PARSER_PI;
- goto done;
- }
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: Parsing PI\n");
-#endif
- xmlParsePI(ctxt);
- if (ctxt->instate == XML_PARSER_EOF)
- goto done;
- ctxt->instate = XML_PARSER_EPILOG;
- ctxt->progressive = 1;
- } else if ((cur == '<') && (next == '!') &&
- (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) {
- if ((!terminate) &&
- (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
- ctxt->progressive = XML_PARSER_COMMENT;
- goto done;
- }
-#ifdef DEBUG_PUSH
- xmlGenericError(xmlGenericErrorContext,
- "PP: Parsing Comment\n");
-#endif
- xmlParseComment(ctxt);
- if (ctxt->instate == XML_PARSER_EOF)
- goto done;
- ctxt->instate = XML_PARSER_EPILOG;
- ctxt->progressive = 1;
- } else if ((cur == '<') && (next == '!') &&
- (avail < 4)) {
- goto done;
- } else {
+ } else if (ctxt->instate == XML_PARSER_EPILOG) {
xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
xmlHaltParser(ctxt);
#ifdef DEBUG_PUSH
@@ -12060,120 +11996,17 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
ctxt->sax->endDocument(ctxt->userData);
goto done;
- }
- break;
- case XML_PARSER_DTD: {
- /*
- * Sorry but progressive parsing of the internal subset
- * is not expected to be supported. We first check that
- * the full content of the internal subset is available and
- * the parsing is launched only at that point.
- * Internal subset ends up with "']' S? '>'" in an unescaped
- * section and not in a ']]>' sequence which are conditional
- * sections (whoever argued to keep that crap in XML deserve
- * a place in hell !).
- */
- int base, i;
- xmlChar *buf;
- xmlChar quote = 0;
- size_t use;
-
- base = ctxt->input->cur - ctxt->input->base;
- if (base < 0) return(0);
- if (ctxt->checkIndex > base)
- base = ctxt->checkIndex;
- buf = xmlBufContent(ctxt->input->buf->buffer);
- use = xmlBufUse(ctxt->input->buf->buffer);
- for (;(unsigned int) base < use; base++) {
- if (quote != 0) {
- if (buf[base] == quote)
- quote = 0;
- continue;
- }
- if ((quote == 0) && (buf[base] == '<')) {
- int found = 0;
- /* special handling of comments */
- if (((unsigned int) base + 4 < use) &&
- (buf[base + 1] == '!') &&
- (buf[base + 2] == '-') &&
- (buf[base + 3] == '-')) {
- for (;(unsigned int) base + 3 < use; base++) {
- if ((buf[base] == '-') &&
- (buf[base + 1] == '-') &&
- (buf[base + 2] == '>')) {
- found = 1;
- base += 2;
- break;
- }
- }
- if (!found) {
-#if 0
- fprintf(stderr, "unfinished comment\n");
-#endif
- break; /* for */
- }
- continue;
- }
- }
- if (buf[base] == '"') {
- quote = '"';
- continue;
- }
- if (buf[base] == '\'') {
- quote = '\'';
- continue;
- }
- if (buf[base] == ']') {
-#if 0
- fprintf(stderr, "%c%c%c%c: ", buf[base],
- buf[base + 1], buf[base + 2], buf[base + 3]);
-#endif
- if ((unsigned int) base +1 >= use)
- break;
- if (buf[base + 1] == ']') {
- /* conditional crap, skip both ']' ! */
- base++;
- continue;
- }
- for (i = 1; (unsigned int) base + i < use; i++) {
- if (buf[base + i] == '>') {
-#if 0
- fprintf(stderr, "found\n");
-#endif
- goto found_end_int_subset;
- }
- if (!IS_BLANK_CH(buf[base + i])) {
-#if 0
- fprintf(stderr, "not found\n");
-#endif
- goto not_end_of_int_subset;
- }
- }
-#if 0
- fprintf(stderr, "end of stream\n");
-#endif
- break;
-
- }
-not_end_of_int_subset:
- continue; /* for */
- }
- /*
- * We didn't found the end of the Internal subset
- */
- if (quote == 0)
- ctxt->checkIndex = base;
- else
- ctxt->checkIndex = 0;
+ } else {
+ ctxt->instate = XML_PARSER_START_TAG;
#ifdef DEBUG_PUSH
- if (next == 0)
xmlGenericError(xmlGenericErrorContext,
- "PP: lookup of int subset end filed\n");
+ "PP: entering START_TAG\n");
#endif
- goto done;
-
-found_end_int_subset:
- ctxt->checkIndex = 0;
+ }
+ break;
+ case XML_PARSER_DTD: {
+ if ((!terminate) && (!xmlParseLookupInternalSubset(ctxt)))
+ goto done;
xmlParseInternalSubset(ctxt);
if (ctxt->instate == XML_PARSER_EOF)
goto done;
@@ -12187,7 +12020,6 @@ found_end_int_subset:
if (ctxt->instate == XML_PARSER_EOF)
goto done;
ctxt->instate = XML_PARSER_PROLOG;
- ctxt->checkIndex = 0;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
"PP: entering PROLOG\n");
@@ -12274,7 +12106,11 @@ done:
#endif
return(ret);
encoding_error:
- {
+ if (ctxt->input->end - ctxt->input->cur < 4) {
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n",
+ NULL, NULL);
+ } else {
char buffer[150];
snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
@@ -12288,55 +12124,6 @@ encoding_error:
}
/**
- * xmlParseCheckTransition:
- * @ctxt: an XML parser context
- * @chunk: a char array
- * @size: the size in byte of the chunk
- *
- * Check depending on the current parser state if the chunk given must be
- * processed immediately or one need more data to advance on parsing.
- *
- * Returns -1 in case of error, 0 if the push is not needed and 1 if needed
- */
-static int
-xmlParseCheckTransition(xmlParserCtxtPtr ctxt, const char *chunk, int size) {
- if ((ctxt == NULL) || (chunk == NULL) || (size < 0))
- return(-1);
- if (ctxt->instate == XML_PARSER_START_TAG) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- if (ctxt->progressive == XML_PARSER_COMMENT) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- if (ctxt->instate == XML_PARSER_CDATA_SECTION) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- if (ctxt->progressive == XML_PARSER_PI) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- if (ctxt->instate == XML_PARSER_END_TAG) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- if ((ctxt->progressive == XML_PARSER_DTD) ||
- (ctxt->instate == XML_PARSER_DTD)) {
- if (memchr(chunk, '>', size) != NULL)
- return(1);
- return(0);
- }
- return(1);
-}
-
-/**
* xmlParseChunk:
* @ctxt: an XML parser context
* @chunk: an char array
@@ -12352,8 +12139,6 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
int terminate) {
int end_in_lf = 0;
int remain = 0;
- size_t old_avail = 0;
- size_t avail = 0;
if (ctxt == NULL)
return(XML_ERR_INTERNAL_ERROR);
@@ -12361,6 +12146,10 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
return(ctxt->errNo);
if (ctxt->instate == XML_PARSER_EOF)
return(-1);
+ if (ctxt->input == NULL)
+ return(-1);
+
+ ctxt->progressive = 1;
if (ctxt->instate == XML_PARSER_START)
xmlDetectSAX2(ctxt);
if ((size > 0) && (chunk != NULL) && (!terminate) &&
@@ -12377,7 +12166,6 @@ xmldecl_done:
size_t cur = ctxt->input->cur - ctxt->input->base;
int res;
- old_avail = xmlBufUse(ctxt->input->buf->buffer);
/*
* Specific handling if we autodetected an encoding, we should not
* push more than the first line ... which depend on the encoding
@@ -12445,23 +12233,11 @@ xmldecl_done:
}
}
}
+
if (remain != 0) {
xmlParseTryOrFinish(ctxt, 0);
} else {
- if ((ctxt->input != NULL) && (ctxt->input->buf != NULL))
- avail = xmlBufUse(ctxt->input->buf->buffer);
- /*
- * Depending on the current state it may not be such
- * a good idea to try parsing if there is nothing in the chunk
- * which would be worth doing a parser state transition and we
- * need to wait for more data
- */
- if ((terminate) || (avail > XML_MAX_TEXT_LENGTH) ||
- (old_avail == 0) || (avail == 0) ||
- (xmlParseCheckTransition(ctxt,
- (const char *)&ctxt->input->base[old_avail],
- avail - old_avail)))
- xmlParseTryOrFinish(ctxt, terminate);
+ xmlParseTryOrFinish(ctxt, terminate);
}
if (ctxt->instate == XML_PARSER_EOF)
return(ctxt->errNo);
@@ -12595,6 +12371,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
inputStream->filename = (char *)
xmlCanonicPath((const xmlChar *) filename);
if (inputStream->filename == NULL) {
+ xmlFreeInputStream(inputStream);
xmlFreeParserCtxt(ctxt);
xmlFreeParserInputBuffer(buf);
return(NULL);
@@ -12609,9 +12386,10 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
* the encoding, we set the context to XML_CHAR_ENCODING_NONE so
* that it can be automatically determined later
*/
- if ((size == 0) || (chunk == NULL)) {
- ctxt->charset = XML_CHAR_ENCODING_NONE;
- } else if ((ctxt->input != NULL) && (ctxt->input->buf != NULL)) {
+ ctxt->charset = XML_CHAR_ENCODING_NONE;
+
+ if ((size != 0) && (chunk != NULL) &&
+ (ctxt->input != NULL) && (ctxt->input->buf != NULL)) {
size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
size_t cur = ctxt->input->cur - ctxt->input->base;
@@ -13064,8 +12842,10 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
if (((depth > 40) &&
((oldctxt == NULL) || (oldctxt->options & XML_PARSE_HUGE) == 0)) ||
- (depth > 1024)) {
- return(XML_ERR_ENTITY_LOOP);
+ (depth > 100)) {
+ xmlFatalErrMsg(oldctxt, XML_ERR_ENTITY_LOOP,
+ "Maximum entity nesting depth exceeded");
+ return(XML_ERR_ENTITY_LOOP);
}
if (list != NULL)
@@ -13078,6 +12858,10 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
ctxt = xmlCreateEntityParserCtxtInternal(sax, user_data, URL, ID, NULL,
oldctxt);
if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
+ if (oldctxt != NULL) {
+ ctxt->nbErrors = oldctxt->nbErrors;
+ ctxt->nbWarnings = oldctxt->nbWarnings;
+ }
xmlDetectSAX2(ctxt);
newDoc = xmlNewDoc(BAD_CAST "1.0");
@@ -13159,6 +12943,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
ctxt->vctxt.error = oldctxt->vctxt.error;
ctxt->vctxt.warning = oldctxt->vctxt.warning;
ctxt->vctxt.userData = oldctxt->vctxt.userData;
+ ctxt->vctxt.flags = oldctxt->vctxt.flags;
}
ctxt->external = oldctxt->external;
if (ctxt->dict) xmlDictFree(ctxt->dict);
@@ -13197,10 +12982,12 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
}
if (!ctxt->wellFormed) {
- if (ctxt->errNo == 0)
- ret = XML_ERR_INTERNAL_ERROR;
- else
- ret = (xmlParserErrors)ctxt->errNo;
+ ret = (xmlParserErrors)ctxt->errNo;
+ if (oldctxt != NULL) {
+ oldctxt->errNo = ctxt->errNo;
+ oldctxt->wellFormed = 0;
+ xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
+ }
} else {
if (list != NULL) {
xmlNodePtr cur;
@@ -13221,29 +13008,26 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
}
/*
- * Record in the parent context the number of entities replacement
- * done when parsing that reference.
- */
- if (oldctxt != NULL)
- oldctxt->nbentities += ctxt->nbentities;
-
- /*
* Also record the size of the entity parsed
*/
if (ctxt->input != NULL && oldctxt != NULL) {
- oldctxt->sizeentities += ctxt->input->consumed;
- oldctxt->sizeentities += (ctxt->input->cur - ctxt->input->base);
+ unsigned long consumed = ctxt->input->consumed;
+
+ xmlSaturatedAddSizeT(&consumed, ctxt->input->cur - ctxt->input->base);
+
+ xmlSaturatedAdd(&oldctxt->sizeentities, consumed);
+ xmlSaturatedAdd(&oldctxt->sizeentities, ctxt->sizeentities);
+
+ xmlSaturatedAdd(&oldctxt->sizeentcopy, consumed);
+ xmlSaturatedAdd(&oldctxt->sizeentcopy, ctxt->sizeentcopy);
}
- /*
- * And record the last error if any
- */
- if ((oldctxt != NULL) && (ctxt->lastError.code != XML_ERR_OK))
- xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
if (oldctxt != NULL) {
ctxt->dict = NULL;
ctxt->attsDefault = NULL;
ctxt->attsSpecial = NULL;
+ oldctxt->nbErrors = ctxt->nbErrors;
+ oldctxt->nbWarnings = ctxt->nbWarnings;
oldctxt->validate = ctxt->validate;
oldctxt->valid = ctxt->valid;
oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
@@ -13354,7 +13138,9 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
#endif
if (((oldctxt->depth > 40) && ((oldctxt->options & XML_PARSE_HUGE) == 0)) ||
- (oldctxt->depth > 1024)) {
+ (oldctxt->depth > 100)) {
+ xmlFatalErrMsg(oldctxt, XML_ERR_ENTITY_LOOP,
+ "Maximum entity nesting depth exceeded");
return(XML_ERR_ENTITY_LOOP);
}
@@ -13368,13 +13154,15 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
ctxt = xmlCreateMemoryParserCtxt((char *) string, size);
if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
+ ctxt->nbErrors = oldctxt->nbErrors;
+ ctxt->nbWarnings = oldctxt->nbWarnings;
if (user_data != NULL)
ctxt->userData = user_data;
else
ctxt->userData = ctxt;
if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
ctxt->dict = oldctxt->dict;
- ctxt->input_id = oldctxt->input_id + 1;
+ ctxt->input_id = oldctxt->input_id;
ctxt->str_xml = xmlDictLookup(ctxt->dict, BAD_CAST "xml", 3);
ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
@@ -13425,7 +13213,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
xmlAddChild((xmlNodePtr) ctxt->myDoc, newRoot);
nodePush(ctxt, ctxt->myDoc->children);
ctxt->instate = XML_PARSER_CONTENT;
- ctxt->depth = oldctxt->depth + 1;
+ ctxt->depth = oldctxt->depth;
ctxt->validate = 0;
ctxt->loadsubset = oldctxt->loadsubset;
@@ -13450,12 +13238,12 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
}
if (!ctxt->wellFormed) {
- if (ctxt->errNo == 0)
- ret = XML_ERR_INTERNAL_ERROR;
- else
- ret = (xmlParserErrors)ctxt->errNo;
+ ret = (xmlParserErrors)ctxt->errNo;
+ oldctxt->errNo = ctxt->errNo;
+ oldctxt->wellFormed = 0;
+ xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
} else {
- ret = XML_ERR_OK;
+ ret = XML_ERR_OK;
}
if ((lst != NULL) && (ret == XML_ERR_OK)) {
@@ -13488,18 +13276,19 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
}
/*
- * Record in the parent context the number of entities replacement
- * done when parsing that reference.
+ * Also record the size of the entity parsed
*/
- if (oldctxt != NULL)
- oldctxt->nbentities += ctxt->nbentities;
+ if (ctxt->input != NULL && oldctxt != NULL) {
+ unsigned long consumed = ctxt->input->consumed;
- /*
- * Also record the last error if any
- */
- if (ctxt->lastError.code != XML_ERR_OK)
- xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
+ xmlSaturatedAddSizeT(&consumed, ctxt->input->cur - ctxt->input->base);
+
+ xmlSaturatedAdd(&oldctxt->sizeentcopy, consumed);
+ xmlSaturatedAdd(&oldctxt->sizeentcopy, ctxt->sizeentcopy);
+ }
+ oldctxt->nbErrors = ctxt->nbErrors;
+ oldctxt->nbWarnings = ctxt->nbWarnings;
ctxt->sax = oldsax;
ctxt->dict = NULL;
ctxt->attsDefault = NULL;
@@ -14008,11 +13797,7 @@ xmlCreateEntityParserCtxtInternal(xmlSAXHandlerPtr sax, void *userData,
if (pctx != NULL) {
ctxt->options = pctx->options;
ctxt->_private = pctx->_private;
- /*
- * this is a subparser of pctx, so the input_id should be
- * incremented to distinguish from main entity
- */
- ctxt->input_id = pctx->input_id + 1;
+ ctxt->input_id = pctx->input_id;
}
/* Don't read from stdin. */
@@ -14406,7 +14191,6 @@ xmlCreateMemoryParserCtxt(const char *buffer, int size) {
if (ctxt == NULL)
return(NULL);
- /* TODO: xmlParserInputBufferCreateStatic, requires some serious changes */
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
xmlFreeParserCtxt(ctxt);
@@ -14738,34 +14522,32 @@ static int xmlParserInitialized = 0;
void
xmlInitParser(void) {
+ /*
+ * Note that the initialization code must not make memory allocations.
+ */
if (xmlParserInitialized != 0)
return;
-#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
- if (xmlFree == free)
- atexit(xmlCleanupParser);
-#endif
-
#ifdef LIBXML_THREAD_ENABLED
__xmlGlobalInitMutexLock();
if (xmlParserInitialized == 0) {
#endif
- xmlInitThreads();
- xmlInitGlobals();
- xmlInitMemory();
- xmlInitializeDict();
- xmlInitCharEncodingHandlers();
- xmlDefaultSAXHandlerInit();
+#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
+ if (xmlFree == free)
+ atexit(xmlCleanupParser);
+#endif
+
+ xmlInitThreadsInternal();
+ xmlInitGlobalsInternal();
+ xmlInitMemoryInternal();
+ __xmlInitializeDict();
+ xmlInitEncodingInternal();
xmlRegisterDefaultInputCallbacks();
#ifdef LIBXML_OUTPUT_ENABLED
xmlRegisterDefaultOutputCallbacks();
#endif /* LIBXML_OUTPUT_ENABLED */
-#ifdef LIBXML_HTML_ENABLED
- htmlInitAutoClose();
- htmlDefaultSAXHandlerInit();
-#endif
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
- xmlXPathInit();
+ xmlInitXPathInternal();
#endif
xmlParserInitialized = 1;
#ifdef LIBXML_THREAD_ENABLED
@@ -14805,7 +14587,7 @@ xmlCleanupParser(void) {
#ifdef LIBXML_CATALOG_ENABLED
xmlCatalogCleanup();
#endif
- xmlDictCleanup();
+ xmlCleanupDictInternal();
xmlCleanupInputCallbacks();
#ifdef LIBXML_OUTPUT_ENABLED
xmlCleanupOutputCallbacks();
@@ -14814,9 +14596,9 @@ xmlCleanupParser(void) {
xmlSchemaCleanupTypes();
xmlRelaxNGCleanupTypes();
#endif
- xmlCleanupGlobals();
- xmlCleanupThreads(); /* must be last if called not from the main thread */
- xmlCleanupMemory();
+ xmlCleanupGlobalsInternal();
+ xmlCleanupThreadsInternal();
+ xmlCleanupMemoryInternal();
xmlParserInitialized = 0;
}
@@ -14925,12 +14707,12 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
#endif
ctxt->record_info = 0;
ctxt->checkIndex = 0;
+ ctxt->endCheckState = 0;
ctxt->inSubset = 0;
ctxt->errNo = XML_ERR_OK;
ctxt->depth = 0;
ctxt->charset = XML_CHAR_ENCODING_UTF8;
ctxt->catalogs = NULL;
- ctxt->nbentities = 0;
ctxt->sizeentities = 0;
ctxt->sizeentcopy = 0;
xmlInitNodeInfoSeq(&ctxt->node_seq);
@@ -14948,6 +14730,8 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt)
if (ctxt->catalogs != NULL)
xmlCatalogFreeLocal(ctxt->catalogs);
#endif
+ ctxt->nbErrors = 0;
+ ctxt->nbWarnings = 0;
if (ctxt->lastError.code != XML_ERR_OK)
xmlResetError(&ctxt->lastError);
}
diff --git a/chromium/third_party/libxml/src/parserInternals.c b/chromium/third_party/libxml/src/parserInternals.c
index c26ccdaa71a..f55700e562a 100644
--- a/chromium/third_party/libxml/src/parserInternals.c
+++ b/chromium/third_party/libxml/src/parserInternals.c
@@ -299,6 +299,10 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) {
if (in->cur == NULL) return(-1);
if (in->buf->buffer == NULL) return(-1);
+ /* Don't grow memory buffers. */
+ if ((in->buf->encoder == NULL) && (in->buf->readcallback == NULL))
+ return(0);
+
CHECK_BUFFER(in);
indx = in->cur - in->base;
@@ -308,12 +312,15 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) {
return(0);
}
- if (in->buf->readcallback != NULL) {
- ret = xmlParserInputBufferGrow(in->buf, len);
- } else
- return(0);
+ ret = xmlParserInputBufferGrow(in->buf, len);
in->base = xmlBufContent(in->buf->buffer);
+ if (in->base == NULL) {
+ in->base = BAD_CAST "";
+ in->cur = in->base;
+ in->end = in->base;
+ return(-1);
+ }
in->cur = in->base + indx;
in->end = xmlBufEnd(in->buf->buffer);
@@ -353,7 +360,11 @@ xmlParserInputShrink(xmlParserInputPtr in) {
ret = xmlBufShrink(in->buf->buffer, used - LINE_LEN);
if (ret > 0) {
used -= ret;
- in->consumed += ret;
+ if ((ret > ULONG_MAX) ||
+ (in->consumed > ULONG_MAX - (unsigned long)ret))
+ in->consumed = ULONG_MAX;
+ else
+ in->consumed += ret;
}
}
@@ -395,7 +406,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
return;
}
- if ((*ctxt->input->cur == 0) &&
+ if ((ctxt->input->cur >= ctxt->input->end) &&
(xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) {
return;
}
@@ -1020,128 +1031,125 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler, int len)
{
int nbchars;
+ xmlParserInputBufferPtr in;
if (handler == NULL)
return (-1);
if (input == NULL)
return (-1);
- if (input->buf != NULL) {
- ctxt->charset = XML_CHAR_ENCODING_UTF8;
-
- if (input->buf->encoder != NULL) {
- /*
- * Check in case the auto encoding detection triggered
- * in already.
- */
- if (input->buf->encoder == handler)
- return (0);
+ in = input->buf;
+ if (in == NULL) {
+ xmlErrInternal(ctxt,
+ "static memory buffer doesn't support encoding\n", NULL);
+ /*
+ * Callers assume that the input buffer takes ownership of the
+ * encoding handler. xmlCharEncCloseFunc frees unregistered
+ * handlers and avoids a memory leak.
+ */
+ xmlCharEncCloseFunc(handler);
+ return (-1);
+ }
- /*
- * "UTF-16" can be used for both LE and BE
- if ((!xmlStrncmp(BAD_CAST input->buf->encoder->name,
- BAD_CAST "UTF-16", 6)) &&
- (!xmlStrncmp(BAD_CAST handler->name,
- BAD_CAST "UTF-16", 6))) {
- return(0);
- }
- */
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
- /*
- * Note: this is a bit dangerous, but that's what it
- * takes to use nearly compatible signature for different
- * encodings.
- *
- * FIXME: Encoders might buffer partial byte sequences, so
- * this probably can't work. We should return an error and
- * make sure that callers never try to switch the encoding
- * twice.
- */
- xmlCharEncCloseFunc(input->buf->encoder);
- input->buf->encoder = handler;
+ if (in->encoder != NULL) {
+ /*
+ * Check in case the auto encoding detection triggered
+ * in already.
+ */
+ if (in->encoder == handler)
return (0);
- }
- input->buf->encoder = handler;
/*
- * Is there already some content down the pipe to convert ?
+ * Note: this is a bit dangerous, but that's what it
+ * takes to use nearly compatible signature for different
+ * encodings.
+ *
+ * FIXME: Encoders might buffer partial byte sequences, so
+ * this probably can't work. We should return an error and
+ * make sure that callers never try to switch the encoding
+ * twice.
*/
- if (xmlBufIsEmpty(input->buf->buffer) == 0) {
- int processed;
- unsigned int use;
+ xmlCharEncCloseFunc(in->encoder);
+ in->encoder = handler;
+ return (0);
+ }
+ in->encoder = handler;
+ /*
+ * Is there already some content down the pipe to convert ?
+ */
+ if (xmlBufIsEmpty(in->buffer) == 0) {
+ size_t processed, use, consumed;
+
+ /*
+ * Specific handling of the Byte Order Mark for
+ * UTF-16
+ */
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-16LE") ||
+ !strcmp(handler->name, "UTF-16")) &&
+ (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) {
+ input->cur += 2;
+ }
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-16BE")) &&
+ (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) {
+ input->cur += 2;
+ }
+ /*
+ * Errata on XML-1.0 June 20 2001
+ * Specific handling of the Byte Order Mark for
+ * UTF-8
+ */
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-8")) &&
+ (input->cur[0] == 0xEF) &&
+ (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) {
+ input->cur += 3;
+ }
+
+ /*
+ * Shrink the current input buffer.
+ * Move it as the raw buffer and create a new input buffer
+ */
+ processed = input->cur - input->base;
+ xmlBufShrink(in->buffer, processed);
+ input->consumed += processed;
+ in->raw = in->buffer;
+ in->buffer = xmlBufCreate();
+ in->rawconsumed = processed;
+ use = xmlBufUse(in->raw);
+
+ if (ctxt->html) {
/*
- * Specific handling of the Byte Order Mark for
- * UTF-16
- */
- if ((handler->name != NULL) &&
- (!strcmp(handler->name, "UTF-16LE") ||
- !strcmp(handler->name, "UTF-16")) &&
- (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) {
- input->cur += 2;
- }
- if ((handler->name != NULL) &&
- (!strcmp(handler->name, "UTF-16BE")) &&
- (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) {
- input->cur += 2;
- }
- /*
- * Errata on XML-1.0 June 20 2001
- * Specific handling of the Byte Order Mark for
- * UTF-8
+ * convert as much as possible of the buffer
*/
- if ((handler->name != NULL) &&
- (!strcmp(handler->name, "UTF-8")) &&
- (input->cur[0] == 0xEF) &&
- (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) {
- input->cur += 3;
- }
-
+ nbchars = xmlCharEncInput(in, 1);
+ } else {
/*
- * Shrink the current input buffer.
- * Move it as the raw buffer and create a new input buffer
+ * convert just enough to get
+ * '<?xml version="1.0" encoding="xxx"?>'
+ * parsed with the autodetected encoding
+ * into the parser reading buffer.
*/
- processed = input->cur - input->base;
- xmlBufShrink(input->buf->buffer, processed);
- input->buf->raw = input->buf->buffer;
- input->buf->buffer = xmlBufCreate();
- input->buf->rawconsumed = processed;
- use = xmlBufUse(input->buf->raw);
-
- if (ctxt->html) {
- /*
- * convert as much as possible of the buffer
- */
- nbchars = xmlCharEncInput(input->buf, 1);
- } else {
- /*
- * convert just enough to get
- * '<?xml version="1.0" encoding="xxx"?>'
- * parsed with the autodetected encoding
- * into the parser reading buffer.
- */
- nbchars = xmlCharEncFirstLineInput(input->buf, len);
- }
- xmlBufResetInput(input->buf->buffer, input);
- if (nbchars < 0) {
- xmlErrInternal(ctxt,
- "switching encoding: encoder error\n",
- NULL);
- return (-1);
- }
- input->buf->rawconsumed += use - xmlBufUse(input->buf->raw);
+ nbchars = xmlCharEncFirstLineInput(in, len);
}
- return (0);
- } else {
- xmlErrInternal(ctxt,
- "static memory buffer doesn't support encoding\n", NULL);
- /*
- * Callers assume that the input buffer takes ownership of the
- * encoding handler. xmlCharEncCloseFunc frees unregistered
- * handlers and avoids a memory leak.
- */
- xmlCharEncCloseFunc(handler);
- return (-1);
+ xmlBufResetInput(in->buffer, input);
+ if (nbchars < 0) {
+ xmlErrInternal(ctxt,
+ "switching encoding: encoder error\n",
+ NULL);
+ return (-1);
+ }
+ consumed = use - xmlBufUse(in->raw);
+ if ((consumed > ULONG_MAX) ||
+ (in->rawconsumed > ULONG_MAX - (unsigned long)consumed))
+ in->rawconsumed = ULONG_MAX;
+ else
+ in->rawconsumed += consumed;
}
+ return (0);
}
/**
@@ -1236,7 +1244,7 @@ xmlNewInputStream(xmlParserCtxtPtr ctxt) {
* the id is actually needed.
*/
if (ctxt != NULL) {
- if (ctxt->input_id >= INT_MAX) {
+ if (input->id >= INT_MAX) {
xmlErrMemory(ctxt, "Input ID overflow\n");
return(NULL);
}
@@ -1309,8 +1317,11 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
break;
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
case XML_EXTERNAL_PARAMETER_ENTITY:
- return(xmlLoadExternalEntity((char *) entity->URI,
- (char *) entity->ExternalID, ctxt));
+ input = xmlLoadExternalEntity((char *) entity->URI,
+ (char *) entity->ExternalID, ctxt);
+ if (input != NULL)
+ input->entity = entity;
+ return(input);
case XML_INTERNAL_GENERAL_ENTITY:
xmlErrInternal(ctxt,
"Internal entity %s without content !\n",
@@ -1341,6 +1352,7 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
input->cur = entity->content;
input->length = entity->length;
input->end = &entity->content[input->length];
+ input->entity = entity;
return(input);
}
@@ -1639,7 +1651,6 @@ xmlInitSAXParserCtxt(xmlParserCtxtPtr ctxt, const xmlSAXHandler *sax,
ctxt->depth = 0;
ctxt->charset = XML_CHAR_ENCODING_UTF8;
ctxt->catalogs = NULL;
- ctxt->nbentities = 0;
ctxt->sizeentities = 0;
ctxt->sizeentcopy = 0;
ctxt->input_id = 1;
diff --git a/chromium/third_party/libxml/src/pattern.c b/chromium/third_party/libxml/src/pattern.c
index 4d0423eef09..04a4eb797fe 100644
--- a/chromium/third_party/libxml/src/pattern.c
+++ b/chromium/third_party/libxml/src/pattern.c
@@ -2039,22 +2039,12 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
#endif /* if 0 ------------------------------------------------------- */
if (match) {
final = step.flags & XML_STREAM_STEP_FINAL;
- if (desc) {
- if (final) {
- ret = 1;
- } else {
- /* descending match create a new state */
- xmlStreamCtxtAddState(stream, stepNr + 1,
- stream->level + 1);
- }
- } else {
- if (final) {
- ret = 1;
- } else {
- xmlStreamCtxtAddState(stream, stepNr + 1,
- stream->level + 1);
- }
- }
+ if (final) {
+ ret = 1;
+ } else {
+ xmlStreamCtxtAddState(stream, stepNr + 1,
+ stream->level + 1);
+ }
if ((ret != 1) && (step.flags & XML_STREAM_STEP_IN_SET)) {
/*
* Check if we have a special case like "foo/bar//.", where
diff --git a/chromium/third_party/libxml/src/runsuite.c b/chromium/third_party/libxml/src/runsuite.c
index 4e406a35670..0880e0a7763 100644
--- a/chromium/third_party/libxml/src/runsuite.c
+++ b/chromium/third_party/libxml/src/runsuite.c
@@ -9,12 +9,8 @@
#include "libxml.h"
#include <stdio.h>
-#if !defined(_WIN32)
-#include <unistd.h>
-#endif
#include <string.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
@@ -1053,13 +1049,19 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
old_tests = nb_tests;
old_leaks = nb_leaks;
xsdTest();
- if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
- printf("Ran %d tests, no errors\n", nb_tests - old_tests);
- else
- printf("Ran %d tests, %d errors, %d leaks\n",
- nb_tests - old_tests,
- nb_errors - old_errors,
- nb_leaks - old_leaks);
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ if (nb_errors - old_errors == 10) {
+ printf("10 errors were expected\n");
+ nb_errors = old_errors;
+ } else {
+ printf("10 errors were expected, got %d errors\n",
+ nb_errors - old_errors);
+ nb_errors = old_errors + 1;
+ }
+
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
@@ -1071,6 +1073,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests - old_tests,
nb_errors - old_errors,
nb_leaks - old_leaks);
+
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
@@ -1082,6 +1085,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_tests - old_tests,
nb_errors - old_errors,
nb_leaks - old_leaks);
+
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
@@ -1099,6 +1103,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_errors - old_errors,
nb_internals,
nb_leaks - old_leaks);
+
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
@@ -1106,16 +1111,20 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_schematas = 0;
xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
"xstc/Tests/");
- if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) {
printf("Ran %d tests (%d schemata), no errors\n",
nb_tests - old_tests, nb_schematas);
- else
+ } else {
printf("Ran %d tests (%d schemata), %d errors (%d internals), %d leaks\n",
nb_tests - old_tests,
nb_schematas,
nb_errors - old_errors,
nb_internals,
nb_leaks - old_leaks);
+ printf("Some errors were expected.\n");
+ nb_errors = old_errors;
+ }
+
old_errors = nb_errors;
old_tests = nb_tests;
old_leaks = nb_leaks;
@@ -1123,16 +1132,19 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
nb_schematas = 0;
xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
"xstc/Tests/");
- if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) {
printf("Ran %d tests (%d schemata), no errors\n",
nb_tests - old_tests, nb_schematas);
- else
+ } else {
printf("Ran %d tests (%d schemata), %d errors (%d internals), %d leaks\n",
nb_tests - old_tests,
nb_schematas,
nb_errors - old_errors,
nb_internals,
nb_leaks - old_leaks);
+ printf("Some errors were expected.\n");
+ nb_errors = old_errors;
+ }
if ((nb_errors == 0) && (nb_leaks == 0)) {
ret = 0;
diff --git a/chromium/third_party/libxml/src/runtest.c b/chromium/third_party/libxml/src/runtest.c
index ff992951fac..80a6c750ad9 100644
--- a/chromium/third_party/libxml/src/runtest.c
+++ b/chromium/third_party/libxml/src/runtest.c
@@ -14,8 +14,10 @@
#include "libxml.h"
#include <stdio.h>
-#if !defined(_WIN32)
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#elif defined (_WIN32)
+#include <io.h>
#endif
#include <string.h>
#include <sys/stat.h>
@@ -110,7 +112,6 @@ static int checkTestFile(const char *filename);
#if defined(_WIN32)
#include <windows.h>
-#include <io.h>
typedef struct
{
@@ -246,7 +247,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
static char testErrors[32769];
static int testErrorsSize = 0;
-static void XMLCDECL
+static void
testErrorHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
int res;
@@ -268,7 +269,7 @@ testErrorHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
testErrors[testErrorsSize] = 0;
}
-static void XMLCDECL
+static void
channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
int res;
@@ -291,7 +292,7 @@ channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
}
/**
- * xmlParserPrintFileContext:
+ * xmlParserPrintFileContextInternal:
* @input: an xmlParserInputPtr input
*
* Displays current context within the input content for error tracking
@@ -300,12 +301,14 @@ channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
static void
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlGenericErrorFunc chanl, void *data ) {
- const xmlChar *cur, *base;
+ const xmlChar *cur, *base, *start;
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
xmlChar content[81]; /* space for 80 chars + line terminator */
xmlChar *ctnt;
- if (input == NULL) return;
+ if ((input == NULL) || (input->cur == NULL))
+ return;
+
cur = input->cur;
base = input->base;
/* skip backwards over any end-of-lines */
@@ -315,21 +318,32 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
n = 0;
/* search backwards for beginning-of-line (to max buff size) */
while ((n++ < (sizeof(content)-1)) && (cur > base) &&
- (*(cur) != '\n') && (*(cur) != '\r'))
+ (*(cur) != '\n') && (*(cur) != '\r'))
cur--;
- if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ if ((*(cur) == '\n') || (*(cur) == '\r')) {
+ cur++;
+ } else {
+ /* skip over continuation bytes */
+ while ((cur < input->cur) && ((*cur & 0xC0) == 0x80))
+ cur++;
+ }
/* calculate the error position in terms of the current position */
col = input->cur - cur;
/* search forward for end-of-line (to max buff size) */
n = 0;
- ctnt = content;
+ start = cur;
/* copy selected text to our buffer */
- while ((*cur != 0) && (*(cur) != '\n') &&
- (*(cur) != '\r') && (n < sizeof(content)-1)) {
- *ctnt++ = *cur++;
- n++;
+ while ((*cur != 0) && (*(cur) != '\n') && (*(cur) != '\r')) {
+ int len = input->end - cur;
+ int c = xmlGetUTF8Char(cur, &len);
+
+ if ((c < 0) || (n + len > sizeof(content)-1))
+ break;
+ cur += len;
+ n += len;
}
- *ctnt = 0;
+ memcpy(content, start, n);
+ content[n] = 0;
/* print out the selected text */
chanl(data ,"%s\n", content);
/* create blank line with problem pointer */
@@ -530,10 +544,17 @@ testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, xmlErrorPtr err) {
static void
initializeLibxml2(void) {
- xmlPedanticParserDefault(0);
-
- xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ /*
+ * This verifies that xmlInitParser doesn't allocate memory with
+ * xmlMalloc
+ */
+ xmlFree = NULL;
+ xmlMalloc = NULL;
+ xmlRealloc = NULL;
+ xmlMemStrdup = NULL;
xmlInitParser();
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlPedanticParserDefault(0);
xmlSetExternalEntityLoader(testExternalEntityLoader);
xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler);
#ifdef LIBXML_SCHEMAS_ENABLED
@@ -1352,7 +1373,7 @@ commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
* Display and format a warning messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
{
va_list args;
@@ -1375,7 +1396,7 @@ warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
* Display and format a error messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
{
va_list args;
@@ -1398,7 +1419,7 @@ errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
* Display and format a fatalError messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
{
va_list args;
@@ -1970,6 +1991,306 @@ pushParseTest(const char *filename, const char *result,
}
return(0);
}
+
+static int pushBoundaryCount;
+static int pushBoundaryRefCount;
+static int pushBoundaryCharsCount;
+static int pushBoundaryCDataCount;
+
+static void
+internalSubsetBnd(void *ctx, const xmlChar *name, const xmlChar *externalID,
+ const xmlChar *systemID) {
+ pushBoundaryCount++;
+ xmlSAX2InternalSubset(ctx, name, externalID, systemID);
+}
+
+static void
+referenceBnd(void *ctx, const xmlChar *name) {
+ pushBoundaryRefCount++;
+ xmlSAX2Reference(ctx, name);
+}
+
+static void
+charactersBnd(void *ctx, const xmlChar *ch, int len) {
+ pushBoundaryCount++;
+ pushBoundaryCharsCount++;
+ xmlSAX2Characters(ctx, ch, len);
+}
+
+static void
+cdataBlockBnd(void *ctx, const xmlChar *ch, int len) {
+ pushBoundaryCount++;
+ pushBoundaryCDataCount++;
+ xmlSAX2CDataBlock(ctx, ch, len);
+}
+
+static void
+processingInstructionBnd(void *ctx, const xmlChar *target,
+ const xmlChar *data) {
+ pushBoundaryCount++;
+ xmlSAX2ProcessingInstruction(ctx, target, data);
+}
+
+static void
+commentBnd(void *ctx, const xmlChar *value) {
+ xmlParserCtxtPtr ctxt = ctx;
+ if (ctxt->inSubset == 0)
+ pushBoundaryCount++;
+ xmlSAX2Comment(ctx, value);
+}
+
+static void
+startElementBnd(void *ctx, const xmlChar *xname, const xmlChar **atts) {
+ const char *name = (const char *)xname;
+
+ /* Some elements might be created automatically. */
+ if ((strcmp(name, "html") != 0) &&
+ (strcmp(name, "body") != 0) &&
+ (strcmp(name, "head") != 0) &&
+ (strcmp(name, "p") != 0)) {
+ pushBoundaryCount++;
+ }
+ xmlSAX2StartElement(ctx, xname, atts);
+}
+
+static void
+endElementBnd(void *ctx, const xmlChar *name) {
+ /*pushBoundaryCount++;*/
+ xmlSAX2EndElement(ctx, name);
+}
+
+static void
+startElementNsBnd(void *ctx, const xmlChar *localname, const xmlChar *prefix,
+ const xmlChar *URI, int nb_namespaces,
+ const xmlChar **namespaces, int nb_attributes,
+ int nb_defaulted, const xmlChar **attributes) {
+ pushBoundaryCount++;
+ xmlSAX2StartElementNs(ctx, localname, prefix, URI, nb_namespaces,
+ namespaces, nb_attributes, nb_defaulted, attributes);
+}
+
+static void
+endElementNsBnd(void *ctx, const xmlChar *localname, const xmlChar *prefix,
+ const xmlChar *URI) {
+ /*pushBoundaryCount++;*/
+ xmlSAX2EndElementNs(ctx, localname, prefix, URI);
+}
+
+/**
+ * pushBoundaryTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Test whether the push parser detects boundaries between syntactical
+ * elements correctly.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+pushBoundaryTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc;
+ xmlSAXHandler bndSAX;
+ const char *base;
+ int size, res, numCallbacks;
+ int cur = 0;
+ unsigned long avail, oldConsumed, consumed;
+
+ /*
+ * If the parser made progress, check that exactly one construct was
+ * processed and that the input buffer is (almost) empty.
+ * Since we use a chunk size of 1, this tests whether content is
+ * processed as early as possible.
+ */
+
+ nb_tests++;
+
+ memset(&bndSAX, 0, sizeof(bndSAX));
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML) {
+ xmlSAX2InitHtmlDefaultSAXHandler(&bndSAX);
+ bndSAX.startElement = startElementBnd;
+ bndSAX.endElement = endElementBnd;
+ } else
+#endif
+ {
+ xmlSAXVersion(&bndSAX, 2);
+ bndSAX.startElementNs = startElementNsBnd;
+ bndSAX.endElementNs = endElementNsBnd;
+ }
+
+ bndSAX.internalSubset = internalSubsetBnd;
+ bndSAX.reference = referenceBnd;
+ bndSAX.characters = charactersBnd;
+ bndSAX.cdataBlock = cdataBlockBnd;
+ bndSAX.processingInstruction = processingInstructionBnd;
+ bndSAX.comment = commentBnd;
+
+ /*
+ * load the document in memory and work from there.
+ */
+ if (loadMem(filename, &base, &size) != 0) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ ctxt = htmlCreatePushParserCtxt(&bndSAX, NULL, base, 1, filename,
+ XML_CHAR_ENCODING_NONE);
+ else
+#endif
+ ctxt = xmlCreatePushParserCtxt(&bndSAX, NULL, base, 1, filename);
+ xmlCtxtUseOptions(ctxt, options);
+ cur = 1;
+ consumed = 0;
+ numCallbacks = 0;
+ avail = 0;
+ while ((cur < size) && (numCallbacks <= 1) && (avail <= 0)) {
+ int terminate = (cur + 1 >= size);
+ int isText = 0;
+
+ if (ctxt->instate == XML_PARSER_CONTENT) {
+ int firstChar = (ctxt->input->end > ctxt->input->cur) ?
+ *ctxt->input->cur :
+ base[cur];
+
+ if ((firstChar != '<') &&
+ ((options & XML_PARSE_HTML) || (firstChar != '&')))
+ isText = 1;
+ }
+
+ oldConsumed = ctxt->input->consumed +
+ (unsigned long) (ctxt->input->cur - ctxt->input->base);
+
+ pushBoundaryCount = 0;
+ pushBoundaryRefCount = 0;
+ pushBoundaryCharsCount = 0;
+ pushBoundaryCDataCount = 0;
+
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ htmlParseChunk(ctxt, base + cur, 1, terminate);
+ else
+#endif
+ xmlParseChunk(ctxt, base + cur, 1, terminate);
+ cur += 1;
+
+ /*
+ * Callback check: Check that only a single construct was parsed.
+ */
+ if (pushBoundaryRefCount > 0) {
+ numCallbacks = 1;
+ } else {
+ numCallbacks = pushBoundaryCount;
+ if (pushBoundaryCharsCount > 1) {
+ if (options & XML_PARSE_HTML) {
+ /*
+ * The HTML parser can generate a mix of chars and
+ * references.
+ */
+ numCallbacks -= pushBoundaryCharsCount - 1;
+ } else {
+ /*
+ * Allow two chars callbacks. This can happen when
+ * multi-byte chars are split across buffer boundaries.
+ */
+ numCallbacks -= 1;
+ }
+ }
+ if (options & XML_PARSE_HTML) {
+ /*
+ * Allow multiple cdata callbacks in HTML mode.
+ */
+ if (pushBoundaryCDataCount > 1)
+ numCallbacks -= pushBoundaryCDataCount - 1;
+ }
+ }
+
+ /*
+ * Buffer check: If input was consumed, check that the input
+ * buffer is (almost) empty.
+ */
+ consumed = ctxt->input->consumed +
+ (unsigned long) (ctxt->input->cur - ctxt->input->base);
+ if ((ctxt->instate != XML_PARSER_DTD) &&
+ (consumed >= 4) &&
+ (consumed != oldConsumed)) {
+ size_t max = 0;
+
+ avail = ctxt->input->end - ctxt->input->cur;
+
+ if ((options & XML_PARSE_HTML) &&
+ (ctxt->instate == XML_PARSER_END_TAG)) {
+ /* Something related to script parsing. */
+ max = 3;
+ } else if (isText) {
+ int c = *ctxt->input->cur;
+
+ /* 3 bytes for partial UTF-8 */
+ max = ((c == '<') || (c == '&')) ? 1 : 3;
+ } else if (ctxt->instate == XML_PARSER_CDATA_SECTION) {
+ /* 2 bytes for terminator, 3 bytes for UTF-8 */
+ max = 5;
+ }
+
+ if (avail <= max)
+ avail = 0;
+ }
+ }
+ doc = ctxt->myDoc;
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ res = 1;
+ else
+#endif
+ res = ctxt->wellFormed;
+ xmlFreeParserCtxt(ctxt);
+ free((char *)base);
+ if (numCallbacks > 1) {
+ xmlFreeDoc(doc);
+ fprintf(stderr, "Failed push boundary callback test (%d@%lu-%lu): %s\n",
+ numCallbacks, oldConsumed, consumed, filename);
+ return(-1);
+ }
+ if (avail > 0) {
+ xmlFreeDoc(doc);
+ fprintf(stderr, "Failed push boundary buffer test (%lu@%lu): %s\n",
+ avail, consumed, filename);
+ return(-1);
+ }
+ if (!res) {
+ xmlFreeDoc(doc);
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ htmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ else
+#endif
+ xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ xmlFreeDoc(doc);
+ res = compareFileMem(result, base, size);
+ if ((base == NULL) || (res != 0)) {
+ if (base != NULL)
+ xmlFree((char *)base);
+ fprintf(stderr, "Result for %s failed in %s\n", filename, result);
+ return(-1);
+ }
+ xmlFree((char *)base);
+ if (err != NULL) {
+ res = compareFileMem(err, testErrors, testErrorsSize);
+ if (res != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ return(-1);
+ }
+ }
+ return(0);
+}
#endif
/**
@@ -2102,7 +2423,10 @@ errParseTest(const char *filename, const char *result, const char *err,
#ifdef LIBXML_XINCLUDE_ENABLED
if (options & XML_PARSE_XINCLUDE) {
doc = xmlReadFile(filename, NULL, options);
- xmlXIncludeProcessFlags(doc, options);
+ if (xmlXIncludeProcessFlags(doc, options) < 0) {
+ xmlFreeDoc(doc);
+ doc = NULL;
+ }
} else
#endif
{
@@ -4657,6 +4981,9 @@ testDesc testDescriptions[] = {
{ "XML push regression tests" ,
pushParseTest, "./test/*", "result/", "", NULL,
0 },
+ { "XML push boundary tests" ,
+ pushBoundaryTest, "./test/*", "result/", "", NULL,
+ 0 },
#endif
#ifdef LIBXML_HTML_ENABLED
{ "HTML regression tests" ,
@@ -4669,6 +4996,9 @@ testDesc testDescriptions[] = {
{ "Push HTML regression tests" ,
pushParseTest, "./test/HTML/*", "result/HTML/", "", ".err",
XML_PARSE_HTML },
+ { "Push HTML boundary tests" ,
+ pushBoundaryTest, "./test/HTML/*", "result/HTML/", "", NULL,
+ XML_PARSE_HTML },
#endif
{ "HTML SAX regression tests" ,
saxParseTest, "./test/HTML/*", "result/HTML/", ".sax", NULL,
@@ -4695,25 +5025,24 @@ testDesc testDescriptions[] = {
#endif
#ifdef LIBXML_XINCLUDE_ENABLED
{ "XInclude regression tests" ,
- errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL,
- /* Ignore errors at this point ".err", */
+ errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", ".err",
XML_PARSE_XINCLUDE },
#ifdef LIBXML_READER_ENABLED
{ "XInclude xmlReader regression tests",
streamParseTest, "./test/XInclude/docs/*", "result/XInclude/", ".rdr",
- /* Ignore errors at this point ".err", */
- NULL, XML_PARSE_XINCLUDE },
+ ".err", XML_PARSE_XINCLUDE },
#endif
{ "XInclude regression tests stripping include nodes" ,
- errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL,
- /* Ignore errors at this point ".err", */
+ errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", ".err",
XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE },
#ifdef LIBXML_READER_ENABLED
{ "XInclude xmlReader regression tests stripping include nodes",
streamParseTest, "./test/XInclude/docs/*", "result/XInclude/", ".rdr",
- /* Ignore errors at this point ".err", */
- NULL, XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE },
+ ".err", XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE },
#endif
+ { "XInclude regression tests without reader",
+ errParseTest, "./test/XInclude/without-reader/*", "result/XInclude/", "",
+ ".err", XML_PARSE_XINCLUDE },
#endif
#ifdef LIBXML_XPATH_ENABLED
#ifdef LIBXML_DEBUG_ENABLED
diff --git a/chromium/third_party/libxml/src/runxmlconf.c b/chromium/third_party/libxml/src/runxmlconf.c
index 69ce39fc4a8..8df9df132a9 100644
--- a/chromium/third_party/libxml/src/runxmlconf.c
+++ b/chromium/third_party/libxml/src/runxmlconf.c
@@ -11,12 +11,8 @@
#ifdef LIBXML_XPATH_ENABLED
-#if !defined(_WIN32)
-#include <unistd.h>
-#endif
#include <string.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
diff --git a/chromium/third_party/libxml/src/testModule.c b/chromium/third_party/libxml/src/testModule.c
index 77b7ba106ab..6d00596f7e5 100644
--- a/chromium/third_party/libxml/src/testModule.c
+++ b/chromium/third_party/libxml/src/testModule.c
@@ -49,24 +49,26 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlStrPrintf(filename, sizeof(filename),
"%s/testdso%s",
(const xmlChar*)MODULE_PATH,
- (const xmlChar*)LIBXML_MODULE_EXTENSION);
+ (const xmlChar*)LIBXML_MODULE_EXTENSION);
module = xmlModuleOpen((const char*)filename, 0);
- if (module)
- {
- if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) {
- fprintf(stderr, "Failure to lookup\n");
- return(1);
- }
- if (hello_world == NULL) {
- fprintf(stderr, "Lookup returned NULL\n");
- return(1);
- }
+ if (module == NULL) {
+ fprintf(stderr, "Failed to open module\n");
+ return(1);
+ }
- (*hello_world)();
+ if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) {
+ fprintf(stderr, "Failure to lookup\n");
+ return(1);
+ }
+ if (hello_world == NULL) {
+ fprintf(stderr, "Lookup returned NULL\n");
+ return(1);
+ }
- xmlModuleClose(module);
- }
+ (*hello_world)();
+
+ xmlModuleClose(module);
xmlMemoryDump();
diff --git a/chromium/third_party/libxml/src/testThreads.c b/chromium/third_party/libxml/src/testThreads.c
index 0714deba8a9..709ae76905d 100644
--- a/chromium/third_party/libxml/src/testThreads.c
+++ b/chromium/third_party/libxml/src/testThreads.c
@@ -14,9 +14,6 @@
#include <windows.h>
#endif
#include <string.h>
-#if !defined(_MSC_VER)
-#include <unistd.h>
-#endif
#include <assert.h>
#define MAX_ARGC 20
diff --git a/chromium/third_party/libxml/src/testapi.c b/chromium/third_party/libxml/src/testapi.c
index 2701f27fc33..12c887f1364 100644
--- a/chromium/third_party/libxml/src/testapi.c
+++ b/chromium/third_party/libxml/src/testapi.c
@@ -17,6 +17,7 @@
#include <stdlib.h> /* for putenv() */
#include <string.h>
#include <libxml/xmlerror.h>
+#include <libxml/catalog.h>
#include <libxml/relaxng.h>
@@ -143,6 +144,9 @@ int main(int argc, char **argv) {
memset(longtab, 0, sizeof(longtab));
xmlInitParser();
+#ifdef LIBXML_CATALOG_ENABLED
+ xmlInitializeCatalog();
+#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlRelaxNGInitTypes();
#endif
@@ -178,7 +182,6 @@ int main(int argc, char **argv) {
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
-#include <libxml/catalog.h>
#include <libxml/chvalid.h>
#include <libxml/dict.h>
#include <libxml/encoding.h>
@@ -472,6 +475,9 @@ static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val,
xmlFreeParserCtxt(val);
}
+#if defined(LIBXML_SAX1_ENABLED) || \
+ defined(LIBXML_VALID_ENABLED) || \
+ defined(LIBXML_PUSH_ENABLED)
#define gen_nb_xmlSAXHandlerPtr 2
static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {
(void) no;
@@ -482,6 +488,7 @@ static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {
}
static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
}
+#endif
#define gen_nb_xmlValidCtxtPtr 2
static xmlValidCtxtPtr gen_xmlValidCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
@@ -1524,8 +1531,8 @@ test_htmlCreateMemoryParserCtxt(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);
desret_htmlParserCtxtPtr(ret_val);
@@ -1591,8 +1598,8 @@ test_htmlCreatePushParserCtxt(void) {
filename = gen_fileoutput(n_filename, 4);
enc = gen_xmlCharEncoding(n_enc, 5);
if ((chunk != NULL) &&
- (size > (int) strlen((const char *) chunk) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST chunk)))
+ size = 0;
ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);
desret_htmlParserCtxtPtr(ret_val);
@@ -1768,8 +1775,8 @@ test_htmlCtxtReadMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_int(n_options, 5);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_htmlDocPtr(ret_val);
@@ -2251,6 +2258,13 @@ test_htmlNewParserCtxt(void) {
return(test_ret);
}
+#ifdef LIBXML_HTML_ENABLED
+
+#define gen_nb_const_htmlSAXHandler_ptr 1
+#define gen_const_htmlSAXHandler_ptr(no, nr) NULL
+#define des_const_htmlSAXHandler_ptr(no, val, nr)
+#endif
+
static int
test_htmlNewSAXParserCtxt(void) {
@@ -2259,21 +2273,21 @@ test_htmlNewSAXParserCtxt(void) {
#if defined(LIBXML_HTML_ENABLED)
int mem_base;
htmlParserCtxtPtr ret_val;
- htmlSAXHandlerPtr sax; /* SAX handler */
+ htmlSAXHandler * sax; /* SAX handler */
int n_sax;
void * userData; /* user data */
int n_userData;
- for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
+ for (n_sax = 0;n_sax < gen_nb_const_htmlSAXHandler_ptr;n_sax++) {
for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
mem_base = xmlMemBlocks();
- sax = gen_htmlSAXHandlerPtr(n_sax, 0);
+ sax = gen_const_htmlSAXHandler_ptr(n_sax, 0);
userData = gen_userdata(n_userData, 1);
- ret_val = htmlNewSAXParserCtxt(sax, userData);
+ ret_val = htmlNewSAXParserCtxt((const htmlSAXHandler *)sax, userData);
desret_htmlParserCtxtPtr(ret_val);
call_tests++;
- des_htmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_htmlSAXHandler_ptr(n_sax, (const htmlSAXHandler *)sax, 0);
des_userdata(n_userData, userData, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
@@ -2394,8 +2408,8 @@ test_htmlParseChunk(void) {
size = gen_int(n_size, 2);
terminate = gen_int(n_terminate, 3);
if ((chunk != NULL) &&
- (size > (int) strlen((const char *) chunk) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST chunk)))
+ size = 0;
ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);
if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
@@ -2740,8 +2754,8 @@ test_htmlReadMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_int(n_options, 4);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_htmlDocPtr(ret_val);
@@ -3962,8 +3976,8 @@ test_xmlSAX2CDataBlock(void) {
value = gen_const_xmlChar_ptr(n_value, 1);
len = gen_int(n_len, 2);
if ((value != NULL) &&
- (len > (int) strlen((const char *) value) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST value)))
+ len = 0;
xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);
call_tests++;
@@ -4009,8 +4023,8 @@ test_xmlSAX2Characters(void) {
ch = gen_const_xmlChar_ptr(n_ch, 1);
len = gen_int(n_len, 2);
if ((ch != NULL) &&
- (len > (int) strlen((const char *) ch) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST ch)))
+ len = 0;
xmlSAX2Characters(ctx, (const xmlChar *)ch, len);
call_tests++;
@@ -4652,8 +4666,8 @@ test_xmlSAX2IgnorableWhitespace(void) {
ch = gen_const_xmlChar_ptr(n_ch, 1);
len = gen_int(n_len, 2);
if ((ch != NULL) &&
- (len > (int) strlen((const char *) ch) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST ch)))
+ len = 0;
xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);
call_tests++;
@@ -8273,8 +8287,8 @@ test_xmlDictExists(void) {
name = gen_const_xmlChar_ptr(n_name, 1);
len = gen_int(n_len, 2);
if ((name != NULL) &&
- (len > (int) strlen((const char *) name) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST name)))
+ len = 0;
ret_val = xmlDictExists(dict, (const xmlChar *)name, len);
desret_const_xmlChar_ptr(ret_val);
@@ -8332,8 +8346,8 @@ test_xmlDictLookup(void) {
name = gen_const_xmlChar_ptr(n_name, 1);
len = gen_int(n_len, 2);
if ((name != NULL) &&
- (len > (int) strlen((const char *) name) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST name)))
+ len = 0;
ret_val = xmlDictLookup(dict, (const xmlChar *)name, len);
desret_const_xmlChar_ptr(ret_val);
@@ -12180,8 +12194,8 @@ test_xmlCreatePushParserCtxt(void) {
size = gen_int(n_size, 3);
filename = gen_fileoutput(n_filename, 4);
if ((chunk != NULL) &&
- (size > (int) strlen((const char *) chunk) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST chunk)))
+ size = 0;
ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename);
desret_xmlParserCtxtPtr(ret_val);
@@ -12361,8 +12375,8 @@ test_xmlCtxtReadMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_parseroptions(n_options, 5);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlDocPtr(ret_val);
@@ -12457,8 +12471,8 @@ test_xmlCtxtResetPush(void) {
filename = gen_filepath(n_filename, 3);
encoding = gen_const_char_ptr(n_encoding, 4);
if ((chunk != NULL) &&
- (size > (int) strlen((const char *) chunk) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST chunk)))
+ size = 0;
ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);
desret_int(ret_val);
@@ -12879,27 +12893,31 @@ test_xmlNewParserCtxt(void) {
}
+#define gen_nb_const_xmlSAXHandler_ptr 1
+#define gen_const_xmlSAXHandler_ptr(no, nr) NULL
+#define des_const_xmlSAXHandler_ptr(no, val, nr)
+
static int
test_xmlNewSAXParserCtxt(void) {
int test_ret = 0;
int mem_base;
xmlParserCtxtPtr ret_val;
- xmlSAXHandlerPtr sax; /* SAX handler */
+ xmlSAXHandler * sax; /* SAX handler */
int n_sax;
void * userData; /* user data */
int n_userData;
- for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_sax = 0;n_sax < gen_nb_const_xmlSAXHandler_ptr;n_sax++) {
for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
mem_base = xmlMemBlocks();
- sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ sax = gen_const_xmlSAXHandler_ptr(n_sax, 0);
userData = gen_userdata(n_userData, 1);
- ret_val = xmlNewSAXParserCtxt(sax, userData);
+ ret_val = xmlNewSAXParserCtxt((const xmlSAXHandler *)sax, userData);
desret_xmlParserCtxtPtr(ret_val);
call_tests++;
- des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_xmlSAXHandler_ptr(n_sax, (const xmlSAXHandler *)sax, 0);
des_userdata(n_userData, userData, 1);
xmlResetLastError();
if (mem_base != xmlMemBlocks()) {
@@ -13107,8 +13125,8 @@ test_xmlParseChunk(void) {
size = gen_int(n_size, 2);
terminate = gen_int(n_terminate, 3);
if ((chunk != NULL) &&
- (size > (int) strlen((const char *) chunk) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST chunk)))
+ size = 0;
ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);
if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
@@ -13567,8 +13585,8 @@ test_xmlParseMemory(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlParseMemory((const char *)buffer, size);
desret_xmlDocPtr(ret_val);
@@ -13967,8 +13985,8 @@ test_xmlReadMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_parseroptions(n_options, 4);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlDocPtr(ret_val);
@@ -14092,8 +14110,8 @@ test_xmlRecoverMemory(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlRecoverMemory((const char *)buffer, size);
desret_xmlDocPtr(ret_val);
@@ -14396,8 +14414,8 @@ test_xmlSAXParseMemory(void) {
size = gen_int(n_size, 2);
recovery = gen_int(n_recovery, 3);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlSAXParseMemory(sax, (const char *)buffer, size, recovery);
desret_xmlDocPtr(ret_val);
@@ -14460,8 +14478,8 @@ test_xmlSAXParseMemoryWithData(void) {
recovery = gen_int(n_recovery, 3);
data = gen_userdata(n_data, 4);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlSAXParseMemoryWithData(sax, (const char *)buffer, size, recovery, data);
desret_xmlDocPtr(ret_val);
@@ -14578,8 +14596,8 @@ test_xmlSAXUserParseMemory(void) {
buffer = gen_const_char_ptr(n_buffer, 2);
size = gen_int(n_size, 3);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
@@ -15234,8 +15252,8 @@ test_xmlCreateMemoryParserCtxt(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);
desret_xmlParserCtxtPtr(ret_val);
@@ -15855,8 +15873,8 @@ test_xmlStringLenDecodeEntities(void) {
end2 = gen_xmlChar(n_end2, 5);
end3 = gen_xmlChar(n_end3, 6);
if ((str != NULL) &&
- (len > (int) strlen((const char *) str) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str)))
+ len = 0;
ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);
desret_xmlChar_ptr(ret_val);
@@ -16807,8 +16825,8 @@ test_xmlRelaxNGNewMemParserCtxt(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlRelaxNGNewMemParserCtxt((const char *)buffer, size);
desret_xmlRelaxNGParserCtxtPtr(ret_val);
@@ -17086,8 +17104,8 @@ test_xmlRelaxNGValidatePushCData(void) {
data = gen_const_xmlChar_ptr(n_data, 1);
len = gen_int(n_len, 2);
if ((data != NULL) &&
- (len > (int) strlen((const char *) data) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST data)))
+ len = 0;
ret_val = xmlRelaxNGValidatePushCData(ctxt, (const xmlChar *)data, len);
desret_int(ret_val);
@@ -17792,8 +17810,8 @@ test_xmlBufferAdd(void) {
str = gen_const_xmlChar_ptr(n_str, 1);
len = gen_int(n_len, 2);
if ((str != NULL) &&
- (len > (int) strlen((const char *) str) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str)))
+ len = 0;
ret_val = xmlBufferAdd(buf, (const xmlChar *)str, len);
desret_int(ret_val);
@@ -17841,8 +17859,8 @@ test_xmlBufferAddHead(void) {
str = gen_const_xmlChar_ptr(n_str, 1);
len = gen_int(n_len, 2);
if ((str != NULL) &&
- (len > (int) strlen((const char *) str) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str)))
+ len = 0;
ret_val = xmlBufferAddHead(buf, (const xmlChar *)str, len);
desret_int(ret_val);
@@ -18217,7 +18235,6 @@ test_xmlBufferSetAllocationScheme(void) {
scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
xmlBufferSetAllocationScheme(buf, scheme);
- if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
call_tests++;
des_xmlBufferPtr(n_buf, buf, 0);
des_xmlBufferAllocationScheme(n_scheme, scheme, 1);
@@ -18413,8 +18430,8 @@ test_xmlBuildQName(void) {
memory = gen_xmlChar_ptr(n_memory, 2);
len = gen_int(n_len, 3);
if ((prefix != NULL) &&
- (len > (int) strlen((const char *) prefix) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST prefix)))
+ len = 0;
ret_val = xmlBuildQName((const xmlChar *)ncname, (const xmlChar *)prefix, memory, len);
if ((ret_val != NULL) && (ret_val != ncname) &&
@@ -20184,8 +20201,8 @@ test_xmlNewCDataBlock(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
ret_val = xmlNewCDataBlock(doc, (const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
@@ -20760,8 +20777,8 @@ test_xmlNewDocTextLen(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
ret_val = xmlNewDocTextLen(doc, (const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
@@ -21306,8 +21323,8 @@ test_xmlNewTextLen(void) {
content = gen_const_xmlChar_ptr(n_content, 0);
len = gen_int(n_len, 1);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
ret_val = xmlNewTextLen((const xmlChar *)content, len);
desret_xmlNodePtr(ret_val);
@@ -21422,8 +21439,8 @@ test_xmlNodeAddContentLen(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
xmlNodeAddContentLen(cur, (const xmlChar *)content, len);
call_tests++;
@@ -21975,8 +21992,8 @@ test_xmlNodeSetContentLen(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
xmlNodeSetContentLen(cur, (const xmlChar *)content, len);
call_tests++;
@@ -23042,8 +23059,8 @@ test_xmlStringLenGetNodeList(void) {
value = gen_const_xmlChar_ptr(n_value, 1);
len = gen_int(n_len, 2);
if ((value != NULL) &&
- (len > (int) strlen((const char *) value) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST value)))
+ len = 0;
ret_val = xmlStringLenGetNodeList((const xmlDoc *)doc, (const xmlChar *)value, len);
desret_xmlNodePtr(ret_val);
@@ -23091,8 +23108,8 @@ test_xmlTextConcat(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
ret_val = xmlTextConcat(node, (const xmlChar *)content, len);
desret_int(ret_val);
@@ -26326,8 +26343,8 @@ test_xmlValidatePushCData(void) {
data = gen_const_xmlChar_ptr(n_data, 1);
len = gen_int(n_len, 2);
if ((data != NULL) &&
- (len > (int) strlen((const char *) data) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST data)))
+ len = 0;
ret_val = xmlValidatePushCData(ctxt, (const xmlChar *)data, len);
desret_int(ret_val);
@@ -27862,8 +27879,8 @@ test_xmlOutputBufferWrite(void) {
len = gen_int(n_len, 1);
buf = gen_const_char_ptr(n_buf, 2);
if ((buf != NULL) &&
- (len > (int) strlen((const char *) buf) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST buf)))
+ len = 0;
ret_val = xmlOutputBufferWrite(out, len, (const char *)buf);
desret_int(ret_val);
@@ -28091,8 +28108,8 @@ test_xmlParserInputBufferCreateMem(void) {
size = gen_int(n_size, 1);
enc = gen_xmlCharEncoding(n_enc, 2);
if ((mem != NULL) &&
- (size > (int) strlen((const char *) mem) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST mem)))
+ size = 0;
ret_val = xmlParserInputBufferCreateMem((const char *)mem, size, enc);
desret_xmlParserInputBufferPtr(ret_val);
@@ -28140,8 +28157,8 @@ test_xmlParserInputBufferCreateStatic(void) {
size = gen_int(n_size, 1);
enc = gen_xmlCharEncoding(n_enc, 2);
if ((mem != NULL) &&
- (size > (int) strlen((const char *) mem) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST mem)))
+ size = 0;
ret_val = xmlParserInputBufferCreateStatic((const char *)mem, size, enc);
desret_xmlParserInputBufferPtr(ret_val);
@@ -28228,8 +28245,8 @@ test_xmlParserInputBufferPush(void) {
len = gen_int(n_len, 1);
buf = gen_const_char_ptr(n_buf, 2);
if ((buf != NULL) &&
- (len > (int) strlen((const char *) buf) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST buf)))
+ len = 0;
ret_val = xmlParserInputBufferPush(in, len, (const char *)buf);
desret_int(ret_val);
@@ -29426,8 +29443,8 @@ test_xmlReaderForMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 3);
options = gen_parseroptions(n_options, 4);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);
desret_xmlTextReaderPtr(ret_val);
@@ -29612,8 +29629,8 @@ test_xmlReaderNewMemory(void) {
encoding = gen_const_char_ptr(n_encoding, 4);
options = gen_parseroptions(n_options, 5);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);
desret_int(ret_val);
@@ -33628,8 +33645,8 @@ test_xmlSchemaNewMemParserCtxt(void) {
buffer = gen_const_char_ptr(n_buffer, 0);
size = gen_int(n_size, 1);
if ((buffer != NULL) &&
- (size > (int) strlen((const char *) buffer) + 1))
- continue;
+ (size > xmlStrlen(BAD_CAST buffer)))
+ size = 0;
ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);
desret_xmlSchemaParserCtxtPtr(ret_val);
@@ -35490,8 +35507,8 @@ test_xmlCharStrndup(void) {
cur = gen_const_char_ptr(n_cur, 0);
len = gen_int(n_len, 1);
if ((cur != NULL) &&
- (len > (int) strlen((const char *) cur) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST cur)))
+ len = 0;
ret_val = xmlCharStrndup((const char *)cur, len);
desret_xmlChar_ptr(ret_val);
@@ -35932,8 +35949,8 @@ test_xmlStrncasecmp(void) {
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
if ((str2 != NULL) &&
- (len > (int) strlen((const char *) str2) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str2)))
+ len = 0;
ret_val = xmlStrncasecmp((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_int(ret_val);
@@ -35981,8 +35998,8 @@ test_xmlStrncatNew(void) {
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
if ((str2 != NULL) &&
- (len > (int) strlen((const char *) str2) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str2)))
+ len = 0;
ret_val = xmlStrncatNew((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_xmlChar_ptr(ret_val);
@@ -36030,8 +36047,8 @@ test_xmlStrncmp(void) {
str2 = gen_const_xmlChar_ptr(n_str2, 1);
len = gen_int(n_len, 2);
if ((str2 != NULL) &&
- (len > (int) strlen((const char *) str2) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str2)))
+ len = 0;
ret_val = xmlStrncmp((const xmlChar *)str1, (const xmlChar *)str2, len);
desret_int(ret_val);
@@ -36075,8 +36092,8 @@ test_xmlStrndup(void) {
cur = gen_const_xmlChar_ptr(n_cur, 0);
len = gen_int(n_len, 1);
if ((cur != NULL) &&
- (len > (int) strlen((const char *) cur) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST cur)))
+ len = 0;
ret_val = xmlStrndup((const xmlChar *)cur, len);
desret_xmlChar_ptr(ret_val);
@@ -36160,11 +36177,11 @@ test_xmlStrsub(void) {
start = gen_int(n_start, 1);
len = gen_int(n_len, 2);
if ((str != NULL) &&
- (start > (int) strlen((const char *) str) + 1))
- continue;
+ (start > xmlStrlen(BAD_CAST str)))
+ start = 0;
if ((str != NULL) &&
- (len > (int) strlen((const char *) str) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST str)))
+ len = 0;
ret_val = xmlStrsub((const xmlChar *)str, start, len);
desret_xmlChar_ptr(ret_val);
@@ -36350,8 +36367,8 @@ test_xmlUTF8Strndup(void) {
utf = gen_const_xmlChar_ptr(n_utf, 0);
len = gen_int(n_len, 1);
if ((utf != NULL) &&
- (len > (int) strlen((const char *) utf) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST utf)))
+ len = 0;
ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);
desret_xmlChar_ptr(ret_val);
@@ -36431,8 +36448,8 @@ test_xmlUTF8Strsize(void) {
utf = gen_const_xmlChar_ptr(n_utf, 0);
len = gen_int(n_len, 1);
if ((utf != NULL) &&
- (len > (int) strlen((const char *) utf) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST utf)))
+ len = 0;
ret_val = xmlUTF8Strsize((const xmlChar *)utf, len);
desret_int(ret_val);
@@ -36477,11 +36494,11 @@ test_xmlUTF8Strsub(void) {
start = gen_int(n_start, 1);
len = gen_int(n_len, 2);
if ((utf != NULL) &&
- (start > (int) strlen((const char *) utf) + 1))
- continue;
+ (start > xmlStrlen(BAD_CAST utf)))
+ start = 0;
if ((utf != NULL) &&
- (len > (int) strlen((const char *) utf) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST utf)))
+ len = 0;
ret_val = xmlUTF8Strsub((const xmlChar *)utf, start, len);
desret_xmlChar_ptr(ret_val);
@@ -43795,11 +43812,11 @@ test_xmlTextWriterWriteBase64(void) {
start = gen_int(n_start, 2);
len = gen_int(n_len, 3);
if ((data != NULL) &&
- (start > (int) strlen((const char *) data) + 1))
- continue;
+ (start > xmlStrlen(BAD_CAST data)))
+ start = 0;
if ((data != NULL) &&
- (len > (int) strlen((const char *) data) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST data)))
+ len = 0;
ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);
desret_int(ret_val);
@@ -43856,11 +43873,11 @@ test_xmlTextWriterWriteBinHex(void) {
start = gen_int(n_start, 2);
len = gen_int(n_len, 3);
if ((data != NULL) &&
- (start > (int) strlen((const char *) data) + 1))
- continue;
+ (start > xmlStrlen(BAD_CAST data)))
+ start = 0;
if ((data != NULL) &&
- (len > (int) strlen((const char *) data) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST data)))
+ len = 0;
ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);
desret_int(ret_val);
@@ -44792,8 +44809,8 @@ test_xmlTextWriterWriteRawLen(void) {
content = gen_const_xmlChar_ptr(n_content, 1);
len = gen_int(n_len, 2);
if ((content != NULL) &&
- (len > (int) strlen((const char *) content) + 1))
- continue;
+ (len > xmlStrlen(BAD_CAST content)))
+ len = 0;
ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);
desret_int(ret_val);
diff --git a/chromium/third_party/libxml/src/testchar.c b/chromium/third_party/libxml/src/testchar.c
index 2fc38697cb0..b612cbdb4a8 100644
--- a/chromium/third_party/libxml/src/testchar.c
+++ b/chromium/third_party/libxml/src/testchar.c
@@ -259,9 +259,10 @@ static int testDocumentRanges(void) {
return(test_ret);
}
-static int testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
+static int testCharRangeByte1(xmlParserCtxtPtr ctxt) {
int i = 0;
int len, c;
+ char *data = (char *) ctxt->input->cur;
data[1] = 0;
data[2] = 0;
@@ -269,6 +270,7 @@ static int testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
for (i = 0;i <= 0xFF;i++) {
data[0] = (char) i;
ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->nbErrors = 0;
lastError = 0;
c = xmlCurrentChar(ctxt, &len);
@@ -292,9 +294,10 @@ static int testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
return(0);
}
-static int testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
+static int testCharRangeByte2(xmlParserCtxtPtr ctxt) {
int i, j;
int len, c;
+ char *data = (char *) ctxt->input->cur;
data[2] = 0;
data[3] = 0;
@@ -303,6 +306,7 @@ static int testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
data[0] = (char) i;
data[1] = (char) j;
ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->nbErrors = 0;
lastError = 0;
c = xmlCurrentChar(ctxt, &len);
@@ -379,10 +383,11 @@ static int testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
return(0);
}
-static int testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
+static int testCharRangeByte3(xmlParserCtxtPtr ctxt) {
int i, j, k, K;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
+ char *data = (char *) ctxt->input->cur;
int value;
data[3] = 0;
@@ -395,6 +400,7 @@ static int testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
data[2] = (char) K;
value = (K & 0x3F) + ((j & 0x3F) << 6) + ((i & 0xF) << 12);
ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->nbErrors = 0;
lastError = 0;
c = xmlCurrentChar(ctxt, &len);
@@ -476,10 +482,11 @@ static int testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
return(0);
}
-static int testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
+static int testCharRangeByte4(xmlParserCtxtPtr ctxt) {
int i, j, k, K, l, L;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
+ char *data = (char *) ctxt->input->cur;
int value;
data[4] = 0;
@@ -496,6 +503,7 @@ static int testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
value = (L & 0x3F) + ((K & 0x3F) << 6) + ((j & 0x3F) << 12) +
((i & 0x7) << 18);
ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->nbErrors = 0;
lastError = 0;
c = xmlCurrentChar(ctxt, &len);
@@ -606,8 +614,8 @@ static int testCharRanges(void) {
fprintf(stderr, "Failed to allocate parser context\n");
return(1);
}
- buf = xmlParserInputBufferCreateStatic(data, sizeof(data),
- XML_CHAR_ENCODING_NONE);
+ buf = xmlParserInputBufferCreateMem(data, sizeof(data),
+ XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
fprintf(stderr, "Failed to allocate input buffer\n");
test_ret = 1;
@@ -628,16 +636,16 @@ static int testCharRanges(void) {
printf("testing char range: 1");
fflush(stdout);
- test_ret += testCharRangeByte1(ctxt, data);
+ test_ret += testCharRangeByte1(ctxt);
printf(" 2");
fflush(stdout);
- test_ret += testCharRangeByte2(ctxt, data);
+ test_ret += testCharRangeByte2(ctxt);
printf(" 3");
fflush(stdout);
- test_ret += testCharRangeByte3(ctxt, data);
+ test_ret += testCharRangeByte3(ctxt);
printf(" 4");
fflush(stdout);
- test_ret += testCharRangeByte4(ctxt, data);
+ test_ret += testCharRangeByte4(ctxt);
printf(" done\n");
fflush(stdout);
diff --git a/chromium/third_party/libxml/src/testdict.c b/chromium/third_party/libxml/src/testdict.c
index 40bebd0582b..4d745525711 100644
--- a/chromium/third_party/libxml/src/testdict.c
+++ b/chromium/third_party/libxml/src/testdict.c
@@ -159,7 +159,8 @@ static int run_test2(xmlDictPtr parent) {
fprintf(stderr, "Out of memory while creating sub-dictionary\n");
exit(1);
}
- memset(test2, 0, sizeof(test2));
+ /* Cast to avoid buggy warning on MSVC. */
+ memset((void *) test2, 0, sizeof(test2));
/*
* Fill in NB_STRINGS_MIN, at this point the dictionary should not grow
@@ -322,7 +323,8 @@ static int run_test1(void) {
fprintf(stderr, "Out of memory while creating dictionary\n");
exit(1);
}
- memset(test1, 0, sizeof(test1));
+ /* Cast to avoid buggy warning on MSVC. */
+ memset((void *) test1, 0, sizeof(test1));
/*
* Fill in NB_STRINGS_MIN, at this point the dictionary should not grow
diff --git a/chromium/third_party/libxml/src/testlimits.c b/chromium/third_party/libxml/src/testlimits.c
index 6322f8ba40c..0680f95b1cb 100644
--- a/chromium/third_party/libxml/src/testlimits.c
+++ b/chromium/third_party/libxml/src/testlimits.c
@@ -13,12 +13,8 @@
#include "libxml.h"
#include <stdio.h>
-#if !defined(_WIN32)
-#include <unistd.h>
-#endif
#include <string.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <time.h>
#include <libxml/parser.h>
@@ -401,7 +397,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
static char testErrors[32769];
static int testErrorsSize = 0;
-static void XMLCDECL
+static void
channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
int res;
@@ -1116,7 +1112,7 @@ commentCallback(void *ctx ATTRIBUTE_UNUSED,
* Display and format a warning messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
warningCallback(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...)
{
@@ -1133,7 +1129,7 @@ warningCallback(void *ctx ATTRIBUTE_UNUSED,
* Display and format a error messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
...)
{
@@ -1150,7 +1146,7 @@ errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
* Display and format a fatalError messages, gives file, line, position and
* extra parameters.
*/
-static void XMLCDECL
+static void
fatalErrorCallback(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...)
{
diff --git a/chromium/third_party/libxml/src/testrecurse.c b/chromium/third_party/libxml/src/testrecurse.c
index d213ebc63dc..acfe08b7613 100644
--- a/chromium/third_party/libxml/src/testrecurse.c
+++ b/chromium/third_party/libxml/src/testrecurse.c
@@ -13,19 +13,13 @@
#include "libxml.h"
#include <stdio.h>
-#if !defined(_WIN32)
-#include <unistd.h>
-#endif
#include <string.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
#include <libxml/tree.h>
#include <libxml/uri.h>
-#ifdef LIBXML_READER_ENABLED
-#include <libxml/xmlreader.h>
-#endif
/*
* O_BINARY is just for Windows compatibility - if it isn't defined
@@ -37,6 +31,9 @@
#define RD_FLAGS O_RDONLY
#endif
+#define OPT_SAX (1<<0)
+#define OPT_NO_SUBST (1<<1)
+
typedef int (*functest) (const char *filename, const char *result,
const char *error, int options);
@@ -58,7 +55,6 @@ static int checkTestFile(const char *filename);
#if defined(_WIN32)
#include <windows.h>
-#include <io.h>
typedef struct
{
@@ -157,17 +153,61 @@ static void globfree(glob_t *pglob) {
#include <libxml/xmlIO.h>
+typedef struct {
+ const char *URL;
+ const char *start;
+ const char *segment;
+ const char *finish;
+} xmlHugeDocParts;
+
+static const xmlHugeDocParts hugeDocTable[] = {
+ {
+ "test/recurse/huge.xml",
+
+ "<!DOCTYPE foo ["
+ "<!ELEMENT foo (bar*)> "
+ "<!ELEMENT bar (#PCDATA)> "
+ "<!ATTLIST bar attr CDATA #IMPLIED> "
+ "<!ENTITY a SYSTEM 'ga.ent'> "
+ "<!ENTITY b SYSTEM 'gb.ent'> "
+ "<!ENTITY c SYSTEM 'gc.ent'> "
+ "<!ENTITY f 'some internal data'> "
+ "<!ENTITY e '&f;&f;'> "
+ "<!ENTITY d '&e;&e;'> "
+ "]> "
+ "<foo>",
+
+ " <bar attr='&e; &f; &d;'>&a; &b; &c; &e; &f; &d;</bar>\n"
+ " <bar>_123456789_123456789_123456789_123456789</bar>\n"
+ " <bar>_123456789_123456789_123456789_123456789</bar>\n"
+ " <bar>_123456789_123456789_123456789_123456789</bar>\n",
+
+ "</foo>"
+ },
+ {
+ "test/recurse/huge_dtd.dtd",
+
+ "<!ELEMENT foo (#PCDATA)>\n"
+ "<!ENTITY ent 'success'>\n"
+ "<!ENTITY % a SYSTEM 'pa.ent'>\n"
+ "<!ENTITY % b SYSTEM 'pb.ent'>\n"
+ "<!ENTITY % c SYSTEM 'pc.ent'>\n"
+ "<!ENTITY % d '<!-- comment -->'>\n"
+ "<!ENTITY % e '%d;%d;'>\n"
+ "<!ENTITY % f '%e;%e;'>\n",
+
+ "<!ENTITY ent '%a; %b; %c; %d; %e; %f;'>\n"
+ "%a; %b; %c; %d; %e; %f;\n"
+ "<!-- _123456789_123456789_123456789_123456789 -->\n"
+ "<!-- _123456789_123456789_123456789_123456789 -->\n"
+ "<!-- _123456789_123456789_123456789_123456789 -->\n",
+
+ ""
+ },
+ { NULL, NULL, NULL, NULL }
+};
-static const char *start = "<!DOCTYPE foo [\
-<!ENTITY f 'some internal data'> \
-<!ENTITY e '&f;&f;'> \
-<!ENTITY d '&e;&e;'> \
-]> \
-<foo>";
-
-static const char *segment = " <bar>&e; &f; &d;</bar>\n";
-static const char *finish = "</foo>";
-
+static const xmlHugeDocParts *hugeDocParts;
static int curseg = 0;
static const char *current;
static int rlen;
@@ -176,14 +216,22 @@ static int rlen;
* hugeMatch:
* @URI: an URI to test
*
- * Check for an huge: query
+ * Check for a huge query
*
* Returns 1 if yes and 0 if another Input module should be used
*/
static int
hugeMatch(const char * URI) {
- if ((URI != NULL) && (!strncmp(URI, "huge:", 4)))
- return(1);
+ int i;
+
+ if (URI == NULL)
+ return(0);
+
+ for (i = 0; hugeDocTable[i].URL; i++) {
+ if (strcmp(URI, hugeDocTable[i].URL) == 0)
+ return(1);
+ }
+
return(0);
}
@@ -191,25 +239,36 @@ hugeMatch(const char * URI) {
* hugeOpen:
* @URI: an URI to test
*
- * Return a pointer to the huge: query handler, in this example simply
+ * Return a pointer to the huge query handler, in this example simply
* the current pointer...
*
* Returns an Input context or NULL in case or error
*/
static void *
hugeOpen(const char * URI) {
- if ((URI == NULL) || (strncmp(URI, "huge:", 4)))
+ int i;
+
+ if (URI == NULL)
return(NULL);
- rlen = strlen(start);
- current = start;
- return((void *) current);
+
+ for (i = 0; hugeDocTable[i].URL; i++) {
+ if (strcmp(URI, hugeDocTable[i].URL) == 0) {
+ hugeDocParts = hugeDocTable + i;
+ curseg = 0;
+ current = hugeDocParts->start;
+ rlen = strlen(current);
+ return((void *) current);
+ }
+ }
+
+ return(NULL);
}
/**
* hugeClose:
* @context: the read context
*
- * Close the huge: query handler
+ * Close the huge query handler
*
* Returns 0 or -1 in case of error
*/
@@ -219,7 +278,7 @@ hugeClose(void * context) {
return(0);
}
-#define MAX_NODES 1000000
+#define MAX_NODES 10000
/**
* hugeRead:
@@ -227,7 +286,7 @@ hugeClose(void * context) {
* @buffer: where to store data
* @len: number of bytes to read
*
- * Implement an huge: query read.
+ * Implement an huge query read.
*
* Returns the number of bytes read or -1 in case of error
*/
@@ -247,15 +306,11 @@ hugeRead(void *context, char *buffer, int len)
memcpy(buffer, current, len);
curseg ++;
if (curseg == MAX_NODES) {
- fprintf(stderr, "\n");
- rlen = strlen(finish);
- current = finish;
+ current = hugeDocParts->finish;
} else {
- if (curseg % (MAX_NODES / 10) == 0)
- fprintf(stderr, ".");
- rlen = strlen(segment);
- current = segment;
+ current = hugeDocParts->segment;
}
+ rlen = strlen(current);
} else {
memcpy(buffer, current, len);
rlen -= len;
@@ -309,7 +364,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
static char testErrors[32769];
static int testErrorsSize = 0;
-static void XMLCDECL
+static void
channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
int res;
@@ -588,6 +643,17 @@ initializeLibxml2(void) {
}
}
+static void
+initSAX(xmlParserCtxtPtr ctxt) {
+ ctxt->sax->startElementNs = NULL;
+ ctxt->sax->endElementNs = NULL;
+ ctxt->sax->characters = NULL;
+ ctxt->sax->cdataBlock = NULL;
+ ctxt->sax->ignorableWhitespace = NULL;
+ ctxt->sax->processingInstruction = NULL;
+ ctxt->sax->comment = NULL;
+}
+
/************************************************************************
* *
* File name and path utilities *
@@ -675,19 +741,28 @@ static int
recursiveDetectTest(const char *filename,
const char *result ATTRIBUTE_UNUSED,
const char *err ATTRIBUTE_UNUSED,
- int options ATTRIBUTE_UNUSED) {
+ int options) {
xmlDocPtr doc;
xmlParserCtxtPtr ctxt;
int res = 0;
+ /*
+ * XML_PARSE_DTDVALID is the only way to load external entities
+ * without XML_PARSE_NOENT. The validation result doesn't matter
+ * anyway.
+ */
+ int parserOptions = XML_PARSE_DTDVALID;
nb_tests++;
ctxt = xmlNewParserCtxt();
+ if (options & OPT_SAX)
+ initSAX(ctxt);
+ if ((options & OPT_NO_SUBST) == 0)
+ parserOptions |= XML_PARSE_NOENT;
/*
* base of the test, parse with the old API
*/
- doc = xmlCtxtReadFile(ctxt, filename, NULL,
- XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, parserOptions);
if ((doc != NULL) || (ctxt->lastError.code != XML_ERR_ENTITY_LOOP)) {
fprintf(stderr, "Failed to detect recursion in %s\n", filename);
xmlFreeParserCtxt(ctxt);
@@ -714,19 +789,23 @@ static int
notRecursiveDetectTest(const char *filename,
const char *result ATTRIBUTE_UNUSED,
const char *err ATTRIBUTE_UNUSED,
- int options ATTRIBUTE_UNUSED) {
+ int options) {
xmlDocPtr doc;
xmlParserCtxtPtr ctxt;
int res = 0;
+ int parserOptions = XML_PARSE_DTDLOAD;
nb_tests++;
ctxt = xmlNewParserCtxt();
+ if (options & OPT_SAX)
+ initSAX(ctxt);
+ if ((options & OPT_NO_SUBST) == 0)
+ parserOptions |= XML_PARSE_NOENT;
/*
* base of the test, parse with the old API
*/
- doc = xmlCtxtReadFile(ctxt, filename, NULL,
- XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, parserOptions);
if (doc == NULL) {
fprintf(stderr, "Failed to parse correct file %s\n", filename);
xmlFreeParserCtxt(ctxt);
@@ -738,7 +817,6 @@ notRecursiveDetectTest(const char *filename,
return(res);
}
-#ifdef LIBXML_READER_ENABLED
/**
* notRecursiveHugeTest:
* @filename: the file to parse
@@ -754,32 +832,179 @@ static int
notRecursiveHugeTest(const char *filename ATTRIBUTE_UNUSED,
const char *result ATTRIBUTE_UNUSED,
const char *err ATTRIBUTE_UNUSED,
- int options ATTRIBUTE_UNUSED) {
- xmlTextReaderPtr reader;
+ int options) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc;
int res = 0;
- int ret;
+ int parserOptions = XML_PARSE_DTDVALID;
nb_tests++;
- reader = xmlReaderForFile("huge:test" , NULL,
- XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
- if (reader == NULL) {
- fprintf(stderr, "Failed to open huge:test\n");
- return(1);
- }
- ret = xmlTextReaderRead(reader);
- while (ret == 1) {
- ret = xmlTextReaderRead(reader);
+ ctxt = xmlNewParserCtxt();
+ if (options & OPT_SAX)
+ initSAX(ctxt);
+ if ((options & OPT_NO_SUBST) == 0)
+ parserOptions |= XML_PARSE_NOENT;
+ doc = xmlCtxtReadFile(ctxt, "test/recurse/huge.xml", NULL, parserOptions);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse huge.xml\n");
+ res = 1;
+ } else {
+ xmlEntityPtr ent;
+ unsigned long fixed_cost = 50;
+ unsigned long f_size = xmlStrlen(BAD_CAST "some internal data");
+ unsigned long e_size;
+ unsigned long d_size;
+ unsigned long total_size;
+
+ ent = xmlGetDocEntity(doc, BAD_CAST "e");
+ e_size = f_size * 2 +
+ xmlStrlen(BAD_CAST "&f;") * 2 +
+ fixed_cost * 2;
+ if (ent->expandedSize != e_size) {
+ fprintf(stderr, "Wrong size for entity e: %lu (expected %lu)\n",
+ ent->expandedSize, e_size);
+ res = 1;
+ }
+
+ ent = xmlGetDocEntity(doc, BAD_CAST "b");
+ if (ent->expandedSize != e_size) {
+ fprintf(stderr, "Wrong size for entity b: %lu (expected %lu)\n",
+ ent->expandedSize, e_size);
+ res = 1;
+ }
+
+ ent = xmlGetDocEntity(doc, BAD_CAST "d");
+ d_size = e_size * 2 +
+ xmlStrlen(BAD_CAST "&e;") * 2 +
+ fixed_cost * 2;
+ if (ent->expandedSize != d_size) {
+ fprintf(stderr, "Wrong size for entity d: %lu (expected %lu)\n",
+ ent->expandedSize, d_size);
+ res = 1;
+ }
+
+ ent = xmlGetDocEntity(doc, BAD_CAST "c");
+ if (ent->expandedSize != d_size) {
+ fprintf(stderr, "Wrong size for entity c: %lu (expected %lu)\n",
+ ent->expandedSize, d_size);
+ res = 1;
+ }
+
+ if (ctxt->sizeentcopy < XML_MAX_TEXT_LENGTH) {
+ fprintf(stderr, "Total entity size too small: %lu\n",
+ ctxt->sizeentcopy);
+ res = 1;
+ }
+
+ total_size = (f_size + e_size + d_size + 3 * fixed_cost) *
+ (MAX_NODES - 1) * 3;
+ if (ctxt->sizeentcopy != total_size) {
+ fprintf(stderr, "Wrong total entity size: %lu (expected %lu)\n",
+ ctxt->sizeentcopy, total_size);
+ res = 1;
+ }
+
+ if (ctxt->sizeentities != 30) {
+ fprintf(stderr, "Wrong parsed entity size: %lu (expected %lu)\n",
+ ctxt->sizeentities, 30lu);
+ res = 1;
+ }
}
- if (ret != 0) {
- fprintf(stderr, "Failed to parser huge:test with entities\n");
+
+ xmlFreeDoc(doc);
+ xmlFreeParserCtxt(ctxt);
+
+ return(res);
+}
+
+/**
+ * notRecursiveHugeTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a memory generated file
+ * good cases
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+hugeDtdTest(const char *filename ATTRIBUTE_UNUSED,
+ const char *result ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc;
+ int res = 0;
+ int parserOptions = XML_PARSE_DTDVALID;
+
+ nb_tests++;
+
+ ctxt = xmlNewParserCtxt();
+ if (options & OPT_SAX)
+ initSAX(ctxt);
+ if ((options & OPT_NO_SUBST) == 0)
+ parserOptions |= XML_PARSE_NOENT;
+ doc = xmlCtxtReadFile(ctxt, "test/recurse/huge_dtd.xml", NULL,
+ parserOptions);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse huge_dtd.xml\n");
res = 1;
+ } else {
+ unsigned long fixed_cost = 50;
+ unsigned long a_size = xmlStrlen(BAD_CAST "<!-- comment -->");
+ unsigned long b_size;
+ unsigned long c_size;
+ unsigned long e_size;
+ unsigned long f_size;
+ unsigned long total_size;
+
+ if (ctxt->sizeentcopy < XML_MAX_TEXT_LENGTH) {
+ fprintf(stderr, "Total entity size too small: %lu\n",
+ ctxt->sizeentcopy);
+ res = 1;
+ }
+
+ b_size = (a_size + strlen("&a;") + fixed_cost) * 2;
+ c_size = (b_size + strlen("&b;") + fixed_cost) * 2;
+ /*
+ * Internal parameter entites are substitued eagerly and
+ * need different accounting.
+ */
+ e_size = a_size * 2;
+ f_size = e_size * 2;
+ total_size = /* internal */
+ e_size + f_size + fixed_cost * 4 +
+ (a_size + e_size + f_size + fixed_cost * 3) *
+ (MAX_NODES - 1) * 2 +
+ /* external */
+ (a_size + b_size + c_size + fixed_cost * 3) *
+ (MAX_NODES - 1) * 2 +
+ /* final reference in main doc */
+ strlen("success") + fixed_cost;
+ if (ctxt->sizeentcopy != total_size) {
+ fprintf(stderr, "Wrong total entity size: %lu (expected %lu)\n",
+ ctxt->sizeentcopy, total_size);
+ res = 1;
+ }
+
+ total_size = strlen(hugeDocParts->start) +
+ strlen(hugeDocParts->segment) * (MAX_NODES - 1) +
+ strlen(hugeDocParts->finish) +
+ 28;
+ if (ctxt->sizeentities != total_size) {
+ fprintf(stderr, "Wrong parsed entity size: %lu (expected %lu)\n",
+ ctxt->sizeentities, total_size);
+ res = 1;
+ }
}
- xmlFreeTextReader(reader);
+
+ xmlFreeDoc(doc);
+ xmlFreeParserCtxt(ctxt);
return(res);
}
-#endif
/************************************************************************
* *
@@ -792,14 +1017,36 @@ testDesc testDescriptions[] = {
{ "Parsing recursive test cases" ,
recursiveDetectTest, "./test/recurse/lol*.xml", NULL, NULL, NULL,
0 },
+ { "Parsing recursive test cases (no substitution)" ,
+ recursiveDetectTest, "./test/recurse/lol*.xml", NULL, NULL, NULL,
+ OPT_NO_SUBST },
+ { "Parsing recursive test cases (SAX)" ,
+ recursiveDetectTest, "./test/recurse/lol*.xml", NULL, NULL, NULL,
+ OPT_SAX },
+ { "Parsing recursive test cases (SAX, no substitution)" ,
+ recursiveDetectTest, "./test/recurse/lol*.xml", NULL, NULL, NULL,
+ OPT_SAX | OPT_NO_SUBST },
{ "Parsing non-recursive test cases" ,
notRecursiveDetectTest, "./test/recurse/good*.xml", NULL, NULL, NULL,
0 },
-#ifdef LIBXML_READER_ENABLED
+ { "Parsing non-recursive test cases (SAX)" ,
+ notRecursiveDetectTest, "./test/recurse/good*.xml", NULL, NULL, NULL,
+ OPT_SAX },
{ "Parsing non-recursive huge case" ,
notRecursiveHugeTest, NULL, NULL, NULL, NULL,
0 },
-#endif
+ { "Parsing non-recursive huge case (no substitution)" ,
+ notRecursiveHugeTest, NULL, NULL, NULL, NULL,
+ OPT_NO_SUBST },
+ { "Parsing non-recursive huge case (SAX)" ,
+ notRecursiveHugeTest, NULL, NULL, NULL, NULL,
+ OPT_SAX },
+ { "Parsing non-recursive huge case (SAX, no substitution)" ,
+ notRecursiveHugeTest, NULL, NULL, NULL, NULL,
+ OPT_SAX | OPT_NO_SUBST },
+ { "Parsing non-recursive huge DTD case" ,
+ hugeDtdTest, NULL, NULL, NULL, NULL,
+ 0 },
{NULL, NULL, NULL, NULL, NULL, NULL, 0}
};
diff --git a/chromium/third_party/libxml/src/threads.c b/chromium/third_party/libxml/src/threads.c
index 9fa477e53b6..56a917e6de5 100644
--- a/chromium/third_party/libxml/src/threads.c
+++ b/chromium/third_party/libxml/src/threads.c
@@ -16,20 +16,6 @@
#include <libxml/threads.h>
#include <libxml/globals.h>
-#ifdef LIBXML_THREAD_ENABLED
- #ifdef HAVE_PTHREAD_H
- #include <pthread.h>
- #define HAVE_POSIX_THREADS
- #elif defined(_WIN32)
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #ifndef HAVE_COMPILER_TLS
- #include <process.h>
- #endif
- #define HAVE_WIN32_THREADS
- #endif
-#endif
-
#if defined(SOLARIS)
#include <note.h>
#endif
@@ -39,15 +25,40 @@
/* #define DEBUG_THREADS */
-#ifdef HAVE_POSIX_THREADS
+#if defined(HAVE_POSIX_THREADS) && \
+ defined(__GLIBC__) && \
+ __GLIBC__ * 100 + __GLIBC_MINOR__ >= 234
-#if defined(__GNUC__) && defined(__linux__)
+/*
+ * The modern way available since glibc 2.32.
+ *
+ * The check above is for glibc 2.34 which merged the pthread symbols into
+ * libc. Since we still allow linking without pthread symbols (see below),
+ * this only works if pthread symbols are guaranteed to be available.
+ */
-static int libxml_is_threaded = -1;
+#include <sys/single_threaded.h>
-#define XML_PTHREAD_WEAK
+#define XML_IS_THREADED() (!__libc_single_threaded)
+
+#elif defined(HAVE_POSIX_THREADS) && \
+ defined(__GLIBC__) && \
+ defined(__GNUC__)
+
+/*
+ * The traditional way to check for single-threaded applications with
+ * glibc was to check whether the separate libpthread library is
+ * linked in. This works by not linking libxml2 with libpthread (see
+ * BASE_THREAD_LIBS in configure.ac and Makefile.am) and declaring
+ * pthread functions as weak symbols.
+ *
+ * In glibc 2.34, the pthread symbols were moved from libpthread to libc,
+ * so this doesn't work anymore.
+ *
+ * At some point, this legacy code and the BASE_THREAD_LIBS hack in
+ * configure.ac can probably be removed.
+ */
-#pragma weak pthread_once
#pragma weak pthread_getspecific
#pragma weak pthread_setspecific
#pragma weak pthread_key_create
@@ -65,13 +76,16 @@ static int libxml_is_threaded = -1;
#pragma weak pthread_key_delete
#pragma weak pthread_cond_signal
-#else /* __GNUC__, __GLIBC__, __linux__ */
+#define XML_PTHREAD_WEAK
+#define XML_IS_THREADED() libxml_is_threaded
+
+static int libxml_is_threaded = -1;
-static int libxml_is_threaded = 1;
+#else /* other POSIX platforms */
-#endif /* __GNUC__, __GLIBC__, __linux__ */
+#define XML_IS_THREADED() 1
-#endif /* HAVE_POSIX_THREADS */
+#endif
/*
* TODO: this module still uses malloc/free and not xmlMalloc/xmlFree
@@ -80,19 +94,6 @@ static int libxml_is_threaded = 1;
*/
/*
- * xmlMutex are a simple mutual exception locks
- */
-struct _xmlMutex {
-#ifdef HAVE_POSIX_THREADS
- pthread_mutex_t lock;
-#elif defined HAVE_WIN32_THREADS
- CRITICAL_SECTION cs;
-#else
- int empty;
-#endif
-};
-
-/*
* xmlRMutex are reentrant mutual exception locks
*/
struct _xmlRMutex {
@@ -118,8 +119,6 @@ struct _xmlRMutex {
#ifdef HAVE_POSIX_THREADS
static pthread_key_t globalkey;
static pthread_t mainthread;
-static pthread_once_t once_control = PTHREAD_ONCE_INIT;
-static pthread_once_t once_control_init = PTHREAD_ONCE_INIT;
static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER;
#elif defined HAVE_WIN32_THREADS
#if defined(HAVE_COMPILER_TLS)
@@ -129,18 +128,28 @@ static __declspec(thread) int tlstate_inited = 0;
static DWORD globalkey = TLS_OUT_OF_INDEXES;
#endif /* HAVE_COMPILER_TLS */
static DWORD mainthread;
-static struct {
- DWORD done;
- LONG control;
-} run_once = { 0, 0};
static volatile LPCRITICAL_SECTION global_init_lock = NULL;
#endif
static xmlRMutexPtr xmlLibraryLock = NULL;
-#ifdef LIBXML_THREAD_ENABLED
-static void xmlOnceInit(void);
+/**
+ * xmlInitMutex:
+ * @mutex: the mutex
+ *
+ * Initialize a mutex.
+ */
+void
+xmlInitMutex(xmlMutexPtr mutex)
+{
+#ifdef HAVE_POSIX_THREADS
+ pthread_mutex_init(&mutex->lock, NULL);
+#elif defined HAVE_WIN32_THREADS
+ InitializeCriticalSection(&mutex->cs);
+#else
+ (void) mutex;
#endif
+}
/**
* xmlNewMutex:
@@ -157,21 +166,33 @@ xmlNewMutex(void)
if ((tok = malloc(sizeof(xmlMutex))) == NULL)
return (NULL);
+ xmlInitMutex(tok);
+ return (tok);
+}
+
+/**
+ * xmlCleanupMutex:
+ * @mutex: the simple mutex
+ *
+ * Reclaim resources associated with a mutex.
+ */
+void
+xmlCleanupMutex(xmlMutexPtr mutex)
+{
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0)
- pthread_mutex_init(&tok->lock, NULL);
+ pthread_mutex_destroy(&mutex->lock);
#elif defined HAVE_WIN32_THREADS
- InitializeCriticalSection(&tok->cs);
+ DeleteCriticalSection(&mutex->cs);
+#else
+ (void) mutex;
#endif
- return (tok);
}
/**
* xmlFreeMutex:
* @tok: the simple mutex
*
- * xmlFreeMutex() is used to reclaim resources associated with a libxml2 token
- * struct.
+ * Free a mutex.
*/
void
xmlFreeMutex(xmlMutexPtr tok)
@@ -179,12 +200,7 @@ xmlFreeMutex(xmlMutexPtr tok)
if (tok == NULL)
return;
-#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0)
- pthread_mutex_destroy(&tok->lock);
-#elif defined HAVE_WIN32_THREADS
- DeleteCriticalSection(&tok->cs);
-#endif
+ xmlCleanupMutex(tok);
free(tok);
}
@@ -200,7 +216,11 @@ xmlMutexLock(xmlMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0)
+ /*
+ * This assumes that __libc_single_threaded won't change while the
+ * lock is held.
+ */
+ if (XML_IS_THREADED() != 0)
pthread_mutex_lock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
EnterCriticalSection(&tok->cs);
@@ -220,7 +240,7 @@ xmlMutexUnlock(xmlMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0)
+ if (XML_IS_THREADED() != 0)
pthread_mutex_unlock(&tok->lock);
#elif defined HAVE_WIN32_THREADS
LeaveCriticalSection(&tok->cs);
@@ -245,12 +265,10 @@ xmlNewRMutex(void)
if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
return (NULL);
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0) {
- pthread_mutex_init(&tok->lock, NULL);
- tok->held = 0;
- tok->waiters = 0;
- pthread_cond_init(&tok->cv, NULL);
- }
+ pthread_mutex_init(&tok->lock, NULL);
+ tok->held = 0;
+ tok->waiters = 0;
+ pthread_cond_init(&tok->cv, NULL);
#elif defined HAVE_WIN32_THREADS
InitializeCriticalSection(&tok->cs);
#endif
@@ -270,10 +288,8 @@ xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0) {
- pthread_mutex_destroy(&tok->lock);
- pthread_cond_destroy(&tok->cv);
- }
+ pthread_mutex_destroy(&tok->lock);
+ pthread_cond_destroy(&tok->cv);
#elif defined HAVE_WIN32_THREADS
DeleteCriticalSection(&tok->cs);
#endif
@@ -292,7 +308,7 @@ xmlRMutexLock(xmlRMutexPtr tok)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded == 0)
+ if (XML_IS_THREADED() == 0)
return;
pthread_mutex_lock(&tok->lock);
@@ -328,7 +344,7 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
if (tok == NULL)
return;
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded == 0)
+ if (XML_IS_THREADED() == 0)
return;
pthread_mutex_lock(&tok->lock);
@@ -355,11 +371,14 @@ __xmlGlobalInitMutexLock(void)
{
/* Make sure the global init lock is initialized and then lock it. */
#ifdef HAVE_POSIX_THREADS
- /* The mutex is statically initialized, so we just lock it. */
#ifdef XML_PTHREAD_WEAK
if (pthread_mutex_lock == NULL)
return;
-#endif /* XML_PTHREAD_WEAK */
+#else
+ if (XML_IS_THREADED() == 0)
+ return;
+#endif
+ /* The mutex is statically initialized, so we just lock it. */
pthread_mutex_lock(&global_init_lock);
#elif defined HAVE_WIN32_THREADS
LPCRITICAL_SECTION cs;
@@ -402,9 +421,12 @@ __xmlGlobalInitMutexUnlock(void)
{
#ifdef HAVE_POSIX_THREADS
#ifdef XML_PTHREAD_WEAK
- if (pthread_mutex_unlock == NULL)
+ if (pthread_mutex_lock == NULL)
return;
-#endif /* XML_PTHREAD_WEAK */
+#else
+ if (XML_IS_THREADED() == 0)
+ return;
+#endif
pthread_mutex_unlock(&global_init_lock);
#elif defined HAVE_WIN32_THREADS
if (global_init_lock != NULL) {
@@ -496,7 +518,7 @@ typedef struct _xmlGlobalStateCleanupHelperParams {
void *memory;
} xmlGlobalStateCleanupHelperParams;
-static void XMLCDECL
+static void
xmlGlobalStateCleanupHelper(void *p)
{
xmlGlobalStateCleanupHelperParams *params =
@@ -525,6 +547,8 @@ static CRITICAL_SECTION cleanup_helpers_cs;
/**
* xmlGetGlobalState:
*
+ * DEPRECATED: Internal function, do not use.
+ *
* xmlGetGlobalState() is called to retrieve the global state for a thread.
*
* Returns the thread global state or NULL in case of error
@@ -535,11 +559,9 @@ xmlGetGlobalState(void)
#ifdef HAVE_POSIX_THREADS
xmlGlobalState *globalval;
- if (libxml_is_threaded == 0)
+ if (XML_IS_THREADED() == 0)
return (NULL);
- pthread_once(&once_control, xmlOnceInit);
-
if ((globalval = (xmlGlobalState *)
pthread_getspecific(globalkey)) == NULL) {
xmlGlobalState *tsd = xmlNewGlobalState();
@@ -560,8 +582,6 @@ xmlGetGlobalState(void)
#else /* HAVE_COMPILER_TLS */
xmlGlobalState *globalval;
xmlGlobalStateCleanupHelperParams *p;
-
- xmlOnceInit();
#if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL)
globalval = (xmlGlobalState *) TlsGetValue(globalkey);
#else
@@ -618,6 +638,8 @@ xmlGetGlobalState(void)
/**
* xmlGetThreadId:
*
+ * DEPRECATED: Internal function, do not use.
+ *
* xmlGetThreadId() find the current thread ID number
* Note that this is likely to be broken on some platforms using pthreads
* as the specification doesn't mandate pthread_t to be an integer type
@@ -631,7 +653,7 @@ xmlGetThreadId(void)
pthread_t id;
int ret;
- if (libxml_is_threaded == 0)
+ if (XML_IS_THREADED() == 0)
return (0);
id = pthread_self();
/* horrible but preserves compat, see warning above */
@@ -647,6 +669,8 @@ xmlGetThreadId(void)
/**
* xmlIsMainThread:
*
+ * DEPRECATED: Internal function, do not use.
+ *
* xmlIsMainThread() check whether the current thread is the main thread.
*
* Returns 1 if the current thread is the main thread, 0 otherwise
@@ -654,20 +678,14 @@ xmlGetThreadId(void)
int
xmlIsMainThread(void)
{
-#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded == -1)
- xmlInitThreads();
- if (libxml_is_threaded == 0)
- return (1);
- pthread_once(&once_control, xmlOnceInit);
-#elif defined HAVE_WIN32_THREADS
- xmlOnceInit();
-#endif
+ xmlInitParser();
#ifdef DEBUG_THREADS
xmlGenericError(xmlGenericErrorContext, "xmlIsMainThread()\n");
#endif
#ifdef HAVE_POSIX_THREADS
+ if (XML_IS_THREADED() == 0)
+ return (1);
return (pthread_equal(mainthread,pthread_self()));
#elif defined HAVE_WIN32_THREADS
return (mainthread == GetCurrentThreadId());
@@ -709,19 +727,31 @@ xmlUnlockLibrary(void)
/**
* xmlInitThreads:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
- *
- * xmlInitThreads() is used to to initialize all the thread related
- * data of the libxml2 library.
+ * DEPRECATED: Alias for xmlInitParser.
*/
void
xmlInitThreads(void)
{
+ xmlInitParser();
+}
+
+/**
+ * xmlInitThreadsInternal:
+ *
+ * Used to to initialize all the thread related data.
+ */
+void
+xmlInitThreadsInternal(void)
+{
#ifdef HAVE_POSIX_THREADS
#ifdef XML_PTHREAD_WEAK
- if (libxml_is_threaded == -1) {
- if ((pthread_once != NULL) &&
+ /*
+ * This is somewhat unreliable since libpthread could be loaded
+ * later with dlopen() and threads could be created. But it's
+ * long-standing behavior and hard to work around.
+ */
+ if (libxml_is_threaded == -1)
+ libxml_is_threaded =
(pthread_getspecific != NULL) &&
(pthread_setspecific != NULL) &&
(pthread_key_create != NULL) &&
@@ -733,51 +763,56 @@ xmlInitThreads(void)
(pthread_cond_init != NULL) &&
(pthread_cond_destroy != NULL) &&
(pthread_cond_wait != NULL) &&
- (pthread_equal != NULL) &&
+ /*
+ * pthread_equal can be inline, resuting in -Waddress warnings.
+ * Let's assume it's available if all the other functions are.
+ */
+ /* (pthread_equal != NULL) && */
(pthread_self != NULL) &&
- (pthread_cond_signal != NULL)) {
- libxml_is_threaded = 1;
-
-/* fprintf(stderr, "Running multithreaded\n"); */
- } else {
-
-/* fprintf(stderr, "Running without multithread\n"); */
- libxml_is_threaded = 0;
- }
- }
+ (pthread_cond_signal != NULL);
+ if (libxml_is_threaded == 0)
+ return;
#endif /* XML_PTHREAD_WEAK */
+ pthread_key_create(&globalkey, xmlFreeGlobalState);
+ mainthread = pthread_self();
+#elif defined(HAVE_WIN32_THREADS)
+#if !defined(HAVE_COMPILER_TLS)
+#if !defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)
+ InitializeCriticalSection(&cleanup_helpers_cs);
+#endif
+ globalkey = TlsAlloc();
+#endif
+ mainthread = GetCurrentThreadId();
#endif
}
/**
* xmlCleanupThreads:
*
- * DEPRECATED: This function will be made private. Call xmlCleanupParser
+ * DEPRECATED: This function is a no-op. 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.
- *
- * xmlCleanupThreads() is used to to cleanup all the thread related
- * data of the libxml2 library once processing has ended.
- *
- * WARNING: if your application is multithreaded or has plugin support
- * calling this may crash the application if another thread or
- * a plugin is still using libxml2. It's sometimes very hard to
- * guess if libxml2 is in use in the application, some libraries
- * or plugins may use it without notice. In case of doubt abstain
- * from calling this function or do it just before calling exit()
- * to avoid leak reports from valgrind !
*/
void
xmlCleanupThreads(void)
{
-#ifdef DEBUG_THREADS
- xmlGenericError(xmlGenericErrorContext, "xmlCleanupThreads()\n");
-#endif
+}
+
+/**
+ * xmlCleanupThreadsInternal:
+ *
+ * Used to to cleanup all the thread related data.
+ */
+void
+xmlCleanupThreadsInternal(void)
+{
#ifdef HAVE_POSIX_THREADS
- if (libxml_is_threaded != 0)
- pthread_key_delete(globalkey);
- once_control = once_control_init;
+#ifdef XML_PTHREAD_WEAK
+ if (libxml_is_threaded == 0)
+ return;
+#endif /* XML_PTHREAD_WEAK */
+ pthread_key_delete(globalkey);
#elif defined(HAVE_WIN32_THREADS)
#if !defined(HAVE_COMPILER_TLS)
if (globalkey != TLS_OUT_OF_INDEXES) {
@@ -803,51 +838,8 @@ xmlCleanupThreads(void)
DeleteCriticalSection(&cleanup_helpers_cs);
#endif
#endif
- run_once.done = 0;
- run_once.control = 0;
-#endif
-}
-
-#ifdef LIBXML_THREAD_ENABLED
-
-/**
- * xmlOnceInit
- *
- * xmlOnceInit() is used to initialize the value of mainthread for use
- * in other routines. This function should only be called using
- * pthread_once() in association with the once_control variable to ensure
- * that the function is only called once. See man pthread_once for more
- * details.
- */
-static void
-xmlOnceInit(void)
-{
-#ifdef HAVE_POSIX_THREADS
- (void) pthread_key_create(&globalkey, xmlFreeGlobalState);
- mainthread = pthread_self();
- __xmlInitializeDict();
-#elif defined(HAVE_WIN32_THREADS)
- if (!run_once.done) {
- if (InterlockedIncrement(&run_once.control) == 1) {
-#if !defined(HAVE_COMPILER_TLS)
-#if !defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)
- InitializeCriticalSection(&cleanup_helpers_cs);
-#endif
- globalkey = TlsAlloc();
-#endif
- mainthread = GetCurrentThreadId();
- __xmlInitializeDict();
- run_once.done = 1;
- } else {
- /* Another thread is working; give up our slice and
- * wait until they're done. */
- while (!run_once.done)
- Sleep(0);
- }
- }
#endif
}
-#endif
/**
* DllMain:
@@ -863,7 +855,7 @@ xmlOnceInit(void)
#ifdef HAVE_POSIX_THREADS
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
#if defined(LIBXML_STATIC_FOR_DLL)
-int XMLCALL
+int
xmlDllMain(ATTRIBUTE_UNUSED void *hinstDLL, unsigned long fdwReason,
ATTRIBUTE_UNUSED void *lpvReserved)
#else
diff --git a/chromium/third_party/libxml/src/tree.c b/chromium/third_party/libxml/src/tree.c
index 6a42f1187d3..e0545c1e635 100644
--- a/chromium/third_party/libxml/src/tree.c
+++ b/chromium/third_party/libxml/src/tree.c
@@ -1411,14 +1411,21 @@ xmlStringLenGetNodeList(const xmlDoc *doc, const xmlChar *value, int len) {
if (val != NULL) xmlFree(val);
goto out;
}
- else if ((ent != NULL) && (ent->children == NULL)) {
+ else if ((ent != NULL) &&
+ ((ent->flags & XML_ENT_PARSED) == 0) &&
+ ((ent->flags & XML_ENT_EXPANDING) == 0)) {
xmlNodePtr temp;
- /* Set to non-NULL value to avoid recursion. */
- ent->children = (xmlNodePtr) -1;
+ /*
+ * The entity should have been checked already,
+ * but set the flag anyway to avoid recursion.
+ */
+ ent->flags |= XML_ENT_EXPANDING;
ent->children = xmlStringGetNodeList(doc,
(const xmlChar*)node->content);
ent->owner = 1;
+ ent->flags &= ~XML_ENT_EXPANDING;
+ ent->flags |= XML_ENT_PARSED;
temp = ent->children;
while (temp) {
temp->parent = (xmlNodePtr)ent;
@@ -1490,9 +1497,9 @@ out:
*/
xmlNodePtr
xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
- xmlNodePtr ret = NULL, last = NULL;
+ xmlNodePtr ret = NULL, head = NULL, last = NULL;
xmlNodePtr node;
- xmlChar *val;
+ xmlChar *val = NULL;
const xmlChar *cur = value;
const xmlChar *q;
xmlEntityPtr ent;
@@ -1590,14 +1597,12 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
*/
if (!xmlBufIsEmpty(buf)) {
node = xmlNewDocText(doc, NULL);
- if (node == NULL) {
- if (val != NULL) xmlFree(val);
- goto out;
- }
+ if (node == NULL)
+ goto out;
node->content = xmlBufDetach(buf);
if (last == NULL) {
- last = ret = node;
+ last = head = node;
} else {
last = xmlAddNextSibling(last, node);
}
@@ -1607,18 +1612,23 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
* Create a new REFERENCE_REF node
*/
node = xmlNewReference(doc, val);
- if (node == NULL) {
- if (val != NULL) xmlFree(val);
+ if (node == NULL)
goto out;
- }
- else if ((ent != NULL) && (ent->children == NULL)) {
+ if ((ent != NULL) &&
+ ((ent->flags & XML_ENT_PARSED) == 0) &&
+ ((ent->flags & XML_ENT_EXPANDING) == 0)) {
xmlNodePtr temp;
- /* Set to non-NULL value to avoid recursion. */
- ent->children = (xmlNodePtr) -1;
+ /*
+ * The entity should have been checked already,
+ * but set the flag anyway to avoid recursion.
+ */
+ ent->flags |= XML_ENT_EXPANDING;
ent->children = xmlStringGetNodeList(doc,
(const xmlChar*)node->content);
ent->owner = 1;
+ ent->flags &= ~XML_ENT_EXPANDING;
+ ent->flags |= XML_ENT_PARSED;
temp = ent->children;
while (temp) {
temp->parent = (xmlNodePtr)ent;
@@ -1627,12 +1637,13 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
}
}
if (last == NULL) {
- last = ret = node;
+ last = head = node;
} else {
last = xmlAddNextSibling(last, node);
}
}
xmlFree(val);
+ val = NULL;
}
cur++;
q = cur;
@@ -1651,7 +1662,7 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
} else
cur++;
}
- if ((cur != q) || (ret == NULL)) {
+ if ((cur != q) || (head == NULL)) {
/*
* Handle the last piece of text.
*/
@@ -1660,21 +1671,24 @@ xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
if (!xmlBufIsEmpty(buf)) {
node = xmlNewDocText(doc, NULL);
- if (node == NULL) {
- xmlBufFree(buf);
- return(NULL);
- }
+ if (node == NULL)
+ goto out;
node->content = xmlBufDetach(buf);
if (last == NULL) {
- ret = node;
+ head = node;
} else {
xmlAddNextSibling(last, node);
}
}
+ ret = head;
+ head = NULL;
+
out:
xmlBufFree(buf);
+ if (val != NULL) xmlFree(val);
+ if (head != NULL) xmlFreeNodeList(head);
return(ret);
}
@@ -1860,7 +1874,7 @@ xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns,
if ((node != NULL) && (node->type != XML_ELEMENT_NODE)) {
if ((eatname == 1) &&
- ((node->doc == NULL) ||
+ ((node->doc == NULL) || (node->doc->dict == NULL) ||
(!(xmlDictOwns(node->doc->dict, name)))))
xmlFree((xmlChar *) name);
return (NULL);
@@ -1873,6 +1887,7 @@ xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns,
if (cur == NULL) {
if ((eatname == 1) &&
((node == NULL) || (node->doc == NULL) ||
+ (node->doc->dict == NULL) ||
(!(xmlDictOwns(node->doc->dict, name)))))
xmlFree((xmlChar *) name);
xmlTreeErrMemory("building attribute");
@@ -2383,8 +2398,9 @@ xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns,
}
} else {
/* if name don't come from the doc dictionary free it here */
- if ((name != NULL) && (doc != NULL) &&
- (!(xmlDictOwns(doc->dict, name))))
+ if ((name != NULL) &&
+ ((doc == NULL) || (doc->dict == NULL) ||
+ (!(xmlDictOwns(doc->dict, name)))))
xmlFree(name);
}
return(cur);
@@ -4085,9 +4101,6 @@ xmlCopyNamespaceList(xmlNsPtr cur) {
return(ret);
}
-static xmlNodePtr
-xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
-
static xmlAttrPtr
xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
xmlAttrPtr ret;
@@ -4218,8 +4231,10 @@ xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) {
return(NULL);
while (cur != NULL) {
q = xmlCopyProp(target, cur);
- if (q == NULL)
+ if (q == NULL) {
+ xmlFreePropList(ret);
return(NULL);
+ }
if (p == NULL) {
ret = p = q;
} else {
@@ -4251,7 +4266,7 @@ xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) {
* namespace info, but don't recurse on children.
*/
-static xmlNodePtr
+xmlNodePtr
xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
int extended) {
xmlNodePtr ret;
@@ -4450,7 +4465,7 @@ out:
return(ret);
}
-static xmlNodePtr
+xmlNodePtr
xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
xmlNodePtr ret = NULL;
xmlNodePtr p = NULL,q;
@@ -4464,7 +4479,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
}
if (doc->intSubset == NULL) {
q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
- if (q == NULL) return(NULL);
+ if (q == NULL) goto error;
q->doc = doc;
q->parent = parent;
doc->intSubset = (xmlDtdPtr) q;
@@ -4476,7 +4491,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
} else
#endif /* LIBXML_TREE_ENABLED */
q = xmlStaticCopyNode(node, doc, parent, 1);
- if (q == NULL) return(NULL);
+ if (q == NULL) goto error;
if (ret == NULL) {
q->prev = NULL;
ret = p = q;
@@ -4489,6 +4504,9 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
node = node->next;
}
return(ret);
+error:
+ xmlFreeNodeList(ret);
+ return(NULL);
}
/**
@@ -7205,8 +7223,6 @@ xmlBufferDetach(xmlBufferPtr buf) {
if (buf == NULL)
return(NULL);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
- return(NULL);
ret = buf->content;
buf->content = NULL;
@@ -7222,31 +7238,14 @@ xmlBufferDetach(xmlBufferPtr buf) {
* @mem: the memory area
* @size: the size in byte
*
- * routine to create an XML buffer from an immutable memory area.
- * The area won't be modified nor copied, and is expected to be
- * present until the end of the buffer lifetime.
- *
- * returns the new structure.
+ * Create an XML buffer initialized with bytes.
*/
xmlBufferPtr
xmlBufferCreateStatic(void *mem, size_t size) {
- xmlBufferPtr ret;
-
- if ((mem == NULL) || (size == 0))
- return(NULL);
- if (size > UINT_MAX)
- return(NULL);
+ xmlBufferPtr buf = xmlBufferCreateSize(size);
- ret = (xmlBufferPtr) xmlMalloc(sizeof(xmlBuffer));
- if (ret == NULL) {
- xmlTreeErrMemory("creating buffer");
- return(NULL);
- }
- ret->use = size;
- ret->size = size;
- ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
- ret->content = (xmlChar *) mem;
- return(ret);
+ xmlBufferAdd(buf, mem, size);
+ return(buf);
}
/**
@@ -7266,12 +7265,10 @@ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
#endif
return;
}
- if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
- (buf->alloc == XML_BUFFER_ALLOC_IO)) return;
+ if (buf->alloc == XML_BUFFER_ALLOC_IO) return;
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
(scheme == XML_BUFFER_ALLOC_EXACT) ||
- (scheme == XML_BUFFER_ALLOC_HYBRID) ||
- (scheme == XML_BUFFER_ALLOC_IMMUTABLE))
+ (scheme == XML_BUFFER_ALLOC_HYBRID))
buf->alloc = scheme;
}
@@ -7295,8 +7292,7 @@ xmlBufferFree(xmlBufferPtr buf) {
if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) {
xmlFree(buf->contentIO);
- } else if ((buf->content != NULL) &&
- (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
+ } else if (buf->content != NULL) {
xmlFree(buf->content);
}
xmlFree(buf);
@@ -7313,10 +7309,7 @@ xmlBufferEmpty(xmlBufferPtr buf) {
if (buf == NULL) return;
if (buf->content == NULL) return;
buf->use = 0;
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
- buf->content = BAD_CAST "";
- } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
- (buf->contentIO != NULL)) {
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
size_t start_buf = buf->content - buf->contentIO;
buf->size += start_buf;
@@ -7343,8 +7336,7 @@ xmlBufferShrink(xmlBufferPtr buf, unsigned int len) {
if (len > buf->use) return(-1);
buf->use -= len;
- if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
- ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
/*
* we just move the content pointer, but also make sure
* the perceived buffer size has shrunk accordingly
@@ -7388,7 +7380,6 @@ xmlBufferGrow(xmlBufferPtr buf, unsigned int len) {
if (buf == NULL) return(-1);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use)
return(0);
if (len >= UINT_MAX - buf->use) {
@@ -7512,8 +7503,6 @@ xmlBufferResize(xmlBufferPtr buf, unsigned int size)
if (buf == NULL)
return(0);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
-
/* Don't resize if we don't have to */
if (size < buf->size)
return 1;
@@ -7631,7 +7620,6 @@ xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) {
if ((str == NULL) || (buf == NULL)) {
return -1;
}
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (len < -1) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -7684,7 +7672,6 @@ xmlBufferAddHead(xmlBufferPtr buf, const xmlChar *str, int len) {
if (buf == NULL)
return(-1);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (str == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
@@ -7755,7 +7742,6 @@ int
xmlBufferCat(xmlBufferPtr buf, const xmlChar *str) {
if (buf == NULL)
return(-1);
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (str == NULL) return -1;
return xmlBufferAdd(buf, str, -1);
}
@@ -7787,7 +7773,6 @@ void
xmlBufferWriteCHAR(xmlBufferPtr buf, const xmlChar *string) {
if (buf == NULL)
return;
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
xmlBufferCat(buf, string);
}
@@ -7803,7 +7788,6 @@ void
xmlBufferWriteChar(xmlBufferPtr buf, const char *string) {
if (buf == NULL)
return;
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
xmlBufferCCat(buf, string);
}
@@ -7822,7 +7806,6 @@ xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
const xmlChar *cur, *base;
if (buf == NULL)
return;
- if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
if (xmlStrchr(string, '\"')) {
if (xmlStrchr(string, '\'')) {
#ifdef DEBUG_BUFFER
diff --git a/chromium/third_party/libxml/src/uri.c b/chromium/third_party/libxml/src/uri.c
index e6f1c3e704a..c3d4871f02a 100644
--- a/chromium/third_party/libxml/src/uri.c
+++ b/chromium/third_party/libxml/src/uri.c
@@ -35,6 +35,9 @@
*/
#define MAX_URI_LENGTH 1024 * 1024
+#define PORT_EMPTY 0
+#define PORT_EMPTY_SERVER -1
+
static void
xmlURIErrMemory(const char *extra)
{
@@ -770,8 +773,11 @@ xmlParse3986HierPart(xmlURIPtr uri, const char **str)
cur += 2;
ret = xmlParse3986Authority(uri, &cur);
if (ret != 0) return(ret);
- if (uri->server == NULL)
- uri->port = -1;
+ /*
+ * An empty server is marked with a special URI value.
+ */
+ if ((uri->server == NULL) && (uri->port == PORT_EMPTY))
+ uri->port = PORT_EMPTY_SERVER;
ret = xmlParse3986PathAbEmpty(uri, &cur);
if (ret != 0) return(ret);
*str = cur;
@@ -1028,6 +1034,7 @@ xmlCreateURI(void) {
return(NULL);
}
memset(ret, 0, sizeof(xmlURI));
+ ret->port = PORT_EMPTY;
return(ret);
}
@@ -1119,7 +1126,7 @@ xmlSaveUri(xmlURIPtr uri) {
}
}
} else {
- if ((uri->server != NULL) || (uri->port == -1)) {
+ if ((uri->server != NULL) || (uri->port != PORT_EMPTY)) {
if (len + 3 >= max) {
temp = xmlSaveUriRealloc(ret, &max);
if (temp == NULL) goto mem_error;
@@ -1164,17 +1171,18 @@ xmlSaveUri(xmlURIPtr uri) {
if (temp == NULL) goto mem_error;
ret = temp;
}
- ret[len++] = *p++;
- }
- if (uri->port > 0) {
- if (len + 10 >= max) {
- temp = xmlSaveUriRealloc(ret, &max);
- if (temp == NULL) goto mem_error;
- ret = temp;
- }
- len += snprintf((char *) &ret[len], max - len, ":%d", uri->port);
+ /* TODO: escaping? */
+ ret[len++] = (xmlChar) *p++;
}
}
+ if (uri->port > 0) {
+ if (len + 10 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ len += snprintf((char *) &ret[len], max - len, ":%d", uri->port);
+ }
} else if (uri->authority != NULL) {
if (len + 3 >= max) {
temp = xmlSaveUriRealloc(ret, &max);
@@ -1673,8 +1681,8 @@ xmlURIUnescapeString(const char *str, int len, char *target) {
* @str: string to escape
* @list: exception list string of chars not to escape
*
- * This routine escapes a string to hex, ignoring reserved characters (a-z)
- * and the characters in the exception list.
+ * This routine escapes a string to hex, ignoring reserved characters
+ * (a-z, A-Z, 0-9, "@-_.!~*'()") and the characters in the exception list.
*
* Returns a new escaped string or NULL in case of error.
*/
@@ -1820,10 +1828,10 @@ xmlURIEscape(const xmlChar * str)
xmlFree(segment);
}
- if (uri->port) {
- xmlChar port[10];
+ if (uri->port > 0) {
+ xmlChar port[11];
- snprintf((char *) port, 10, "%d", uri->port);
+ snprintf((char *) port, 11, "%d", uri->port);
ret = xmlStrcat(ret, BAD_CAST ":");
ret = xmlStrcat(ret, port);
}
@@ -1969,12 +1977,13 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
if (res == NULL)
goto done;
if ((ref->scheme == NULL) && (ref->path == NULL) &&
- ((ref->authority == NULL) && (ref->server == NULL))) {
+ ((ref->authority == NULL) && (ref->server == NULL) &&
+ (ref->port == PORT_EMPTY))) {
if (bas->scheme != NULL)
res->scheme = xmlMemStrdup(bas->scheme);
if (bas->authority != NULL)
res->authority = xmlMemStrdup(bas->authority);
- else if ((bas->server != NULL) || (bas->port == -1)) {
+ else {
if (bas->server != NULL)
res->server = xmlMemStrdup(bas->server);
if (bas->user != NULL)
@@ -2023,11 +2032,13 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
* component, which will also be undefined if the URI scheme does not
* use an authority component.
*/
- if ((ref->authority != NULL) || (ref->server != NULL)) {
+ if ((ref->authority != NULL) || (ref->server != NULL) ||
+ (ref->port != PORT_EMPTY)) {
if (ref->authority != NULL)
res->authority = xmlMemStrdup(ref->authority);
else {
- res->server = xmlMemStrdup(ref->server);
+ if (ref->server != NULL)
+ res->server = xmlMemStrdup(ref->server);
if (ref->user != NULL)
res->user = xmlMemStrdup(ref->user);
res->port = ref->port;
@@ -2038,7 +2049,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
}
if (bas->authority != NULL)
res->authority = xmlMemStrdup(bas->authority);
- else if ((bas->server != NULL) || (bas->port == -1)) {
+ else if ((bas->server != NULL) || (bas->port != PORT_EMPTY)) {
if (bas->server != NULL)
res->server = xmlMemStrdup(bas->server);
if (bas->user != NULL)
@@ -2108,7 +2119,7 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
/*
* Ensure the path includes a '/'
*/
- if ((out == 0) && (bas->server != NULL))
+ if ((out == 0) && ((bas->server != NULL) || bas->port != PORT_EMPTY))
res->path[out++] = '/';
while (ref->path[indx] != 0) {
res->path[out++] = ref->path[indx++];
@@ -2226,7 +2237,8 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
if ((ref->scheme != NULL) &&
((bas->scheme == NULL) ||
(xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) ||
- (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) {
+ (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)) ||
+ (bas->port != ref->port))) {
val = xmlStrdup (URI);
goto done;
}
diff --git a/chromium/third_party/libxml/src/valid.c b/chromium/third_party/libxml/src/valid.c
index 182ffed1df2..120627cc865 100644
--- a/chromium/third_party/libxml/src/valid.c
+++ b/chromium/third_party/libxml/src/valid.c
@@ -26,8 +26,9 @@
#include "private/error.h"
#include "private/parser.h"
-static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
- int create);
+static xmlElementPtr
+xmlGetDtdElementDesc2(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name,
+ int create);
/* #define DEBUG_VALID_ALGO */
/* #define DEBUG_REGEXP_ALGO */
@@ -67,9 +68,7 @@ xmlVErrMemory(xmlValidCtxtPtr ctxt, const char *extra)
/* Look up flag to detect if it is part of a parsing
context */
if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
- long delta = (char *) ctxt - (char *) ctxt->userData;
- if ((delta > 0) && (delta < 250))
- pctxt = ctxt->userData;
+ pctxt = ctxt->userData;
}
}
if (extra)
@@ -106,9 +105,7 @@ xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error,
/* Look up flag to detect if it is part of a parsing
context */
if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
- long delta = (char *) ctxt - (char *) ctxt->userData;
- if ((delta > 0) && (delta < 250))
- pctxt = ctxt->userData;
+ pctxt = ctxt->userData;
}
}
if (extra)
@@ -152,9 +149,7 @@ xmlErrValidNode(xmlValidCtxtPtr ctxt,
/* Look up flag to detect if it is part of a parsing
context */
if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
- long delta = (char *) ctxt - (char *) ctxt->userData;
- if ((delta > 0) && (delta < 250))
- pctxt = ctxt->userData;
+ pctxt = ctxt->userData;
}
}
__xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
@@ -194,9 +189,7 @@ xmlErrValidNodeNr(xmlValidCtxtPtr ctxt,
/* Look up flag to detect if it is part of a parsing
context */
if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
- long delta = (char *) ctxt - (char *) ctxt->userData;
- if ((delta > 0) && (delta < 250))
- pctxt = ctxt->userData;
+ pctxt = ctxt->userData;
}
}
__xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
@@ -234,9 +227,7 @@ xmlErrValidWarning(xmlValidCtxtPtr ctxt,
/* Look up flag to detect if it is part of a parsing
context */
if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
- long delta = (char *) ctxt - (char *) ctxt->userData;
- if ((delta > 0) && (delta < 250))
- pctxt = ctxt->userData;
+ pctxt = ctxt->userData;
}
}
__xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
@@ -2123,7 +2114,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
* Validity Check:
* Multiple ID per element
*/
- elemDef = xmlGetDtdElementDesc2(dtd, elem, 1);
+ elemDef = xmlGetDtdElementDesc2(ctxt, dtd, elem, 1);
if (elemDef != NULL) {
#ifdef LIBXML_VALID_ENABLED
@@ -3287,7 +3278,8 @@ xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
*/
static xmlElementPtr
-xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
+xmlGetDtdElementDesc2(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name,
+ int create) {
xmlElementTablePtr table;
xmlElementPtr cur;
xmlChar *uqname = NULL, *prefix = NULL;
@@ -3310,7 +3302,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
dtd->elements = (void *) table;
}
if (table == NULL) {
- xmlVErrMemory(NULL, "element table allocation failed");
+ xmlVErrMemory(ctxt, "element table allocation failed");
return(NULL);
}
}
@@ -3323,8 +3315,8 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
if ((cur == NULL) && (create)) {
cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
if (cur == NULL) {
- xmlVErrMemory(NULL, "malloc failed");
- return(NULL);
+ xmlVErrMemory(ctxt, "malloc failed");
+ goto error;
}
memset(cur, 0, sizeof(xmlElement));
cur->type = XML_ELEMENT_DECL;
@@ -3336,8 +3328,13 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
cur->prefix = xmlStrdup(prefix);
cur->etype = XML_ELEMENT_TYPE_UNDEFINED;
- xmlHashAddEntry2(table, name, prefix, cur);
+ if (xmlHashAddEntry2(table, name, prefix, cur) < 0) {
+ xmlVErrMemory(ctxt, "adding entry failed");
+ xmlFreeElement(cur);
+ cur = NULL;
+ }
}
+error:
if (prefix != NULL) xmlFree(prefix);
if (uqname != NULL) xmlFree(uqname);
return(cur);
@@ -7018,7 +7015,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
/*
* Dummy function to suppress messages while we try out valid elements
*/
-static void XMLCDECL xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
+static void xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...) {
return;
}
diff --git a/chromium/third_party/libxml/src/win32/libxml2.def.src b/chromium/third_party/libxml/src/win32/libxml2.def.src
index 86f687baa7c..4486c0e654b 100644
--- a/chromium/third_party/libxml/src/win32/libxml2.def.src
+++ b/chromium/third_party/libxml/src/win32/libxml2.def.src
@@ -741,7 +741,6 @@ xmlDictQLookup
xmlDictReference
xmlDictSetLimit
xmlDictSize
-xmlDllMain
xmlDocCopyNode
xmlDocCopyNodeList
xmlDocDump
diff --git a/chromium/third_party/libxml/src/xmlIO.c b/chromium/third_party/libxml/src/xmlIO.c
index 834b4ae5874..5cab16f4695 100644
--- a/chromium/third_party/libxml/src/xmlIO.c
+++ b/chromium/third_party/libxml/src/xmlIO.c
@@ -717,20 +717,6 @@ xmlCheckFilename (const char *path)
}
/**
- * xmlInputReadCallbackNop:
- *
- * No Operation xmlInputReadCallback function, does nothing.
- *
- * Returns zero
- */
-int
-xmlInputReadCallbackNop(void *context ATTRIBUTE_UNUSED,
- char *buffer ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED) {
- return(0);
-}
-
-/**
* xmlFdRead:
* @context: the I/O context
* @buffer: where to drop data
@@ -2946,11 +2932,11 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
ret = xmlAllocParserInputBuffer(enc);
if (ret != NULL) {
ret->context = (void *) mem;
- ret->readcallback = xmlInputReadCallbackNop;
+ ret->readcallback = NULL;
ret->closecallback = NULL;
errcode = xmlBufAdd(ret->buffer, (const xmlChar *) mem, size);
if (errcode != 0) {
- xmlFree(ret);
+ xmlFreeParserInputBuffer(ret);
return(NULL);
}
}
@@ -2964,43 +2950,14 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
* @size: the length of the memory block
* @enc: the charset encoding if known
*
- * Create a buffered parser input for the progressive parsing for the input
- * from an immutable memory area. This will not copy the memory area to
- * the buffer, but the memory is expected to be available until the end of
- * the parsing, this is useful for example when using mmap'ed file.
+ * DEPRECATED: Use xmlParserInputBufferCreateMem.
*
* Returns the new parser input or NULL
*/
xmlParserInputBufferPtr
xmlParserInputBufferCreateStatic(const char *mem, int size,
xmlCharEncoding enc) {
- xmlParserInputBufferPtr ret;
-
- if (size < 0) return(NULL);
- if (mem == NULL) return(NULL);
-
- ret = (xmlParserInputBufferPtr) xmlMalloc(sizeof(xmlParserInputBuffer));
- if (ret == NULL) {
- xmlIOErrMemory("creating input buffer");
- return(NULL);
- }
- memset(ret, 0, sizeof(xmlParserInputBuffer));
- ret->buffer = xmlBufCreateStatic((void *)mem, size);
- if (ret->buffer == NULL) {
- xmlFree(ret);
- return(NULL);
- }
- ret->encoder = xmlGetCharEncodingHandler(enc);
- if (ret->encoder != NULL)
- ret->raw = xmlBufCreateSize(2 * xmlDefaultBufferSize);
- else
- ret->raw = NULL;
- ret->compressed = -1;
- ret->context = (void *) mem;
- ret->readcallback = NULL;
- ret->closecallback = NULL;
-
- return(ret);
+ return(xmlParserInputBufferCreateMem(mem, size, enc));
}
#ifdef LIBXML_OUTPUT_ENABLED
@@ -3155,7 +3112,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
if (len < 0) return(0);
if ((in == NULL) || (in->error)) return(-1);
if (in->encoder != NULL) {
- unsigned int use;
+ size_t use, consumed;
/*
* Store the data in the incoming raw buffer
@@ -3177,7 +3134,12 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
in->error = XML_IO_ENCODER;
return(-1);
}
- in->rawconsumed += (use - xmlBufUse(in->raw));
+ consumed = use - xmlBufUse(in->raw);
+ if ((consumed > ULONG_MAX) ||
+ (in->rawconsumed > ULONG_MAX - (unsigned long)consumed))
+ in->rawconsumed = ULONG_MAX;
+ else
+ in->rawconsumed += consumed;
} else {
nbchars = len;
ret = xmlBufAdd(in->buffer, (xmlChar *) buf, nbchars);
@@ -3222,41 +3184,42 @@ endOfInput (void * context ATTRIBUTE_UNUSED,
*/
int
xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
- char *buffer = NULL;
+ xmlBufPtr buf;
int res = 0;
- int nbchars = 0;
if ((in == NULL) || (in->error)) return(-1);
if ((len <= MINLEN) && (len != 4))
len = MINLEN;
- if (xmlBufAvail(in->buffer) <= 0) {
- xmlIOErr(XML_IO_BUFFER_FULL, NULL);
- in->error = XML_IO_BUFFER_FULL;
- return(-1);
- }
-
- if (xmlBufGrow(in->buffer, len + 1) < 0) {
- xmlIOErrMemory("growing input buffer");
- in->error = XML_ERR_NO_MEMORY;
- return(-1);
+ if (in->encoder == NULL) {
+ if (in->readcallback == NULL)
+ return(0);
+ buf = in->buffer;
+ } else {
+ if (in->raw == NULL) {
+ in->raw = xmlBufCreate();
+ }
+ buf = in->raw;
}
- buffer = (char *)xmlBufEnd(in->buffer);
/*
* Call the read method for this I/O type.
*/
if (in->readcallback != NULL) {
- res = in->readcallback(in->context, &buffer[0], len);
+ if (xmlBufGrow(buf, len + 1) < 0) {
+ xmlIOErrMemory("growing input buffer");
+ in->error = XML_ERR_NO_MEMORY;
+ return(-1);
+ }
+
+ res = in->readcallback(in->context, (char *)xmlBufEnd(buf), len);
if (res <= 0)
in->readcallback = endOfInput;
- } else {
- xmlIOErr(XML_IO_NO_INPUT, NULL);
- in->error = XML_IO_NO_INPUT;
- return(-1);
- }
- if (res < 0) {
- return(-1);
+ if (res < 0)
+ return(-1);
+
+ if (xmlBufAddLen(buf, res) < 0)
+ return(-1);
}
/*
@@ -3269,41 +3232,32 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
#endif
}
- len = res;
if (in->encoder != NULL) {
- unsigned int use;
-
- /*
- * Store the data in the incoming raw buffer
- */
- if (in->raw == NULL) {
- in->raw = xmlBufCreate();
- }
- res = xmlBufAdd(in->raw, (const xmlChar *) buffer, len);
- if (res != 0)
- return(-1);
+ size_t use, consumed;
/*
* convert as much as possible to the parser reading buffer.
*/
- use = xmlBufUse(in->raw);
- nbchars = xmlCharEncInput(in, 1);
- if (nbchars < 0) {
+ use = xmlBufUse(buf);
+ res = xmlCharEncInput(in, 1);
+ if (res < 0) {
xmlIOErr(XML_IO_ENCODER, NULL);
in->error = XML_IO_ENCODER;
return(-1);
}
- in->rawconsumed += (use - xmlBufUse(in->raw));
- } else {
- nbchars = len;
- xmlBufAddLen(in->buffer, nbchars);
+ consumed = use - xmlBufUse(buf);
+ if ((consumed > ULONG_MAX) ||
+ (in->rawconsumed > ULONG_MAX - (unsigned long)consumed))
+ in->rawconsumed = ULONG_MAX;
+ else
+ in->rawconsumed += consumed;
}
#ifdef DEBUG_INPUT
xmlGenericError(xmlGenericErrorContext,
"I/O: read %d chars, buffer %d\n",
nbchars, xmlBufUse(in->buffer));
#endif
- return(nbchars);
+ return(res);
}
/**
@@ -3320,13 +3274,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
*/
int
xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) {
- if ((in == NULL) || (in->error)) return(-1);
- if (in->readcallback != NULL)
- return(xmlParserInputBufferGrow(in, len));
- else if (xmlBufGetAllocationScheme(in->buffer) == XML_BUFFER_ALLOC_IMMUTABLE)
- return(0);
- else
- return(-1);
+ return(xmlParserInputBufferGrow(in, len));
}
#ifdef LIBXML_OUTPUT_ENABLED
@@ -3528,8 +3476,7 @@ xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
int cons; /* byte from str consumed */
if ((out == NULL) || (out->error) || (str == NULL) ||
- (out->buffer == NULL) ||
- (xmlBufGetAllocationScheme(out->buffer) == XML_BUFFER_ALLOC_IMMUTABLE))
+ (out->buffer == NULL))
return(-1);
len = strlen((const char *)str);
if (len < 0) return(0);
diff --git a/chromium/third_party/libxml/src/xmlmemory.c b/chromium/third_party/libxml/src/xmlmemory.c
index 892d50c306d..eed166693e9 100644
--- a/chromium/third_party/libxml/src/xmlmemory.c
+++ b/chromium/third_party/libxml/src/xmlmemory.c
@@ -31,11 +31,13 @@
#include <libxml/xmlerror.h>
#include <libxml/threads.h>
-static int xmlMemInitialized = 0;
+#include "private/memory.h"
+#include "private/threads.h"
+
static unsigned long debugMemSize = 0;
static unsigned long debugMemBlocks = 0;
static unsigned long debugMaxMemSize = 0;
-static xmlMutexPtr xmlMemMutex = NULL;
+static xmlMutex xmlMemMutex;
void xmlMallocBreakpoint(void);
@@ -147,7 +149,7 @@ xmlMallocLoc(size_t size, const char * file, int line)
MEMHDR *p;
void *ret;
- if (!xmlMemInitialized) xmlInitMemory();
+ xmlInitParser();
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
"Malloc(%d)\n",size);
@@ -175,7 +177,7 @@ xmlMallocLoc(size_t size, const char * file, int line)
p->mh_type = MALLOC_TYPE;
p->mh_file = file;
p->mh_line = line;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
p->mh_number = ++block;
debugMemSize += size;
debugMemBlocks++;
@@ -183,7 +185,7 @@ xmlMallocLoc(size_t size, const char * file, int line)
#ifdef MEM_LIST
debugmem_list_add(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
@@ -223,7 +225,7 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
MEMHDR *p;
void *ret;
- if (!xmlMemInitialized) xmlInitMemory();
+ xmlInitParser();
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
"Malloc(%d)\n",size);
@@ -251,7 +253,7 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
p->mh_type = MALLOC_ATOMIC_TYPE;
p->mh_file = file;
p->mh_line = line;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
p->mh_number = ++block;
debugMemSize += size;
debugMemBlocks++;
@@ -259,7 +261,7 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
#ifdef MEM_LIST
debugmem_list_add(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
@@ -320,7 +322,7 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
if (ptr == NULL)
return(xmlMallocLoc(size, file, line));
- if (!xmlMemInitialized) xmlInitMemory();
+ xmlInitParser();
TEST_POINT
p = CLIENT_2_HDR(ptr);
@@ -331,7 +333,7 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
goto error;
}
p->mh_tag = ~MEMTAG;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
debugMemSize -= p->mh_size;
debugMemBlocks--;
#ifdef DEBUG_MEMORY
@@ -340,7 +342,7 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
#ifdef MEM_LIST
debugmem_list_delete(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
xmlGenericError(xmlGenericErrorContext,
@@ -368,14 +370,14 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
p->mh_size = size;
p->mh_file = file;
p->mh_line = line;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
debugMemSize += size;
debugMemBlocks++;
if (debugMemSize > debugMaxMemSize) debugMaxMemSize = debugMemSize;
#ifdef MEM_LIST
debugmem_list_add(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
TEST_POINT
@@ -446,7 +448,7 @@ xmlMemFree(void *ptr)
if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
p->mh_tag = ~MEMTAG;
memset(target, -1, p->mh_size);
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
debugMemSize -= p->mh_size;
debugMemBlocks--;
#ifdef DEBUG_MEMORY
@@ -455,7 +457,7 @@ xmlMemFree(void *ptr)
#ifdef MEM_LIST
debugmem_list_delete(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
free(p);
@@ -493,7 +495,7 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
size_t size = strlen(str) + 1;
MEMHDR *p;
- if (!xmlMemInitialized) xmlInitMemory();
+ xmlInitParser();
TEST_POINT
if (size > (MAX_SIZE_T - RESERVE_SIZE)) {
@@ -512,7 +514,7 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
p->mh_type = STRDUP_TYPE;
p->mh_file = file;
p->mh_line = line;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
p->mh_number = ++block;
debugMemSize += size;
debugMemBlocks++;
@@ -520,7 +522,7 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
#ifdef MEM_LIST
debugmem_list_add(p);
#endif
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
s = (char *) HDR_2_CLIENT(p);
@@ -566,12 +568,7 @@ xmlMemoryStrdup(const char *str) {
int
xmlMemUsed(void) {
- int res;
-
- xmlMutexLock(xmlMemMutex);
- res = debugMemSize;
- xmlMutexUnlock(xmlMemMutex);
- return(res);
+ return(debugMemSize);
}
/**
@@ -586,74 +583,12 @@ int
xmlMemBlocks(void) {
int res;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
res = debugMemBlocks;
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
return(res);
}
-#ifdef MEM_LIST
-/**
- * xmlMemContentShow:
- * @fp: a FILE descriptor used as the output file
- * @p: a memory block header
- *
- * tries to show some content from the memory block
- */
-
-static void
-xmlMemContentShow(FILE *fp, MEMHDR *p)
-{
- int i,j,k,len;
- const char *buf;
-
- if (p == NULL) {
- fprintf(fp, " NULL");
- return;
- }
- len = p->mh_size;
- buf = (const char *) HDR_2_CLIENT(p);
-
- for (i = 0;i < len;i++) {
- if (buf[i] == 0) break;
- if (!isprint((unsigned char) buf[i])) break;
- }
- if ((i < 4) && ((buf[i] != 0) || (i == 0))) {
- if (len >= 4) {
- MEMHDR *q;
- void *cur;
-
- for (j = 0;(j < len -3) && (j < 40);j += 4) {
- cur = *((void **) &buf[j]);
- q = CLIENT_2_HDR(cur);
- p = memlist;
- k = 0;
- while (p != NULL) {
- if (p == q) break;
- p = p->mh_next;
- if (k++ > 100) break;
- }
- if ((p != NULL) && (p == q)) {
- fprintf(fp, " pointer to #%lu at index %d",
- p->mh_number, j);
- return;
- }
- }
- }
- } else if ((i == 0) && (buf[i] == 0)) {
- fprintf(fp," null");
- } else {
- if (buf[i] == 0) fprintf(fp," \"%.25s\"", buf);
- else {
- fprintf(fp," [");
- for (j = 0;j < i;j++)
- fprintf(fp,"%c", buf[j]);
- fprintf(fp,"]");
- }
- }
-}
-#endif
-
/**
* xmlMemDisplayLast:
* @fp: a FILE descriptor used as the output file, if NULL, the result is
@@ -688,7 +623,7 @@ xmlMemDisplayLast(FILE *fp, long nbBytes)
nbBytes, debugMemSize, debugMaxMemSize);
fprintf(fp,"BLOCK NUMBER SIZE TYPE\n");
idx = 0;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
p = memlist;
while ((p) && (nbBytes > 0)) {
fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number,
@@ -701,7 +636,7 @@ xmlMemDisplayLast(FILE *fp, long nbBytes)
case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
default:
fprintf(fp,"Unknown memory block, may be corrupted");
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
if (old_fp == NULL)
fclose(fp);
return;
@@ -710,16 +645,12 @@ xmlMemDisplayLast(FILE *fp, long nbBytes)
if (p->mh_tag != MEMTAG)
fprintf(fp," INVALID");
nb++;
- if (nb < 100)
- xmlMemContentShow(fp, p);
- else
- fprintf(fp," skip");
fprintf(fp,"\n");
nbBytes -= (unsigned long)p->mh_size;
p = p->mh_next;
}
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
#else
fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
#endif
@@ -765,7 +696,7 @@ xmlMemDisplay(FILE *fp)
debugMemSize, debugMaxMemSize);
fprintf(fp,"BLOCK NUMBER SIZE TYPE\n");
idx = 0;
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
p = memlist;
while (p) {
fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number,
@@ -778,7 +709,7 @@ xmlMemDisplay(FILE *fp)
case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
default:
fprintf(fp,"Unknown memory block, may be corrupted");
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
if (old_fp == NULL)
fclose(fp);
return;
@@ -787,15 +718,11 @@ xmlMemDisplay(FILE *fp)
if (p->mh_tag != MEMTAG)
fprintf(fp," INVALID");
nb++;
- if (nb < 100)
- xmlMemContentShow(fp, p);
- else
- fprintf(fp," skip");
fprintf(fp,"\n");
p = p->mh_next;
}
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
#else
fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
#endif
@@ -872,7 +799,7 @@ xmlMemShow(FILE *fp, int nr ATTRIBUTE_UNUSED)
fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n",
debugMemSize, debugMaxMemSize);
#ifdef MEM_LIST
- xmlMutexLock(xmlMemMutex);
+ xmlMutexLock(&xmlMemMutex);
if (nr > 0) {
fprintf(fp,"NUMBER SIZE TYPE WHERE\n");
p = memlist;
@@ -890,13 +817,12 @@ xmlMemShow(FILE *fp, int nr ATTRIBUTE_UNUSED)
fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
if (p->mh_tag != MEMTAG)
fprintf(fp," INVALID");
- xmlMemContentShow(fp, p);
fprintf(fp,"\n");
nr--;
p = p->mh_next;
}
}
- xmlMutexUnlock(xmlMemMutex);
+ xmlMutexUnlock(&xmlMemMutex);
#endif /* MEM_LIST */
}
@@ -935,28 +861,29 @@ xmlMemoryDump(void)
/**
* xmlInitMemory:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
+ * DEPRECATED: Alias for xmlInitParser.
+ */
+int
+xmlInitMemory(void) {
+ xmlInitParser();
+ return(0);
+}
+
+/**
+ * xmlInitMemoryInternal:
*
* Initialize the memory layer.
*
* Returns 0 on success
*/
-int
-xmlInitMemory(void)
-{
+void
+xmlInitMemoryInternal(void) {
char *breakpoint;
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
"xmlInitMemory()\n");
#endif
- /*
- This is really not good code (see Bug 130419). Suggestions for
- improvement will be welcome!
- */
- if (xmlMemInitialized) return(-1);
- xmlMemInitialized = 1;
- xmlMemMutex = xmlNewMutex();
+ xmlInitMutex(&xmlMemMutex);
breakpoint = getenv("XML_MEM_BREAKPOINT");
if (breakpoint != NULL) {
@@ -971,32 +898,34 @@ xmlInitMemory(void)
xmlGenericError(xmlGenericErrorContext,
"xmlInitMemory() Ok\n");
#endif
- return(0);
}
/**
* xmlCleanupMemory:
*
- * DEPRECATED: This function will be made private. Call xmlCleanupParser
+ * DEPRECATED: This function is a no-op. 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.
+ */
+void
+xmlCleanupMemory(void) {
+}
+
+/**
+ * xmlCleanupMemoryInternal:
*
* Free up all the memory allocated by the library for its own
* use. This should not be called by user level code.
*/
void
-xmlCleanupMemory(void) {
+xmlCleanupMemoryInternal(void) {
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
"xmlCleanupMemory()\n");
#endif
- if (xmlMemInitialized == 0)
- return;
- xmlFreeMutex(xmlMemMutex);
- xmlMemMutex = NULL;
- xmlMemInitialized = 0;
+ xmlCleanupMutex(&xmlMemMutex);
#ifdef DEBUG_MEMORY
xmlGenericError(xmlGenericErrorContext,
"xmlCleanupMemory() Ok\n");
diff --git a/chromium/third_party/libxml/src/xmlreader.c b/chromium/third_party/libxml/src/xmlreader.c
index 9c2da90e456..979385a1382 100644
--- a/chromium/third_party/libxml/src/xmlreader.c
+++ b/chromium/third_party/libxml/src/xmlreader.c
@@ -41,6 +41,9 @@
#include "private/buf.h"
#include "private/tree.h"
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include "private/xinclude.h"
+#endif
#define MAX_ERR_MSG_SIZE 64000
@@ -537,30 +540,23 @@ xmlTextReaderDebug(xmlTextReaderPtr reader) {
*
* Pushes a new entity reference node on top of the entities stack
*
- * Returns 0 in case of error, the index in the stack otherwise
+ * Returns -1 in case of error, the index in the stack otherwise
*/
static int
xmlTextReaderEntPush(xmlTextReaderPtr reader, xmlNodePtr value)
{
- if (reader->entMax <= 0) {
- reader->entMax = 10;
- reader->entTab = (xmlNodePtr *) xmlMalloc(reader->entMax *
- sizeof(reader->entTab[0]));
- if (reader->entTab == NULL) {
- xmlGenericError(xmlGenericErrorContext, "xmlMalloc failed !\n");
- return (0);
- }
- }
if (reader->entNr >= reader->entMax) {
- reader->entMax *= 2;
- reader->entTab =
- (xmlNodePtr *) xmlRealloc(reader->entTab,
- reader->entMax *
- sizeof(reader->entTab[0]));
- if (reader->entTab == NULL) {
+ size_t newSize = reader->entMax == 0 ? 10 : reader->entMax * 2;
+ xmlNodePtr *tmp;
+
+ tmp = (xmlNodePtr *) xmlRealloc(reader->entTab,
+ newSize * sizeof(*tmp));
+ if (tmp == NULL) {
xmlGenericError(xmlGenericErrorContext, "xmlRealloc failed !\n");
- return (0);
+ return (-1);
}
+ reader->entTab = tmp;
+ reader->entMax = newSize;
}
reader->entTab[reader->entNr] = value;
reader->ent = value;
@@ -770,7 +766,6 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
xmlBufPtr inbuf;
int val, s;
xmlTextReaderState oldstate;
- int alloc;
if ((reader->input == NULL) || (reader->input->buffer == NULL))
return(-1);
@@ -778,7 +773,6 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
oldstate = reader->state;
reader->state = XML_TEXTREADER_NONE;
inbuf = reader->input->buffer;
- alloc = xmlBufGetAllocationScheme(inbuf);
while (reader->state == XML_TEXTREADER_NONE) {
if (xmlBufUse(inbuf) < reader->cur + CHUNK_SIZE) {
@@ -788,7 +782,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
if (reader->mode != XML_TEXTREADER_MODE_EOF) {
val = xmlParserInputBufferRead(reader->input, 4096);
if ((val == 0) &&
- (alloc == XML_BUFFER_ALLOC_IMMUTABLE)) {
+ (reader->input->readcallback == NULL)) {
if (xmlBufUse(inbuf) == reader->cur) {
reader->mode = XML_TEXTREADER_MODE_EOF;
reader->state = oldstate;
@@ -837,7 +831,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
* Discard the consumed input when needed and possible
*/
if (reader->mode == XML_TEXTREADER_MODE_INTERACTIVE) {
- if (alloc != XML_BUFFER_ALLOC_IMMUTABLE) {
+ if (reader->input->readcallback != NULL) {
if ((reader->cur >= 4096) &&
(xmlBufUse(inbuf) - reader->cur <= CHUNK_SIZE)) {
val = xmlBufShrink(inbuf, reader->cur);
@@ -1035,7 +1029,11 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
if ((node->children != NULL) &&
(node->children->type == XML_ENTITY_DECL) &&
(node->children->children != NULL)) {
- xmlTextReaderEntPush(reader, node);
+ if (xmlTextReaderEntPush(reader, node) < 0) {
+ if (node == oldnode)
+ break;
+ goto skip_children;
+ }
node = node->children->children;
continue;
} else {
@@ -1454,6 +1452,7 @@ node_found:
reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc);
xmlXIncludeSetFlags(reader->xincctxt,
reader->parserFlags & (~XML_PARSE_NOXINCNODE));
+ xmlXIncludeSetStreamingMode(reader->xincctxt, 1);
}
/*
* expand that node and process it
@@ -1480,7 +1479,8 @@ node_found:
if ((reader->node->children != NULL) &&
(reader->node->children->type == XML_ENTITY_DECL) &&
(reader->node->children->children != NULL)) {
- xmlTextReaderEntPush(reader, reader->node);
+ if (xmlTextReaderEntPush(reader, reader->node) < 0)
+ goto get_next_node;
reader->node = reader->node->children->children;
}
#ifdef LIBXML_REGEXP_ENABLED
@@ -3979,19 +3979,19 @@ xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) {
#ifdef LIBXML_SCHEMAS_ENABLED
static char *xmlTextReaderBuildMessage(const char *msg, va_list ap) LIBXML_ATTR_FORMAT(1,0);
-static void XMLCDECL
+static void
xmlTextReaderValidityError(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
-static void XMLCDECL
+static void
xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
-static void XMLCDECL
+static void
xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
-static void XMLCDECL
+static void
xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
-static void XMLCDECL
+static void
xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
{
xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
@@ -4014,7 +4014,7 @@ xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
va_end(ap);
}
-static void XMLCDECL
+static void
xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...)
{
xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
@@ -4783,7 +4783,7 @@ xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error)
}
}
-static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
+static void LIBXML_ATTR_FORMAT(2,3)
xmlTextReaderError(void *ctxt, const char *msg, ...)
{
va_list ap;
@@ -4796,7 +4796,7 @@ xmlTextReaderError(void *ctxt, const char *msg, ...)
}
-static void XMLCDECL LIBXML_ATTR_FORMAT(2,3)
+static void LIBXML_ATTR_FORMAT(2,3)
xmlTextReaderWarning(void *ctxt, const char *msg, ...)
{
va_list ap;
@@ -4808,7 +4808,7 @@ xmlTextReaderWarning(void *ctxt, const char *msg, ...)
va_end(ap);
}
-static void XMLCDECL
+static void
xmlTextReaderValidityError(void *ctxt, const char *msg, ...)
{
va_list ap;
@@ -4828,7 +4828,7 @@ xmlTextReaderValidityError(void *ctxt, const char *msg, ...)
}
}
-static void XMLCDECL
+static void
xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...)
{
va_list ap;
@@ -5362,8 +5362,7 @@ xmlReaderForMemory(const char *buffer, int size, const char *URL,
xmlTextReaderPtr reader;
xmlParserInputBufferPtr buf;
- buf = xmlParserInputBufferCreateStatic(buffer, size,
- XML_CHAR_ENCODING_NONE);
+ buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
return (NULL);
}
@@ -5589,7 +5588,7 @@ xmlReaderNewMemory(xmlTextReaderPtr reader, const char *buffer, int size,
if (buffer == NULL)
return (-1);
- input = xmlParserInputBufferCreateStatic(buffer, size,
+ input = xmlParserInputBufferCreateMem(buffer, size,
XML_CHAR_ENCODING_NONE);
if (input == NULL) {
return (-1);
diff --git a/chromium/third_party/libxml/src/xmlsave.c b/chromium/third_party/libxml/src/xmlsave.c
index 77cb7b9b012..5b5c8f1f2fd 100644
--- a/chromium/third_party/libxml/src/xmlsave.c
+++ b/chromium/third_party/libxml/src/xmlsave.c
@@ -2363,6 +2363,7 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) == NULL ) {
xmlSaveErrMemory("creating buffer");
+ xmlCharEncCloseFunc(conv_hdlr);
return;
}
diff --git a/chromium/third_party/libxml/src/xmlstring.c b/chromium/third_party/libxml/src/xmlstring.c
index 7fbf9d079e2..54734724055 100644
--- a/chromium/third_party/libxml/src/xmlstring.c
+++ b/chromium/third_party/libxml/src/xmlstring.c
@@ -48,7 +48,6 @@ xmlStrndup(const xmlChar *cur, int len) {
if ((cur == NULL) || (len < 0)) return(NULL);
ret = (xmlChar *) xmlMallocAtomic((size_t) len + 1);
if (ret == NULL) {
- xmlErrMemory(NULL, NULL);
return(NULL);
}
memcpy(ret, cur, len);
@@ -93,7 +92,6 @@ xmlCharStrndup(const char *cur, int len) {
if ((cur == NULL) || (len < 0)) return(NULL);
ret = (xmlChar *) xmlMallocAtomic((size_t) len + 1);
if (ret == NULL) {
- xmlErrMemory(NULL, NULL);
return(NULL);
}
for (i = 0;i < len;i++) {
@@ -463,7 +461,6 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
return(NULL);
ret = (xmlChar *) xmlRealloc(cur, (size_t) size + len + 1);
if (ret == NULL) {
- xmlErrMemory(NULL, NULL);
return(cur);
}
memcpy(&ret[size], add, len);
@@ -503,7 +500,6 @@ xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
return(NULL);
ret = (xmlChar *) xmlMalloc((size_t) size + len + 1);
if (ret == NULL) {
- xmlErrMemory(NULL, NULL);
return(xmlStrndup(str1, size));
}
memcpy(ret, str1, size);
@@ -547,7 +543,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
*
* Returns the number of characters written to @buf or -1 if an error occurs.
*/
-int XMLCDECL
+int
xmlStrPrintf(xmlChar *buf, int len, const char *msg, ...) {
va_list args;
int ret;
@@ -1032,7 +1028,6 @@ xmlEscapeFormatString(xmlChar **msg)
out-of-memory situations. */
xmlFree(*msg);
*msg = NULL;
- xmlErrMemory(NULL, NULL);
return(NULL);
}
diff --git a/chromium/third_party/libxml/src/xmlwriter.c b/chromium/third_party/libxml/src/xmlwriter.c
index 278f25d61a5..0de56e7c634 100644
--- a/chromium/third_party/libxml/src/xmlwriter.c
+++ b/chromium/third_party/libxml/src/xmlwriter.c
@@ -864,7 +864,7 @@ xmlTextWriterEndComment(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
const char *format, ...)
{
@@ -1292,7 +1292,7 @@ xmlTextWriterFullEndElement(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, const char *format,
...)
{
@@ -1418,7 +1418,7 @@ xmlTextWriterWriteRaw(xmlTextWriterPtr writer, const xmlChar * content)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatString(xmlTextWriterPtr writer, const char *format,
...)
{
@@ -1964,7 +1964,7 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name, const char *format,
...)
@@ -2059,7 +2059,7 @@ xmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name,
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
@@ -2167,7 +2167,7 @@ xmlTextWriterWriteAttributeNS(xmlTextWriterPtr writer,
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name, const char *format,
...)
@@ -2264,7 +2264,7 @@ xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name,
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
@@ -2521,7 +2521,7 @@ xmlTextWriterEndPI(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, const xmlChar * target,
const char *format, ...)
{
@@ -2736,7 +2736,7 @@ xmlTextWriterEndCDATA(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, const char *format,
...)
{
@@ -3045,7 +3045,7 @@ xmlTextWriterEndDTD(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
@@ -3289,7 +3289,7 @@ xmlTextWriterEndDTDElement(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
@@ -3526,7 +3526,7 @@ xmlTextWriterEndDTDAttlist(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
@@ -3784,7 +3784,7 @@ xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer)
*
* Returns the bytes written (may be 0 because of buffering) or -1 in case of error
*/
-int XMLCDECL
+int
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
diff --git a/chromium/third_party/libxml/src/xpath.c b/chromium/third_party/libxml/src/xpath.c
index aa86fd3a754..94611509ea4 100644
--- a/chromium/third_party/libxml/src/xpath.c
+++ b/chromium/third_party/libxml/src/xpath.c
@@ -51,6 +51,7 @@
#include "private/buf.h"
#include "private/error.h"
+#include "private/xpath.h"
#ifdef LIBXML_PATTERN_ENABLED
#define XPATH_STREAMING
@@ -144,6 +145,9 @@
* any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
*/
+static void
+xmlXPathNodeSetClear(xmlNodeSetPtr set, int hasNsNodes);
+
#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
/**
* xmlXPathCmpNodesExt:
@@ -486,14 +490,21 @@ double xmlXPathNINF = 0.0;
/**
* xmlXPathInit:
*
- * DEPRECATED: This function will be made private. Call xmlInitParser to
- * initialize the library.
+ * DEPRECATED: Alias for xmlInitParser.
+ */
+void
+xmlXPathInit(void) {
+ xmlInitParser();
+}
+
+/**
+ * xmlInitXPathInternal:
*
* Initialize the XPath environment
*/
ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
void
-xmlXPathInit(void) {
+xmlInitXPathInternal(void) {
#if defined(NAN) && defined(INFINITY)
xmlXPathNAN = NAN;
xmlXPathPINF = INFINITY;
@@ -704,6 +715,9 @@ xmlXPathErr(xmlXPathParserContextPtr ctxt, int error)
"%s", xmlXPathErrorMessages[error]);
return;
}
+ /* Only report the first error */
+ if (ctxt->error != 0)
+ return;
ctxt->error = error;
if (ctxt->context == NULL) {
__xmlRaiseError(NULL, NULL, NULL,
@@ -2327,6 +2341,8 @@ xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
* Wrap the Nodeset @val in a new xmlXPathObjectPtr
*
* Returns the created or reused object.
+ *
+ * In case of error the node set is destroyed and NULL is returned.
*/
static xmlXPathObjectPtr
xmlXPathCacheWrapNodeSet(xmlXPathContextPtr ctxt, xmlNodeSetPtr val)
@@ -2865,7 +2881,15 @@ valuePop(xmlXPathParserContextPtr ctxt)
{
xmlXPathObjectPtr ret;
- if ((ctxt == NULL) || (ctxt->valueNr <= 0))
+ /*
+ * If a memory allocation failed, it can happen that valuePush doesn't
+ * push a value on the stack. If there's no error check before the
+ * corresponding valuePop call, we would pop an unrelated object which
+ * could lead to use-after-free errors later on. So we don't pop values
+ * if an error was signaled. The stack will be cleaned later in
+ * xmlXPathFreeParserContext.
+ */
+ if ((ctxt == NULL) || (ctxt->valueNr <= 0) || (ctxt->error != 0))
return (NULL);
if (ctxt->valueNr <= ctxt->valueFrame) {
@@ -2891,6 +2915,8 @@ valuePop(xmlXPathParserContextPtr ctxt)
* a memory error is recorded in the parser context.
*
* Returns the number of items on the value stack, or -1 in case of error.
+ *
+ * The object is destroyed in case of error.
*/
int
valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
@@ -2909,6 +2935,7 @@ valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
if (ctxt->valueMax >= XPATH_MAX_STACK_DEPTH) {
xmlXPathPErrMemory(ctxt, "XPath stack depth limit reached\n");
+ xmlXPathFreeObject(value);
return (-1);
}
tmp = (xmlXPathObjectPtr *) xmlRealloc(ctxt->valueTab,
@@ -2916,6 +2943,7 @@ valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
sizeof(ctxt->valueTab[0]));
if (tmp == NULL) {
xmlXPathPErrMemory(ctxt, "pushing value\n");
+ xmlXPathFreeObject(value);
return (-1);
}
ctxt->valueMax *= 2;
@@ -3021,16 +3049,15 @@ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt) {
xmlXPathObjectPtr obj;
xmlNodeSetPtr ret;
- if (ctxt == NULL) return(NULL);
- if (ctxt->value == NULL) {
+ obj = valuePop(ctxt);
+ if (obj == NULL) {
xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
return(NULL);
}
- if (!xmlXPathStackIsNodeSet(ctxt)) {
+ if (obj->type != XPATH_NODESET) {
xmlXPathSetTypeError(ctxt);
return(NULL);
}
- obj = valuePop(ctxt);
ret = obj->nodesetval;
#if 0
/* to fix memory leak of not clearing obj->user */
@@ -3056,15 +3083,15 @@ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt) {
xmlXPathObjectPtr obj;
void * ret;
- if ((ctxt == NULL) || (ctxt->value == NULL)) {
+ obj = valuePop(ctxt);
+ if (obj == NULL) {
xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
return(NULL);
}
- if (ctxt->value->type != XPATH_USERS) {
+ if (obj->type != XPATH_USERS) {
xmlXPathSetTypeError(ctxt);
return(NULL);
}
- obj = valuePop(ctxt);
ret = obj->user;
obj->user = NULL;
xmlXPathReleaseObject(ctxt->context, obj);
@@ -3598,10 +3625,13 @@ xmlXPathNodeSetCreate(xmlNodePtr val) {
ret->nodeMax = XML_NODESET_DEFAULT;
if (val->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns = (xmlNsPtr) val;
+ xmlNodePtr nsNode = xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
- /* TODO: Check memory error. */
- ret->nodeTab[ret->nodeNr++] =
- xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ if (nsNode == NULL) {
+ xmlXPathFreeNodeSet(ret);
+ return(NULL);
+ }
+ ret->nodeTab[ret->nodeNr++] = nsNode;
} else
ret->nodeTab[ret->nodeNr++] = val;
}
@@ -3658,7 +3688,7 @@ xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val) {
int
xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
int i;
-
+ xmlNodePtr nsNode;
if ((cur == NULL) || (ns == NULL) || (node == NULL) ||
(ns->type != XML_NAMESPACE_DECL) ||
@@ -3706,8 +3736,10 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
cur->nodeMax *= 2;
cur->nodeTab = temp;
}
- /* TODO: Check memory error. */
- cur->nodeTab[cur->nodeNr++] = xmlXPathNodeSetDupNs(node, ns);
+ nsNode = xmlXPathNodeSetDupNs(node, ns);
+ if(nsNode == NULL)
+ return(-1);
+ cur->nodeTab[cur->nodeNr++] = nsNode;
return(0);
}
@@ -3764,10 +3796,11 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
}
if (val->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns = (xmlNsPtr) val;
+ xmlNodePtr nsNode = xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
- /* TODO: Check memory error. */
- cur->nodeTab[cur->nodeNr++] =
- xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ if (nsNode == NULL)
+ return(-1);
+ cur->nodeTab[cur->nodeNr++] = nsNode;
} else
cur->nodeTab[cur->nodeNr++] = val;
return(0);
@@ -3819,10 +3852,11 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
}
if (val->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns = (xmlNsPtr) val;
+ xmlNodePtr nsNode = xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
- /* TODO: Check memory error. */
- cur->nodeTab[cur->nodeNr++] =
- xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ if (nsNode == NULL)
+ return(-1);
+ cur->nodeTab[cur->nodeNr++] = nsNode;
} else
cur->nodeTab[cur->nodeNr++] = val;
return(0);
@@ -3837,6 +3871,8 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
* if @val1 is NULL, a new set is created and copied from @val2
*
* Returns @val1 once extended or NULL in case of error.
+ *
+ * Frees @val1 in case of error.
*/
xmlNodeSetPtr
xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
@@ -3846,35 +3882,8 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
if (val2 == NULL) return(val1);
if (val1 == NULL) {
val1 = xmlXPathNodeSetCreate(NULL);
- if (val1 == NULL)
- return (NULL);
-#if 0
- /*
- * TODO: The optimization won't work in every case, since
- * those nasty namespace nodes need to be added with
- * xmlXPathNodeSetDupNs() to the set; thus a pure
- * memcpy is not possible.
- * If there was a flag on the nodesetval, indicating that
- * some temporary nodes are in, that would be helpful.
- */
- /*
- * Optimization: Create an equally sized node-set
- * and memcpy the content.
- */
- val1 = xmlXPathNodeSetCreateSize(val2->nodeNr);
- if (val1 == NULL)
- return(NULL);
- if (val2->nodeNr != 0) {
- if (val2->nodeNr == 1)
- *(val1->nodeTab) = *(val2->nodeTab);
- else {
- memcpy(val1->nodeTab, val2->nodeTab,
- val2->nodeNr * sizeof(xmlNodePtr));
- }
- val1->nodeNr = val2->nodeNr;
- }
- return(val1);
-#endif
+ if (val1 == NULL)
+ return (NULL);
}
/* @@ with_ns to check whether namespace nodes should be looked at @@ */
@@ -3913,7 +3922,7 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
sizeof(xmlNodePtr));
if (val1->nodeTab == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
memset(val1->nodeTab, 0 ,
XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
@@ -3923,28 +3932,33 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
if (val1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
- return(NULL);
+ goto error;
}
temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * 2 *
sizeof(xmlNodePtr));
if (temp == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
val1->nodeTab = temp;
val1->nodeMax *= 2;
}
if (n2->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns = (xmlNsPtr) n2;
+ xmlNodePtr nsNode = xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
- /* TODO: Check memory error. */
- val1->nodeTab[val1->nodeNr++] =
- xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ if (nsNode == NULL)
+ goto error;
+ val1->nodeTab[val1->nodeNr++] = nsNode;
} else
val1->nodeTab[val1->nodeNr++] = n2;
}
return(val1);
+
+error:
+ xmlXPathFreeNodeSet(val1);
+ return(NULL);
}
@@ -3957,6 +3971,8 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
* Checks for duplicate nodes. Clears set2.
*
* Returns @set1 once extended or NULL in case of error.
+ *
+ * Frees @set1 in case of error.
*/
static xmlNodeSetPtr
xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
@@ -3985,7 +4001,6 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
/*
* Free the namespace node.
*/
- set2->nodeTab[i] = NULL;
xmlXPathNodeSetFreeNs((xmlNsPtr) n2);
goto skip_node;
}
@@ -3999,7 +4014,7 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
if (set1->nodeTab == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
memset(set1->nodeTab, 0,
XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
@@ -4009,24 +4024,29 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
- return(NULL);
+ goto error;
}
temp = (xmlNodePtr *) xmlRealloc(
set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr));
if (temp == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
set1->nodeTab = temp;
set1->nodeMax *= 2;
}
set1->nodeTab[set1->nodeNr++] = n2;
skip_node:
- {}
+ set2->nodeTab[i] = NULL;
}
}
set2->nodeNr = 0;
return(set1);
+
+error:
+ xmlXPathFreeNodeSet(set1);
+ xmlXPathNodeSetClear(set2, 1);
+ return(NULL);
}
/**
@@ -4038,6 +4058,8 @@ skip_node:
* Doesn't check for duplicate nodes. Clears set2.
*
* Returns @set1 once extended or NULL in case of error.
+ *
+ * Frees @set1 in case of error.
*/
static xmlNodeSetPtr
xmlXPathNodeSetMergeAndClearNoDupls(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
@@ -4053,7 +4075,7 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
if (set1->nodeTab == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
memset(set1->nodeTab, 0,
XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
@@ -4063,22 +4085,28 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlNodeSetPtr set1, xmlNodeSetPtr set2)
if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
- return(NULL);
+ goto error;
}
temp = (xmlNodePtr *) xmlRealloc(
set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr));
if (temp == NULL) {
xmlXPathErrMemory(NULL, "merging nodeset\n");
- return(NULL);
+ goto error;
}
set1->nodeTab = temp;
set1->nodeMax *= 2;
}
set1->nodeTab[set1->nodeNr++] = n2;
+ set2->nodeTab[i] = NULL;
}
}
set2->nodeNr = 0;
return(set1);
+
+error:
+ xmlXPathFreeNodeSet(set1);
+ xmlXPathNodeSetClear(set2, 1);
+ return(NULL);
}
/**
@@ -4396,6 +4424,8 @@ xmlXPathNewNodeSetList(xmlNodeSetPtr val)
* Wrap the Nodeset @val in a new xmlXPathObjectPtr
*
* Returns the newly created object.
+ *
+ * In case of error the node set is destroyed and NULL is returned.
*/
xmlXPathObjectPtr
xmlXPathWrapNodeSet(xmlNodeSetPtr val) {
@@ -4404,6 +4434,7 @@ xmlXPathWrapNodeSet(xmlNodeSetPtr val) {
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
if (ret == NULL) {
xmlXPathErrMemory(NULL, "creating node set object\n");
+ xmlXPathFreeNodeSet(val);
return(NULL);
}
memset(ret, 0 , sizeof(xmlXPathObject));
@@ -5286,6 +5317,8 @@ xmlXPathNewString(const xmlChar *val) {
* Wraps the @val string into an XPath object.
*
* Returns the newly created object.
+ *
+ * Frees @val in case of error.
*/
xmlXPathObjectPtr
xmlXPathWrapString (xmlChar *val) {
@@ -5294,6 +5327,7 @@ xmlXPathWrapString (xmlChar *val) {
ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
if (ret == NULL) {
xmlXPathErrMemory(NULL, "creating string object\n");
+ xmlFree(val);
return(NULL);
}
memset(ret, 0 , sizeof(xmlXPathObject));
@@ -6815,6 +6849,7 @@ xmlXPathEqualNodeSetFloat(xmlXPathParserContextPtr ctxt,
xmlFree(str2);
xmlXPathNumberFunction(ctxt, 1);
val = valuePop(ctxt);
+ CHECK_ERROR0;
v = val->floatval;
xmlXPathReleaseObject(ctxt->context, val);
if (!xmlXPathIsNaN(v)) {
@@ -7029,6 +7064,8 @@ xmlXPathEqualValuesCommon(xmlXPathParserContextPtr ctxt,
valuePush(ctxt, arg2);
xmlXPathNumberFunction(ctxt, 1);
arg2 = valuePop(ctxt);
+ if (ctxt->error)
+ break;
/* Falls through. */
case XPATH_NUMBER:
/* Hand check NaN and Infinity equalities */
@@ -7094,6 +7131,8 @@ xmlXPathEqualValuesCommon(xmlXPathParserContextPtr ctxt,
valuePush(ctxt, arg1);
xmlXPathNumberFunction(ctxt, 1);
arg1 = valuePop(ctxt);
+ if (ctxt->error)
+ break;
/* Hand check NaN and Infinity equalities */
if (xmlXPathIsNaN(arg1->floatval) ||
xmlXPathIsNaN(arg2->floatval)) {
@@ -7393,21 +7432,13 @@ xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) {
xmlXPathNumberFunction(ctxt, 1);
arg1 = valuePop(ctxt);
}
- if (arg1->type != XPATH_NUMBER) {
- xmlXPathFreeObject(arg1);
- xmlXPathFreeObject(arg2);
- XP_ERROR0(XPATH_INVALID_OPERAND);
- }
if (arg2->type != XPATH_NUMBER) {
valuePush(ctxt, arg2);
xmlXPathNumberFunction(ctxt, 1);
arg2 = valuePop(ctxt);
}
- if (arg2->type != XPATH_NUMBER) {
- xmlXPathReleaseObject(ctxt->context, arg1);
- xmlXPathReleaseObject(ctxt->context, arg2);
- XP_ERROR0(XPATH_INVALID_OPERAND);
- }
+ if (ctxt->error)
+ goto error;
/*
* Add tests for infinity and nan
* => feedback on 3.4 for Inf and NaN
@@ -7457,6 +7488,7 @@ xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) {
}
}
}
+error:
xmlXPathReleaseObject(ctxt->context, arg1);
xmlXPathReleaseObject(ctxt->context, arg2);
return(ret);
@@ -9993,13 +10025,13 @@ xmlXPathStringEvalNumber(const xmlChar *str) {
#endif
if (cur == NULL) return(0);
while (IS_BLANK_CH(*cur)) cur++;
- if ((*cur != '.') && ((*cur < '0') || (*cur > '9')) && (*cur != '-')) {
- return(xmlXPathNAN);
- }
if (*cur == '-') {
isneg = 1;
cur++;
}
+ if ((*cur != '.') && ((*cur < '0') || (*cur > '9'))) {
+ return(xmlXPathNAN);
+ }
#ifdef __GNUC__
/*
@@ -10256,7 +10288,10 @@ xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
} else {
XP_ERROR(XPATH_START_LITERAL_ERROR);
}
- if (ret == NULL) return;
+ if (ret == NULL) {
+ xmlXPathPErrMemory(ctxt, NULL);
+ return;
+ }
lit = xmlXPathCacheNewString(ctxt->context, ret);
if (lit == NULL) {
ctxt->error = XPATH_MEMORY_ERROR;
@@ -13644,8 +13679,6 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp,
xmlNodePtr cur = NULL, limit = NULL;
xmlStreamCtxtPtr patstream = NULL;
- int nb_nodes = 0;
-
if ((ctxt == NULL) || (comp == NULL))
return(-1);
max_depth = xmlPatternMaxDepth(comp);
@@ -13762,8 +13795,6 @@ next_node:
ctxt->opCount++;
}
- nb_nodes++;
-
switch (cur->type) {
case XML_ELEMENT_NODE:
case XML_TEXT_NODE:
@@ -13855,11 +13886,6 @@ scan_children:
done:
-#if 0
- printf("stream eval: checked %d nodes selected %d\n",
- nb_nodes, retObj->nodesetval->nodeNr);
-#endif
-
if (patstream)
xmlFreeStreamCtxt(patstream);
return(0);
@@ -14113,6 +14139,7 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
comp = xmlXPathNewCompExpr();
if (comp == NULL) {
xmlXPathErrMemory(ctxt, "allocating streamable expression\n");
+ xmlFreePattern(stream);
return(NULL);
}
comp->stream = stream;
diff --git a/chromium/third_party/libxml/win32/config.h b/chromium/third_party/libxml/win32/config.h
index 2b113237058..a25e0385024 100644
--- a/chromium/third_party/libxml/win32/config.h
+++ b/chromium/third_party/libxml/win32/config.h
@@ -6,16 +6,16 @@
#define HAVE_FCNTL_H
#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER >= 1600)
-#define HAVE_STDINT_H
+ #define HAVE_STDINT_H
#endif
#if defined(_MSC_VER)
-#if _MSC_VER < 1900
-#define snprintf _snprintf
-#endif
-#if _MSC_VER < 1500
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
-#endif
+ #if _MSC_VER < 1900
+ #define snprintf _snprintf
+ #endif
+ #if _MSC_VER < 1500
+ #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+ #endif
#endif
#endif /* __LIBXML_WIN32_CONFIG__ */
diff --git a/chromium/third_party/libxml/win32/include/libxml/xmlversion.h b/chromium/third_party/libxml/win32/include/libxml/xmlversion.h
index d84600c05ad..eccc1a3b27e 100644
--- a/chromium/third_party/libxml/win32/include/libxml/xmlversion.h
+++ b/chromium/third_party/libxml/win32/include/libxml/xmlversion.h
@@ -21,7 +21,7 @@ extern "C" {
* your library and includes mismatch
*/
#ifndef LIBXML2_COMPILING_MSCCDEF
-XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+XMLPUBFUN void xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */
/**
@@ -90,7 +90,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* Whether the thread support is configured in
*/
-#if 0
+#if 1
#define LIBXML_THREAD_ENABLED
#endif
@@ -440,10 +440,10 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif
#ifndef XML_DEPRECATED
-# ifdef IN_LIBXML
+# if defined (IN_LIBXML) || (__GNUC__ * 100 + __GNUC_MINOR__ < 301)
# define XML_DEPRECATED
-# else
/* Available since at least GCC 3.1 */
+# else
# define XML_DEPRECATED __attribute__((deprecated))
# endif
#endif
@@ -487,20 +487,35 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* is deprecated.
*/
#ifndef XML_DEPRECATED
-#define XML_DEPRECATED
+# if defined (IN_LIBXML) || !defined (_MSC_VER)
+# define XML_DEPRECATED
+/* Available since Visual Studio 2005 */
+# elif defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_DEPRECATED __declspec(deprecated)
+# endif
#endif
/**
* LIBXML_IGNORE_FPTR_CAST_WARNINGS:
*
* Macro used to ignore pointer cast warnings that can't be worked around.
*/
-#define XML_IGNORE_FPTR_CAST_WARNINGS
+#if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_IGNORE_FPTR_CAST_WARNINGS __pragma(warning(push))
+#else
+# define XML_IGNORE_FPTR_CAST_WARNINGS
+#endif
/**
- * LIBXML_POP_WARNINGS:
+ * XML_POP_WARNINGS:
*
* Macro used to restore warnings state.
*/
-#define XML_POP_WARNINGS
+#ifndef XML_POP_WARNINGS
+# if defined (_MSC_VER) && (_MSC_VER >= 1400)
+# define XML_POP_WARNINGS __pragma(warning(pop))
+# else
+# define XML_POP_WARNINGS
+# endif
+#endif
#endif /* __GNUC__ */
#ifdef __cplusplus