pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.22,1.23 col_map.cxx,1.


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.22,1.23 col_map.cxx,1.14,1.15 config.cxx,1.10,1.11 credits.cxx,1.14,1.15 demo_recorder.cxx,1.12,1.13 fps_counter.cxx,1.4,1.5 intro.cxx,1.6,1.7 level_desc.cxx,1.8,1.9 level_result.cxx,1.7,1.8 my_gettext.hxx,1.3,1.4 option_menu.cxx,1.11,1.12 pingu_info.cxx,1.6,1.7 pingus_error.cxx,1.6,1.7 pingus_main.cxx,1.44,1.45 screenshot.cxx,1.9,1.10 surface_button.cxx,1.19,1.20 system.cxx,1.6,1.7
Date: 18 Feb 2003 18:42:01 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv10370/src

Modified Files:
        blitter.cxx col_map.cxx config.cxx credits.cxx 
        demo_recorder.cxx fps_counter.cxx intro.cxx level_desc.cxx 
        level_result.cxx my_gettext.hxx option_menu.cxx pingu_info.cxx 
        pingus_error.cxx pingus_main.cxx screenshot.cxx 
        surface_button.cxx system.cxx 
Log Message:
fixed gettext support


Index: blitter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/blitter.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- blitter.cxx 29 Dec 2002 23:29:00 -0000      1.22
+++ blitter.cxx 18 Feb 2003 18:41:58 -0000      1.23
@@ -17,6 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <config.h>
 #include <stdio.h>
 #include "pingus_error.hxx"
 #include "color.hxx"
@@ -28,8 +29,6 @@
 #include "blitter_impl.hxx"
 
 /* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 #define COMPILE_WITH_MEMORY_HOLE 0

Index: col_map.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/col_map.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- col_map.cxx 29 Dec 2002 23:29:00 -0000      1.14
+++ col_map.cxx 18 Feb 2003 18:41:58 -0000      1.15
@@ -22,10 +22,6 @@
 #include "graphic_context.hxx"
 #include "globals.hxx"
 #include "col_map.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 #define COLMAP_WITH_MEMORY_HOLE 1

Index: config.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/config.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- config.cxx  25 Jan 2003 18:34:36 -0000      1.10
+++ config.cxx  18 Feb 2003 18:41:58 -0000      1.11
@@ -24,10 +24,6 @@
 #include "pingus_error.hxx"
 #include "config.hxx"
 
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
-
 #include "cheat.hxx"
 #include "my_gettext.hxx"
 

Index: credits.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/credits.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- credits.cxx 18 Feb 2003 15:04:47 -0000      1.14
+++ credits.cxx 18 Feb 2003 18:41:58 -0000      1.15
@@ -24,10 +24,6 @@
 #include "pingus_resource.hxx"
 #include "credits.hxx"
 #include "screen_manager.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 Credits* Credits::instance_ = 0;

Index: demo_recorder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/demo_recorder.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- demo_recorder.cxx   15 Jan 2003 21:16:41 -0000      1.12
+++ demo_recorder.cxx   18 Feb 2003 18:41:58 -0000      1.13
@@ -23,10 +23,6 @@
 #include "demo_recorder.hxx"
 #include "server.hxx"
 #include "plf.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 DemoRecorder::DemoRecorder (Server* server)

Index: fps_counter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/fps_counter.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fps_counter.cxx     4 Sep 2002 14:55:11 -0000       1.4
+++ fps_counter.cxx     18 Feb 2003 18:41:58 -0000      1.5
@@ -23,10 +23,6 @@
 #include <ClanLib/Display/Font/font.h>
 #include "pingus_resource.hxx"
 #include "fps_counter.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 FPSCounter fps_counter;

Index: intro.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/intro.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- intro.cxx   29 Dec 2002 23:29:00 -0000      1.6
+++ intro.cxx   18 Feb 2003 18:41:58 -0000      1.7
@@ -21,12 +21,7 @@
 #include <ClanLib/Display/Font/font.h>
 #include "pingus_menu_manager.hxx"
 #include "pingus_resource.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 Intro::Intro(PingusMenuManager* m)
   : PingusSubMenu (m)

Index: level_desc.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_desc.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- level_desc.cxx      14 Sep 2002 19:06:33 -0000      1.8
+++ level_desc.cxx      18 Feb 2003 18:41:58 -0000      1.9
@@ -25,12 +25,7 @@
 #include "level_desc.hxx"
 #include "system.hxx"
 #include "plf.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 PingusLevelDesc::PingusLevelDesc(PLF* arg_plf)
 {

Index: level_result.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/level_result.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- level_result.cxx    18 Feb 2003 15:04:47 -0000      1.7
+++ level_result.cxx    18 Feb 2003 18:41:58 -0000      1.8
@@ -28,12 +28,7 @@
 #include "sound/sound.hxx"
 #include "world.hxx"
 #include "pingu_holder.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 PingusLevelResult::PingusLevelResult(World* w, Controller* c)
   : controller (c)

Index: my_gettext.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/my_gettext.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- my_gettext.hxx      16 Aug 2002 13:03:35 -0000      1.3
+++ my_gettext.hxx      18 Feb 2003 18:41:59 -0000      1.4
@@ -20,6 +20,7 @@
 #ifndef HEADER_PINGUS_MY_GETTEXT_HXX
 #define HEADER_PINGUS_MY_GETTEXT_HXX
 
+#include <config.h>
 #include "pingus.hxx"
 
 #ifdef HAVE_GETTEXT

Index: option_menu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/option_menu.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- option_menu.cxx     29 Dec 2002 23:29:00 -0000      1.11
+++ option_menu.cxx     18 Feb 2003 18:41:59 -0000      1.12
@@ -30,12 +30,7 @@
 #include "pingus_menu_manager.hxx"
 #include "display.hxx"
 #include "cheat.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 // Define the global option menu
 OptionMenu   option_menu (0);

Index: pingu_info.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_info.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingu_info.cxx      13 Oct 2002 20:25:00 -0000      1.6
+++ pingu_info.cxx      18 Feb 2003 18:41:59 -0000      1.7
@@ -24,12 +24,7 @@
 #include "pingus_resource.hxx"
 #include "pingu_info.hxx"
 #include "pingu.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 PinguInfo::PinguInfo()
   : pingu (0)

Index: pingus_error.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_error.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pingus_error.cxx    11 Oct 2002 20:21:41 -0000      1.6
+++ pingus_error.cxx    18 Feb 2003 18:41:59 -0000      1.7
@@ -18,12 +18,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "pingus_error.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 PingusException::PingusException (const std::string& mes) : message(mes)
 {

Index: pingus_main.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_main.cxx,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- pingus_main.cxx     18 Feb 2003 17:04:13 -0000      1.44
+++ pingus_main.cxx     18 Feb 2003 18:41:59 -0000      1.45
@@ -27,6 +27,10 @@
 #include <stdio.h>
 #include <signal.h>
 
+#ifdef HAVE_GETTEXT
+#  include <locale.h>
+#endif
+
 #ifndef WIN32
 #  include <config.h>
 #  include <getopt.h>
@@ -51,12 +55,8 @@
 # include <ClanLib/gl.h>
 #endif
 
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
 #include "my_gettext.hxx"
 
-
 #include "path_manager.hxx"
 #include "pingus_main.hxx"
 #include "algo.hxx"
@@ -633,7 +633,16 @@
 #endif /* !WIN32 */
  
 #ifdef HAVE_GETTEXT
