]> git.lyx.org Git - lyx.git/blob - src/main.cpp
cosmetics
[lyx.git] / src / main.cpp
1 /**
2  * \file main.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Jean Marc Lasgouttes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "debug.h"
15 #include "LyX.h"
16 #include "gettext.h"
17
18 #include "support/os.h"
19
20 #ifdef HAVE_IOS
21 #include <ios>
22 #endif
23
24 int main(int argc, char * argv[])
25 {
26 #ifdef HAVE_IOS
27         std::ios_base::sync_with_stdio(false);
28 #endif
29
30         // To avoid ordering of global object problems with some
31         // stdlibs we do the initialization here, but still as
32         // early as possible.
33         lyx::lyxerr.rdbuf(std::cerr.rdbuf());
34
35         lyx::support::os::init(argc, argv);
36
37         // initialize for internationalized version *EK*
38         lyx::locale_init();
39
40         lyx::LyX the_lyx_instance;
41
42         return the_lyx_instance.exec(argc, argv);
43 }