Rationnalization of the tcl/tk init process and use function instead of a silly globa...
[scilab.git] / scilab / modules / tclsci / src / c / InitializeTclTk.c
1 /*--------------------------------------------------------------------------*/
2 /* INRIA 2007 */
3 /* Allan CORNET */
4 /*--------------------------------------------------------------------------*/ 
5 #include "InitializeTclTk.h"
6 #include "InitTclTk.h"
7 #include "scilabmode.h"
8 /*--------------------------------------------------------------------------*/ 
9 /*--------------------------------------------------------------------------*/ 
10 BOOL InitializeTclTk(void)
11 {
12         if ( getScilabMode() != SCILAB_NWNI )
13         {
14                 if ( OpenTCLsci()==0 )
15                 {
16                         setTkStarted(TRUE);
17                         return TRUE;
18                 }
19                 else
20                 {
21                         setTkStarted(FALSE);
22                 }
23         }
24         else
25         {
26                 setTkStarted(FALSE);
27         }
28         return FALSE;
29 }
30 /*--------------------------------------------------------------------------*/