0f3735e
From 216140bd0109a1c0829f9296b5abd971bee263c7 Mon Sep 17 00:00:00 2001
0f3735e
From: Lubomir Rintel <lkundrak@v3.sk>
0f3735e
Date: Sat, 14 Nov 2015 18:19:33 +0100
0f3735e
Subject: [PATCH 7/7] Rename TiXmlNode::ELEMENT and ::TEXT
0f3735e
0f3735e
Tinyxml 2.6 renamed it and this fixes build against that version
0f3735e
available system-wide. We could update the in-tre version as well, but
0f3735e
this seems like a lesser effort.
0f3735e
---
0f3735e
 src/core/AtanuaConfig.cpp             |  4 ++--
0f3735e
 src/core/fileio.cpp                   | 12 ++++++------
0f3735e
 src/core/pluginchipfactory.cpp        |  4 ++--
0f3735e
 src/tinyxml_2_5_3/tinyxml/tinyxml.cpp |  6 +++---
0f3735e
 src/tinyxml_2_5_3/tinyxml/tinyxml.h   | 10 +++++-----
0f3735e
 5 files changed, 18 insertions(+), 18 deletions(-)
0f3735e
0f3735e
diff --git a/src/core/AtanuaConfig.cpp b/src/core/AtanuaConfig.cpp
0f3735e
index dd7d64f..acc5d83 100644
0f3735e
--- a/src/core/AtanuaConfig.cpp
0f3735e
+++ b/src/core/AtanuaConfig.cpp
0f3735e
@@ -191,14 +191,14 @@ void AtanuaConfig::load()
0f3735e
         TiXmlNode *root;
0f3735e
         for (root = doc.FirstChild(); root != 0; root = root->NextSibling())
