summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-10 18:43:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-10 18:43:15 +0300
commitbad730dd0de24b2b17b91922c0c7f2b31b7b4d9b (patch)
tree06c1d723a051b57cc4c107df1d7bb00296dbe99b /src/main.cpp
parent08dc59e8bff25736d15d11313e0296f60e248e0a (diff)
downloadmanaplus-bad730dd0de24b2b17b91922c0c7f2b31b7b4d9b.tar.gz
manaplus-bad730dd0de24b2b17b91922c0c7f2b31b7b4d9b.tar.bz2
manaplus-bad730dd0de24b2b17b91922c0c7f2b31b7b4d9b.tar.xz
manaplus-bad730dd0de24b2b17b91922c0c7f2b31b7b4d9b.zip
Move libxml2 includes to xml.h
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 2 insertions, 20 deletions
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 <libxml/parser.h>
-
#include <getopt.h>
#include <iostream>
#include <physfs.h>
#include "utils/stringutils.h"
+#include "utils/xml.h"
#ifdef __MINGW32__
#include <windows.h>
@@ -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());