diff options
| author | jhurst <jhurst@cinecert.com> | 2015-10-07 16:41:23 +0000 |
|---|---|---|
| committer | jhurst <> | 2015-10-07 16:41:23 +0000 |
| commit | af6a1e4ef13dcf5811ccd9eb6b63d21bdc88dc70 (patch) | |
| tree | 021ae744f611d9bfd2f8832c665351132205ab0b /src/KM_xml.cpp | |
| parent | 77200515d9acee07988f26dadfa37ffbd169cdfb (diff) | |
o Moved personal dev environment from older gcc to newer clang. Many small changes were made to satisfy the new compiler:
- Altered many printf format codes to use the correct type for the given integer type
- Parenthesized some expressions to clarify previously ambiguous expectations of precedence
- Created macro KM_MACOSX for use in OS-specific code selection
- Removed last uses of the old C-language abs(), now using Kumu::xabs()
- Removed last uses of the old C-language atoi()
o Added platform-independent call Kumu::GetExecutablePath() (test with win32)
o Fixed a bug that was causing Array properties to be written without the (count, length) header (from PAL)
o Fixed Win32 build (from Crowe)
o Added imlementation of SMPTE ST 2092-1 pink noise generator
o Added pinkwave CLI utility
o Added font support to the IMF timed-text wrapper
Diffstat (limited to 'src/KM_xml.cpp')
| -rw-r--r-- | src/KM_xml.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/KM_xml.cpp b/src/KM_xml.cpp index 2fe4e33..8345630 100644 --- a/src/KM_xml.cpp +++ b/src/KM_xml.cpp @@ -61,13 +61,13 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. XERCES_CPP_NAMESPACE_USE -namespace Kumu { - void init_xml_dom(); - typedef std::basic_string<XMLCh> XercesString; - bool UTF_8_to_XercesString(const std::string& in_str, XercesString& out_str); - bool UTF_8_to_XercesString(const char* in_str, XercesString& out_str); - bool XercesString_to_UTF_8(const XercesString& in_str, std::string& out_str); - bool XercesString_to_UTF_8(const XMLCh* in_str, std::string& out_str); +extern "C" +{ + void kumu_init_xml_dom(); + bool kumu_UTF_8_to_XercesString(const std::string& in_str, std::basic_string<XMLCh>& out_str); + bool kumu_UTF_8_to_XercesString_p(const char* in_str, std::basic_string<XMLCh>& out_str); + bool kumu_XercesString_to_UTF_8(const std::basic_string<XMLCh>& in_str, std::string& out_str); + bool kumu_XercesString_to_UTF_8_p(const XMLCh* in_str, std::string& out_str); } #endif @@ -651,7 +651,7 @@ static const XMLCh sg_label_UTF_8[] = { chLatin_U, chLatin_T, chLatin_F, // void -Kumu::init_xml_dom() +kumu_init_xml_dom() { if ( ! sg_xml_init ) { @@ -691,13 +691,13 @@ Kumu::init_xml_dom() // bool -Kumu::XercesString_to_UTF_8(const Kumu::XercesString& in_str, std::string& out_str) { - return XercesString_to_UTF_8(in_str.c_str(), out_str); +kumu_XercesString_to_UTF_8(const std::basic_string<XMLCh>& in_str, std::string& out_str) { + return kumu_XercesString_to_UTF_8_p(in_str.c_str(), out_str); } // bool -Kumu::XercesString_to_UTF_8(const XMLCh* in_str, std::string& out_str) +kumu_XercesString_to_UTF_8_p(const XMLCh* in_str, std::string& out_str) { assert(in_str); assert(sg_xml_init); @@ -734,13 +734,13 @@ Kumu::XercesString_to_UTF_8(const XMLCh* in_str, std::string& out_str) // bool -Kumu::UTF_8_to_XercesString(const std::string& in_str, Kumu::XercesString& out_str) { - return UTF_8_to_XercesString(in_str.c_str(), out_str); +kumu_UTF_8_to_XercesString(const std::string& in_str, std::basic_string<XMLCh>& out_str) { + return kumu_UTF_8_to_XercesString_p(in_str.c_str(), out_str); } // bool -Kumu::UTF_8_to_XercesString(const char* in_str, Kumu::XercesString& out_str) +kumu_UTF_8_to_XercesString_p(const char* in_str, std::basic_string<XMLCh>& out_str) { assert(in_str); assert(sg_xml_init); @@ -848,7 +848,7 @@ public: assert(x_name); std::string tx_name; - if ( ! XercesString_to_UTF_8(x_name, tx_name) ) + if ( ! kumu_XercesString_to_UTF_8(x_name, tx_name) ) m_HasEncodeErrors = true; const char* name = tx_name.c_str(); @@ -878,10 +878,10 @@ public: for ( ui32_t i = 0; i < a_len; i++) { std::string aname, value; - if ( ! XercesString_to_UTF_8(attributes.getName(i), aname) ) + if ( ! kumu_XercesString_to_UTF_8(attributes.getName(i), aname) ) m_HasEncodeErrors = true; - if ( ! XercesString_to_UTF_8(attributes.getValue(i), value) ) + if ( ! kumu_XercesString_to_UTF_8(attributes.getValue(i), value) ) m_HasEncodeErrors = true; const char* x_aname = aname.c_str(); @@ -917,7 +917,7 @@ public: if ( length > 0 ) { std::string tmp; - if ( ! XercesString_to_UTF_8(chars, tmp) ) + if ( ! kumu_XercesString_to_UTF_8(chars, tmp) ) m_HasEncodeErrors = true; m_Scope.top()->AppendBody(tmp); @@ -934,7 +934,7 @@ Kumu::XMLElement::ParseString(const char* document, ui32_t doc_len) return false; } - init_xml_dom(); + kumu_init_xml_dom(); int errorCount = 0; SAXParser* parser = new SAXParser(); @@ -992,8 +992,8 @@ Kumu::XMLElement::ParseFirstFromString(const char* document, ui32_t doc_len) return false; } - init_xml_dom(); - + kumu_init_xml_dom(); + int errorCount = 0; SAXParser* parser = new SAXParser(); |
