wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src language.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src language.cpp
Date: Thu, 09 Sep 2004 18:44:33 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/09/09 22:39:03

Modified files:
        src            : language.cpp 

Log message:
        catch return value from setlocale, warn on stderr on error

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/language.cpp.diff?tr1=1.42&tr2=1.43&r1=text&r2=text

Patches:
Index: wesnoth/src/language.cpp
diff -u wesnoth/src/language.cpp:1.42 wesnoth/src/language.cpp:1.43
--- wesnoth/src/language.cpp:1.42       Thu Sep  9 22:32:41 2004
+++ wesnoth/src/language.cpp    Thu Sep  9 22:39:02 2004
@@ -1,4 +1,4 @@
-/* $Id: language.cpp,v 1.42 2004/09/09 22:32:41 ydirson Exp $ */
+/* $Id: language.cpp,v 1.43 2004/09/09 22:39:02 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -114,7 +114,11 @@
        if (setenv ("LC_ALL", locale, 1) == -1)
                std::cerr << "setenv LC_ALL failed: " << strerror(errno);
 
-       return setlocale (category, locale);
+       char* res = setlocale (category, locale);
+       if (res == NULL)
+               std::cerr << "WARNING: setlocale() failed for "
+                         << locale << ".\n";
+       return res;
 }
 
 bool set_language(const language_def& locale)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]