]> git.lyx.org Git - lyx.git/blob - src/main.C
cb1e53a451287937ab92d5f421da2eb1fbc4e660
[lyx.git] / src / main.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright (C) 1995 Matthias Ettrich
7  *          Copyright (C) 1995-1999 The LyX Team.
8  *
9  *======================================================*/
10
11 #include <config.h>
12 #include FORMS_H_LOCATION
13 #include "lyx_main.h"
14 #include "gettext.h"
15 #include "LString.h"
16 #include "filetools.h"
17
18 //      $Id: main.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $      
19
20 #if !defined(lint) && !defined(WITH_WARNINGS)
21 static char vcid[] = "$Id: main.C,v 1.1 1999/09/27 18:44:38 larsbj Exp $";
22 #endif /* lint */
23
24 // I keep these here so that it will be processed as early in
25 // the compilation process as possible.
26 #if !defined(FL_REVISION) || (FL_REVISION != 88 && FL_REVISION != 89) \
27                           || FL_VERSION != 0
28 #error LyX will not compile with this version of XForms.\
29        Please get version 0.89.\
30        If you want to try to compile anyway, delete this test in src/main.C.
31 #endif
32
33
34 int main(int argc, char *argv[]) {
35         // lyx_localedir is used by gettext_init() is we have
36         //   i18n support built-in
37         LString lyx_localedir = getEnvPath("LYX_LOCALEDIR");
38         if (lyx_localedir.empty())
39                 lyx_localedir = LOCALEDIR;
40         
41         // initialize for internationalized version *EK*
42         locale_init();
43         gettext_init();
44
45 #ifdef __EMX__
46         _wildcard(&argc, &argv);
47 #endif
48
49         LyX lyx(&argc,argv);
50         return 0; // ok
51 }