]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.cpp
Fix some display glitches
[lyx.git] / src / support / os_unix.cpp
index b8a94b2c5680e8a194be628bad162afd56df8d3b..2635d672f8760f2689087bd0e0d96f23aa4fe20f 100644 (file)
 #include "support/lassert.h"
 
 #include <limits.h>
+#include <locale.h>
 #include <stdlib.h>
 
 #ifdef __APPLE__
-#include <Carbon/Carbon.h>
+#include <CoreServices/CoreServices.h>
 #endif
 
 using namespace std;
@@ -46,12 +47,16 @@ void init(int argc, char * argv[])
 {
        argc_ = argc;
        argv_ = argv;
+
+       // Set environment's default locale
+       setlocale(LC_ALL, "");
+       setlocale(LC_NUMERIC, "C");
 }
 
 
 string utf8_argv(int i)
 {
-       LASSERT(i < argc_, /**/);
+       LASSERT(i < argc_, return "");
        return to_utf8(from_local8bit(argv_[i]));
 }
 
@@ -222,12 +227,6 @@ shell_type shell()
 }
 
 
-int timeout_min()
-{
-       return 3;
-}
-
-
 char path_separator(path_type)
 {
        return ':';