diff --git a/.gitignore b/.gitignore index 224e7f0..2c3e2b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,24 @@ -.pc/ +# intermediate files +Win32/ +x64/ +ipch/ +resources/out/ +tinyxml2/tinyxml2-cbp/bin/ +tinyxml2/tinyxml2-cbp/obj/ +tinyxml2/bin/ +tinyxml2/temp/ +.artifacts/ +.projects/ +*.sdf +*.suo +*.opensdf +*.user +*.depend +*.layout +*.o +*.vc.db +*.vc.opendb +libtinyxml2.a +xmltest +vs/debug + diff --git a/CMakeLists.txt b/CMakeLists.txt index 8802fb8..b7bdf86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(tinyxml2 VERSION 9.0.0) +project(tinyxml2 VERSION 11.0.0) include(CTest) option(tinyxml2_BUILD_TESTING "Build tests for tinyxml2" "${BUILD_TESTING}") @@ -31,6 +31,7 @@ target_compile_definitions( PUBLIC $<$:TINYXML2_DEBUG> INTERFACE $<$:TINYXML2_IMPORT> PRIVATE $<$:_CRT_SECURE_NO_WARNINGS> + PUBLIC _FILE_OFFSET_BITS=64 ) set_target_properties( @@ -62,7 +63,9 @@ endif () include(GNUInstallDirs) include(CMakePackageConfigHelpers) -## Custom locations +## Custom settings +option(tinyxml2_INSTALL_PKGCONFIG "Create and install pkgconfig files" ON) + set(tinyxml2_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE PATH "Directory for pkgconfig files") @@ -120,10 +123,12 @@ install( ## pkg-config -configure_file(cmake/tinyxml2.pc.in tinyxml2.pc.gen @ONLY) -file(GENERATE OUTPUT tinyxml2.pc INPUT "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc.gen") -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc" - DESTINATION "${tinyxml2_INSTALL_PKGCONFIGDIR}" - COMPONENT tinyxml2_development -) +if (tinyxml2_INSTALL_PKGCONFIG) + configure_file(cmake/tinyxml2.pc.in tinyxml2.pc.gen @ONLY) + file(GENERATE OUTPUT tinyxml2.pc INPUT "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc.gen") + install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc" + DESTINATION "${tinyxml2_INSTALL_PKGCONFIGDIR}" + COMPONENT tinyxml2_development + ) +endif () diff --git a/Makefile b/Makefile index e76d8ec..6ca8544 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ ARFLAGS = cr RM = rm -f RANLIB = ranlib MKDIR = mkdir -p -CXXFLAGS = -fPIC +CXXFLAGS = -D_FILE_OFFSET_BITS=64 -fPIC INSTALL = install INSTALL_PROGRAM = $(INSTALL) diff --git a/contrib/html5-printer.cpp b/contrib/html5-printer.cpp index e9a423d..1aeb3cc 100644 --- a/contrib/html5-printer.cpp +++ b/contrib/html5-printer.cpp @@ -7,7 +7,7 @@ // In HTML5, there are 16 so-called "void" elements. "void elements" NEVER have // inner content (but they MAY have attributes), and are assumed to be self-closing. -// An example of a self-closig HTML5 element is "
" (line break) +// An example of a self-closing HTML5 element is "
" (line break) // All other elements are called "non-void" and MUST never self-close. // Examples: "
". diff --git a/debian/changelog b/debian/changelog index ddceab8..faa8936 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,61 @@ +tinyxml2 (11.0.0+dfsg-1) unstable; urgency=medium + + * [cb69d19] New upstream version 11.0.0+dfsg + * [b97c731] Rename package for soname bump + + -- Chow Loong Jin Mon, 17 Mar 2025 15:44:04 +0800 + +tinyxml2 (10.1.0+dfsg-1) unstable; urgency=medium + + * [e3fe268] New upstream version 10.1.0+dfsg + - Fixes CVE-2024-50615 (Closes: #1088814) + * [4b330c9] Refresh patches + * [870daa6] Update watch file to version 4 and use example from uscan manpage + + -- Chow Loong Jin Fri, 14 Mar 2025 12:49:48 +0800 + +tinyxml2 (10.0.0+dfsg-2) unstable; urgency=medium + + [ Jenkins ] + * [c0b0d65] Set upstream metadata fields: Bug-Database, Bug-Submit, + Repository, Repository-Browse. + Changes-By: lintian-brush + Fixes: lintian: upstream-metadata-file-is-missing + Fixes: lintian: upstream-metadata-missing-bug-tracking + Fixes: lintian: upstream-metadata-missing-repository + * [089faba] Remove Section on libtinyxml2-9 that duplicates source. + Changes-By: lintian-brush + Fixes: lintian: binary-control-field-duplicates-source + + [ Debian Janitor ] + * [5c99140] Use secure URI in Homepage field. + Changes-By: lintian-brush + Fixes: lintian: homepage-field-uses-insecure-uri + * [f16bddf] Bump debhelper from old 12 to 13. + Changes-By: lintian-brush + Fixes: lintian: package-uses-old-debhelper-compat-version + * [b8747ae] Remove constraints unnecessary since buster (oldstable) + * Build-Depends: Drop versioned constraint on dpkg-dev. + Changes-By: deb-scrub-obsolete + + -- Chow Loong Jin Fri, 05 Jan 2024 23:29:38 +0800 + +tinyxml2 (10.0.0+dfsg-1) unstable; urgency=medium + + * [31b2418] New upstream version 10.0.0+dfsg + * [b38f32c] Refresh patches + * [d00e929] Rename binary package for soname bump + * [70c9b49] Update symbols file + + -- Chow Loong Jin Fri, 05 Jan 2024 23:29:34 +0800 + +tinyxml2 (9.0.0+dfsg-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Install cmake files (Closes: #967045) + + -- Jochen Sprickerhof Mon, 16 May 2022 11:14:34 +0200 + tinyxml2 (9.0.0+dfsg-3) unstable; urgency=medium * [a6e98f0] Drop Provides/Conflicts libtinyxml2-8 (Closes: #992602) diff --git a/debian/control b/debian/control index 92d310e..5e4b2c1 100644 --- a/debian/control +++ b/debian/control @@ -1,20 +1,19 @@ Source: tinyxml2 Priority: optional Maintainer: Chow Loong Jin -Build-Depends: debhelper-compat (= 12), - dpkg-dev (>= 1.16.1), +Build-Depends: debhelper-compat (= 13), cmake Build-Conflicts: libssl1.0.0 (= 1.0.2-1) Standards-Version: 4.1.3 Section: libs -Homepage: http://www.grinninglizard.com/tinyxml2/ +Homepage: https://www.grinninglizard.com/tinyxml2/ Vcs-Browser: https://salsa.debian.org/debian/tinyxml2 Vcs-Git: https://salsa.debian.org/debian/tinyxml2.git Package: libtinyxml2-dev Section: libdevel Architecture: any -Depends: libtinyxml2-9 (= ${binary:Version}), +Depends: libtinyxml2-11 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same @@ -34,8 +33,7 @@ Description: TinyXML2 library - header and static library - More modern C++, including a proper namespace - Proper and useful handling of whitespace -Package: libtinyxml2-9 -Section: libs +Package: libtinyxml2-11 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Multi-Arch: same diff --git a/debian/libtinyxml2-9.install b/debian/libtinyxml2-11.install similarity index 100% rename from debian/libtinyxml2-9.install rename to debian/libtinyxml2-11.install diff --git a/debian/libtinyxml2-11.symbols b/debian/libtinyxml2-11.symbols new file mode 100644 index 0000000..dfa3121 --- /dev/null +++ b/debian/libtinyxml2-11.symbols @@ -0,0 +1,232 @@ +libtinyxml2.so.11 libtinyxml2-11 #MINVER# + (c++)"tinyxml2::StrPair::GetStr()@Base" 11.0.0 + (c++)"tinyxml2::StrPair::ParseName(char*)@Base" 11.0.0 + (c++)"tinyxml2::StrPair::ParseText(char*, char const*, int, int*)@Base" 11.0.0 + (c++)"tinyxml2::StrPair::Reset()@Base" 11.0.0 + (c++)"tinyxml2::StrPair::SetStr(char const*, int)@Base" 11.0.0 + (c++)"tinyxml2::StrPair::TransferTo(tinyxml2::StrPair*)@Base" 11.0.0 + (c++)"tinyxml2::StrPair::~StrPair()@Base" 11.0.0 + (c++)"tinyxml2::StrPair::~StrPair()@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::Name() const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::QueryBoolValue(bool*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::QueryDoubleValue(double*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::QueryFloatValue(float*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::QueryIntValue(int*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::QueryUnsignedValue(unsigned int*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(double)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(float)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(int)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::SetAttribute(unsigned int)@Base" 11.0.0 + (c++)"tinyxml2::XMLAttribute::Value() const@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::ShallowClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::XMLComment(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::XMLComment(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 11.0.0 + (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::ShallowClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::XMLDeclaration(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::XMLDeclaration(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 11.0.0 + (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::Clear()@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::ClearError()@Base" 8.1.0+really8.1.0 + (c++)"tinyxml2::XMLDocument::DeepCopy(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::DeleteNode(tinyxml2::XMLNode*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::ErrorIDToName(tinyxml2::XMLError)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::ErrorName() const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::ErrorStr() const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::Identify(char*, tinyxml2::XMLNode**, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::LoadFile(_IO_FILE*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::LoadFile(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::MarkInUse(tinyxml2::XMLNode const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::NewComment(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::NewDeclaration(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::NewElement(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::NewText(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::NewUnknown(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::Print(tinyxml2::XMLPrinter*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::PrintError() const@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::SaveFile(_IO_FILE*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::SaveFile(char const*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::XMLDocument(bool, tinyxml2::Whitespace)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::XMLDocument(bool, tinyxml2::Whitespace)@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::_errorNames@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 11.0.0 + (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::Attribute(char const*, char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::BoolAttribute(char const*, bool) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::BoolText(bool) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::DeleteAttribute(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::DoubleAttribute(char const*, double) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::DoubleText(double) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::FindAttribute(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::FindOrCreateAttribute(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::FloatAttribute(char const*, float) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::FloatText(float) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::GetText() const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::InsertNewChildElement(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::InsertNewComment(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::InsertNewDeclaration(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::InsertNewText(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::InsertNewUnknown(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::IntAttribute(char const*, int) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::IntText(int) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::QueryBoolText(bool*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::QueryDoubleText(double*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::QueryFloatText(float*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::QueryIntText(int*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::QueryUnsignedText(unsigned int*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(double)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(float)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(int)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::SetText(unsigned int)@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::ShallowClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::UnsignedAttribute(char const*, unsigned int) const@Base" 11.0.0 + (c++)"tinyxml2::XMLElement::UnsignedText(unsigned int) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::ChildElementCount() const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::ChildElementCount(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::DeepClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::DeleteChild(tinyxml2::XMLNode*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::DeleteChildren()@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::FirstChildElement(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::InsertAfterChild(tinyxml2::XMLNode*, tinyxml2::XMLNode*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::InsertFirstChild(tinyxml2::XMLNode*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::LastChildElement(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::NextSiblingElement(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::PreviousSiblingElement(char const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::SetValue(char const*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::Value() const@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::XMLNode(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::XMLNode(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 11.0.0 + (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::CloseElement(bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::OpenElement(char const*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Print(char const*, ...)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PrintSpace(int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, double)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, unsigned int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushComment(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushDeclaration(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushHeader(bool, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(char const*, bool)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(double)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(float)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushText(unsigned int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::PushUnknown(char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Putc(char)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::SealElementIfJustOpened()@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLComment const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLDeclaration const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLText const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLUnknown const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::VisitEnter(tinyxml2::XMLDocument const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::VisitEnter(tinyxml2::XMLElement const&, tinyxml2::XMLAttribute const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::VisitExit(tinyxml2::XMLElement const&)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::XMLPrinter(_IO_FILE*, bool, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLPrinter::XMLPrinter(_IO_FILE*, bool, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLText::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLText::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLText::ShallowClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLText::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::Accept(tinyxml2::XMLVisitor*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::ShallowClone(tinyxml2::XMLDocument*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::XMLUnknown(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::XMLUnknown(tinyxml2::XMLDocument*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 11.0.0 + (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ConvertUTF32ToUTF8(unsigned long, char*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::GetCharacterRef(char const*, char*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ReadBOM(char const*, bool*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::SetBoolSerialization(char const*, char const*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToBool(char const*, bool*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToDouble(char const*, double*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToFloat(char const*, float*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToInt(char const*, int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToStr(bool, char*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToStr(double, char*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToStr(float, char*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToStr(int, char*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToStr(unsigned int, char*, int)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::ToUnsigned(char const*, unsigned int*)@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::writeBoolFalse@Base" 11.0.0 + (c++)"tinyxml2::XMLUtil::writeBoolTrue@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLAttribute@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLComment@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLDeclaration@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLDocument@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLElement@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLNode@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLPrinter@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLText@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLUnknown@Base" 11.0.0 + (c++)"typeinfo for tinyxml2::XMLVisitor@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLAttribute@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLComment@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLDeclaration@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLDocument@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLElement@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLNode@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLPrinter@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLText@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLUnknown@Base" 11.0.0 + (c++)"typeinfo name for tinyxml2::XMLVisitor@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLAttribute@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLComment@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLDeclaration@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLDocument@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLElement@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLNode@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLPrinter@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLText@Base" 11.0.0 + (c++)"vtable for tinyxml2::XMLUnknown@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLAttribute::QueryInt64Value\((long )?long\*\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLAttribute::QueryUnsigned64Value\(unsigned (long )?long\*\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLAttribute::SetAttribute\((long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLAttribute::SetAttribute\(unsigned (long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLDocument::Parse\(char const\*, unsigned (int|(long )?long)\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::Int64Attribute\(char const\*, (long )?long\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::Int64Text\((long )?long\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::QueryInt64Text\((long )?long\*\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::QueryUnsigned64Text\(unsigned (long )?long\*\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::SetText\((long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::SetText\(unsigned (long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::Unsigned64Attribute\(char const\*, unsigned (long )?long\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLElement::Unsigned64Text\(unsigned (long )?long\) const@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLPrinter::PushAttribute\(char const\*, (long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLPrinter::PushAttribute\(char const\*, unsigned (long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLPrinter::PushText\((long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLPrinter::PushText\(unsigned (long )?long\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLPrinter::Write\(char const\*, unsigned (int|long)\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLUtil::ToInt64\(char const\*, (long )?long\*\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLUtil::ToStr\((long )?long, char\*, int\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLUtil::ToStr\(unsigned (long )?long, char\*, int\)@Base" 11.0.0 + (c++|regex)"tinyxml2::XMLUtil::ToUnsigned64\(char const\*, unsigned (long )?long\*\)@Base" 11.0.0 diff --git a/debian/libtinyxml2-9.symbols b/debian/libtinyxml2-9.symbols deleted file mode 100644 index 849c430..0000000 --- a/debian/libtinyxml2-9.symbols +++ /dev/null @@ -1,230 +0,0 @@ -libtinyxml2.so.9 libtinyxml2-9 #MINVER# - (c++|regex)"tinyxml2::XMLAttribute::QueryInt64Value\((long )?long\*\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLAttribute::QueryUnsigned64Value\(unsigned (long )?long\*\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLAttribute::SetAttribute\((long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLAttribute::SetAttribute\(unsigned (long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLDocument::Parse\(char const\*, unsigned (int|(long )?long)\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::Int64Attribute\(char const\*, (long )?long\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::Int64Text\((long )?long\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::QueryInt64Text\((long )?long\*\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::QueryUnsigned64Text\(unsigned (long )?long\*\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::SetText\((long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::SetText\(unsigned (long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::Unsigned64Attribute\(char const\*, unsigned (long )?long\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLElement::Unsigned64Text\(unsigned (long )?long\) const@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLPrinter::PushAttribute\(char const\*, (long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLPrinter::PushAttribute\(char const\*, unsigned (long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLPrinter::PushText\((long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLPrinter::PushText\(unsigned (long )?long\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLPrinter::Write\(char const\*, unsigned (int|long)\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLUtil::ToInt64\(char const\*, (long )?long\*\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLUtil::ToStr\((long )?long, char\*, int\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLUtil::ToStr\(unsigned (long )?long, char\*, int\)@Base" 8.0.0 - (c++|regex)"tinyxml2::XMLUtil::ToUnsigned64\(char const\*, unsigned (long )?long\*\)@Base" 8.0.0 - (c++)"tinyxml2::StrPair::GetStr()@Base" 8.0.0 - (c++)"tinyxml2::StrPair::ParseName(char*)@Base" 8.0.0 - (c++)"tinyxml2::StrPair::ParseText(char*, char const*, int, int*)@Base" 8.0.0 - (c++)"tinyxml2::StrPair::Reset()@Base" 8.0.0 - (c++)"tinyxml2::StrPair::SetStr(char const*, int)@Base" 8.0.0 - (c++)"tinyxml2::StrPair::~StrPair()@Base" 8.0.0 - (c++)"tinyxml2::StrPair::~StrPair()@Base" 8.0.0 - (c++)"tinyxml2::StrPair::TransferTo(tinyxml2::StrPair*)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::Name() const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::QueryBoolValue(bool*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::QueryDoubleValue(double*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::QueryFloatValue(float*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::QueryIntValue(int*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::QueryUnsignedValue(unsigned int*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(double)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(float)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(int)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::SetAttribute(unsigned int)@Base" 8.0.0 - (c++)"tinyxml2::XMLAttribute::Value() const@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::ShallowClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::~XMLComment()@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::XMLComment(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLComment::XMLComment(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::ShallowClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::~XMLDeclaration()@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::XMLDeclaration(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDeclaration::XMLDeclaration(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::Clear()@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::ClearError()@Base" 8.1.0+really8.1.0 - (c++)"tinyxml2::XMLDocument::DeepCopy(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::DeleteNode(tinyxml2::XMLNode*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::ErrorIDToName(tinyxml2::XMLError)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::ErrorName() const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::_errorNames@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::ErrorStr() const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::Identify(char*, tinyxml2::XMLNode**)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::LoadFile(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::LoadFile(_IO_FILE*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::MarkInUse(tinyxml2::XMLNode const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::NewComment(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::NewDeclaration(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::NewElement(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::NewText(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::NewUnknown(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::PrintError() const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::Print(tinyxml2::XMLPrinter*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::SaveFile(char const*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::SaveFile(_IO_FILE*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::~XMLDocument()@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::XMLDocument(bool, tinyxml2::Whitespace)@Base" 8.0.0 - (c++)"tinyxml2::XMLDocument::XMLDocument(bool, tinyxml2::Whitespace)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::Attribute(char const*, char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::BoolAttribute(char const*, bool) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::BoolText(bool) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::DeleteAttribute(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::DoubleAttribute(char const*, double) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::DoubleText(double) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::FindAttribute(char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::FindOrCreateAttribute(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::FloatAttribute(char const*, float) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::FloatText(float) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::GetText() const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::InsertNewChildElement(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::InsertNewComment(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::InsertNewDeclaration(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::InsertNewText(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::InsertNewUnknown(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::IntAttribute(char const*, int) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::IntText(int) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::QueryBoolText(bool*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::QueryDoubleText(double*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::QueryFloatText(float*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::QueryIntText(int*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::QueryUnsignedText(unsigned int*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(double)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(float)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(int)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::SetText(unsigned int)@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::ShallowClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::UnsignedAttribute(char const*, unsigned int) const@Base" 8.0.0 - (c++)"tinyxml2::XMLElement::UnsignedText(unsigned int) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::DeepClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::DeleteChildren()@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::DeleteChild(tinyxml2::XMLNode*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::FirstChildElement(char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::InsertAfterChild(tinyxml2::XMLNode*, tinyxml2::XMLNode*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::InsertFirstChild(tinyxml2::XMLNode*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::LastChildElement(char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::NextSiblingElement(char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::PreviousSiblingElement(char const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::SetValue(char const*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::Value() const@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::~XMLNode()@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::XMLNode(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLNode::XMLNode(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::CloseElement(bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::OpenElement(char const*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Print(char const*, ...)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PrintSpace(int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, double)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushAttribute(char const*, unsigned int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushComment(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushDeclaration(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushHeader(bool, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(char const*, bool)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(double)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(float)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushText(unsigned int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::PushUnknown(char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Putc(char)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::SealElementIfJustOpened()@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::VisitEnter(tinyxml2::XMLDocument const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::VisitEnter(tinyxml2::XMLElement const&, tinyxml2::XMLAttribute const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::VisitExit(tinyxml2::XMLElement const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLComment const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLDeclaration const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLText const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::Visit(tinyxml2::XMLUnknown const&)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::XMLPrinter(_IO_FILE*, bool, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLPrinter::XMLPrinter(_IO_FILE*, bool, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLText::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLText::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLText::ShallowClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLText::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::Accept(tinyxml2::XMLVisitor*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::ParseDeep(char*, tinyxml2::StrPair*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::ShallowClone(tinyxml2::XMLDocument*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::ShallowEqual(tinyxml2::XMLNode const*) const@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::~XMLUnknown()@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::XMLUnknown(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUnknown::XMLUnknown(tinyxml2::XMLDocument*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ConvertUTF32ToUTF8(unsigned long, char*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::GetCharacterRef(char const*, char*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ReadBOM(char const*, bool*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::SetBoolSerialization(char const*, char const*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToBool(char const*, bool*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToDouble(char const*, double*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToFloat(char const*, float*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToInt(char const*, int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToStr(bool, char*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToStr(double, char*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToStr(float, char*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToStr(int, char*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToStr(unsigned int, char*, int)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::ToUnsigned(char const*, unsigned int*)@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::writeBoolFalse@Base" 8.0.0 - (c++)"tinyxml2::XMLUtil::writeBoolTrue@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLAttribute@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLComment@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLDeclaration@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLDocument@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLElement@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLNode@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLPrinter@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLText@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLUnknown@Base" 8.0.0 - (c++)"typeinfo for tinyxml2::XMLVisitor@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLAttribute@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLComment@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLDeclaration@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLDocument@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLElement@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLNode@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLPrinter@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLText@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLUnknown@Base" 8.0.0 - (c++)"typeinfo name for tinyxml2::XMLVisitor@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLAttribute@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLComment@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLDeclaration@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLDocument@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLElement@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLNode@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLPrinter@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLText@Base" 8.0.0 - (c++)"vtable for tinyxml2::XMLUnknown@Base" 8.0.0 diff --git a/debian/libtinyxml2-dev.install b/debian/libtinyxml2-dev.install index 242b795..37b9573 100644 --- a/debian/libtinyxml2-dev.install +++ b/debian/libtinyxml2-dev.install @@ -1,3 +1,4 @@ /usr/include/ /usr/lib/*/*.so /usr/lib/*/pkgconfig/ +/usr/lib/*/cmake/ diff --git a/debian/patches/Set-visibility-to-hidden-for-private-functions.patch b/debian/patches/Set-visibility-to-hidden-for-private-functions.patch index cce0921..fbe3841 100644 --- a/debian/patches/Set-visibility-to-hidden-for-private-functions.patch +++ b/debian/patches/Set-visibility-to-hidden-for-private-functions.patch @@ -9,18 +9,18 @@ are defined in the header. 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/tinyxml2.h b/tinyxml2.h -index 05848da..ddd84e8 100755 +index 3d65f7f..9a3c9c5 100644 --- a/tinyxml2.h +++ b/tinyxml2.h -@@ -65,6 +65,7 @@ distribution. +@@ -62,6 +62,7 @@ distribution. #endif - #ifdef _WIN32 + #ifdef _MSC_VER +# define TINYXML2_PRIVATE # ifdef TINYXML2_EXPORT # define TINYXML2_LIB __declspec(dllexport) # elif defined(TINYXML2_IMPORT) -@@ -74,8 +75,10 @@ distribution. +@@ -71,8 +72,10 @@ distribution. # endif #elif __GNUC__ >= 4 # define TINYXML2_LIB __attribute__((visibility("default"))) @@ -31,7 +31,7 @@ index 05848da..ddd84e8 100755 #endif -@@ -181,7 +184,7 @@ public: +@@ -178,7 +181,7 @@ public: void Reset(); private: @@ -40,7 +40,7 @@ index 05848da..ddd84e8 100755 enum { NEEDS_FLUSH = 0x100, -@@ -192,8 +195,8 @@ private: +@@ -189,8 +192,8 @@ private: char* _start; char* _end; @@ -51,7 +51,7 @@ index 05848da..ddd84e8 100755 }; -@@ -297,10 +300,10 @@ public: +@@ -293,10 +296,10 @@ public: } private: @@ -60,12 +60,12 @@ index 05848da..ddd84e8 100755 + TINYXML2_PRIVATE DynArray( const DynArray& ); // not supported + TINYXML2_PRIVATE void operator=( const DynArray& ); // not supported -- void EnsureCapacity( int cap ) { -+ TINYXML2_PRIVATE void EnsureCapacity( int cap ) { +- void EnsureCapacity( size_t cap ) { ++ TINYXML2_PRIVATE void EnsureCapacity( size_t cap ) { TIXMLASSERT( cap > 0 ); if ( cap > _allocated ) { - TIXMLASSERT( cap <= INT_MAX / 2 ); -@@ -438,8 +441,8 @@ public: + TIXMLASSERT( cap <= SIZE_MAX / 2 / sizeof(T)); +@@ -434,8 +437,8 @@ public: enum { ITEMS_PER_BLOCK = (4 * 1024) / ITEM_SIZE }; private: @@ -76,7 +76,7 @@ index 05848da..ddd84e8 100755 union Item { Item* next; -@@ -966,13 +969,13 @@ protected: +@@ -968,13 +971,13 @@ protected: private: MemPool* _memPool; @@ -96,7 +96,7 @@ index 05848da..ddd84e8 100755 }; -@@ -1022,8 +1025,8 @@ protected: +@@ -1024,8 +1027,8 @@ protected: private: bool _isCData; @@ -107,8 +107,8 @@ index 05848da..ddd84e8 100755 }; -@@ -1051,8 +1054,8 @@ protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); +@@ -1053,8 +1056,8 @@ protected: + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr) override; private: - XMLComment( const XMLComment& ); // not supported @@ -118,8 +118,8 @@ index 05848da..ddd84e8 100755 }; -@@ -1090,8 +1093,8 @@ protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); +@@ -1092,8 +1095,8 @@ protected: + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: - XMLDeclaration( const XMLDeclaration& ); // not supported @@ -129,8 +129,8 @@ index 05848da..ddd84e8 100755 }; -@@ -1125,8 +1128,8 @@ protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); +@@ -1127,8 +1130,8 @@ protected: + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: - XMLUnknown( const XMLUnknown& ); // not supported @@ -140,7 +140,7 @@ index 05848da..ddd84e8 100755 }; -@@ -1240,14 +1243,14 @@ public: +@@ -1242,14 +1245,14 @@ public: private: enum { BUF_SIZE = 200 }; @@ -161,8 +161,8 @@ index 05848da..ddd84e8 100755 mutable StrPair _name; mutable StrPair _value; -@@ -1683,15 +1686,15 @@ protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); +@@ -1685,15 +1688,15 @@ protected: + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: - XMLElement( XMLDocument* doc ); @@ -184,7 +184,7 @@ index 05848da..ddd84e8 100755 enum { BUF_SIZE = 200 }; ElementClosingType _closingType; -@@ -1928,8 +1931,8 @@ public: +@@ -1931,8 +1934,8 @@ public: } private: @@ -195,7 +195,7 @@ index 05848da..ddd84e8 100755 bool _writeBOM; bool _processEntities; -@@ -1955,9 +1958,9 @@ private: +@@ -1958,9 +1961,9 @@ private: static const char* _errorNames[XML_ERROR_COUNT]; @@ -207,7 +207,7 @@ index 05848da..ddd84e8 100755 // Something of an obvious security hole, once it was discovered. // Either an ill-formed XML or an excessively deep one can overflow -@@ -1974,11 +1977,11 @@ private: +@@ -1977,11 +1980,11 @@ private: private: XMLDocument * _document; }; @@ -216,13 +216,13 @@ index 05848da..ddd84e8 100755 + TINYXML2_PRIVATE void PushDepth(); + TINYXML2_PRIVATE void PopDepth(); - template + template - NodeType* CreateUnlinkedNode( MemPoolT& pool ); + TINYXML2_PRIVATE NodeType* CreateUnlinkedNode( MemPoolT& pool ); }; - template -@@ -2346,8 +2349,8 @@ private: + template +@@ -2349,8 +2352,8 @@ private: Prepares to write a new node. This includes sealing an element that was just opened, and writing any whitespace necessary if not in compact mode. */ @@ -233,7 +233,7 @@ index 05848da..ddd84e8 100755 bool _firstElement; FILE* _fp; -@@ -2366,8 +2369,8 @@ private: +@@ -2369,8 +2372,8 @@ private: DynArray< char, 20 > _buffer; // Prohibit cloning, intentionally not implemented diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..fcc9bfa --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/leethomason/tinyxml2/issues +Bug-Submit: https://github.com/leethomason/tinyxml2/issues/new +Repository: https://github.com/leethomason/tinyxml2.git +Repository-Browse: https://github.com/leethomason/tinyxml2 diff --git a/debian/watch b/debian/watch index 3ddc4ba..d9082a7 100644 --- a/debian/watch +++ b/debian/watch @@ -1,4 +1,10 @@ -version=3 +version=4 -opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/tinyxml2-$1.tar.gz/,dversionmangle=s/\+dfsg(\.\d+)?$//,repacksuffix=+dfsg" \ -https://github.com/leethomason/tinyxml2/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz +opts=\ + filenamemangle=s%.*/@ANY_VERSION@%@PACKAGE@-$1.tar.gz%,\ + downloadurlmangle=s%(api.github.com/repos/[^/]+/[^/]+)/git/refs/%$1/tarball/refs/%g,\ + dversionmangle=s/\+dfsg(\.\d+)?$//,\ + repacksuffix=+dfsg,\ + searchmode=plain \ + https://api.github.com/repos/leethomason/tinyxml2/git/matching-refs/tags/ \ + https://api.github.com/repos/[^/]+/[^/]+/git/refs/tags/@ANY_VERSION@ diff --git a/dox b/dox index 99921de..5dc1671 100644 --- a/dox +++ b/dox @@ -38,7 +38,7 @@ PROJECT_NAME = "TinyXML-2" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 9.0.0 +PROJECT_NUMBER = 11.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/meson.build b/meson.build index 3546c15..cd4c3fa 100644 --- a/meson.build +++ b/meson.build @@ -22,7 +22,7 @@ project( 'tinyxml2', ['cpp'], - version : '9.0.0', + version : '11.0.0', meson_version : '>= 0.49.0', ) @@ -62,26 +62,6 @@ if meson.version().version_compare('>= 0.54.0') endif if get_option('tests') - # Try to find a copy command. If this is windows we probably don't have cp, - # but if this is msys then we do, so make cp not required in that case, and - # try Xcopy if cp isn't found - prog_cp = find_program('cp', required : build_machine.system() != 'windows') - command = ['-r'] - if not prog_cp.found() - prog_cp = find_program('Xcopy') - command = ['/E', '/I'] - endif - - # Copy the test resources into the build dir - run_command( - prog_cp, - [ - command, - meson.current_source_dir() / 'resources', - meson.current_build_dir(), - ], - ) - test( 'xmltest', executable( @@ -89,7 +69,7 @@ if get_option('tests') ['xmltest.cpp'], link_with : [lib_tinyxml2], ), - workdir : meson.current_build_dir(), + workdir : meson.current_source_dir(), ) endif diff --git a/readme.md b/readme.md index 5245ac4..6609015 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,7 @@ TinyXML-2 ========= -![Build](https://github.com/leethomason/tinyxml2/actions/workflows/test.yml/badge.svg) - -![TinyXML-2 Logo](http://www.grinninglizard.com/tinyxml2/TinyXML2_small.png) +[![Test](https://github.com/leethomason/tinyxml2/actions/workflows/test.yml/badge.svg)](https://github.com/leethomason/tinyxml2/actions/workflows/test.yml) TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrated into other programs. @@ -93,7 +91,7 @@ by the Document. When the Document is deleted, so are all the nodes it contains. ### White Space -#### Whitespace Preservation (default) +#### Whitespace Preservation (default, PRESERVE_WHITESPACE) Microsoft has an excellent article on white space: http://msdn.microsoft.com/en-us/library/ms256097.aspx @@ -125,7 +123,7 @@ valuable. TinyXML-2 sees these as the same XML: 123 -#### Whitespace Collapse +#### Whitespace Collapse (COLLAPSE_WHITESPACE) For some applications, it is preferable to collapse whitespace. Collapsing whitespace gives you "HTML-like" behavior, which is sometimes more suitable @@ -143,7 +141,15 @@ However, you may also use COLLAPSE_WHITESPACE, which will: Note that (currently) there is a performance impact for using COLLAPSE_WHITESPACE. It essentially causes the XML to be parsed twice. -#### Error Reporting +#### Pedantic Whitespace (PEDANTIC_WHITESPACE) + +For applications that need to know about text nodes that are composed entirely of +whitespace, PEDANTIC_WHITESPACE is available. PEDANTIC_WHITESPACE maintains all the +whilespace between elements. + +PEDANTIC_WHITESPACE is a new mode and not as tested as the other whitespace modes. + +### Error Reporting TinyXML-2 reports the line number of any errors in an XML document that cannot be parsed correctly. In addition, all nodes (elements, declarations, @@ -263,10 +269,9 @@ Generally speaking, the intent is that you simply include the tinyxml2.cpp and tinyxml2.h files in your project and build with your other source code. There is also a CMake build included. CMake is the general build for TinyXML-2. -Additional build systems are costly to maintain, and tend to bit-rot. -A Visual Studio project is included, but that is largely for developer convenience, -and is not intended to integrate well with other builds. +(Additional build systems are costly to maintain, and tend to bit-rot. They are +being removed over time.) Building TinyXML-2 - Using vcpkg -------------------------------- diff --git a/resources/dream.xml b/resources/dream.xml old mode 100755 new mode 100644 diff --git a/resources/utf8test.xml b/resources/utf8test.xml old mode 100755 new mode 100644 diff --git a/resources/utf8testverify.xml b/resources/utf8testverify.xml old mode 100755 new mode 100644 diff --git a/tinyxml2.cpp b/tinyxml2.cpp old mode 100755 new mode 100644 index 31925d9..66ef0c9 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -24,7 +24,7 @@ distribution. #include "tinyxml2.h" #include // yes, this one new style header, is in the Android SDK. -#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__) +#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__) || defined(__CC_ARM) # include # include #else @@ -103,10 +103,10 @@ distribution. #if defined(_WIN64) #define TIXML_FSEEK _fseeki64 #define TIXML_FTELL _ftelli64 -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__ANDROID__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__CYGWIN__) #define TIXML_FSEEK fseeko #define TIXML_FTELL ftello -#elif defined(__unix__) && defined(__x86_64__) +#elif defined(__ANDROID__) && __ANDROID_API__ > 24 #define TIXML_FSEEK fseeko64 #define TIXML_FTELL ftello64 #else @@ -234,13 +234,13 @@ char* StrPair::ParseName( char* p ) if ( !p || !(*p) ) { return 0; } - if ( !XMLUtil::IsNameStartChar( (unsigned char) *p ) ) { + if ( !XMLUtil::IsNameStartChar( static_cast(*p) ) ) { return 0; } char* const start = p; ++p; - while ( *p && XMLUtil::IsNameChar( (unsigned char) *p ) ) { + while ( *p && XMLUtil::IsNameChar( static_cast(*p) ) ) { ++p; } @@ -467,102 +467,94 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length } -const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length ) +const char* XMLUtil::GetCharacterRef(const char* p, char* value, int* length) { - // Presume an entity, and pull it out. + // Assume an entity, and pull it out. *length = 0; - if ( *(p+1) == '#' && *(p+2) ) { - unsigned long ucs = 0; - TIXMLASSERT( sizeof( ucs ) >= 4 ); + static const uint32_t MAX_CODE_POINT = 0x10FFFF; + + if (*(p + 1) == '#' && *(p + 2)) { + uint32_t ucs = 0; ptrdiff_t delta = 0; - unsigned mult = 1; + uint32_t mult = 1; static const char SEMICOLON = ';'; - if ( *(p+2) == 'x' ) { + bool hex = false; + uint32_t radix = 10; + const char* q = 0; + char terminator = '#'; + + if (*(p + 2) == 'x') { // Hexadecimal. - const char* q = p+3; - if ( !(*q) ) { - return 0; - } + hex = true; + radix = 16; + terminator = 'x'; - q = strchr( q, SEMICOLON ); + q = p + 3; + } + else { + // Decimal. + q = p + 2; + } + if (!(*q)) { + return 0; + } - if ( !q ) { - return 0; - } - TIXMLASSERT( *q == SEMICOLON ); + q = strchr(q, SEMICOLON); + if (!q) { + return 0; + } + TIXMLASSERT(*q == SEMICOLON); - delta = q-p; - --q; + delta = q - p; + --q; - while ( *q != 'x' ) { - unsigned int digit = 0; + while (*q != terminator) { + uint32_t digit = 0; - if ( *q >= '0' && *q <= '9' ) { - digit = *q - '0'; - } - else if ( *q >= 'a' && *q <= 'f' ) { - digit = *q - 'a' + 10; - } - else if ( *q >= 'A' && *q <= 'F' ) { - digit = *q - 'A' + 10; - } - else { - return 0; - } - TIXMLASSERT( digit < 16 ); - TIXMLASSERT( digit == 0 || mult <= UINT_MAX / digit ); - const unsigned int digitScaled = mult * digit; - TIXMLASSERT( ucs <= ULONG_MAX - digitScaled ); - ucs += digitScaled; - TIXMLASSERT( mult <= UINT_MAX / 16 ); - mult *= 16; - --q; + if (*q >= '0' && *q <= '9') { + digit = *q - '0'; } - } - else { - // Decimal. - const char* q = p+2; - if ( !(*q) ) { - return 0; + else if (hex && (*q >= 'a' && *q <= 'f')) { + digit = *q - 'a' + 10; } - - q = strchr( q, SEMICOLON ); - - if ( !q ) { + else if (hex && (*q >= 'A' && *q <= 'F')) { + digit = *q - 'A' + 10; + } + else { return 0; } - TIXMLASSERT( *q == SEMICOLON ); - - delta = q-p; - --q; - - while ( *q != '#' ) { - if ( *q >= '0' && *q <= '9' ) { - const unsigned int digit = *q - '0'; - TIXMLASSERT( digit < 10 ); - TIXMLASSERT( digit == 0 || mult <= UINT_MAX / digit ); - const unsigned int digitScaled = mult * digit; - TIXMLASSERT( ucs <= ULONG_MAX - digitScaled ); - ucs += digitScaled; - } - else { - return 0; - } - TIXMLASSERT( mult <= UINT_MAX / 10 ); - mult *= 10; - --q; + TIXMLASSERT(digit < radix); + + const unsigned int digitScaled = mult * digit; + ucs += digitScaled; + mult *= radix; + + // Security check: could a value exist that is out of range? + // Easily; limit to the MAX_CODE_POINT, which also allows for a + // bunch of leading zeroes. + if (mult > MAX_CODE_POINT) { + mult = MAX_CODE_POINT; } + --q; + } + // Out of range: + if (ucs > MAX_CODE_POINT) { + return 0; } // convert the UCS to UTF-8 - ConvertUTF32ToUTF8( ucs, value, length ); + ConvertUTF32ToUTF8(ucs, value, length); + if (length == 0) { + // If length is 0, there was an error. (Security? Bad input?) + // Fail safely. + return 0; + } return p + delta + 1; } - return p+1; + return p + 1; } - void XMLUtil::ToStr( int v, char* buffer, int bufferSize ) { TIXML_SNPRINTF( buffer, bufferSize, "%d", v ); @@ -605,7 +597,7 @@ void XMLUtil::ToStr( int64_t v, char* buffer, int bufferSize ) void XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize ) { // horrible syntax trick to make the compiler happy about %llu - TIXML_SNPRINTF(buffer, bufferSize, "%llu", (long long)v); + TIXML_SNPRINTF(buffer, bufferSize, "%llu", static_cast(v)); } bool XMLUtil::ToInt(const char* str, int* value) @@ -700,14 +692,14 @@ bool XMLUtil::ToInt64(const char* str, int64_t* value) bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) { unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llu if(TIXML_SSCANF(str, IsPrefixHex(str) ? "%llx" : "%llu", &v) == 1) { - *value = (uint64_t)v; + *value = static_cast(v); return true; } return false; } -char* XMLDocument::Identify( char* p, XMLNode** node ) +char* XMLDocument::Identify( char* p, XMLNode** node, bool first ) { TIXMLASSERT( node ); TIXMLASSERT( p ); @@ -759,9 +751,19 @@ char* XMLDocument::Identify( char* p, XMLNode** node ) p += dtdHeaderLen; } else if ( XMLUtil::StringEqual( p, elementHeader, elementHeaderLen ) ) { - returnNode = CreateUnlinkedNode( _elementPool ); - returnNode->_parseLineNum = _parseCurLineNum; - p += elementHeaderLen; + + // Preserve whitespace pedantically before closing tag, when it's immediately after opening tag + if (WhitespaceMode() == PEDANTIC_WHITESPACE && first && p != start && *(p + elementHeaderLen) == '/') { + returnNode = CreateUnlinkedNode(_textPool); + returnNode->_parseLineNum = startLine; + p = start; // Back it up, all the text counts. + _parseCurLineNum = startLine; + } + else { + returnNode = CreateUnlinkedNode(_elementPool); + returnNode->_parseLineNum = _parseCurLineNum; + p += elementHeaderLen; + } } else { returnNode = CreateUnlinkedNode( _textPool ); @@ -814,6 +816,34 @@ XMLNode::~XMLNode() } } +// ChildElementCount was originally suggested by msteiger on the sourceforge page for TinyXML and modified by KB1SPH for TinyXML-2. + +int XMLNode::ChildElementCount(const char *value) const { + int count = 0; + + const XMLElement *e = FirstChildElement(value); + + while (e) { + e = e->NextSiblingElement(value); + count++; + } + + return count; +} + +int XMLNode::ChildElementCount() const { + int count = 0; + + const XMLElement *e = FirstChildElement(); + + while (e) { + e = e->NextSiblingElement(); + count++; + } + + return count; +} + const char* XMLNode::Value() const { // Edge case: XMLDocuments don't have a Value. Return null. @@ -1062,21 +1092,23 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) if (_document->Error()) return 0; + bool first = true; while( p && *p ) { XMLNode* node = 0; - p = _document->Identify( p, &node ); + p = _document->Identify( p, &node, first ); TIXMLASSERT( p ); if ( node == 0 ) { break; } + first = false; const int initialLineNum = node->_parseLineNum; StrPair endTag; p = node->ParseDeep( p, &endTag, curLineNumPtr ); if ( !p ) { - DeleteNode( node ); + _document->DeleteNode( node ); if ( !_document->Error() ) { _document->SetError( XML_ERROR_PARSING, initialLineNum, 0); } @@ -1109,7 +1141,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) } if ( !wellLocated ) { _document->SetError( XML_ERROR_PARSING_DECLARATION, initialLineNum, "XMLDeclaration value=%s", decl->Value()); - DeleteNode( node ); + _document->DeleteNode( node ); break; } } @@ -1144,7 +1176,7 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) } if ( mismatch ) { _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, initialLineNum, "XMLElement name=%s", ele->Name()); - DeleteNode( node ); + _document->DeleteNode( node ); break; } } @@ -1776,11 +1808,11 @@ XMLError XMLElement::QueryInt64Text(int64_t* ival) const } -XMLError XMLElement::QueryUnsigned64Text(uint64_t* ival) const +XMLError XMLElement::QueryUnsigned64Text(uint64_t* uval) const { if(FirstChild() && FirstChild()->ToText()) { const char* t = FirstChild()->Value(); - if(XMLUtil::ToUnsigned64(t, ival)) { + if(XMLUtil::ToUnsigned64(t, uval)) { return XML_SUCCESS; } return XML_CAN_NOT_CONVERT_TEXT; @@ -1937,7 +1969,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr ) } // attribute. - if (XMLUtil::IsNameStartChar( (unsigned char) *p ) ) { + if (XMLUtil::IsNameStartChar( static_cast(*p) ) ) { XMLAttribute* attrib = CreateAttribute(); TIXMLASSERT( attrib ); attrib->_parseLineNum = _document->_parseCurLineNum; @@ -2181,7 +2213,7 @@ void XMLDocument::MarkInUse(const XMLNode* const node) TIXMLASSERT(node); TIXMLASSERT(node->_parent == 0); - for (int i = 0; i < _unlinked.Size(); ++i) { + for (size_t i = 0; i < _unlinked.Size(); ++i) { if (node == _unlinked[i]) { _unlinked.SwapRemove(i); break; @@ -2412,21 +2444,21 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact ) } -XMLError XMLDocument::Parse( const char* p, size_t len ) +XMLError XMLDocument::Parse( const char* xml, size_t nBytes ) { Clear(); - if ( len == 0 || !p || !*p ) { + if ( nBytes == 0 || !xml || !*xml ) { SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); return _errorID; } - if ( len == static_cast(-1) ) { - len = strlen( p ); + if ( nBytes == static_cast(-1) ) { + nBytes = strlen( xml ); } TIXMLASSERT( _charBuffer == 0 ); - _charBuffer = new char[ len+1 ]; - memcpy( _charBuffer, p, len ); - _charBuffer[len] = 0; + _charBuffer = new char[ nBytes+1 ]; + memcpy( _charBuffer, xml, nBytes ); + _charBuffer[nBytes] = 0; Parse(); if ( Error() ) { @@ -2464,7 +2496,7 @@ void XMLDocument::ClearError() { void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ... ) { - TIXMLASSERT( error >= 0 && error < XML_ERROR_COUNT ); + TIXMLASSERT(error >= 0 && error < XML_ERROR_COUNT); _errorID = error; _errorLineNum = lineNum; _errorStr.Reset(); @@ -2473,7 +2505,8 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ... char* buffer = new char[BUFFER_SIZE]; TIXMLASSERT(sizeof(error) <= sizeof(int)); - TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", ErrorIDToName(error), int(error), int(error), lineNum); + TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", + ErrorIDToName(error), static_cast(error), static_cast(error), lineNum); if (format) { size_t len = strlen(buffer); diff --git a/tinyxml2.h b/tinyxml2.h old mode 100755 new mode 100644 index 452ae95..8179f57 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -42,9 +42,6 @@ distribution. #endif #include -/* - TODO: intern strings instead of allocation. -*/ /* gcc: g++ -Wall -DTINYXML2_DEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe @@ -64,7 +61,7 @@ distribution. # pragma warning(disable: 4251) #endif -#ifdef _WIN32 +#ifdef _MSC_VER # ifdef TINYXML2_EXPORT # define TINYXML2_LIB __declspec(dllexport) # elif defined(TINYXML2_IMPORT) @@ -83,27 +80,27 @@ distribution. #if defined(TINYXML2_DEBUG) # if defined(_MSC_VER) # // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like -# define TIXMLASSERT( x ) if ( !((void)0,(x))) { __debugbreak(); } +# define TIXMLASSERT( x ) do { if ( !((void)0,(x))) { __debugbreak(); } } while(false) # elif defined (ANDROID_NDK) # include -# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } +# define TIXMLASSERT( x ) do { if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } } while(false) # else # include # define TIXMLASSERT assert # endif #else -# define TIXMLASSERT( x ) {} +# define TIXMLASSERT( x ) do {} while(false) #endif #endif /* Versioning, past 1.0.14: http://semver.org/ */ -static const int TIXML2_MAJOR_VERSION = 9; +static const int TIXML2_MAJOR_VERSION = 11; static const int TIXML2_MINOR_VERSION = 0; static const int TIXML2_PATCH_VERSION = 0; -#define TINYXML2_MAJOR_VERSION 9 +#define TINYXML2_MAJOR_VERSION 11 #define TINYXML2_MINOR_VERSION 0 #define TINYXML2_PATCH_VERSION 0 @@ -112,7 +109,7 @@ static const int TIXML2_PATCH_VERSION = 0; // system, and the capacity of the stack. On the other hand, it's a trivial // attack that can result from ill, malicious, or even correctly formed XML, // so there needs to be a limit in place. -static const int TINYXML2_MAX_ELEMENT_DEPTH = 100; +static const int TINYXML2_MAX_ELEMENT_DEPTH = 500; namespace tinyxml2 { @@ -202,7 +199,7 @@ class TINYXML2_LIB StrPair Has a small initial memory pool, so that low or no usage will not cause a call to new/delete */ -template +template class DynArray { public: @@ -230,9 +227,8 @@ class DynArray ++_size; } - T* PushArr( int count ) { - TIXMLASSERT( count >= 0 ); - TIXMLASSERT( _size <= INT_MAX - count ); + T* PushArr( size_t count ) { + TIXMLASSERT( _size <= SIZE_MAX - count ); EnsureCapacity( _size+count ); T* ret = &_mem[_size]; _size += count; @@ -245,7 +241,7 @@ class DynArray return _mem[_size]; } - void PopArr( int count ) { + void PopArr( size_t count ) { TIXMLASSERT( _size >= count ); _size -= count; } @@ -254,13 +250,13 @@ class DynArray return _size == 0; } - T& operator[](int i) { - TIXMLASSERT( i>= 0 && i < _size ); + T& operator[](size_t i) { + TIXMLASSERT( i < _size ); return _mem[i]; } - const T& operator[](int i) const { - TIXMLASSERT( i>= 0 && i < _size ); + const T& operator[](size_t i) const { + TIXMLASSERT( i < _size ); return _mem[i]; } @@ -269,18 +265,18 @@ class DynArray return _mem[ _size - 1]; } - int Size() const { + size_t Size() const { TIXMLASSERT( _size >= 0 ); return _size; } - int Capacity() const { + size_t Capacity() const { TIXMLASSERT( _allocated >= INITIAL_SIZE ); return _allocated; } - void SwapRemove(int i) { - TIXMLASSERT(i >= 0 && i < _size); + void SwapRemove(size_t i) { + TIXMLASSERT(i < _size); TIXMLASSERT(_size > 0); _mem[i] = _mem[_size - 1]; --_size; @@ -300,14 +296,14 @@ class DynArray DynArray( const DynArray& ); // not supported void operator=( const DynArray& ); // not supported - void EnsureCapacity( int cap ) { + void EnsureCapacity( size_t cap ) { TIXMLASSERT( cap > 0 ); if ( cap > _allocated ) { - TIXMLASSERT( cap <= INT_MAX / 2 ); - const int newAllocated = cap * 2; + TIXMLASSERT( cap <= SIZE_MAX / 2 / sizeof(T)); + const size_t newAllocated = cap * 2; T* newMem = new T[newAllocated]; TIXMLASSERT( newAllocated >= _size ); - memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs + memcpy( newMem, _mem, sizeof(T) * _size ); // warning: not using constructors, only works for PODs if ( _mem != _pool ) { delete [] _mem; } @@ -318,8 +314,8 @@ class DynArray T* _mem; T _pool[INITIAL_SIZE]; - int _allocated; // objects allocated - int _size; // number objects in use + size_t _allocated; // objects allocated + size_t _size; // number objects in use }; @@ -333,7 +329,7 @@ class MemPool MemPool() {} virtual ~MemPool() {} - virtual int ItemSize() const = 0; + virtual size_t ItemSize() const = 0; virtual void* Alloc() = 0; virtual void Free( void* ) = 0; virtual void SetTracked() = 0; @@ -343,7 +339,7 @@ class MemPool /* Template child class to create pools of the correct type. */ -template< int ITEM_SIZE > +template< size_t ITEM_SIZE > class MemPoolT : public MemPool { public: @@ -365,21 +361,21 @@ class MemPoolT : public MemPool _nUntracked = 0; } - virtual int ItemSize() const { + virtual size_t ItemSize() const override { return ITEM_SIZE; } - int CurrentAllocs() const { + size_t CurrentAllocs() const { return _currentAllocs; } - virtual void* Alloc() { + virtual void* Alloc() override{ if ( !_root ) { // Need a new block. - Block* block = new Block(); + Block* block = new Block; _blockPtrs.Push( block ); Item* blockItems = block->items; - for( int i = 0; i < ITEMS_PER_BLOCK - 1; ++i ) { + for( size_t i = 0; i < ITEMS_PER_BLOCK - 1; ++i ) { blockItems[i].next = &(blockItems[i + 1]); } blockItems[ITEMS_PER_BLOCK - 1].next = 0; @@ -398,7 +394,7 @@ class MemPoolT : public MemPool return result; } - virtual void Free( void* mem ) { + virtual void Free( void* mem ) override { if ( !mem ) { return; } @@ -416,11 +412,11 @@ class MemPoolT : public MemPool ITEM_SIZE, _nAllocs, _blockPtrs.Size() ); } - void SetTracked() { + void SetTracked() override { --_nUntracked; } - int Untracked() const { + size_t Untracked() const { return _nUntracked; } @@ -443,7 +439,7 @@ class MemPoolT : public MemPool union Item { Item* next; - char itemData[ITEM_SIZE]; + char itemData[static_cast(ITEM_SIZE)]; }; struct Block { Item items[ITEMS_PER_BLOCK]; @@ -451,10 +447,10 @@ class MemPoolT : public MemPool DynArray< Block*, 10 > _blockPtrs; Item* _root; - int _currentAllocs; - int _nAllocs; - int _maxAllocs; - int _nUntracked; + size_t _currentAllocs; + size_t _nAllocs; + size_t _maxAllocs; + size_t _nUntracked; }; @@ -603,7 +599,7 @@ class TINYXML2_LIB XMLUtil TIXMLASSERT( p ); TIXMLASSERT( q ); TIXMLASSERT( nChar >= 0 ); - return strncmp( p, q, nChar ) == 0; + return strncmp( p, q, static_cast(nChar) ) == 0; } inline static bool IsUTF8Continuation( const char p ) { @@ -732,6 +728,12 @@ class TINYXML2_LIB XMLNode return 0; } + // ChildElementCount was originally suggested by msteiger on the sourceforge page for TinyXML and modified by KB1SPH for TinyXML-2. + + int ChildElementCount(const char *value) const; + + int ChildElementCount() const; + /** The meaning of 'value' changes for the specific type. @verbatim Document: empty (NULL is returned, not an empty string) @@ -889,7 +891,7 @@ class TINYXML2_LIB XMLNode If the 'target' is null, then the nodes will be allocated in the current document. If 'target' - is specified, the memory will be allocated is the + is specified, the memory will be allocated in the specified XMLDocument. NOTE: This is probably not the correct tool to @@ -992,12 +994,12 @@ class TINYXML2_LIB XMLText : public XMLNode { friend class XMLDocument; public: - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; - virtual XMLText* ToText() { + virtual XMLText* ToText() override { return this; } - virtual const XMLText* ToText() const { + virtual const XMLText* ToText() const override { return this; } @@ -1010,14 +1012,14 @@ class TINYXML2_LIB XMLText : public XMLNode return _isCData; } - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; + virtual XMLNode* ShallowClone( XMLDocument* document ) const override; + virtual bool ShallowEqual( const XMLNode* compare ) const override; protected: explicit XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {} virtual ~XMLText() {} - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: bool _isCData; @@ -1032,23 +1034,23 @@ class TINYXML2_LIB XMLComment : public XMLNode { friend class XMLDocument; public: - virtual XMLComment* ToComment() { + virtual XMLComment* ToComment() override { return this; } - virtual const XMLComment* ToComment() const { + virtual const XMLComment* ToComment() const override { return this; } - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; + virtual XMLNode* ShallowClone( XMLDocument* document ) const override; + virtual bool ShallowEqual( const XMLNode* compare ) const override; protected: explicit XMLComment( XMLDocument* doc ); virtual ~XMLComment(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr) override; private: XMLComment( const XMLComment& ); // not supported @@ -1071,23 +1073,23 @@ class TINYXML2_LIB XMLDeclaration : public XMLNode { friend class XMLDocument; public: - virtual XMLDeclaration* ToDeclaration() { + virtual XMLDeclaration* ToDeclaration() override { return this; } - virtual const XMLDeclaration* ToDeclaration() const { + virtual const XMLDeclaration* ToDeclaration() const override { return this; } - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; + virtual XMLNode* ShallowClone( XMLDocument* document ) const override; + virtual bool ShallowEqual( const XMLNode* compare ) const override; protected: explicit XMLDeclaration( XMLDocument* doc ); virtual ~XMLDeclaration(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: XMLDeclaration( const XMLDeclaration& ); // not supported @@ -1106,23 +1108,23 @@ class TINYXML2_LIB XMLUnknown : public XMLNode { friend class XMLDocument; public: - virtual XMLUnknown* ToUnknown() { + virtual XMLUnknown* ToUnknown() override { return this; } - virtual const XMLUnknown* ToUnknown() const { + virtual const XMLUnknown* ToUnknown() const override { return this; } - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; + virtual XMLNode* ShallowClone( XMLDocument* document ) const override; + virtual bool ShallowEqual( const XMLNode* compare ) const override; protected: explicit XMLUnknown( XMLDocument* doc ); virtual ~XMLUnknown(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: XMLUnknown( const XMLUnknown& ); // not supported @@ -1274,13 +1276,13 @@ class TINYXML2_LIB XMLElement : public XMLNode SetValue( str, staticMem ); } - virtual XMLElement* ToElement() { + virtual XMLElement* ToElement() override { return this; } - virtual const XMLElement* ToElement() const { + virtual const XMLElement* ToElement() const override { return this; } - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; /** Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none @@ -1676,11 +1678,11 @@ class TINYXML2_LIB XMLElement : public XMLNode ElementClosingType ClosingType() const { return _closingType; } - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; + virtual XMLNode* ShallowClone( XMLDocument* document ) const override; + virtual bool ShallowEqual( const XMLNode* compare ) const override; protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override; private: XMLElement( XMLDocument* doc ); @@ -1704,7 +1706,8 @@ class TINYXML2_LIB XMLElement : public XMLNode enum Whitespace { PRESERVE_WHITESPACE, - COLLAPSE_WHITESPACE + COLLAPSE_WHITESPACE, + PEDANTIC_WHITESPACE }; @@ -1728,11 +1731,11 @@ class TINYXML2_LIB XMLDocument : public XMLNode XMLDocument( bool processEntities = true, Whitespace whitespaceMode = PRESERVE_WHITESPACE ); ~XMLDocument(); - virtual XMLDocument* ToDocument() { + virtual XMLDocument* ToDocument() override { TIXMLASSERT( this == _document ); return this; } - virtual const XMLDocument* ToDocument() const { + virtual const XMLDocument* ToDocument() const override { TIXMLASSERT( this == _document ); return this; } @@ -1829,7 +1832,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode @endverbatim */ void Print( XMLPrinter* streamer=0 ) const; - virtual bool Accept( XMLVisitor* visitor ) const; + virtual bool Accept( XMLVisitor* visitor ) const override; /** Create a new Element associated with @@ -1915,15 +1918,15 @@ class TINYXML2_LIB XMLDocument : public XMLNode void DeepCopy(XMLDocument* target) const; // internal - char* Identify( char* p, XMLNode** node ); + char* Identify( char* p, XMLNode** node, bool first ); // internal void MarkInUse(const XMLNode* const); - virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const { + virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const override{ return 0; } - virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const { + virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const override{ return false; } @@ -1977,11 +1980,11 @@ class TINYXML2_LIB XMLDocument : public XMLNode void PushDepth(); void PopDepth(); - template + template NodeType* CreateUnlinkedNode( MemPoolT& pool ); }; -template +template inline NodeType* XMLDocument::CreateUnlinkedNode( MemPoolT& pool ) { TIXMLASSERT( sizeof( NodeType ) == PoolElementSize ); @@ -2286,18 +2289,18 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor void PushDeclaration( const char* value ); void PushUnknown( const char* value ); - virtual bool VisitEnter( const XMLDocument& /*doc*/ ); - virtual bool VisitExit( const XMLDocument& /*doc*/ ) { + virtual bool VisitEnter( const XMLDocument& /*doc*/ ) override; + virtual bool VisitExit( const XMLDocument& /*doc*/ ) override { return true; } - virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute ); - virtual bool VisitExit( const XMLElement& element ); + virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute ) override; + virtual bool VisitExit( const XMLElement& element ) override; - virtual bool Visit( const XMLText& text ); - virtual bool Visit( const XMLComment& comment ); - virtual bool Visit( const XMLDeclaration& declaration ); - virtual bool Visit( const XMLUnknown& unknown ); + virtual bool Visit( const XMLText& text ) override; + virtual bool Visit( const XMLComment& comment ) override; + virtual bool Visit( const XMLDeclaration& declaration ) override; + virtual bool Visit( const XMLUnknown& unknown ) override; /** If in print to memory mode, return a pointer to @@ -2311,7 +2314,7 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor of the XML file in memory. (Note the size returned includes the terminating null.) */ - int CStrSize() const { + size_t CStrSize() const { return _buffer.Size(); } /** @@ -2371,7 +2374,7 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor }; -} // tinyxml2 +} // namespace tinyxml2 #if defined(_MSC_VER) # pragma warning(pop) diff --git a/vs/tinyxml2.sln b/vs/tinyxml2.sln deleted file mode 100644 index be0c85a..0000000 --- a/vs/tinyxml2.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31229.75 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "tinyxml2.vcxproj", "{7C72653A-E6F8-4584-B553-DE3A0AEE4356}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x64.ActiveCfg = Debug|x64 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x64.Build.0 = Debug|x64 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x86.ActiveCfg = Debug|Win32 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Debug|x86.Build.0 = Debug|Win32 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x64.ActiveCfg = Release|x64 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x64.Build.0 = Release|x64 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x86.ActiveCfg = Release|Win32 - {7C72653A-E6F8-4584-B553-DE3A0AEE4356}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8F57874D-F373-476E-93F5-EB09D74866E8} - EndGlobalSection -EndGlobal diff --git a/vs/tinyxml2.vcxproj b/vs/tinyxml2.vcxproj deleted file mode 100644 index be2a81a..0000000 --- a/vs/tinyxml2.vcxproj +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {7c72653a-e6f8-4584-b553-de3a0aee4356} - tinyxml2 - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - false - - - true - - - false - - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs/tinyxml2.vcxproj.filters b/vs/tinyxml2.vcxproj.filters deleted file mode 100644 index b729bf8..0000000 --- a/vs/tinyxml2.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - - - Source Files - - - \ No newline at end of file diff --git a/xmltest.cpp b/xmltest.cpp old mode 100755 new mode 100644 index 7f196f1..f7408d1 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1005,7 +1005,7 @@ int main( int argc, const char ** argv ) FILE* fp1 = fopen("resources/out/printer_1.xml", "w"); XMLPrinter printer(fp1); - printer.PushDeclaration("version = '1.0' enconding = 'utf-8'"); + printer.PushDeclaration("version = '1.0' encoding = 'utf-8'"); printer.OpenElement("foo"); printer.PushAttribute("attrib-text", "text"); @@ -1096,7 +1096,7 @@ int main( int argc, const char ** argv ) const XMLDeclaration* declaration = cdoc.FirstChild()->ToDeclaration(); const char* declaration_value = declaration->Value(); - XMLTest("PushDeclaration() test", "version = '1.0' enconding = 'utf-8'", declaration_value); + XMLTest("PushDeclaration() test", "version = '1.0' encoding = 'utf-8'", declaration_value); } } @@ -1642,7 +1642,7 @@ int main( int argc, const char ** argv ) static const char* result = "\xef\xbb\xbf"; XMLTest( "BOM and default declaration", result, printer.CStr(), false ); - XMLTest( "CStrSize", 42, printer.CStrSize(), false ); + XMLTest( "CStrSize", true, printer.CStrSize() == 42, false ); } { const char* xml = "GetText()); + } + + { + const char* xml = " This \nis ' text ' "; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", " This \nis ' text ' ", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n This is ' text ' \n"; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", " \n This is ' text ' \n", doc.FirstChildElement()->GetText()); + } + + // Following cases are for text that is all whitespace which are not preserved intentionally + { + const char* xml = " "; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " "; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); + } + + { + const char* xml = "\n\n"; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n"; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n \n "; + XMLDocument doc(true, PRESERVE_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with whitespace preserved", false, doc.Error()); + XMLTest("Whitespace preserved", true, 0 == doc.FirstChildElement()->GetText()); + } + + // ----------- Pedantic Whitespace ------------ + { + const char* xml = "This is ' \n\n text '"; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", "This is ' \n\n text '", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " This \nis ' text ' "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " This \nis ' text ' ", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n This is ' text ' \n"; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " \n This is ' text ' \n", doc.FirstChildElement()->GetText()); + } + + // Following cases are for text that is all whitespace which is preserved with pedantic mode + { + const char* xml = " "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " ", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " ", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = "\n\n\n"; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", "\n\n", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n \n "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " \n", doc.FirstChildElement()->GetText()); + } + + { + const char* xml = " \n \n "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " \n \n ", doc.FirstChildElement()->GetText()); + } + + // Following cases are for checking nested elements are still parsed with pedantic whitespace + { + const char* xml = "\n\t This is nested text \n "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse nested elements with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " This is nested text ", doc.RootElement()->FirstChildElement()->GetText()); + } + + { + const char* xml = " \n"; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse nested elements with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", " ", doc.RootElement()->FirstChildElement()->GetText()); + } + + { + const char* xml = " \n "; + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.Parse(xml); + XMLTest("Parse nested elements with pedantic whitespace", false, doc.Error()); + XMLTest("Pedantic whitespace", true, 0 == doc.RootElement()->FirstChildElement()->GetText()); + } + + // Check sample xml can be parsed with pedantic mode + { + XMLDocument doc(true, PEDANTIC_WHITESPACE); + doc.LoadFile("resources/dream.xml"); + XMLTest("Load dream.xml with pedantic whitespace mode", false, doc.Error()); + + XMLTest("Dream", "xml version=\"1.0\"", + doc.FirstChild()->ToDeclaration()->Value()); + XMLTest("Dream", true, doc.FirstChild()->NextSibling()->ToUnknown() != 0); + XMLTest("Dream", "DOCTYPE PLAY SYSTEM \"play.dtd\"", + doc.FirstChild()->NextSibling()->ToUnknown()->Value()); + XMLTest("Dream", "And Robin shall restore amends.", + doc.LastChild()->LastChild()->LastChild()->LastChild()->LastChildElement()->GetText()); + } + { // An assert should not fire. const char* xml = ""; @@ -2149,6 +2321,12 @@ int main( int argc, const char ** argv ) XMLTest( "Should be no error initially", false, doc.Error() ); doc.LoadFile( "resources/no-such-file.xml" ); XMLTest( "No such file - should fail", true, doc.Error() ); + + doc.LoadFile("resources/dream.xml"); + XMLTest("Error should be cleared", false, doc.Error()); + + doc.LoadFile( "resources/xmltest-5330.xml" ); + XMLTest( "parse errors occur - should fail", true, doc.Error() ); doc.LoadFile( "resources/dream.xml" ); XMLTest( "Error should be cleared", false, doc.Error() ); @@ -2461,7 +2639,7 @@ int main( int argc, const char ** argv ) "\n" // 2 DecL "\r\n" // 3 Element "\n" // 4 - "text contining new line \n" // 5 Text + "text containing new line \n" // 5 Text " and also containing crlf \r\n" // 6 "Text"; + XMLDocument doc; + doc.Parse(xml); + const char* value = doc.FirstChildElement()->Attribute("value"); + const char* value2 = doc.FirstChildElement()->Attribute("value2"); + XMLTest("Test attribute encode", false, doc.Error()); + XMLTest("Test decimal value", value, "12A34"); + XMLTest("Test hex encode", value2, "56B78"); + } + + { + const char* xml = "Text"; + XMLDocument doc; + doc.Parse(xml); + const char* value = doc.FirstChildElement()->Attribute("value"); + const char* value2 = doc.FirstChildElement()->Attribute("value2"); + const char* value3 = doc.FirstChildElement()->Attribute("value3"); + const char* value4 = doc.FirstChildElement()->Attribute("value4"); + const char* value5 = doc.FirstChildElement()->Attribute("value5"); + XMLTest("Test attribute encode", false, doc.Error()); + XMLTest("Test attribute encode too long value", value, "&#ABC9000000065;"); // test long value + XMLTest("Test attribute encode out of unicode range", value2, "�"); // out of unicode range + XMLTest("Test attribute encode out of int max value", value3, "�"); // out of int max value + XMLTest("Test attribute encode with a Hex value", value4, "E"); // hex value in unicode value + XMLTest("Test attribute encode with a Hex value", value5, "!"); // hex value in unicode value + } + // ----------- Performance tracking -------------- { #if defined( _MSC_VER )