gettext.cpp: Fix syntax error when using MSVC

Also remove trailing whitespaces from the file
master
jh10001 2015-09-01 02:36:02 +08:00 committed by est31
parent 714b68add2
commit dce9468925
1 changed files with 7 additions and 7 deletions

View File

@ -167,7 +167,7 @@ void init_gettext(const char *path, const std::string &configured_language) {
if (parameters != "") { if (parameters != "") {
ptr_parameters = parameters.c_str(); ptr_parameters = parameters.c_str();
} }
/** users may start by short name in commandline without extention **/ /** users may start by short name in commandline without extention **/
std::string appname = argv[0]; std::string appname = argv[0];
if (appname.substr(appname.length() - 4) != ".exe") { if (appname.substr(appname.length() - 4) != ".exe") {
@ -184,7 +184,7 @@ void init_gettext(const char *path, const std::string &configured_language) {
NULL, NULL,
&startupinfo, &startupinfo,
&processinfo)) { &processinfo)) {
char buffer[1024]; char buffer[1024];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL, NULL,
GetLastError(), GetLastError(),
@ -202,14 +202,14 @@ void init_gettext(const char *path, const std::string &configured_language) {
else { else {
exit(0); exit(0);
} }
}
#else #else
errorstream << "*******************************************************" << std::endl; errorstream << "*******************************************************" << std::endl;
errorstream << "Can't apply locale workaround for server!" << std::endl; errorstream << "Can't apply locale workaround for server!" << std::endl;
errorstream << "Expect language to be broken!" << std::endl; errorstream << "Expect language to be broken!" << std::endl;
errorstream << "*******************************************************" << std::endl; errorstream << "*******************************************************" << std::endl;
#endif #endif
}
setlocale(LC_ALL,configured_language.c_str()); setlocale(LC_ALL,configured_language.c_str());
#else // Mingw #else // Mingw