From bad730dd0de24b2b17b91922c0c7f2b31b7b4d9b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 10 Jan 2012 18:43:15 +0300 Subject: Move libxml2 includes to xml.h --- src/main.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 71794487c..9bffcfa2a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,13 +27,12 @@ #include "client.h" #include "logger.h" -#include - #include #include #include #include "utils/stringutils.h" +#include "utils/xml.h" #ifdef __MINGW32__ #include @@ -210,23 +209,6 @@ static void parseOptions(int argc, char *argv[], Client::Options &options) extern "C" char const *_nl_locale_name_default(void); #endif -static void xmlNullLogger(void *ctx A_UNUSED, const char *msg A_UNUSED, ...) -{ - // Does nothing, that's the whole point of it -} - -// Initialize libxml2 and check for potential ABI mismatches between -// compiled version and the shared library actually used. -static void initXML() -{ - xmlInitParser(); - LIBXML_TEST_VERSION; - - // Suppress libxml2 error messages - xmlSetGenericErrorFunc(nullptr, xmlNullLogger); -} - - int main(int argc, char *argv[]) { #if defined(__MINGW32__) @@ -262,7 +244,7 @@ int main(int argc, char *argv[]) atexit((void(*)()) PHYSFS_deinit); - initXML(); + XML::initXML(); #ifdef WIN32 SetCurrentDirectory(PHYSFS_getBaseDir()); -- cgit v1.2.3-60-g2f50