diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5eceee77b..b49b38300 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -107,12 +107,12 @@ static void parseOptions(int argc, char *argv[], Client::Options &options) { "chat-log-dir", required_argument, 0, 'L' }, { "screenshot-dir", required_argument, 0, 'i' }, { "safemode", no_argument, 0, 'm' }, - { 0, 0, 0, 0 } + { nullptr, 0, 0, 0 } }; while (optind < argc) { - int result = getopt_long(argc, argv, optstring, long_options, NULL); + int result = getopt_long(argc, argv, optstring, long_options, nullptr); if (result == -1) break; @@ -191,27 +191,6 @@ static void parseOptions(int argc, char *argv[], Client::Options &options) extern "C" char const *_nl_locale_name_default(void); #endif -static void initInternationalization() -{ -#if ENABLE_NLS -#ifdef WIN32 - putenv(("LANG=" + std::string(_nl_locale_name_default())).c_str()); - // mingw doesn't like LOCALEDIR to be defined for some reason - bindtextdomain("manaplus", "translations/"); -#else -#ifdef ENABLE_PORTABLE - bindtextdomain("manaplus", (std::string(PHYSFS_getBaseDir()) - + "../locale/").c_str()); -#else - bindtextdomain("manaplus", LOCALEDIR); -#endif -#endif - setlocale(LC_MESSAGES, ""); - bind_textdomain_codeset("manaplus", "UTF-8"); - textdomain("manaplus"); -#endif -} - static void xmlNullLogger(void *ctx A_UNUSED, const char *msg A_UNUSED, ...) { // Does nothing, that's the whole point of it @@ -225,7 +204,7 @@ static void initXML() LIBXML_TEST_VERSION; // Suppress libxml2 error messages - xmlSetGenericErrorFunc(NULL, xmlNullLogger); + xmlSetGenericErrorFunc(nullptr, xmlNullLogger); } @@ -260,8 +239,6 @@ int main(int argc, char *argv[]) return 1; } - initInternationalization(); - atexit((void(*)()) PHYSFS_deinit); initXML(); |