summaryrefslogtreecommitdiffstats
path: root/scilab/modules/tclsci
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-02-12 17:07:37 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-02-12 17:07:37 +0100
commit9ec78e31e45d53e113c3b1e16f6a60b429fa9214 (patch)
tree0d715a095ae0c74875b3ff10fba76b9f43de10cd /scilab/modules/tclsci
parentdc63bbedc09128a3ee605af7c0f7d343eb5296a9 (diff)
downloadscilab-9ec78e31e45d53e113c3b1e16f6a60b429fa9214.zip
scilab-9ec78e31e45d53e113c3b1e16f6a60b429fa9214.tar.gz
tclsci dynamically loaded
Diffstat (limited to 'scilab/modules/tclsci')
-rw-r--r--scilab/modules/tclsci/includes/InitializeTclTk.h3
-rw-r--r--scilab/modules/tclsci/includes/withtk.h5
-rw-r--r--scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c10
-rw-r--r--scilab/modules/tclsci/tclsci.vcproj8
4 files changed, 13 insertions, 13 deletions
diff --git a/scilab/modules/tclsci/includes/InitializeTclTk.h b/scilab/modules/tclsci/includes/InitializeTclTk.h
index cd34053..0e6dd45 100644
--- a/scilab/modules/tclsci/includes/InitializeTclTk.h
+++ b/scilab/modules/tclsci/includes/InitializeTclTk.h
@@ -13,7 +13,6 @@
13#ifndef __INITIALIZETCLTK_H__ 13#ifndef __INITIALIZETCLTK_H__
14#define __INITIALIZETCLTK_H__ 14#define __INITIALIZETCLTK_H__
15 15
16#include "dynlib_tclsci.h"
17#include "BOOL.h" 16#include "BOOL.h"
18 17
19/** 18/**
@@ -21,7 +20,7 @@
21 * 20 *
22 * @return If the init went well (or not) 21 * @return If the init went well (or not)
23 */ 22 */
24TCLSCI_IMPEXP BOOL InitializeTclTk(void); 23BOOL InitializeTclTk(void);
25 24
26#endif /* __INITIALIZETCLTK_H__ */ 25#endif /* __INITIALIZETCLTK_H__ */
27/*--------------------------------------------------------------------------*/ 26/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/tclsci/includes/withtk.h b/scilab/modules/tclsci/includes/withtk.h
index b278ef3..d6af2c5 100644
--- a/scilab/modules/tclsci/includes/withtk.h
+++ b/scilab/modules/tclsci/includes/withtk.h
@@ -14,7 +14,6 @@
14#define __WITHTK_H__ 14#define __WITHTK_H__
15 15
16#include "machine.h" /* C2F */ 16#include "machine.h" /* C2F */
17#include "dynlib_tclsci.h"
18#include "BOOL.h" /* BOOL*/ 17#include "BOOL.h" /* BOOL*/
19 18
20/** 19/**
@@ -22,13 +21,13 @@
22* @param rep 1 (WITH) or 0 (WITHOUT) 21* @param rep 1 (WITH) or 0 (WITHOUT)
23* @return 0 22* @return 0
24*/ 23*/
25TCLSCI_IMPEXP int C2F(withtk)(int *rep); 24int C2F(withtk)(int *rep);
26 25
27/** 26/**
28* check if it is with TCL/TK 27* check if it is with TCL/TK
29* @return TRUE or FALSE 28* @return TRUE or FALSE
30*/ 29*/
31TCLSCI_IMPEXP BOOL withtk(void); 30BOOL withtk(void);
32 31
33#endif /* _WITHTK_H__ */ 32#endif /* _WITHTK_H__ */
34/*--------------------------------------------------------------------------*/ 33/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c b/scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c
index e793dff..5683e19 100644
--- a/scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c
+++ b/scilab/modules/tclsci/sci_gateway/c/gw_tclsci.c
@@ -22,6 +22,10 @@
22#include "scilabmode.h" 22#include "scilabmode.h"
23#include "callFunctionFromGateway.h" 23#include "callFunctionFromGateway.h"
24#include "InitTclTk.h" /* isTkStarted */ 24#include "InitTclTk.h" /* isTkStarted */
25#include "InitializeTclTk.h"
26#include "BOOL.h"
27/*--------------------------------------------------------------------------*/
28static BOOL bFirstTclInit = TRUE;
25/*--------------------------------------------------------------------------*/ 29/*--------------------------------------------------------------------------*/
26static gw_generic_table Tab[]= 30static gw_generic_table Tab[]=
27{ 31{
@@ -44,6 +48,12 @@ int gw_tclsci(void)
44{ 48{
45 if ( getScilabMode() != SCILAB_NWNI ) 49 if ( getScilabMode() != SCILAB_NWNI )
46 { 50 {
51 if (bFirstTclInit)
52 {
53 InitializeTclTk();
54 bFirstTclInit = FALSE;
55 }
56
47 if (isTkStarted()) 57 if (isTkStarted())
48 { 58 {
49 Rhs = Max(0, Rhs); 59 Rhs = Max(0, Rhs);
diff --git a/scilab/modules/tclsci/tclsci.vcproj b/scilab/modules/tclsci/tclsci.vcproj
index b60fe41..d67c58b 100644
--- a/scilab/modules/tclsci/tclsci.vcproj
+++ b/scilab/modules/tclsci/tclsci.vcproj
@@ -494,10 +494,6 @@
494 RelativePath=".\src\c\TerminateTclTk.c" 494 RelativePath=".\src\c\TerminateTclTk.c"
495 > 495 >
496 </File> 496 </File>
497 <File
498 RelativePath=".\src\c\withtk.c"
499 >
500 </File>
501 </Filter> 497 </Filter>
502 <Filter 498 <Filter
503 Name="Header Files" 499 Name="Header Files"
@@ -584,10 +580,6 @@
584 RelativePath=".\src\c\Thread_Wrapper.h" 580 RelativePath=".\src\c\Thread_Wrapper.h"
585 > 581 >
586 </File> 582 </File>
587 <File
588 RelativePath=".\includes\withtk.h"
589 >
590 </File>
591 </Filter> 583 </Filter>
592 <Filter 584 <Filter
593 Name="Resource Files" 585 Name="Resource Files"