00001 /*-----------------------------------------------------------------------------------*/ 00002 /* INRIA 2006 */ 00003 /* Allan CORNET */ 00004 /*-----------------------------------------------------------------------------------*/ 00005 #include "jvms.h" 00006 #include "JVM_CONSOLE.h" 00007 /*-----------------------------------------------------------------------------------*/ 00008 extern int StartJVM_SCILAB(char *SCILAB_PATH); 00009 extern int StartJVM_GRAPHIC(char *SCILAB_PATH); 00010 extern int TerminateJVM_SCILAB(void); 00011 extern int TerminateJVM_GRAPHIC(void); 00012 #ifdef _MSC_VER 00013 extern int GetJVMDll(char *SCILAB_PATH); 00014 extern int FreeJVMDll(void); 00015 #endif 00016 00017 IMPORT_DLL int C2F(xscion)(int *i); 00018 /*-----------------------------------------------------------------------------------*/ 00019 IMPORT_EXPORT_LIBJVM_DLL int StartJVMs(char *SCILAB_PATH) 00020 { 00021 int bOK=FALSE; 00022 int b1=FALSE; 00023 /*,b2=FALSE,b3=FALSE;*/ 00024 int WithGUIConsole=FALSE; 00025 00026 #ifdef _MSC_VER 00027 GetJVMDll(SCILAB_PATH); 00028 #endif 00029 00030 00031 C2F(xscion)(&WithGUIConsole); 00032 if (WithGUIConsole == TRUE) 00033 { 00034 b1=StartJVM_CONSOLE(SCILAB_PATH); 00035 } 00036 /*b2=StartJVM_SCILAB(SCILAB_PATH); 00037 b3=StartJVM_GRAPHIC(SCILAB_PATH); 00038 00039 if (b1 && b2 && b3) bOK=TRUE;*/ 00040 00041 return bOK; 00042 } 00043 /*-----------------------------------------------------------------------------------*/ 00044 IMPORT_EXPORT_LIBJVM_DLL int TerminateJVMs(void) 00045 { 00046 int bOK=FALSE; 00047 int b1=FALSE; 00048 /*,b2=FALSE,b3=FALSE;*/ 00049 int WithGUIConsole=FALSE; 00050 00051 C2F(xscion)(&WithGUIConsole); 00052 if (WithGUIConsole == TRUE) 00053 { 00054 b1=TerminateJVM_CONSOLE(); 00055 } 00056 00057 /*b2=TerminateJVM_SCILAB(); 00058 b3=TerminateJVM_GRAPHIC();*/ 00059 00060 #ifdef _MSC_VER 00061 FreeJVMDll(); 00062 #endif 00063 00064 /*if (b1 && b2 && b3) bOK=TRUE;*/ 00065 00066 return bOK; 00067 00068 } 00069 /*-----------------------------------------------------------------------------------*/
1.5.1