Removed "const char*" versions of tinygettext for now, as they where buggy
authorgrumbel <grumbel@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Fri, 20 Nov 2009 00:32:54 +0000 (00:32 +0000)
committergrumbel <grumbel@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Fri, 20 Nov 2009 00:32:54 +0000 (00:32 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6061 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/supertux/main.cpp
src/util/gettext.hpp

index 57078c5..41e22ef 100644 (file)
@@ -206,27 +206,27 @@ Main::init_physfs(const char* argv0)
 void
 Main::print_usage(const char* argv0)
 {
-  fprintf(stderr, _("Usage: %s [OPTIONS] [LEVELFILE]\n\n"), argv0);
-  fprintf(stderr,
-          _("Options:\n"
-            "  -f, --fullscreen             Run in fullscreen mode\n"
-            "  -w, --window                 Run in window mode\n"
-            "  -g, --geometry WIDTHxHEIGHT  Run SuperTux in given resolution\n"
-            "  -a, --aspect WIDTH:HEIGHT    Run SuperTux with given aspect ratio\n"
-            "  -d, --default                Reset video settings to default values\n"
-            "  --renderer RENDERER          Use sdl, opengl, or auto to render\n"
-            "  --disable-sfx                Disable sound effects\n"
-            "  --disable-music              Disable music\n"
-            "  -h, --help                   Show this help message and quit\n"
-            "  -v, --version                Show SuperTux version and quit\n"
-            "  --console                    Enable ingame scripting console\n"
-            "  --noconsole                  Disable ingame scripting console\n"
-            "  --show-fps                   Display framerate in levels\n"
-            "  --no-show-fps                Do not display framerate in levels\n"
-            "  --record-demo FILE LEVEL     Record a demo to FILE\n"
-            "  --play-demo FILE LEVEL       Play a recorded demo\n"
-            "  -s, --debug-scripts          Enable script debugger.\n"
-            "%s\n"), "");
+  std::cerr << _("Usage: ") << argv0 << _(" [OPTIONS] [LEVELFILE]\n\n")
+            << _("Options:\n"
+                 "  -f, --fullscreen             Run in fullscreen mode\n"
+                 "  -w, --window                 Run in window mode\n"
+                 "  -g, --geometry WIDTHxHEIGHT  Run SuperTux in given resolution\n"
+                 "  -a, --aspect WIDTH:HEIGHT    Run SuperTux with given aspect ratio\n"
+                 "  -d, --default                Reset video settings to default values\n"
+                 "  --renderer RENDERER          Use sdl, opengl, or auto to render\n"
+                 "  --disable-sfx                Disable sound effects\n"
+                 "  --disable-music              Disable music\n"
+                 "  -h, --help                   Show this help message and quit\n"
+                 "  -v, --version                Show SuperTux version and quit\n"
+                 "  --console                    Enable ingame scripting console\n"
+                 "  --noconsole                  Disable ingame scripting console\n"
+                 "  --show-fps                   Display framerate in levels\n"
+                 "  --no-show-fps                Do not display framerate in levels\n"
+                 "  --record-demo FILE LEVEL     Record a demo to FILE\n"
+                 "  --play-demo FILE LEVEL       Play a recorded demo\n"
+                 "  -s, --debug-scripts          Enable script debugger.\n"
+                 "\n")
+            << std::flush;
 }
 
 /**
index 4a84f24..6fb96be 100644 (file)
 
 #include "supertux/globals.hpp"
 
-static inline const char* _(const char* message)
-{
-  if (dictionary_manager)
-  {
-    return dictionary_manager->get_dictionary().translate(message);
-  }
-  else
-  {
-    return message;
-  }
-}
-
 static inline std::string _(const std::string& message)
 {
   if (dictionary_manager)