* Bug #14524 fixed - Numeric locales were not set to standard "C" by default at scila...
[scilab.git] / scilab / modules / core / src / c / InitScilab.c
1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2006 - INRIA - Allan CORNET
4  *
5  * This file must be used under the terms of the CeCILL.
6  * This source file is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution.  The terms
8  * are also available at
9  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10  *
11  */
12 #include "InitScilab.h"
13 #include "InitializeCore.h"
14 #include "locale.h"
15 #include "../../../console/includes/InitializeConsole.h"
16 #include "../../../tclsci/includes/InitializeTclTk.h"
17 #include "../../../localization/includes/InitializeLocalization.h"
18 #include "../../../graphics/includes/graphicModuleLoad.h"
19 #include "../../../jvm/includes/InitializeJVM.h"
20 #ifdef _MSC_VER
21 #include "../../../windows_tools/includes/InitializeWindows_tools.h"
22 #endif
23 #include "../../../gui/includes/InitializeGUI.h"
24 #include "../../../string/includes/InitializeString.h"
25 #include "scilabmode.h"
26 #include "SetScilabEnvironment.h"
27 #include "../../../jvm/includes/loadBackGroundClassPath.h"
28 /*--------------------------------------------------------------------------*/
29 int C2F(initscilab) (void)
30 {
31
32     SetScilabEnvironment();
33
34     InitializeString();
35
36     InitializeLocalization();
37
38 #ifdef _MSC_VER
39     InitializeWindows_tools();
40 #endif
41
42     InitializeCore();
43
44     if (getScilabMode() != SCILAB_NWNI)
45     {
46         InitializeJVM();
47         InitializeGUI();
48
49         /* create needed data structure if not already created */
50         loadGraphicModule();
51     }
52
53     // set default (English) locale after JVM which may set its own locale
54     setlocale(LC_NUMERIC, "C");
55
56     /* Initialize console: lines... */
57     InitializeConsole();
58
59     if (getScilabMode() != SCILAB_NWNI)
60     {
61         loadBackGroundClassPath();
62     }
63     return 0;
64 }
65
66 /*--------------------------------------------------------------------------*/