Date: Wed, 21 Feb 2024 06:58:04 GMT From: Xin LI <delphij@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 4b79ff18c3b5 - stable/14 - MFC: MFV: expat 2.6.0. Message-ID: <202402210658.41L6w459057547@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=4b79ff18c3b5ea2e3fc2f50569d5cda9f74b8a94 commit 4b79ff18c3b5ea2e3fc2f50569d5cda9f74b8a94 Author: Xin LI <delphij@FreeBSD.org> AuthorDate: 2024-02-17 21:56:56 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2024-02-21 06:52:29 +0000 MFC: MFV: expat 2.6.0. (cherry picked from commit 4543ef516683042d46f3bd3bb8a4f3f746e00499) --- contrib/expat/Changes | 118 +- contrib/expat/Makefile.am | 10 +- contrib/expat/Makefile.in | 22 +- contrib/expat/README.md | 7 +- contrib/expat/configure.ac | 43 +- contrib/expat/doc/Makefile.in | 10 +- contrib/expat/doc/ok.min.css | 4 +- contrib/expat/doc/reference.html | 222 +- contrib/expat/doc/xmlwf.1 | 24 +- contrib/expat/doc/xmlwf.xml | 50 +- contrib/expat/examples/Makefile.am | 9 +- contrib/expat/examples/Makefile.in | 48 +- contrib/expat/examples/element_declarations.c | 234 + contrib/expat/expat_config.h.in | 8 +- contrib/expat/fuzz/xml_parse_fuzzer.c | 53 +- contrib/expat/fuzz/xml_parsebuffer_fuzzer.c | 68 +- contrib/expat/lib/Makefile.in | 10 +- contrib/expat/lib/expat.h | 28 +- contrib/expat/lib/internal.h | 8 +- contrib/expat/lib/siphash.h | 10 +- contrib/expat/lib/xmlparse.c | 558 +- contrib/expat/lib/xmlrole.c | 6 +- contrib/expat/lib/xmlrole.h | 6 +- contrib/expat/lib/xmltok.c | 29 +- contrib/expat/lib/xmltok.h | 8 +- contrib/expat/lib/xmltok_impl.c | 2 +- contrib/expat/tests/Makefile.am | 61 +- contrib/expat/tests/Makefile.in | 261 +- contrib/expat/tests/acc_tests.c | 396 + contrib/expat/tests/acc_tests.h | 56 + contrib/expat/tests/acc_tests_cxx.cpp | 32 + contrib/expat/tests/alloc_tests.c | 2127 ++++ contrib/expat/tests/alloc_tests.h | 56 + contrib/expat/tests/alloc_tests_cxx.cpp | 32 + contrib/expat/tests/basic_tests.c | 6076 +++++++++ contrib/expat/tests/basic_tests.h | 56 + contrib/expat/tests/basic_tests_cxx.cpp | 32 + contrib/expat/tests/benchmark/Makefile.in | 10 +- contrib/expat/tests/benchmark/benchmark.c | 14 +- contrib/expat/tests/chardata.c | 16 +- contrib/expat/tests/chardata_cxx.cpp | 32 + contrib/expat/tests/common.c | 325 + contrib/expat/tests/common.h | 162 + contrib/expat/tests/common_cxx.cpp | 32 + contrib/expat/tests/dummy.c | 261 + contrib/expat/tests/dummy.h | 150 + contrib/expat/tests/dummy_cxx.cpp | 32 + contrib/expat/tests/handlers.c | 1932 +++ contrib/expat/tests/handlers.h | 595 + contrib/expat/tests/handlers_cxx.cpp | 32 + contrib/expat/tests/memcheck.c | 21 +- contrib/expat/tests/memcheck_cxx.cpp | 32 + contrib/expat/tests/minicheck.c | 58 +- contrib/expat/tests/minicheck.h | 79 +- contrib/expat/tests/minicheck_cxx.cpp | 32 + contrib/expat/tests/misc_tests.c | 523 + contrib/expat/tests/misc_tests.h | 56 + contrib/expat/tests/misc_tests_cxx.cpp | 32 + contrib/expat/tests/ns_tests.c | 754 ++ contrib/expat/tests/ns_tests.h | 56 + contrib/expat/tests/ns_tests_cxx.cpp | 32 + contrib/expat/tests/nsalloc_tests.c | 1537 +++ contrib/expat/tests/nsalloc_tests.h | 56 + contrib/expat/tests/nsalloc_tests_cxx.cpp | 32 + contrib/expat/tests/runtests.c | 12479 +------------------ .../tests/{runtestspp.cpp => runtests_cxx.cpp} | 4 +- contrib/expat/tests/structdata.c | 37 +- contrib/expat/tests/structdata_cxx.cpp | 32 + contrib/expat/xmlwf/Makefile.in | 10 +- contrib/expat/xmlwf/readfilemap.c | 21 +- contrib/expat/xmlwf/xmlfile.c | 16 +- contrib/expat/xmlwf/xmlfile.h | 4 +- contrib/expat/xmlwf/xmlwf.c | 156 +- contrib/expat/xmlwf/xmlwf_helpgen.py | 31 +- lib/libexpat/expat_config.h | 16 +- lib/libexpat/libbsdxml.3 | 4 +- 76 files changed, 17368 insertions(+), 13115 deletions(-) diff --git a/contrib/expat/Changes b/contrib/expat/Changes index e67171056950..a7d4caf9ac81 100644 --- a/contrib/expat/Changes +++ b/contrib/expat/Changes @@ -2,6 +2,120 @@ NOTE: We are looking for help with a few things: https://github.com/libexpat/libexpat/labels/help%20wanted If you can help, please get in touch. Thanks! +Release 2.6.0 Tue February 6 2024 + Security fixes: + #789 #814 CVE-2023-52425 -- Fix quadratic runtime issues with big tokens + that can cause denial of service, in partial where + dealing with compressed XML input. Applications + that parsed a document in one go -- a single call to + functions XML_Parse or XML_ParseBuffer -- were not affected. + The smaller the chunks/buffers you use for parsing + previously, the bigger the problem prior to the fix. + Backporters should be careful to no omit parts of + pull request #789 and to include earlier pull request #771, + in order to not break the fix. + #777 CVE-2023-52426 -- Fix billion laughs attacks for users + compiling *without* XML_DTD defined (which is not common). + Users with XML_DTD defined have been protected since + Expat >=2.4.0 (and that was CVE-2013-0340 back then). + + Bug fixes: + #753 Fix parse-size-dependent "invalid token" error for + external entities that start with a byte order mark + #780 Fix NULL pointer dereference in setContext via + XML_ExternalEntityParserCreate for compilation with + XML_DTD undefined + #812 #813 Protect against closing entities out of order + + Other changes: + #723 Improve support for arc4random/arc4random_buf + #771 #788 Improve buffer growth in XML_GetBuffer and XML_Parse + #761 #770 xmlwf: Support --help and --version + #759 #770 xmlwf: Support custom buffer size for XML_GetBuffer and read + #744 xmlwf: Improve language and URL clickability in help output + #673 examples: Add new example "element_declarations.c" + #764 Be stricter about macro XML_CONTEXT_BYTES at build time + #765 Make inclusion to expat_config.h consistent + #726 #727 Autotools: configure.ac: Support --disable-maintainer-mode + #678 #705 .. + #706 #733 #792 Autotools: Sync CMake templates with CMake 3.26 + #795 Autotools: Make installation of shipped man page doc/xmlwf.1 + independent of docbook2man availability + #815 Autotools|CMake: Add missing -DXML_STATIC to pkg-config file + section "Cflags.private" in order to fix compilation + against static libexpat using pkg-config on Windows + #724 #751 Autotools|CMake: Require a C99 compiler + (a de-facto requirement already since Expat 2.2.2 of 2017) + #793 Autotools|CMake: Fix PACKAGE_BUGREPORT variable + #750 #786 Autotools|CMake: Make test suite require a C++11 compiler + #749 CMake: Require CMake >=3.5.0 + #672 CMake: Lowercase off_t and size_t to help a bug in Meson + #746 CMake: Sort xmlwf sources alphabetically + #785 CMake|Windows: Fix generation of DLL file version info + #790 CMake: Build tests/benchmark/benchmark.c as well for + a build with -DEXPAT_BUILD_TESTS=ON + #745 #757 docs: Document the importance of isFinal + adjust tests + accordingly + #736 docs: Improve use of "NULL" and "null" + #713 docs: Be specific about version of XML (XML 1.0r4) + and version of C (C99); (XML 1.0r5 will need a sponsor.) + #762 docs: reference.html: Promote function XML_ParseBuffer more + #779 docs: reference.html: Add HTML anchors to XML_* macros + #760 docs: reference.html: Upgrade to OK.css 1.2.0 + #763 #739 docs: Fix typos + #696 docs|CI: Use HTTPS URLs instead of HTTP at various places + #669 #670 .. + #692 #703 .. + #733 #772 Address compiler warnings + #798 #800 Address clang-tidy warnings + #775 #776 Version info bumped from 9:10:8 (libexpat*.so.1.8.10) + to 10:0:9 (libexpat*.so.1.9.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #700 #701 docs: Document security policy in file SECURITY.md + #766 docs: Improve parse buffer variables in-code documentation + #674 #738 .. + #740 #747 .. + #748 #781 #782 Refactor coverage and conformance tests + #714 #716 Refactor debug level variables to unsigned long + #671 Improve handling of empty environment variable value + in function getDebugLevel (without visible user effect) + #755 #774 .. + #758 #783 .. + #784 #787 tests: Improve test coverage with regard to parse chunk size + #660 #797 #801 Fuzzing: Improve fuzzing coverage + #367 #799 Fuzzing|CI: Start running OSS-Fuzz fuzzing regression tests + #698 #721 CI: Resolve some Travis CI leftovers + #669 CI: Be robust towards absence of Git tags + #693 #694 CI: Set permissions to "contents: read" for security + #709 CI: Pin all GitHub Actions to specific commits for security + #739 CI: Reject spelling errors using codespell + #798 CI: Enforce clang-tidy clean code + #773 #808 .. + #809 #810 CI: Upgrade Clang from 15 to 18 + #796 CI: Start using Clang's Control Flow Integrity sanitizer + #675 #720 #722 CI: Adapt to breaking changes in GitHub Actions Ubuntu images + #689 CI: Adapt to breaking changes in Clang/LLVM Debian packaging + #763 CI: Adapt to breaking changes in codespell + #803 CI: Adapt to breaking changes in Cppcheck + + Special thanks to: + Ivan Galkin + Joyce Brum + Philippe Antoine + Rhodri James + Snild Dolkow + spookyahell + Steven Garske + and + Clang AddressSanitizer + Clang UndefinedBehaviorSanitizer + codespell + GCC Farm Project + OSS-Fuzz + Sony Mobile + Release 2.5.0 Tue October 25 2022 Security fixes: #616 #649 #650 CVE-2022-43680 -- Fix heap use-after-free after overeager @@ -11,7 +125,7 @@ Release 2.5.0 Tue October 25 2022 arbitrary code execution. Bug fixes: - #612 #645 Fix curruption from undefined entities + #612 #645 Fix corruption from undefined entities #613 #654 Fix case when parsing was suspended while processing nested entities #616 #652 #653 Stop leaking opening tag bindings after a closing tag @@ -318,7 +432,7 @@ Release 2.4.2 Sun December 19 2021 see https://verbump.de/ for what these numbers do Special thanks to: - Dong-hee Na + Donghee Na Joergen Ibsen Kai Pastor diff --git a/contrib/expat/Makefile.am b/contrib/expat/Makefile.am index 37ae3738edd3..9c2259d23e63 100644 --- a/contrib/expat/Makefile.am +++ b/contrib/expat/Makefile.am @@ -6,9 +6,10 @@ # \___/_/\_\ .__/ \__,_|\__| # |_| XML parser # -# Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org> +# Copyright (c) 2017-2023 Sebastian Pipping <sebastian@pipping.org> # Copyright (c) 2018 KangLin <kl222@126.com> # Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com> +# Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com> # Licensed under the MIT license: # # Permission is hereby granted, free of charge, to any person obtaining @@ -84,7 +85,7 @@ _EXTRA_DIST_WINDOWS = \ win32/expat.iss \ win32/MANIFEST.txt \ win32/README.txt \ - win32/version.rc + win32/version.rc.cmake EXTRA_DIST = \ $(_EXTRA_DIST_CMAKE) \ @@ -131,6 +132,11 @@ buildlib: run-benchmark: $(MAKE) -C tests/benchmark ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_attr.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_cdata.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_comment.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_tag.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_text.xml 4096 3 .PHONY: download-xmlts-zip download-xmlts-zip: diff --git a/contrib/expat/Makefile.in b/contrib/expat/Makefile.in index 008c4109b793..f505224f6fa8 100644 --- a/contrib/expat/Makefile.in +++ b/contrib/expat/Makefile.in @@ -22,9 +22,10 @@ # \___/_/\_\ .__/ \__,_|\__| # |_| XML parser # -# Copyright (c) 2017-2021 Sebastian Pipping <sebastian@pipping.org> +# Copyright (c) 2017-2023 Sebastian Pipping <sebastian@pipping.org> # Copyright (c) 2018 KangLin <kl222@126.com> # Copyright (c) 2022 Johnny Jazeix <jazeix@gmail.com> +# Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com> # Licensed under the MIT license: # # Permission is hereby granted, free of charge, to any person obtaining @@ -136,6 +137,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/conftools/ax-append-compile-flags.m4 \ $(top_srcdir)/conftools/ax-append-link-flags.m4 \ $(top_srcdir)/conftools/expatcfg-compiler-supports-visibility.m4 \ + $(top_srcdir)/conftools/ax-cxx-compile-stdcxx.m4 \ + $(top_srcdir)/conftools/ax-cxx-compile-stdcxx-11.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -339,6 +342,7 @@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILEMAP = @FILEMAP@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -358,6 +362,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -478,7 +483,7 @@ _EXTRA_DIST_WINDOWS = \ win32/expat.iss \ win32/MANIFEST.txt \ win32/README.txt \ - win32/version.rc + win32/version.rc.cmake EXTRA_DIST = \ $(_EXTRA_DIST_CMAKE) \ @@ -506,7 +511,7 @@ all: expat_config.h .SUFFIXES: am--refresh: Makefile @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -532,9 +537,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): @@ -545,7 +550,7 @@ expat_config.h: stamp-h1 stamp-h1: $(srcdir)/expat_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status expat_config.h -$(srcdir)/expat_config.h.in: $(am__configure_deps) +$(srcdir)/expat_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -1092,6 +1097,11 @@ buildlib: run-benchmark: $(MAKE) -C tests/benchmark ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_attr.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_cdata.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_comment.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_tag.xml 4096 3 + ./run.sh tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/aaaaaa_text.xml 4096 3 .PHONY: download-xmlts-zip download-xmlts-zip: diff --git a/contrib/expat/README.md b/contrib/expat/README.md index e5e237fc9496..43c4f4f3dbb3 100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@ -1,13 +1,14 @@ -[![Run Linux Travis CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) +[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) [![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) [![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) [![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) -# Expat, Release 2.5.0 +# Expat, Release 2.6.0 -This is Expat, a C library for parsing XML, started by +This is Expat, a C99 library for parsing +[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by [James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997. Expat is a stream-oriented XML parser. This means that you register handlers with the parser before starting the parse. These handlers diff --git a/contrib/expat/configure.ac b/contrib/expat/configure.ac index d3642dea5864..a5d1ff9317c8 100644 --- a/contrib/expat/configure.ac +++ b/contrib/expat/configure.ac @@ -11,7 +11,7 @@ dnl Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net> dnl Copyright (c) 2000-2005 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> dnl Copyright (c) 2001-2003 Greg Stein <gstein@users.sourceforge.net> dnl Copyright (c) 2006-2012 Karl Waclawek <karl@waclawek.net> -dnl Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org> +dnl Copyright (c) 2016-2024 Sebastian Pipping <sebastian@pipping.org> dnl Copyright (c) 2017 S. P. Zeidler <spz@netbsd.org> dnl Copyright (c) 2017 Stephen Groat <stephen@groat.us> dnl Copyright (c) 2017-2020 Joe Orton <jorton@redhat.com> @@ -60,7 +60,7 @@ m4_define([expat_version], m4_ifdef([__gnu__], [esyscmd(conftools/get-version.sh lib/expat.h)], [2.2.x])) -AC_INIT([expat], expat_version, [expat-bugs@libexpat.org]) +AC_INIT([expat], expat_version, [https://github.com/libexpat/libexpat/issues]) m4_undefine([expat_version]) AC_CONFIG_SRCDIR([Makefile.in]) @@ -68,6 +68,7 @@ AC_CONFIG_AUX_DIR([conftools]) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE([enable]) # to allow argument --disable-maintainer-mode dnl @@ -81,9 +82,9 @@ dnl dnl If the API changes incompatibly set LIBAGE back to 0 dnl -LIBCURRENT=9 # sync -LIBREVISION=10 # with -LIBAGE=8 # CMakeLists.txt! +LIBCURRENT=10 # sync +LIBREVISION=0 # with +LIBAGE=9 # CMakeLists.txt! AC_CONFIG_HEADERS([expat_config.h]) AH_TOP([#ifndef EXPAT_CONFIG_H @@ -105,6 +106,9 @@ AC_SUBST(LIBAGE) AC_LANG([C]) AC_PROG_CC_C99 +AS_IF([test "${ac_cv_prog_cc_c99}" = no], + [AC_MSG_ERROR([Expat requires a C99 compiler.])]) + AS_IF([test "$GCC" = yes], [AX_APPEND_COMPILE_FLAGS([-Wall -Wextra], [AM_CFLAGS]) dnl Be careful about adding the -fexceptions option; some versions of @@ -176,6 +180,8 @@ AC_ARG_WITH([tests], [with_tests=yes]) AM_CONDITIONAL([WITH_TESTS], [test x${with_tests} = xyes]) +AS_IF([test x${with_tests} = xyes], + [AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])]) AS_VAR_SET([EXPATCFG_ON_MINGW],[no]) AS_CASE("${host_os}", @@ -202,14 +208,16 @@ AS_IF([test "x${with_libbsd}" != xno], [], [AS_IF([test "x${with_libbsd}" = xyes], [AC_MSG_ERROR([Enforced use of libbsd cannot be satisfied.])])])]) -AC_MSG_CHECKING([for arc4random_buf (BSD or libbsd)]) +AC_MSG_CHECKING([for arc4random_buf (BSD, libbsd or glibc 2.36+)]) AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include <stdlib.h> /* for arc4random_buf on BSD, for NULL */ #if defined(HAVE_LIBBSD) # include <bsd/stdlib.h> + #else + # include <stdlib.h> /* for arc4random_buf on BSD */ #endif int main() { - arc4random_buf(NULL, 0U); + char dummy[[123]]; // double brackets for m4 + arc4random_buf(dummy, 0U); return 0; } ])], @@ -217,7 +225,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) - AC_MSG_CHECKING([for arc4random (BSD, macOS or libbsd)]) + AC_MSG_CHECKING([for arc4random (BSD, macOS, libbsd or glibc 2.36+)]) AC_LINK_IFELSE([AC_LANG_SOURCE([ #if defined(HAVE_LIBBSD) # include <bsd/stdlib.h> @@ -295,6 +303,8 @@ AC_SUBST(FILEMAP) dnl Some basic configuration: AC_DEFINE([XML_NS], 1, [Define to make XML Namespaces functionality available.]) +AC_DEFINE([XML_GE], 1, + [Define as 1/0 to enable/disable support for general entities.]) AC_DEFINE([XML_DTD], 1, [Define to make parameter entity parsing functionality available.]) AC_DEFINE([XML_DEV_URANDOM], 1, @@ -319,9 +329,10 @@ AS_HELP_STRING([--disable-xml-context], AS_IF([test "x${enable_xml_context}" != "xno"], [AS_IF([test "x${enable_xml_context}" = "xyes" \ -o "x${enable_xml_context}" = "x"], - [AS_VAR_SET(enable_xml_context,1024)]) - AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}], - [Define to specify how much context to retain around the current parse point.])]) + [AS_VAR_SET(enable_xml_context,1024)])], + [AS_VAR_SET(enable_xml_context,0)]) +AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}], + [Define to specify how much context to retain around the current parse point, 0 to disable.]) AC_ARG_WITH([docbook], [AS_HELP_STRING([--with-docbook], @@ -345,8 +356,12 @@ AS_IF([test "x${DOCBOOK_TO_MAN}" != x -a "x$with_docbook" != xno], You can also configure using --without-docbook if you can do without a man page for xmlwf.])])]) -AM_CONDITIONAL(WITH_DOCBOOK, [test "x${DOCBOOK_TO_MAN}" != x]) - +dnl This will make sure that a release tarball shipping a pre-rendered xmlwf man page will +dnl get it installed, independent of whether some flavor of docbook2man is available. +dnl This relies on file xmlwf.1 being at least as recent as its source file xmlwf.xml. +AS_IF([test -f "${srcdir}"/doc/xmlwf.1], + [AM_CONDITIONAL(WITH_DOCBOOK, [true])], + [AM_CONDITIONAL(WITH_DOCBOOK, [test "x${DOCBOOK_TO_MAN}" != x])]) dnl Configure CMake file templates dnl NOTE: The *_TRUE variables read here are Automake conditionals diff --git a/contrib/expat/doc/Makefile.in b/contrib/expat/doc/Makefile.in index 7fef3eda1897..18f86be3947b 100644 --- a/contrib/expat/doc/Makefile.in +++ b/contrib/expat/doc/Makefile.in @@ -132,6 +132,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/conftools/ax-append-compile-flags.m4 \ $(top_srcdir)/conftools/ax-append-link-flags.m4 \ $(top_srcdir)/conftools/expatcfg-compiler-supports-visibility.m4 \ + $(top_srcdir)/conftools/ax-cxx-compile-stdcxx.m4 \ + $(top_srcdir)/conftools/ax-cxx-compile-stdcxx-11.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -241,6 +243,7 @@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILEMAP = @FILEMAP@ GREP = @GREP@ +HAVE_CXX11 = @HAVE_CXX11@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -260,6 +263,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -351,7 +355,7 @@ EXTRA_DIST = \ all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -375,9 +379,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/contrib/expat/doc/ok.min.css b/contrib/expat/doc/ok.min.css index 8b5f86e7042c..d324fabb2873 100644 --- a/contrib/expat/doc/ok.min.css +++ b/contrib/expat/doc/ok.min.css @@ -1,2 +1,2 @@ -/*! OK.css v1.0.3 | MIT License | github.com/andrewh0/okcss */@import url("https://rsms.me/inter/inter.css"); -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus -inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--ok-sans:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue","Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Se goe UI Symbol","Noto Color Emoji";--ok-mono:! SFMono-Regular,Menlo,Monaco,Consolas,"Ubuntu Mono","Liberation Mono","Courier New",Courier,monospace;--ok-fw-0:400;--ok-fw-1:600;--ok-fw-2:700;--ok-fw-3:700;--ok-fs-0:2.5rem;--ok-fs-1:2rem;--ok-fs-2:1.5rem;--ok-fs-3:1.25rem;--ok-fs-4:1rem;--ok-fs-5:0.75rem;--ok-br:0.25rem;--ok-s-0:0;--ok-s-1:0.25rem;--ok-s-2:0.5rem;--ok-s-3:1rem;--ok-s-4:1.5rem;--ok-s-5:2rem;--ok-s-6:2.5rem;--ok-lh-body:1.5;--ok-lh-heading:1.25;--ok-t-hl:#ffcf30;--ok-accent-0:#3e67fa;--ok-accent-1:#4788ff;--ok-tc-accent:#3173de;--ok-tc-code:#c23a30;--ok-tc-0:#000;--ok-tc-1:#747474;--ok-tc-2:#848484;--ok-bg-0:#fff;--ok-bg-1:#f0f0f0;--ok-bg-2:#ccc;--ok-b-0:1px solid #cbcbcb;--ok-b-1:1px solid #848484;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23747474'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8 ' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23848484'/%3E%3C/svg%3E")}@media (prefers-color-scheme:dark){:root{--ok-tc-accent:#5c9aff;--ok-tc-code:#ed5853;--ok-tc-0:#fff;--ok-tc-1:#ababab;--ok-tc-2:#929292;--ok-bg-0:#000;--ok-bg-1:#212121;--ok-bg-2:#3e3e3e;--ok-b-0:1px solid #747474;--ok-b-1:1px solid #929292;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23ababab'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23929292'/%3E%3C/svg%3E")}}*,:after,:before{box-sizing:border-box}*{margin:0;padding:0}html{font-family:var(--ok-sans);line-sizing:normal;line-height:var(--ok-lh-body);font-weight:var(--ok-fw-0);color:var(--ok-tc-0);b ackground-color:var(--ok-bg-0);-webkit-font-! smoothing! :antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;text-rendering:optimizeLegibility}@supports (font-variation-settings:normal){html{font-family:Inter var,var(--ok-sans)}}button,input,optgroup,select,textarea{font-family:inherit;line-height:var(--ok-lh-body)}[role=button],button{cursor:pointer}audio,canvas,embed,iframe,img,input,object,select,svg,textarea,video{display:block}img,video{max-width:100%;height:auto}body{padding:var(--ok-s-3);max-width:80ch;margin:auto}h1{font-size:var(--ok-fs-0);margin:0}h2{font-size:var(--ok-fs-1)}h3{font-size:var(--ok-fs-2)}h4{font-size:var(--ok-fs-3)}h5{font-size:var(--ok-fs-4)}h6{font-size:var(--ok-fs-5);text-transform:uppercase;font-weight:var(--ok-fw-1)}h1,h2,h3,h4,h5,h6{line-height:var(--ok-lh-heading);font-weight:var(--ok-fw-3)}p{font-size:var(--ok-fs-4)}small{font-size:var(--ok-fs-5)}b,dt,strong{font-weight:var(--ok-fw-2)}address,article,aside,a udio,blockquote,button,canvas,dd,details,dialog,div,dl,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,img,input,main,nav,object,ol,p,pre,section,select,summary,svg,table,textarea,ul,video{margin-bottom:var(--ok-s-4)}address:last-child,article:last-child,aside:last-child,blockquote:last-child,dd:last-child,details:last-child,dialog:last-child,div:last-child,dl:last-child,dt:last-child,fieldset:last-child,figcaption:last-child,figure:last-child,footer:last-child,form:last-child,h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,h6:last-child,header:last-child,hgroup:last-child,hr:last-child,input[type=checkbox],input[type=radio],main:last-child,nav:last-child,ol:last-child,p:last-child,pre:last-child,section:last-child,table:last-child,ul:last-child{margin-bottom:0}fieldset{padding:var(--ok-s-3);border:var(--ok-b-0);border-radius:var(--ok-br)}legend{font-weight:var(--ok-fw-1);text-transform:uppercase;font-size:var(--ok-fs-5)}i nput,select{padding:var(--ok-s-2);background! :var(--ok! -bg-0);border:var(--ok-b-0);border-radius:var(--ok-br);color:var(--ok-tc-0);min-width:25ch}input:disabled,select:disabled,textarea:disabled{color:var(--ok-tc-2)}input::placeholder,textarea::placeholder{color:var(--ok-tc-2)}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:var(--ok-tc-2)}input::-moz-placeholder,textarea::-moz-placeholder{color:var(--ok-tc-2)}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--ok-tc-2)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--ok-tc-2)}input::-webkit-clear-button,input::-webkit-inner-spin-button,input::-webkit-search-cancel-button,input::-webkit-search-results-button{display:none}input::-ms-clear,input::-ms-reveal{display:none}input:disabled,textarea:disabled{background-color:var(--ok-bg-1)}input[type=search]{-webkit-appearance:none;-moz-appearance:none;appearance:none}input[type=file]{max-width:300px}input[type=number]{-moz-appearance:textfield}input[type=checkbox],input[type= radio]{display:inline;min-width:auto}input[type=color]{height:2.5rem}input[type=date],input[type=datetime-local],input[type=month],input[type=time],input[type=week]{height:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative}input[type=date]:before,input[type=datetime-local]:before,input[type=month]:before,input[type=time]:before,input[type=week]:before{position:absolute;right:0;top:0;background-image:var(--ok-down-0);background-repeat:no-repeat;background-position:right .2em top 50%;background-size:2em auto;width:2.5rem;height:calc(2.5rem - 2px);content:""}input[type=date]:disabled:before,input[type=datetime-local]:disabled:before,input[type=month]:disabled:before,input[type=time]:disabled:before,input[type=week]:disabled:before{background-image:var(--ok-down-1)}input::-webkit-calendar-picker-indicator{position:absolute;top:0;right:0;background-color:transparent;cursor:pointer;padding:0;width:2.5rem;height:calc(2.5rem - 2px);content:"";opacity:0}inp ut[type=range]{overflow:visible;line-height:! inherit;f! ont-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;outline:none;cursor:pointer;padding:0;vertical-align:middle;border:none;min-height:2rem;background-color:transparent}input[type=range]::-webkit-slider-runnable-track{cursor:pointer;-webkit-appearance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(--ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box;position:relative}input[type=range]::-moz-range-track{cursor:pointer;-moz-appearance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(--ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box}input[type=range]::-ms-track{cursor:pointer;-ms-appearance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(- -ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box}input[type=range]::-ms-fill-lower{background:transparent}input[type=range]::-webkit-slider-thumb{cursor:pointer;-webkit-appearance:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem;margin-top:calc(-.5rem - 1px)}input[type=range]::-moz-range-thumb{cursor:pointer;-moz-appearance:none;border:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem}input[type=range]::-ms-thumb{cursor:pointer;-ms-appearance:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem;transform:translateY(.25rem)}input[type=range]:focus:not(:disabled)::-webkit-slider-thumb{background-color:var(--ok-accent-1)}input[type=range]:focus:not(:disabled)::-moz-range-thumb{background-color:var(--ok-accent-1)}input[type=range]:focus:not(:disabled)::-ms-thumb{background-color:var(--ok-accent-1)}input[type=range]:disabled{cursor:default}input[type=range]: disabled::-webkit-slider-runnable-track{curs! or:defaul! t}input[type=range]:disabled::-moz-range-track{cursor:default}input[type=range]:disabled::-ms-track{cursor:default}input[type=range]:disabled::-webkit-slider-thumb{background-color:var(--ok-bg-2);cursor:default}input[type=range]:disabled::-moz-range-thumb{background-color:var(--ok-bg-2);cursor:default}input[type=range]:disabled::-ms-thumb{background-color:var(--ok-bg-2);cursor:default}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:var(--ok-b-0);border-radius:var(--ok-br);background-color:var(--ok-bg-0);min-height:2.5rem;color:var(--ok-tc-0)}select:not([multiple]){background-image:var(--ok-down-0);background-repeat:no-repeat,repeat;background-position:right .2em top 50%;background-size:2em auto;padding-right:2.5em;height:2.5rem}select::-ms-expand{display:none}select:not([multiple]):disabled{background-image:var(--ok-down-1);background-color:var(--ok-bg-1);cursor:default}select[multiple]{border-radius:var(--ok-br)}select[multiple]:disabled{background-color: var(--ok-bg-1)}select[multiple] option{color:var(--ok-t-)}select[multiple]:disabled option{color:var(--ok-tc-2)}textarea{padding:var(--ok-s-2);resize:vertical;background:var(--ok-bg-0);border:var(--ok-b-0);border-radius:var(--ok-br);color:var(--ok-tc-0);min-height:calc(2.5rem - 2px);min-width:25ch}button,input[type=button],input[type=reset],input[type=submit]{display:inline-block;background-color:var(--ok-accent-0);border-radius:var(--ok-br);color:#fff;font-weight:var(--ok-fw-1);height:2.5rem;border:none;padding:var(--ok-s-2) var(--ok-s-3);white-space:nowrap;min-width:auto}input::-webkit-file-upload-button{display:inline-block;background-color:var(--ok-accent-0);border-radius:var(--ok-br);color:#fff;font-weight:var(--ok-fw-1);height:2.5rem;border:none;padding:var(--ok-s-2) var(--ok-s-3);white-space:nowrap}input:disabled::-webkit-file-upload-button{cursor:default;opacity:.5}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer}input:not(:disabled)::-webkit-fil e-upload-button{cursor:pointer}button:disabl! ed,input[! type=button]:disabled,input[type=reset]:disabled,input[type=submit]:disabled{cursor:default;opacity:.5;background-color:var(--ok-accent-0)}button:focus:not(:disabled),input[type=button]:focus:not(:disabled),input[type=reset]:focus:not(:disabled),input[type=submit]:focus:not(:disabled){background-color:var(--ok-accent-1)}input:not(:disabled):focus::-webkit-file-upload-button{background-color:var(--ok-accent-1)}table{border-collapse:collapse;border-radius:var(--ok-br);display:block;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;margin-left:auto;margin-right:auto;overflow-x:auto;white-space:nowrap}tfoot,thead{border:var(--ok-b-0)}tfoot tr,thead tr{background-color:var(--ok-bg-1);font-size:var(--ok-fs-5);text-transform:uppercase;color:var(--ok-tc-0)}td,th{border:var(--ok-b-0) 0;text-align:left;padding:.5rem}td{white-space:normal;max-width:20ch}tr{border:var(--ok-b-0)}table caption{font-size:var(--ok-fs-4);font-weight:var(--ok-fw-3);padding:.5rem}code,samp {padding:.2em .4em;color:var(--ok-tc-code)}code,pre,samp{font-family:var(--ok-mono);line-height:var(--ok-lh-body);background-color:var(--ok-bg-1);border-radius:var(--ok-br);text-transform:none}pre{padding:var(--ok-s-3);white-space:pre;overflow-x:auto}pre,var{color:var(--ok-tc-0)}var{font-family:var(--ok-mono);font-style:normal}code pre,pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}code pre{display:inline}kbd{background-color:var(--ok-bg-1);border:var(--ok-b-0);border-radius:var(--ok-br);border-bottom:2px solid var(--ok-bg-2);padding:var(--ok-s-1);font-family:var(--ok-sans);color:var(--ok-tc-0)}a{text-decoration:none;font-weight:var(--ok-fw-1)}a,a:visited{color:var(--ok-tc-accent)}ol,ul{padding-left:var(--ok-s-5)}nav ul{text-decoration:none;padding-left:0}nav ul li{display:inline;margin-right:1em}audio,img,video{margin-left:auto;margin-right:auto}img{border-radius:var(--ok-br)}figure>img:not(:last-child){margin-bottom:var(--ok-s-1)}figure>fig caption{text-align:center}figcaption,time{fo! nt-size:v! ar(--ok-fs-5);color:var(--ok-tc-1)}mark{padding:.2em .4em;background:var(--ok-t-hl);color:#000;border-radius:var(--ok-br)}iframe{border:var(--ok-b-0);border-radius:var(--ok-br);width:100%}hr{border:none;border-bottom:var(--ok-b-0)}footer{font-size:var(--ok-fs-5)}blockquote,footer{color:var(--ok-tc-1)}blockquote{position:relative;margin-left:0;margin-right:0;padding-left:var(--ok-s-5)}blockquote:before{position:absolute;height:100%;content:"";width:4px;left:0;border-radius:var(--ok-br);background-color:var(--ok-bg-1)}dd{padding-left:var(--ok-s-5)}abbr{cursor:help}@media (hover:hover){a:hover{text-decoration:underline}input:hover:not(:disabled):not(:focus):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]),select:hover:not(:disabled):not(:focus),textarea:hover:not(:disabled):not(:focus){border:var(--ok-b-1)}input[type=range]:hover:not(:disabled)::-webkit-slider-runnable-track{border:var(--ok-b-1)}input[type=range]:hover:not(:disabled)::-moz-range-track{border:va r(--ok-b-1)}input[type=range]:hover:not(:disabled)::-ms-track{border:var(--ok-b-1)}select:not([multiple]):not(:disabled):hover{cursor:pointer}button:hover:not(:disabled),input[type=button]:hover:not(:disabled),input[type=reset]:hover:not(:disabled),input[type=submit]:hover:not(:disabled){background-color:var(--ok-accent-1)}input:not(:disabled):hover::-webkit-file-upload-button{background-color:var(--ok-accent-1)}} \ No newline at end of file +/*! OK.css v1.2.0 | MIT License | github.com/andrewh0/okcss */@import url("https://rsms.me/inter/inter.css"); +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus -inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--ok-sans:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue","Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Se goe UI Symbol","Noto Color Emoji";--ok-mono:! SFMono-Regular,Menlo,Monaco,Consolas,"Ubuntu Mono","Liberation Mono","Courier New",Courier,monospace;--ok-fw-0:400;--ok-fw-1:600;--ok-fw-2:700;--ok-fw-3:700;--ok-fs-0:2.5rem;--ok-fs-1:2rem;--ok-fs-2:1.5rem;--ok-fs-3:1.25rem;--ok-fs-4:1rem;--ok-fs-5:0.75rem;--ok-br:0.25rem;--ok-s-0:0;--ok-s-1:0.25rem;--ok-s-2:0.5rem;--ok-s-3:1rem;--ok-s-4:1.5rem;--ok-s-5:2rem;--ok-s-6:2.5rem;--ok-lh-body:1.5;--ok-lh-heading:1.25;--ok-t-hl:#ffcf30;--ok-accent-0:#3e67fa;--ok-accent-1:#4788ff;--ok-tc-accent:#3173de;--ok-tc-code:#c23a30;--ok-tc-0:#000;--ok-tc-1:#747474;--ok-tc-2:#848484;--ok-bg-0:#fff;--ok-bg-1:#f0f0f0;--ok-bg-2:#ccc;--ok-b-0:1px solid #cbcbcb;--ok-b-1:1px solid #848484;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23747474'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8 ' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23848484'/%3E%3C/svg%3E")}@media (prefers-color-scheme:dark){:root{--ok-tc-accent:#5c9aff;--ok-tc-code:#ed5853;--ok-tc-0:#fff;--ok-tc-1:#ababab;--ok-tc-2:#929292;--ok-bg-0:#000;--ok-bg-1:#212121;--ok-bg-2:#3e3e3e;--ok-b-0:1px solid #747474;--ok-b-1:1px solid #929292;--ok-down-0:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23ababab'/%3E%3C/svg%3E");--ok-down-1:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='8' viewBox='0 0 12 8' width='24' fill='none'%3E%3Cpath d='M6 6l4-4h1v1-1L6 7 1 2h1l4 4z' fill='%23929292'/%3E%3C/svg%3E")}}*,:after,:before{box-sizing:border-box}*{margin:0;padding:0}html{font-family:var(--ok-sans);line-sizing:normal;line-height:var(--ok-lh-body);font-weight:var(--ok-fw-0);color:var(--ok-tc-0);b ackground-color:var(--ok-bg-0);-webkit-font-! smoothing! :antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;text-rendering:optimizeLegibility;scroll-behavior:smooth}@supports (font-variation-settings:normal){html{font-family:Inter var,var(--ok-sans)}}button,input,optgroup,select,textarea{font-family:inherit;line-height:var(--ok-lh-body)}[role=button],button{cursor:pointer}audio,canvas,embed,iframe,img,input,object,select,svg,textarea,video{display:block}img,video{max-width:100%;height:auto}body{padding:var(--ok-s-3);max-width:80ch;margin:auto}article{padding-bottom:var(--ok-s-6)}h1{font-size:var(--ok-fs-0);margin:0}h2{font-size:var(--ok-fs-1)}h3{font-size:var(--ok-fs-2)}h4{font-size:var(--ok-fs-3)}h5{font-size:var(--ok-fs-4)}h6{font-size:var(--ok-fs-5);text-transform:uppercase;font-weight:var(--ok-fw-1)}h1,h2,h3,h4,h5,h6{line-height:var(--ok-lh-heading);font-weight:var(--ok-fw-3);margin-top:var(--ok-s-6);margin-bottom:var(--ok-s-3)}h1+*,h2 +*,h3+*,h4+*,h5+*,h6+*,hr+*{margin-top:0}p{font-size:var(--ok-fs-4)}small{font-size:var(--ok-fs-5)}b,dt,strong{font-weight:var(--ok-fw-2)}address,article,aside,audio,blockquote,button,canvas,dd,details,dialog,div,dl,embed,fieldset,figcaption,figure,footer,form,header,hgroup,hr,iframe,img,input,main,nav,object,ol,p,pre,section,select,summary,svg,table,textarea,ul,video{margin-bottom:var(--ok-s-4)}address:last-child,article:last-child,aside:last-child,blockquote:last-child,dd:last-child,details:last-child,dialog:last-child,div:last-child,dl:last-child,dt:last-child,fieldset:last-child,figcaption:last-child,figure:last-child,footer:last-child,form:last-child,h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,h6:last-child,header:last-child,hgroup:last-child,hr:last-child,input[type=checkbox],input[type=radio],main:last-child,nav:last-child,ol:last-child,p:last-child,pre:last-child,section:last-child,table:last-child,ul:last-child{margin-bottom:0}fieldset{padding:var( --ok-s-3);border:var(--ok-b-0);border-radius! :var(--ok! -br)}legend{font-weight:var(--ok-fw-1);text-transform:uppercase;font-size:var(--ok-fs-5)}input,select{padding:var(--ok-s-2);background:var(--ok-bg-0);border:var(--ok-b-0);border-radius:var(--ok-br);color:var(--ok-tc-0);min-width:25ch}input:disabled,select:disabled,textarea:disabled{color:var(--ok-tc-2)}input::placeholder,textarea::placeholder{color:var(--ok-tc-2)}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:var(--ok-tc-2)}input::-moz-placeholder,textarea::-moz-placeholder{color:var(--ok-tc-2)}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--ok-tc-2)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--ok-tc-2)}input::-webkit-clear-button,input::-webkit-inner-spin-button,input::-webkit-search-cancel-button,input::-webkit-search-results-button{display:none}input::-ms-clear,input::-ms-reveal{display:none}input:disabled,textarea:disabled{background-color:var(--ok-bg-1)}input[type=search]{-webkit-appearance:none;-moz -appearance:none;appearance:none}input[type=file]{max-width:300px}input[type=number]{-moz-appearance:textfield}input[type=checkbox],input[type=radio]{display:inline;min-width:auto}input[type=color]{height:2.5rem}input[type=date],input[type=datetime-local],input[type=month],input[type=time],input[type=week]{height:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative}input[type=date]:before,input[type=datetime-local]:before,input[type=month]:before,input[type=time]:before,input[type=week]:before{position:absolute;right:0;top:0;background-image:var(--ok-down-0);background-repeat:no-repeat;background-position:right .2em top 50%;background-size:2em auto;width:2.5rem;height:calc(2.5rem - 2px);content:""}input[type=date]:disabled:before,input[type=datetime-local]:disabled:before,input[type=month]:disabled:before,input[type=time]:disabled:before,input[type=week]:disabled:before{background-image:var(--ok-down-1)}input::-webkit-calendar-picker-indicator{positi on:absolute;top:0;right:0;background-color:t! ransparen! t;cursor:pointer;padding:0;width:2.5rem;height:calc(2.5rem - 2px);content:"";opacity:0}input[type=range]{overflow:visible;line-height:inherit;font-family:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;outline:none;cursor:pointer;padding:0;vertical-align:middle;border:none;min-height:2rem;background-color:transparent}input[type=range]::-webkit-slider-runnable-track{cursor:pointer;-webkit-appearance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(--ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box;position:relative}input[type=range]::-moz-range-track{cursor:pointer;-moz-appearance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(--ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box}input[type=range]::-ms-track{cursor:pointer;-ms-appear ance:none;border-radius:var(--ok-br);border:var(--ok-b-0);background-color:var(--ok-bg-1);background-image:linear-gradient(var(--ok-bg-1),var(--ok-bg-1));width:100%;height:.5rem;color:transparent;box-sizing:border-box}input[type=range]::-ms-fill-lower{background:transparent}input[type=range]::-webkit-slider-thumb{cursor:pointer;-webkit-appearance:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem;margin-top:calc(-.5rem - 1px)}input[type=range]::-moz-range-thumb{cursor:pointer;-moz-appearance:none;border:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem}input[type=range]::-ms-thumb{cursor:pointer;-ms-appearance:none;border-radius:50%;background-color:var(--ok-accent-0);width:1.5rem;height:1.5rem;transform:translateY(.25rem)}input[type=range]:focus:not(:disabled)::-webkit-slider-thumb{background-color:var(--ok-accent-1)}input[type=range]:focus:not(:disabled)::-moz-range-thumb{background-color:var(--ok-accent-1)}inp ut[type=range]:focus:not(:disabled)::-ms-thu! mb{backgr! ound-color:var(--ok-accent-1)}input[type=range]:disabled{cursor:default}input[type=range]:disabled::-webkit-slider-runnable-track{cursor:default}input[type=range]:disabled::-moz-range-track{cursor:default}input[type=range]:disabled::-ms-track{cursor:default}input[type=range]:disabled::-webkit-slider-thumb{background-color:var(--ok-bg-2);cursor:default}input[type=range]:disabled::-moz-range-thumb{background-color:var(--ok-bg-2);cursor:default}input[type=range]:disabled::-ms-thumb{background-color:var(--ok-bg-2);cursor:default}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:var(--ok-b-0);border-radius:var(--ok-br);background-color:var(--ok-bg-0);min-height:2.5rem;color:var(--ok-tc-0)}select:not([multiple]){background-image:var(--ok-down-0);background-repeat:no-repeat,repeat;background-position:right .2em top 50%;background-size:2em auto;padding-right:2.5em;height:2.5rem}select::-ms-expand{display:none}select:not([multiple]):disabled{background-image:var(--ok -down-1);background-color:var(--ok-bg-1);cursor:default}select[multiple]{border-radius:var(--ok-br)}select[multiple]:disabled{background-color:var(--ok-bg-1)}select[multiple] option{color:var(--ok-t-)}select[multiple]:disabled option{color:var(--ok-tc-2)}textarea{padding:var(--ok-s-2);resize:vertical;background:var(--ok-bg-0);border:var(--ok-b-0);border-radius:var(--ok-br);color:var(--ok-tc-0);min-height:calc(2.5rem - 2px);min-width:25ch}button,input[type=button],input[type=reset],input[type=submit]{display:inline-block;background-color:var(--ok-accent-0);border-radius:var(--ok-br);color:#fff;font-weight:var(--ok-fw-1);height:2.5rem;border:none;padding:var(--ok-s-2) var(--ok-s-3);white-space:nowrap;min-width:auto}input::-webkit-file-upload-button{display:inline-block;background-color:var(--ok-accent-0);border-radius:var(--ok-br);color:#fff;font-weight:var(--ok-fw-1);height:2.5rem;border:none;padding:var(--ok-s-2) var(--ok-s-3);white-space:nowrap}input:disabled::-webkit-file-upload-b utton{cursor:default;opacity:.5}button,input! [type=but! ton],input[type=reset],input[type=submit]{cursor:pointer}input:not(:disabled)::-webkit-file-upload-button{cursor:pointer}button:disabled,input[type=button]:disabled,input[type=reset]:disabled,input[type=submit]:disabled{cursor:default;opacity:.5;background-color:var(--ok-accent-0)}button:focus:not(:disabled),input[type=button]:focus:not(:disabled),input[type=reset]:focus:not(:disabled),input[type=submit]:focus:not(:disabled){background-color:var(--ok-accent-1)}input:not(:disabled):focus::-webkit-file-upload-button{background-color:var(--ok-accent-1)}table{border-collapse:collapse;display:table;margin-left:auto;margin-right:auto;white-space:nowrap}tfoot,thead{border:var(--ok-b-0)}thead{position:-webkit-sticky;position:sticky;top:0}tfoot tr,thead tr{background-color:var(--ok-bg-1);font-size:var(--ok-fs-5);text-transform:uppercase;color:var(--ok-tc-0)}td,th{border:var(--ok-b-0) 0;text-align:left;padding:.5rem}td{white-space:normal;max-width:20ch}tr{border:var(--ok-b-0)}table caption{fo nt-size:var(--ok-fs-4);font-weight:var(--ok-fw-3);padding:.5rem}code,samp{padding:.2em .4em;color:var(--ok-tc-code)}code,pre,samp{font-family:var(--ok-mono);font-size:87.5%;line-height:var(--ok-lh-body);background-color:var(--ok-bg-1);border-radius:var(--ok-br);text-transform:none}pre{padding:var(--ok-s-3);white-space:pre;overflow-x:auto}pre,var{color:var(--ok-tc-0)}var{font-family:var(--ok-mono);font-style:normal}code pre,pre code{background:inherit;font-size:inherit;color:inherit;border:0;padding:0;margin:0}code pre{display:inline}kbd{background-color:var(--ok-bg-1);border:var(--ok-b-0);border-radius:var(--ok-br);border-bottom:2px solid var(--ok-bg-2);padding:var(--ok-s-1);font-family:var(--ok-sans);color:var(--ok-tc-0)}a{text-decoration:none;font-weight:var(--ok-fw-1)}a,a:visited,a code,a mark,a samp{color:var(--ok-tc-accent)}ol,ul{padding-left:var(--ok-s-5)}nav ul{text-decoration:none;padding-left:0}nav ul li{display:inline;margin-right:1em}li p{margin-bottom:0}li,li p+p{margin- top:.5em}audio,img,video{margin-left:auto;ma! rgin-righ! t:auto}img{border-radius:var(--ok-br)}figure>img:not(:last-child){margin-bottom:var(--ok-s-1)}figure>figcaption{text-align:center}figcaption,time{font-size:var(--ok-fs-5);color:var(--ok-tc-1)}mark{padding:.2em .4em;background:var(--ok-t-hl);color:#000;border-radius:var(--ok-br)}iframe{border:var(--ok-b-0);border-radius:var(--ok-br);width:100%}hr{border:none;border-bottom:var(--ok-b-0)}footer{font-size:var(--ok-fs-5)}blockquote,footer{color:var(--ok-tc-1)}blockquote{position:relative;margin-left:0;margin-right:0;padding-left:var(--ok-s-5)}blockquote:before{position:absolute;height:100%;content:"";width:4px;left:0;border-radius:var(--ok-br);background-color:var(--ok-bg-1)}dd{padding-left:var(--ok-s-5)}abbr{cursor:help}@media (hover:hover){a:hover{text-decoration:underline}input:hover:not(:disabled):not(:focus):not([type=submit]):not([type=button]):not([type=reset]):not([type=range]),select:hover:not(:disabled):not(:focus),textarea:hover:not(:disabled):not(:focus){border:var(--ok-b-1)} input[type=range]:hover:not(:disabled)::-webkit-slider-runnable-track{border:var(--ok-b-1)}input[type=range]:hover:not(:disabled)::-moz-range-track{border:var(--ok-b-1)}input[type=range]:hover:not(:disabled)::-ms-track{border:var(--ok-b-1)}select:not([multiple]):not(:disabled):hover{cursor:pointer}button:hover:not(:disabled),input[type=button]:hover:not(:disabled),input[type=reset]:hover:not(:disabled),input[type=submit]:hover:not(:disabled){background-color:var(--ok-accent-1)}input:not(:disabled):hover::-webkit-file-upload-button{background-color:var(--ok-accent-1)}} \ No newline at end of file diff --git a/contrib/expat/doc/reference.html b/contrib/expat/doc/reference.html index 8b0d47d6dd7b..898f03a3364d 100644 --- a/contrib/expat/doc/reference.html +++ b/contrib/expat/doc/reference.html @@ -14,11 +14,13 @@ Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net> Copyright (c) 2000-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> Copyright (c) 2002-2012 Karl Waclawek <karl@waclawek.net> - Copyright (c) 2017-2022 Sebastian Pipping <sebastian@pipping.org> + Copyright (c) 2017-2024 Sebastian Pipping <sebastian@pipping.org> Copyright (c) 2017 Jakub Wilk <jwilk@jwilk.net> Copyright (c) 2021 Tomas Korbar <tkorbar@redhat.com> Copyright (c) 2021 Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Copyright (c) 2022 Thijs Schreijer <thijs@thijsschreijer.nl> + Copyright (c) 2023 Hanno Böck <hanno@gentoo.org> + Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com> Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -50,7 +52,7 @@ <div> <h1> The Expat XML Parser - <small>Release 2.5.0</small> + <small>Release 2.6.0</small> </h1> </div> <div class="content"> @@ -68,11 +70,11 @@ Working Group at W3C that produced the XML specification.</p> <p>This is free software, licensed under the <a href="../COPYING">MIT/X Consortium license</a>. You may download it -from <a href="http://www.libexpat.org/">the Expat home page</a>. +from <a href="https://libexpat.github.io/">the Expat home page</a>. </p> <p>The bulk of this document was originally commissioned as an article -by <a href="http://www.xml.com/">XML.com</a>. They graciously allowed +by <a href="https://www.xml.com/">XML.com</a>. They graciously allowed Clark Cooper to retain copyright and to distribute it with Expat. This version has been substantially extended to include documentation on features which have been added since the original article was @@ -151,10 +153,11 @@ interface.</p> </ul> </li> <li> - <a href="#billion-laughs">Billion Laughs Attack Protection</a> + <a href="#attack-protection">Attack Protection</a> <ul> <li><a href="#XML_SetBillionLaughsAttackProtectionMaximumAmplification">XML_SetBillionLaughsAttackProtectionMaximumAmplification</a></li> <li><a href="#XML_SetBillionLaughsAttackProtectionActivationThreshold">XML_SetBillionLaughsAttackProtectionActivationThreshold</a></li> + <li><a href="#XML_SetReparseDeferralEnabled">XML_SetReparseDeferralEnabled</a></li> </ul> </li> <li><a href="#miscellaneous">Miscellaneous Functions</a> @@ -305,7 +308,7 @@ shoveling the document to the parser so that it can do its work.</p> <p>The Expat distribution comes as a compressed (with GNU gzip) tar file. You may download the latest version from <a href= -"http://sourceforge.net/projects/expat/" >Source Forge</a>. After +"https://sourceforge.net/projects/expat/" >Source Forge</a>. After unpacking this, cd into the directory. Then follow either the Win32 directions or Unix directions below.</p> @@ -359,37 +362,64 @@ and the definition of character types in the case of <code>XML_UNICODE_WCHAR_T</code>. The symbols are:</p> <dl class="cpp-symbols"> -<dt>XML_DTD</dt> +<dt><a name="XML_GE">XML_GE</a></dt> +<dd> +Added in Expat 2.6.0. +Include support for +<a href="https://www.w3.org/TR/2006/REC-xml-20060816/#sec-physical-struct">general entities</a> +(syntax <code>&e1;</code> to reference and +syntax <code><!ENTITY e1 'value1'></code> (an internal general entity) or +<code><!ENTITY e2 SYSTEM 'file2'></code> (an external general entity) to declare). +With <code>XML_GE</code> enabled, general entities will be replaced by their declared replacement text; +for this to work for <em>external</em> general entities, in addition an +<code><a href="#XML_SetExternalEntityRefHandler">XML_ExternalEntityRefHandler</a></code> must be set using +<code><a href="#XML_SetExternalEntityRefHandler">XML_SetExternalEntityRefHandler</a></code>. +Also, enabling <code>XML_GE</code> makes +the functions <code><a href="#XML_SetBillionLaughsAttackProtectionMaximumAmplification"> +XML_SetBillionLaughsAttackProtectionMaximumAmplification</a></code> and <code> +<a href="#XML_SetBillionLaughsAttackProtectionActivationThreshold"> +XML_SetBillionLaughsAttackProtectionActivationThreshold</a></code> available. +<br/> +With <code>XML_GE</code> disabled, Expat has a smaller memory footprint and can be faster, but will +not load external general entities and will replace all general entities +(except the <a href="https://www.w3.org/TR/2006/REC-xml-20060816/#sec-predefined-ent">predefined five</a>: +<code>amp</code>, <code>apos</code>, <code>gt</code>, <code>lt</code>, <code>quot</code>) +with a self-reference: +for example, referencing an entity <code>e1</code> via <code>&e1;</code> will be replaced +by text <code>&e1;</code>. +</dd> + +<dt><a name="XML_DTD">XML_DTD</a></dt> <dd>Include support for using and reporting DTD-based content. If this is defined, default attribute values from an external DTD subset are reported and attribute value normalization occurs based on the type of attributes defined in the external subset. Without this, Expat has a smaller memory footprint and can be faster, but will -not load external entities or process conditional sections. If defined, makes +not load external parameter entities or process conditional sections. If defined, makes the functions <code><a href="#XML_SetBillionLaughsAttackProtectionMaximumAmplification"> XML_SetBillionLaughsAttackProtectionMaximumAmplification</a></code> and <code> <a href="#XML_SetBillionLaughsAttackProtectionActivationThreshold"> XML_SetBillionLaughsAttackProtectionActivationThreshold</a></code> available.</dd> -<dt>XML_NS</dt> +<dt><a name="XML_NS">XML_NS</a></dt> <dd>When defined, support for the <cite><a href= -"http://www.w3.org/TR/REC-xml-names/" >Namespaces in XML</a></cite> +"https://www.w3.org/TR/REC-xml-names/" >Namespaces in XML</a></cite> specification is included.</dd> -<dt>XML_UNICODE</dt> +<dt><a name="XML_UNICODE">XML_UNICODE</a></dt> <dd>When defined, character data reported to the application is encoded in UTF-16 using wide characters of the type <code>XML_Char</code>. This is implied if <code>XML_UNICODE_WCHAR_T</code> is defined.</dd> -<dt>XML_UNICODE_WCHAR_T</dt> +<dt><a name="XML_UNICODE_WCHAR_T">XML_UNICODE_WCHAR_T</a></dt> <dd>If defined, causes the <code>XML_Char</code> character type to be defined using the <code>wchar_t</code> type; otherwise, <code>unsigned short</code> is used. Defining this implies <code>XML_UNICODE</code>.</dd> -<dt>XML_LARGE_SIZE</dt> +<dt><a name="XML_LARGE_SIZE">XML_LARGE_SIZE</a></dt> <dd>If defined, causes the <code>XML_Size</code> and <code>XML_Index</code> integer types to be at least 64 bits in size. This is intended to support processing of very large input streams, where the return values of @@ -399,23 +429,23 @@ processing of very large input streams, where the return values of could overflow. It may not be supported by all compilers, and is turned off by default.</dd> -<dt>XML_CONTEXT_BYTES</dt> +<dt><a name="XML_CONTEXT_BYTES">XML_CONTEXT_BYTES</a></dt> <dd>The number of input bytes of markup context which the parser will ensure are available for reporting via <code><a href= "#XML_GetInputContext" >XML_GetInputContext</a></code>. This is -normally set to 1024, and must be set to a positive integer. If this -is not defined, the input context will not be available and <code><a +normally set to 1024, and must be set to a positive integer to enable. +If this is set to zero, the input context will not be available and <code><a href= "#XML_GetInputContext" >XML_GetInputContext</a></code> will -always report NULL. Without this, Expat has a smaller memory +always report <code>NULL</code>. Without this, Expat has a smaller memory footprint and can be faster.</dd> -<dt>XML_STATIC</dt> +<dt><a name="XML_STATIC">XML_STATIC</a></dt> <dd>On Windows, this should be set if Expat is going to be linked statically with the code that calls it; this is required to get all the right MSVC magic annotations correct. This is ignored on other platforms.</dd> -<dt>XML_ATTR_INFO</dt> +<dt><a name="XML_ATTR_INFO">XML_ATTR_INFO</a></dt> <dd>If defined, makes the additional function <code><a href= "#XML_GetAttributeInfo" >XML_GetAttributeInfo</a></code> available for reporting attribute byte offsets.</dd> @@ -669,8 +699,9 @@ function. The StartNamespaceDeclHandler is called prior to the start tag handler and the EndNamespaceDeclHandler is called after the corresponding end tag that ends the namespace's scope. The namespace start handler gets passed the prefix and URI for the namespace. For a -default namespace declaration (xmlns='...'), the prefix will be null. -The URI will be null for the case where the default namespace is being +default namespace declaration (xmlns='...'), the prefix will be +<code>NULL</code>. +The URI will be <code>NULL</code> for the case where the default namespace is being unset. The namespace end handler just gets the prefix for the closing scope.</p> @@ -799,7 +830,7 @@ has already been passed into the parser. Applications for this include</p> <ul> - <li>Supporting the <a href= "http://www.w3.org/TR/xinclude/" + <li>Supporting the <a href= "https://www.w3.org/TR/xinclude/" >XInclude</a> specification.</li> <li>Delaying further processing until additional information is @@ -947,16 +978,20 @@ XML_Parser XMLCALL XML_ParserCreate(const XML_Char *encoding); </pre> <div class="fcndef"> -Construct a new parser. If encoding is non-null, it specifies a +<p> +Construct a new parser. If encoding is non-<code>NULL</code>, it specifies a character encoding to use for the document. This overrides the document encoding declaration. There are four built-in encodings: +</p> <ul> <li>US-ASCII</li> <li>UTF-8</li> <li>UTF-16</li> <li>ISO-8859-1</li> </ul> +<p> Any other value will invoke a call to the UnknownEncodingHandler. +</p> </div> <h4 id="XML_ParserCreateNS">XML_ParserCreateNS</h4> @@ -1003,9 +1038,9 @@ typedef struct { </pre> <div class="fcndef"> <p>Construct a new parser using the suite of memory handling functions -specified in <code>ms</code>. If <code>ms</code> is NULL, then use the +specified in <code>ms</code>. If <code>ms</code> is <code>NULL</code>, then use the standard set of memory management functions. If <code>sep</code> is -non NULL, then namespace processing is enabled in the created parser +non-<code>NULL</code>, then namespace processing is enabled in the created parser and the character pointed at by sep is used as the separator between the namespace URI and the local part of the name.</p> </div> @@ -1077,6 +1112,11 @@ exceed the maximum integer value. Input data at the end of a buffer will remain unprocessed if it is part of an XML token for which the end is not part of that buffer.</p> +<p><a name="isFinal"></a>The application <em>must</em> make a concluding +<code><a href="#XML_Parse">XML_Parse</a></code> or +<code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code> call +with <code>isFinal</code> set to <code>XML_TRUE</code>.</p> + <h4 id="XML_Parse">XML_Parse</h4> <pre class="fcndec"> enum XML_Status XMLCALL @@ -1092,17 +1132,50 @@ enum XML_Status { }; </pre> <div class="fcndef"> +<p> Parse some more of the document. The string <code>s</code> is a buffer containing part (or perhaps all) of the document. The number of bytes of s that are part of the document is indicated by <code>len</code>. This means -that <code>s</code> doesn't have to be null terminated. It also means that +that <code>s</code> doesn't have to be null-terminated. It also means that if <code>len</code> is larger than the number of bytes in the block of memory that <code>s</code> points at, then a memory fault is likely. The <code>isFinal</code> parameter informs the parser that this is the last piece of the document. Frequently, the last piece is empty (i.e. <code>len</code> is zero.) +</p> + +<p> If a parse error occurred, it returns <code>XML_STATUS_ERROR</code>. Otherwise it returns <code>XML_STATUS_OK</code> value. +Note that regardless of the return value, there is no guarantee that all +provided input has been parsed; only after <a href="#isFinal">the +concluding call</a> will all handler callbacks and parsing errors have +happened. +</p> + +<p> +Simplified, <code>XML_Parse</code> can be considered a convenience wrapper +that is pairing calls +to <code><a href="#XML_GetBuffer">XML_GetBuffer</a></code> +and <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code> +(when Expat is built with macro <code>XML_CONTEXT_BYTES</code> +defined to a positive value, which is both common and default). +<code>XML_Parse</code> is then functionally equivalent to calling +<code><a href="#XML_GetBuffer">XML_GetBuffer</a></code>, +<code>memcpy</code>, and +<code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code>. +</p> + +<p> +To avoid double copying of the input, direct use of functions +<code><a href="#XML_GetBuffer">XML_GetBuffer</a></code> and +<code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code> is advised +for most production use, e.g. +if you're using <code>read</code> or similar functionality to fill your +buffers, fill directly into the buffer from +<code><a href="#XML_GetBuffer">XML_GetBuffer</a></code>, +then parse with <code><a href="#XML_ParseBuffer">XML_ParseBuffer</a></code>. +</p> </div> <h4 id="XML_ParseBuffer">XML_ParseBuffer</h4> @@ -1128,8 +1201,8 @@ XML_GetBuffer(XML_Parser p, </pre> <div class="fcndef"> Obtain a buffer of size <code>len</code> to read a piece of the document -into. A NULL value is returned if Expat can't allocate enough memory for -this buffer. A NULL value may also be returned if <code>len</code> is zero. +into. A <code>NULL</code> value is returned if Expat can't allocate enough memory for +this buffer. A <code>NULL</code> value may also be returned if <code>len</code> is zero. This has to be called prior to every call to <code><a href= "#XML_ParseBuffer" >XML_ParseBuffer</a></code>. A typical use would look like this: @@ -1275,7 +1348,7 @@ typedef struct { <p>Returns status of parser with respect to being initialized, parsing, finished, or suspended, and whether the final buffer is being processed. The <code>status</code> parameter <em>must not</em> be -NULL.</p> +<code>NULL</code>.</p> <p>New in Expat 1.95.8.</p> </div> @@ -1290,7 +1363,7 @@ to ignore all text not descended from a <code>para</code> element. One way it could do this is to set the character handler when a para start tag is seen, and unset it for the corresponding end tag.</p> -<p>A handler may be <em>unset</em> by providing a NULL pointer to the +<p>A handler may be <em>unset</em> by providing a <code>NULL</code> pointer to the appropriate handler setter. None of the handler setting functions have a return value.</p> @@ -1318,7 +1391,7 @@ typedef void handler as a pointer to a vector of char pointers. Each attribute seen in a start (or empty) tag occupies 2 consecutive places in this vector: the attribute name followed by the attribute value. These pairs are terminated -by a null pointer.</p> +by a <code>NULL</code> pointer.</p> <p>Note that an empty tag generates a call to both start and end handlers (in that order).</p> </div> @@ -1368,7 +1441,7 @@ is <em>NOT null-terminated</em>. You have to use the length argument to deal with the end of the string. A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may -be split across calls to this handler. Note: Setting this handler to NULL +be split across calls to this handler. Note: Setting this handler to <code>NULL</code> may <em>NOT immediately</em> terminate call-backs if the parser is currently processing such a single block of contiguous markup-free text, as the parser will continue calling back until the end of the block is reached.</p> @@ -1526,16 +1599,16 @@ the format expected by the <code>context</code> argument to <code><a href="#XML_ExternalEntityParserCreate" >XML_ExternalEntityParserCreate</a></code>. <code>code</code> is valid only until the handler returns, so if the referenced entity is -to be parsed later, it must be copied. <code>context</code> is NULL +to be parsed later, it must be copied. <code>context</code> is <code>NULL</code> only when the entity is a parameter entity, which is how one can differentiate between general and parameter entities.</p> <p>The <code>base</code> parameter is the base to use for relative system identifiers. It is set by <code><a -href="#XML_SetBase">XML_SetBase</a></code> and may be NULL. The +href="#XML_SetBase">XML_SetBase</a></code> and may be <code>NULL</code>. The <code>publicId</code> parameter is the public id given in the entity -declaration and may be NULL. <code>systemId</code> is the system -identifier specified in the entity declaration and is never NULL.</p> +declaration and may be <code>NULL</code>. <code>systemId</code> is the system +identifier specified in the entity declaration and is never <code>NULL</code>.</p> <p>There are a couple of ways in which this handler differs from others. First, this handler returns a status indicator (an @@ -1564,10 +1637,10 @@ XML_SetExternalEntityRefHandlerArg(XML_Parser p, </pre> <div class="fcndef"> <p>Set the argument passed to the ExternalEntityRefHandler. If -<code>arg</code> is not NULL, it is the new value passed to the +<code>arg</code> is not <code>NULL</code>, it is the new value passed to the handler set using <code><a href="#XML_SetExternalEntityRefHandler" >XML_SetExternalEntityRefHandler</a></code>; if <code>arg</code> is -NULL, the argument passed to the handler function will be the parser +<code>NULL</code>, the argument passed to the handler function will be the parser object itself.</p> <p><strong>Note:</strong> @@ -1650,14 +1723,14 @@ value is -1, then that byte is invalid as the initial byte in a sequence. If the value is -n, where n is an integer > 1, then n is the number of bytes in the sequence and the actual conversion is accomplished by a call to the function pointed at by convert. This function may return -1 -if the sequence itself is invalid. The convert pointer may be null if +if the sequence itself is invalid. The convert pointer may be <code>NULL</code> if there are only single byte codes. The data parameter passed to the convert function is the data pointer from <code>XML_Encoding</code>. The string s is <em>NOT</em> null-terminated and points at the sequence of bytes to be converted.</p> <p>The function pointed at by <code>release</code> is called by the -parser when it is finished with the encoding. It may be NULL.</p> +parser when it is finished with the encoding. It may be <code>NULL</code>.</p> </div> <div class="handler"> @@ -1724,8 +1797,8 @@ typedef void </pre> <p>Sets a handler that is called for XML declarations and also for text declarations discovered in external entities. The way to -distinguish is that the <code>version</code> parameter will be NULL -for text declarations. The <code>encoding</code> parameter may be NULL +distinguish is that the <code>version</code> parameter will be <code>NULL</code> +for text declarations. The <code>encoding</code> parameter may be <code>NULL</code> for an XML declaration. The <code>standalone</code> argument will contain -1, 0, or 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or @@ -1749,7 +1822,7 @@ typedef void </pre> <p>Set a handler that is called at the start of a DOCTYPE declaration, before any external or internal subset is parsed. Both <code>sysid</code> -and <code>pubid</code> may be NULL. The <code>has_internal_subset</code> +and <code>pubid</code> may be <code>NULL</code>. The <code>has_internal_subset</code> will be non-zero if the DOCTYPE declaration has an internal subset.</p> </div> @@ -1831,7 +1904,7 @@ around and freed at a later stage.</p> <code>XML_Content</code> nodes. If <code>type</code> equals <code>XML_CTYPE_EMPTY</code> or <code>XML_CTYPE_ANY</code>, then <code>quant</code> will be <code>XML_CQUANT_NONE</code>, and the other -fields will be zero or NULL. If <code>type</code> is +fields will be zero or <code>NULL</code>. If <code>type</code> is <code>XML_CTYPE_MIXED</code>, then <code>quant</code> will be <code>XML_CQUANT_NONE</code> or <code>XML_CQUANT_REP</code> and *** 32725 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402210658.41L6w459057547>