0f3735e
         {
0f3735e
-            if (root->Type() == TiXmlNode::ELEMENT)
0f3735e
+            if (root->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
             {
0f3735e
                 if (stricmp(root->Value(), "AtanuaConfig")==0)
0f3735e
                 {
0f3735e
                     TiXmlNode *part;
0f3735e
                     for (part = root->FirstChild(); part != 0; part = part->NextSibling())
0f3735e
                     {
0f3735e
-                        if (part->Type() == TiXmlNode::ELEMENT)
0f3735e
+                        if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
                         {
0f3735e
 
0f3735e
                             if (stricmp(part->Value(), "FontSystem") == 0)
0f3735e
diff --git a/src/core/fileio.cpp b/src/core/fileio.cpp
0f3735e
index a5866f8..d37bd9a 100644
0f3735e
--- a/src/core/fileio.cpp
0f3735e
+++ b/src/core/fileio.cpp
0f3735e
@@ -327,7 +327,7 @@ void do_loadxml(FILE * f, int box)
0f3735e
 
0f3735e
     for (pChild = doc.FirstChild(); pChild != 0; pChild = pChild->NextSibling())
0f3735e
     {
0f3735e
-        if (pChild->Type() == TiXmlNode::ELEMENT)
0f3735e
+        if (pChild->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
         {
0f3735e
             if (stricmp(pChild->Value(), "Atanua") == 0)
0f3735e
             {
0f3735e
@@ -338,7 +338,7 @@ void do_loadxml(FILE * f, int box)
0f3735e
                 TiXmlNode *part;
0f3735e
                 for (part = pChild->FirstChild(); part != 0; part = part->NextSibling())
0f3735e
                 {
0f3735e
-                    if (part->Type() == TiXmlNode::ELEMENT)
0f3735e
+                    if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
                     {
0f3735e
                         if (stricmp(part->Value(), "Chip")==0)
0f3735e
                         {
0f3735e
@@ -421,7 +421,7 @@ void do_loadxml(FILE * f, int box)
0f3735e
                                     TiXmlNode *text;
0f3735e
                                     for (text = part->FirstChild(); text != 0; text = text->NextSibling())
0f3735e
                                     {
0f3735e
-                                        if (text->Type() == TiXmlNode::TEXT)
0f3735e
+                                        if (text->Type() == TiXmlNode::TINYXML_TEXT)
0f3735e
                                         {
0f3735e
 
0f3735e
                                             MemoryFile f;
0f3735e
@@ -731,7 +731,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
0f3735e
 
0f3735e
     for (pChild = doc.FirstChild(); pChild != 0; pChild = pChild->NextSibling())
0f3735e
     {
0f3735e
-        if (pChild->Type() == TiXmlNode::ELEMENT)
0f3735e
+        if (pChild->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
         {
0f3735e
             if (stricmp(pChild->Value(), "Atanua") == 0)
0f3735e
             {
0f3735e
@@ -751,7 +751,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
0f3735e
                 TiXmlNode *part;
0f3735e
                 for (part = pChild->FirstChild(); part != 0; part = part->NextSibling())
0f3735e
                 {
0f3735e
-                    if (part->Type() == TiXmlNode::ELEMENT)
0f3735e
+                    if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
                     {
0f3735e
                         if (stricmp(part->Value(), "Chip")==0)
0f3735e
                         {
0f3735e
@@ -832,7 +832,7 @@ void do_loadxmltobinary(FILE * f, File * outf, BoxcacheData * bd)
0f3735e
                                     TiXmlNode *text;
0f3735e
                                     for (text = part->FirstChild(); text != 0; text = text->NextSibling())
0f3735e
                                     {
0f3735e
-                                        if (text->Type() == TiXmlNode::TEXT)
0f3735e
+                                        if (text->Type() == TiXmlNode::TINYXML_TEXT)
0f3735e
                                         {
0f3735e
                                             const char *v = text->Value();
0f3735e
                                             int wholebyte = 0;
0f3735e
diff --git a/src/core/pluginchipfactory.cpp b/src/core/pluginchipfactory.cpp
0f3735e
index 01a9192..5e7ee32 100644
0f3735e
--- a/src/core/pluginchipfactory.cpp
0f3735e
+++ b/src/core/pluginchipfactory.cpp
0f3735e
@@ -44,14 +44,14 @@ PluginChipFactory::PluginChipFactory()
0f3735e
     TiXmlNode *root;
0f3735e
     for (root = doc.FirstChild(); root != 0; root = root->NextSibling())
0f3735e
     {
0f3735e
-        if (root->Type() == TiXmlNode::ELEMENT)
0f3735e
+        if (root->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
         {
0f3735e
             if (stricmp(root->Value(), "AtanuaConfig")==0)
0f3735e
             {
0f3735e
                 TiXmlNode *part;
0f3735e
                 for (part = root->FirstChild(); part != 0; part = part->NextSibling())
0f3735e
                 {
0f3735e
-                    if (part->Type() == TiXmlNode::ELEMENT)
0f3735e
+                    if (part->Type() == TiXmlNode::TINYXML_ELEMENT)
0f3735e
                     {
0f3735e
                         if (stricmp(part->Value(), "Plugin") == 0)
0f3735e
                         {
0f3735e
diff --git a/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp b/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
0f3735e
index 5de21f6..09e9686 100644
0f3735e
--- a/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
0f3735e
+++ b/src/tinyxml_2_5_3/tinyxml/tinyxml.cpp
0f3735e
@@ -502,7 +502,7 @@ const TiXmlDocument* TiXmlNode::GetDocument() const
0f3735e
 
0f3735e
 
0f3735e
 TiXmlElement::TiXmlElement (const char * _value)
0f3735e
-	: TiXmlNode( TiXmlNode::ELEMENT )
0f3735e
+	: TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
0f3735e
 {
0f3735e
 	firstChild = lastChild = 0;
0f3735e
 	value = _value;
0f3735e
@@ -511,7 +511,7 @@ TiXmlElement::TiXmlElement (const char * _value)
0f3735e
 
0f3735e
 #ifdef TIXML_USE_STL
0f3735e
 TiXmlElement::TiXmlElement( const std::string& _value ) 
0f3735e
-	: TiXmlNode( TiXmlNode::ELEMENT )
0f3735e
+	: TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
0f3735e
 {
0f3735e
 	firstChild = lastChild = 0;
0f3735e
 	value = _value;
0f3735e
@@ -520,7 +520,7 @@ TiXmlElement::TiXmlElement( const std::string& _value )
0f3735e
 
0f3735e
 
0f3735e
 TiXmlElement::TiXmlElement( const TiXmlElement& copy)
0f3735e
-	: TiXmlNode( TiXmlNode::ELEMENT )
0f3735e
+	: TiXmlNode( TiXmlNode::TINYXML_ELEMENT )
0f3735e
 {
0f3735e
 	firstChild = lastChild = 0;
0f3735e
 	copy.CopyTo( this );	
0f3735e
diff --git a/src/tinyxml_2_5_3/tinyxml/tinyxml.h b/src/tinyxml_2_5_3/tinyxml/tinyxml.h
0f3735e
index c6f40cc..2f9e25e 100644
0f3735e
--- a/src/tinyxml_2_5_3/tinyxml/tinyxml.h
0f3735e
+++ b/src/tinyxml_2_5_3/tinyxml/tinyxml.h
0f3735e
@@ -463,10 +463,10 @@ public:
0f3735e
 	enum NodeType
0f3735e
 	{
0f3735e
 		DOCUMENT,
0f3735e
-		ELEMENT,
0f3735e
+		TINYXML_ELEMENT,
0f3735e
 		COMMENT,
0f3735e
 		UNKNOWN,
0f3735e
-		TEXT,
0f3735e
+		TINYXML_TEXT,
0f3735e
 		DECLARATION,
0f3735e
 		TYPECOUNT
0f3735e
 	};
0f3735e
@@ -1209,7 +1209,7 @@ public:
0f3735e
 		normal, encoded text. If you want it be output as a CDATA text
0f3735e
 		element, set the parameter _cdata to 'true'
0f3735e
 	*/
0f3735e
-	TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TEXT)
0f3735e
+	TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
0f3735e
 	{
0f3735e
 		SetValue( initValue );
0f3735e
 		cdata = false;
0f3735e
@@ -1218,14 +1218,14 @@ public:
0f3735e
 
0f3735e
 	#ifdef TIXML_USE_STL
0f3735e
 	/// Constructor.
0f3735e
-	TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TEXT)
0f3735e
+	TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)
0f3735e
 	{
0f3735e
 		SetValue( initValue );
0f3735e
 		cdata = false;
0f3735e
 	}
0f3735e
 	#endif
0f3735e
 
0f3735e
-	TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TEXT )	{ copy.CopyTo( this ); }
0f3735e
+	TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT )	{ copy.CopyTo( this ); }
0f3735e
 	void operator=( const TiXmlText& base )							 	{ base.CopyTo( this ); }
0f3735e
 
0f3735e
 	// Write this text object to a FILE stream.
0f3735e
-- 
0f3735e
2.5.0
0f3735e