]> git.lyx.org Git - lyx.git/blobdiff - src/main.cpp
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / main.cpp
index 5e09dd86fb27ac2dba298e16c31ad01ca62c61b2..65a9f4d8d7da10e7537ea51fbb53d49ef3afb355 100644 (file)
@@ -14,7 +14,6 @@
 #include "LyX.h"
 
 #include "support/debug.h"
-#include "support/gettext.h"
 #include "support/os.h"
 
 #include <iostream>
 #include <ios>
 #endif
 
+#ifdef WIN32
+#include <Windows.h>
+#endif
+
+
 using namespace std;
 
 
@@ -31,15 +35,20 @@ int main(int argc, char * argv[])
        ios_base::sync_with_stdio(false);
 #endif
 
+#ifdef WIN32
+       if (AttachConsole(ATTACH_PARENT_PROCESS)) {
+               freopen("CONOUT$", "w", stdout);
+               freopen("CONOUT$", "w", stderr);
+       }
+       SetConsoleOutputCP(CP_UTF8);
+#endif
+
        // To avoid ordering of global object problems with some
        // stdlibs we do the initialization here, but still as
        // early as possible.
        lyx::lyxerr.setStream(cerr);
 
-       lyx::support::os::init(argc, argv);
-
-       // initialize for internationalized version *EK*
-       lyx::locale_init();
+       lyx::support::os::init(argc, &argv);
 
        lyx::LyX the_lyx_instance;