-  std::cout << "Setting gettext path to: " << path_manager.get_base_path () + 
"/../../locale/" << std::endl;
+  std::cout << "Setting gettext path to: " << path_manager.get_base_path () + 
"/../../locale" << std::endl;
+  const char* ret = setlocale (LC_ALL, "");
+  if (ret == NULL)
+    {
+      std::cout << "ERROR: setlocale failed!" <<  std::endl;
+    }
+  else
+    {
+      std::cout << "setlocale returned '" << ret << "'" << std::endl;
+    }
   bindtextdomain (PACKAGE, (path_manager.get_base_path () + 
"/../../locale/").c_str());
   // We use another LOCALEDIR to make static binaries possible
   // bindtextdomain (PACKAGE, LOCALEDIR);
@@ -660,6 +669,13 @@
   std::cout << "clanMikMod support: missing (.it and .s3m music files will not 
be playable)" << std::endl;
 #endif
 
+#ifdef HAVE_GETTEXT
+  std::cout << "getext support: ok" << std::endl;
+  std::cout << gettext("gettext language: english") << std::endl;
+#else
+  std::cout << "getext support: missing (only support for english will be 
available" << std::endl;
+#endif
+
   std::cout << std::endl;
 }
 
@@ -750,13 +766,13 @@
 
   try 
     {
-      print_greeting_message();
-
       quick_check_args(argc, argv);
       read_rc_file();
       check_args(argc, argv);
 
       init_path_finder();
+
+      print_greeting_message();
 
       init_clanlib();
       init_pingus();   

Index: screenshot.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/screenshot.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- screenshot.cxx      10 Oct 2002 12:25:53 -0000      1.9
+++ screenshot.cxx      18 Feb 2003 18:41:59 -0000      1.10
@@ -26,12 +26,7 @@
 #include <ClanLib/Display/Display/target.h>
 #include "system.hxx"
 #include "screenshot.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 // Saves a screenshot to file, it return the filename the screenshot
 // was saved to.

Index: surface_button.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/surface_button.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- surface_button.cxx  18 Feb 2003 15:04:47 -0000      1.19
+++ surface_button.cxx  18 Feb 2003 18:41:59 -0000      1.20
@@ -30,10 +30,6 @@
 #include "surface_button.hxx"
 #include "screen_manager.hxx"
 #include "worldmap/manager.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
 
 using EditorNS::Editor;

Index: system.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/system.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- system.cxx  15 Sep 2002 00:19:19 -0000      1.6
+++ system.cxx  18 Feb 2003 18:41:59 -0000      1.7
@@ -38,12 +38,7 @@
 #include "globals.hxx"
 #include "string_converter.hxx"
 #include "system.hxx"
-
-/* Headers needed for i18n / gettext */
-#include <clocale>
-#include <config.h>
 #include "my_gettext.hxx"
-
 
 int System::verbose;
 std::string System::default_email;





reply via email to

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