tNecessary #defines for NLS moved into a separate nls.h header file - vaccinewa… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b561f151374a4e7b19c84e2eb4ec514bffe352fa | |
parent b303528750c77ad6dad59ead543ac18f856e52eb | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 1 Oct 2001 18:01:00 +0000 | |
Necessary #defines for NLS moved into a separate nls.h header file | |
Diffstat: | |
M src/AIPlayer.c | 1 + | |
M src/curses_client.c | 1 + | |
M src/dopewars.c | 1 + | |
M src/dopewars.h | 19 ------------------- | |
M src/gtk_client.c | 1 + | |
M src/gtkport.c | 1 + | |
M src/message.c | 3 ++- | |
A src/nls.h | 46 +++++++++++++++++++++++++++++… | |
M src/serverside.c | 1 + | |
M src/winmain.c | 2 ++ | |
10 files changed, 56 insertions(+), 20 deletions(-) | |
--- | |
diff --git a/src/AIPlayer.c b/src/AIPlayer.c | |
t@@ -31,6 +31,7 @@ | |
#include "dopeos.h" | |
#include "dopewars.h" | |
#include "message.h" | |
+#include "nls.h" | |
#include "tstring.h" | |
#include "AIPlayer.h" | |
diff --git a/src/curses_client.c b/src/curses_client.c | |
t@@ -38,6 +38,7 @@ | |
#include "dopeos.h" | |
#include "dopewars.h" | |
#include "message.h" | |
+#include "nls.h" | |
#include "serverside.h" | |
#include "tstring.h" | |
diff --git a/src/dopewars.c b/src/dopewars.c | |
t@@ -45,6 +45,7 @@ | |
#include "dopeos.h" | |
#include "gtk_client.h" | |
#include "message.h" | |
+#include "nls.h" | |
#include "serverside.h" | |
#include "tstring.h" | |
#include "AIPlayer.h" | |
diff --git a/src/dopewars.h b/src/dopewars.h | |
t@@ -44,25 +44,6 @@ | |
#include <glib.h> | |
#include "dopeos.h" | |
-/* Internationalization stuff */ | |
- | |
-#ifdef ENABLE_NLS | |
-#include <locale.h> | |
-#include <libintl.h> | |
-#define _(String) gettext (String) | |
-#ifdef gettext_noop | |
-#define N_(String) gettext_noop (String) | |
-#else | |
-#define N_(String) (String) | |
-#endif | |
-#else | |
-#define gettext(String) (String) | |
-#define dgettext(Domain,Message) (Message) | |
-#define dcgettext(Domain,Message,Type) (Message) | |
-#define _(String) (String) | |
-#define N_(String) (String) | |
-#endif | |
- | |
/* Make price_t be a long long if the type is supported by the compiler */ | |
#if SIZEOF_LONG_LONG == 0 | |
typedef long price_t; | |
diff --git a/src/gtk_client.c b/src/gtk_client.c | |
t@@ -31,6 +31,7 @@ | |
#include "dopewars.h" | |
#include "gtk_client.h" | |
#include "message.h" | |
+#include "nls.h" | |
#include "serverside.h" | |
#include "tstring.h" | |
#include "gtkport.h" | |
diff --git a/src/gtkport.c b/src/gtkport.c | |
t@@ -28,6 +28,7 @@ | |
#include <glib.h> | |
#include "gtkport.h" | |
+#include "nls.h" | |
/* Internationalization stuff */ | |
diff --git a/src/message.c b/src/message.c | |
t@@ -39,9 +39,10 @@ | |
#include <glib.h> | |
#include "dopeos.h" | |
#include "dopewars.h" | |
+#include "message.h" | |
+#include "nls.h" | |
#include "serverside.h" | |
#include "tstring.h" | |
-#include "message.h" | |
/* Maximum sizes (in bytes) of read and write buffers - connections should | |
be dropped if either buffer is filled */ | |
diff --git a/src/nls.h b/src/nls.h | |
t@@ -0,0 +1,46 @@ | |
+/* nls.h Header file for NLS (internationalization) defines */ | |
+/* Copyright (C) 1998-2001 Ben Webb */ | |
+/* Email: [email protected] */ | |
+/* WWW: http://bellatrix.pcl.ox.ac.uk/~ben/dopewars/ */ | |
+ | |
+/* This program is free software; you can redistribute it and/or */ | |
+/* modify it under the terms of the GNU General Public License */ | |
+/* as published by the Free Software Foundation; either version 2 */ | |
+/* of the License, or (at your option) any later version. */ | |
+ | |
+/* This program is distributed in the hope that it will be useful, */ | |
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | |
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | |
+/* GNU General Public License for more details. */ | |
+ | |
+/* You should have received a copy of the GNU General Public License */ | |
+/* along with this program; if not, write to the Free Software */ | |
+/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, */ | |
+/* MA 02111-1307, USA. */ | |
+ | |
+ | |
+#ifndef __NLS_H__ | |
+#define __NLS_H__ | |
+ | |
+#ifdef HAVE_CONFIG_H | |
+#include <config.h> | |
+#endif | |
+ | |
+#ifdef ENABLE_NLS | |
+#include <locale.h> | |
+#include <libintl.h> | |
+#define _(String) gettext (String) | |
+#ifdef gettext_noop | |
+#define N_(String) gettext_noop (String) | |
+#else | |
+#define N_(String) (String) | |
+#endif | |
+#else | |
+#define gettext(String) (String) | |
+#define dgettext(Domain,Message) (Message) | |
+#define dcgettext(Domain,Message,Type) (Message) | |
+#define _(String) (String) | |
+#define N_(String) (String) | |
+#endif | |
+ | |
+#endif /* __NLS_H__ */ | |
diff --git a/src/serverside.c b/src/serverside.c | |
t@@ -37,6 +37,7 @@ | |
#include "dopeos.h" | |
#include "dopewars.h" | |
#include "message.h" | |
+#include "nls.h" | |
#include "serverside.h" | |
#include "tstring.h" | |
diff --git a/src/winmain.c b/src/winmain.c | |
t@@ -31,6 +31,8 @@ | |
#include "dopeos.h" | |
#include "dopewars.h" | |
+#include "nls.h" | |
+#include "tstring.h" | |
#include "tstring.h" | |
#include "AIPlayer.h" | |
#include "curses_client.h" |