[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src gettext.cpp gettext.hpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src gettext.cpp gettext.hpp |
Date: |
Sun, 05 Dec 2004 13:31:23 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/12/05 18:24:44
Modified files:
src : gettext.cpp gettext.hpp
Log message:
Because gettext is allowed to do as it pleases when it is fed with an
empty string, let's workaround it by adding a new function.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gettext.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gettext.hpp.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: wesnoth/src/gettext.cpp
diff -u wesnoth/src/gettext.cpp:1.6 wesnoth/src/gettext.cpp:1.7
--- wesnoth/src/gettext.cpp:1.6 Thu Nov 18 04:08:32 2004
+++ wesnoth/src/gettext.cpp Sun Dec 5 18:24:44 2004
@@ -4,6 +4,11 @@
#include <cstring>
+char const *egettext(char const *msgid)
+{
+ return msgid[0] == '\0' ? msgid : gettext(msgid);
+}
+
const char* sgettext (const char *msgid)
{
const char *msgval = gettext (msgid);
Index: wesnoth/src/gettext.hpp
diff -u wesnoth/src/gettext.hpp:1.4 wesnoth/src/gettext.hpp:1.5
--- wesnoth/src/gettext.hpp:1.4 Sat Oct 30 16:33:48 2004
+++ wesnoth/src/gettext.hpp Sun Dec 5 18:24:44 2004
@@ -5,6 +5,8 @@
// gettext-related declarations
#include <libintl.h>
+
+const char* egettext (const char*);
const char* sgettext (const char*);
const char* dsgettext (const char * domainname, const char *msgid);
std::string vgettext (const char*,const string_map&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src gettext.cpp gettext.hpp,
Guillaume Melquiond <=