Merge remote branch 'origin/sas' into YaSp 14/2114/2
Bruno JOFRET [Tue, 28 Sep 2010 10:05:56 +0000 (12:05 +0200)]
Conflicts:
scilab/Scilab.sln
scilab/configure
scilab/etc/modules.xml.in
scilab/etc/modules.xml.vc
scilab/modules/Makefile.in
scilab/modules/api_scilab/src/cpp/api_int.cpp
scilab/modules/call_scilab/LibScilab_Import.def
scilab/modules/call_scilab/src/c/call_scilab.c
scilab/modules/console/src/jni/GuiManagement.i
scilab/modules/console/src/jni/GuiManagement_wrap.c
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/src/c/TerminateCore.c
scilab/modules/core/src/c/callDynamicGateway.c
scilab/modules/core/src/cpp/hashtable_core.cpp
scilab/modules/core/src/fortran/core_f.vfproj
scilab/modules/elementary_functions/sci_gateway/c/gw_elementary_functions.c
scilab/modules/elementary_functions/sci_gateway/c/sci_zeros.c
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/sci_gateway/c/sci_fscanfMat.c
scilab/modules/fileio/sci_gateway/c/sci_mputl.c
scilab/modules/fileio/src/c/basename.h
scilab/modules/fileio/src/c/mgetl.c
scilab/modules/functions/Makefile.in
scilab/modules/hdf5/sci_gateway/cpp/sci_import_from_hdf5.cpp
scilab/modules/javasci/Javasci.vcproj
scilab/modules/jvm/Makefile.am
scilab/modules/jvm/Makefile.in
scilab/modules/localization/src/c/charEncoding.c
scilab/modules/matio/src/c/GetCharVariable.c
scilab/modules/output_stream/src/c/errmsg.c
scilab/modules/parallel/Makefile.am
scilab/modules/parallel/Makefile.in
scilab/modules/parallel/includes/gw_parallel.h
scilab/modules/parallel/sci_gateway/c/gw_parallel.c
scilab/modules/parallel/src/c/parallel.vcproj
scilab/modules/scinotes/Makefile.in
scilab/modules/string/sci_gateway/c/sci_strstr.c
scilab/modules/types/Makefile.am
scilab/modules/types/Makefile.in
scilab/modules/ui_data/includes/gw_ui_data.h
scilab/modules/ui_data/sci_gateway/c/gw_ui_data.c
scilab/modules/ui_data/sci_gateway/cpp/sci_editvar.cpp
scilab/modules/ui_data/sci_gateway/cpp/sci_updateEditvarValue.cpp
scilab/modules/xcos/includes/gw_xcos.h
scilab/modules/xcos/sci_gateway/c/gw_xcos.c

Change-Id: I59a6af01339cc4f5a601ed70b2638028bcabf2d3

213 files changed:
1  2 
scilab/.gitignore
scilab/Scilab.sln
scilab/bin/scilab
scilab/configure
scilab/configure.ac
scilab/libs/MALLOC/Makefile.in
scilab/libs/doublylinkedlist/Makefile.in
scilab/libs/dynamiclibrary/Makefile.in
scilab/libs/hashtable/Makefile.in
scilab/libs/libst/Makefile.in
scilab/modules/Makefile.am
scilab/modules/Makefile.in
scilab/modules/action_binding/Makefile.am
scilab/modules/action_binding/Makefile.in
scilab/modules/api_scilab/Makefile.am
scilab/modules/api_scilab/Makefile.in
scilab/modules/api_scilab/includes/api_boolean.h
scilab/modules/api_scilab/includes/api_boolean_sparse.h
scilab/modules/api_scilab/includes/api_error.h
scilab/modules/api_scilab/includes/api_int.h
scilab/modules/api_scilab/includes/api_list.h
scilab/modules/api_scilab/includes/api_string.h
scilab/modules/api_scilab/src/cpp/api_boolean.cpp
scilab/modules/api_scilab/src/cpp/api_common.cpp
scilab/modules/api_scilab/src/cpp/api_int.cpp
scilab/modules/api_scilab/src/cpp/api_list.cpp
scilab/modules/api_scilab/src/cpp/api_string.cpp
scilab/modules/arnoldi/Makefile.in
scilab/modules/atoms/Makefile.in
scilab/modules/boolean/Makefile.in
scilab/modules/cacsd/Makefile.in
scilab/modules/call_scilab/LibScilab_Import.def
scilab/modules/call_scilab/Makefile.am
scilab/modules/call_scilab/Makefile.in
scilab/modules/call_scilab/src/c/SendScilabJobs.c
scilab/modules/call_scilab/src/c/call_scilab.c
scilab/modules/commons/Makefile.am
scilab/modules/commons/Makefile.in
scilab/modules/commons/src/java/org/scilab/modules/commons/ScilabCommons.java
scilab/modules/commons/src/java/org/scilab/modules/commons/ScilabCommonsJNI.java
scilab/modules/commons/src/jni/ScilabCommons.i
scilab/modules/commons/src/jni/ScilabCommons_wrap.c
scilab/modules/compatibility_functions/Makefile.in
scilab/modules/completion/Makefile.am
scilab/modules/completion/Makefile.in
scilab/modules/completion/src/jni/Completion_wrap.c
scilab/modules/console/Makefile.in
scilab/modules/console/src/java/org/scilab/modules/console/GuiManagement.java
scilab/modules/console/src/java/org/scilab/modules/console/GuiManagementJNI.java
scilab/modules/console/src/jni/DropFiles_wrap.c
scilab/modules/console/src/jni/GuiManagement.i
scilab/modules/console/src/jni/GuiManagement_wrap.c
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/includes/gw_core.h
scilab/modules/core/includes/sci_types.h
scilab/modules/core/sci_gateway/c/gw_core.c
scilab/modules/core/sci_gateway/c/sci_errclear.c
scilab/modules/core/sci_gateway/c/sci_lasterror.c
scilab/modules/core/src/c/TerminateCore.c
scilab/modules/core/src/c/callDynamicGateway.c
scilab/modules/core/src/c/core.vcproj
scilab/modules/core/src/c/dynamic_tclsci.c
scilab/modules/core/src/cpp/hashtable_core.cpp
scilab/modules/core/src/fortran/core_f.vfproj
scilab/modules/data_structures/Makefile.in
scilab/modules/demo_tools/Makefile.in
scilab/modules/development_tools/Makefile.in
scilab/modules/differential_equations/Makefile.in
scilab/modules/double/Makefile.in
scilab/modules/dynamic_link/Makefile.am
scilab/modules/dynamic_link/Makefile.in
scilab/modules/elementary_functions/Makefile.am
scilab/modules/elementary_functions/Makefile.in
scilab/modules/elementary_functions/sci_gateway/c/gw_elementary_functions.c
scilab/modules/elementary_functions/sci_gateway/c/sci_frexp.c
scilab/modules/elementary_functions/sci_gateway/c/sci_zeros.c
scilab/modules/fftw/Makefile.am
scilab/modules/fftw/Makefile.in
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/fileio.vcproj
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/sci_gateway/c/sci_fprintfMat.c
scilab/modules/fileio/sci_gateway/c/sci_fscanfMat.c
scilab/modules/fileio/src/c/basename.h
scilab/modules/fileio/src/c/fprintfMat.c
scilab/modules/fileio/src/c/fscanfMat.c
scilab/modules/functions/Makefile.am
scilab/modules/functions/Makefile.in
scilab/modules/functions/sci_gateway/c/sci_libraryinfo.c
scilab/modules/genetic_algorithms/Makefile.in
scilab/modules/graph/Makefile.in
scilab/modules/graph/src/java/org/scilab/modules/graph/io/ScilabIntegerCodec.java
scilab/modules/graphic_export/Makefile.am
scilab/modules/graphic_export/Makefile.in
scilab/modules/graphic_export/src/jni/GL2PSWrapping_wrap.c
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/src/c/gui.vcproj
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/window/SwingScilabWindow.java
scilab/modules/hdf5/Makefile.am
scilab/modules/hdf5/Makefile.in
scilab/modules/hdf5/sci_gateway/cpp/sci_import_from_hdf5.cpp
scilab/modules/hdf5/src/c/LibScilab_Import.def
scilab/modules/hdf5/src/java/org/scilab/modules/hdf5/write/H5WriteScilabInteger.java
scilab/modules/helptools/Makefile.in
scilab/modules/history_browser/Makefile.am
scilab/modules/history_browser/Makefile.in
scilab/modules/history_manager/Makefile.am
scilab/modules/history_manager/Makefile.in
scilab/modules/history_manager/src/jni/HistoryManagement_wrap.c
scilab/modules/integer/Makefile.am
scilab/modules/integer/Makefile.in
scilab/modules/interpolation/Makefile.in
scilab/modules/intersci/Makefile.in
scilab/modules/io/Makefile.am
scilab/modules/io/Makefile.in
scilab/modules/io/sci_gateway/cpp/sci_file.cpp
scilab/modules/javasci/Javasci.vcproj
scilab/modules/javasci/Makefile.am
scilab/modules/javasci/Makefile.in
scilab/modules/javasci/src/c/javasci2_helper.c
scilab/modules/javasci/src/c/javasci2_helper.h
scilab/modules/javasci/src/java/org/scilab/modules/javasci/Scilab.java
scilab/modules/jvm/Makefile.am
scilab/modules/jvm/Makefile.in
scilab/modules/jvm/src/c/createMainScilabObject.c
scilab/modules/linear_algebra/Makefile.in
scilab/modules/localization/Makefile.am
scilab/modules/localization/Makefile.in
scilab/modules/m2sci/Makefile.in
scilab/modules/maple2scilab/Makefile.in
scilab/modules/matio/Makefile.in
scilab/modules/matio/src/c/GetCharVariable.c
scilab/modules/mexlib/Makefile.in
scilab/modules/modules_manager/Makefile.in
scilab/modules/operations/Makefile.in
scilab/modules/optimization/Makefile.am
scilab/modules/optimization/Makefile.in
scilab/modules/output_stream/Makefile.am
scilab/modules/output_stream/Makefile.in
scilab/modules/output_stream/src/c/errmsg.c
scilab/modules/output_stream/src/c/lasterror.c
scilab/modules/output_stream/src/c/msgstore.c
scilab/modules/output_stream/src/c/output_stream.vcproj
scilab/modules/output_stream/src/c/output_stream_export.def
scilab/modules/overloading/Makefile.in
scilab/modules/parallel/Makefile.am
scilab/modules/parallel/Makefile.in
scilab/modules/parallel/includes/gw_parallel.h
scilab/modules/parallel/sci_gateway/c/gw_parallel.c
scilab/modules/parallel/sci_gateway/c/sci_parallel_concurrency.c
scilab/modules/parallel/src/c/parallel.vcproj
scilab/modules/parallel/src/cpp/parallel_run.hxx
scilab/modules/parameters/Makefile.in
scilab/modules/parse/Makefile.in
scilab/modules/polynomials/Makefile.in
scilab/modules/pvm/Makefile.am
scilab/modules/pvm/Makefile.in
scilab/modules/randlib/Makefile.in
scilab/modules/renderer/Makefile.in
scilab/modules/scicos/Makefile.in
scilab/modules/scicos_blocks/Makefile.am
scilab/modules/scicos_blocks/Makefile.in
scilab/modules/scinotes/Makefile.am
scilab/modules/scinotes/Makefile.in
scilab/modules/shell/Makefile.am
scilab/modules/shell/Makefile.in
scilab/modules/signal_processing/Makefile.in
scilab/modules/simulated_annealing/Makefile.in
scilab/modules/sound/Makefile.am
scilab/modules/sound/Makefile.in
scilab/modules/sparse/Makefile.in
scilab/modules/special_functions/Makefile.am
scilab/modules/special_functions/Makefile.in
scilab/modules/spreadsheet/Makefile.am
scilab/modules/spreadsheet/Makefile.in
scilab/modules/statistics/Makefile.in
scilab/modules/statistics/src/c/CdfBase.c
scilab/modules/statistics/src/c/CdfBase.h
scilab/modules/string/Makefile.am
scilab/modules/string/Makefile.in
scilab/modules/string/sci_gateway/c/sci_strcat.c
scilab/modules/string/sci_gateway/c/sci_strstr.c
scilab/modules/symbolic/Makefile.in
scilab/modules/tclsci/Makefile.am
scilab/modules/tclsci/Makefile.in
scilab/modules/texmacs/Makefile.in
scilab/modules/time/Makefile.am
scilab/modules/time/Makefile.in
scilab/modules/types/Makefile.am
scilab/modules/types/Makefile.in
scilab/modules/types/src/java/org/scilab/modules/types/ScilabInteger.java
scilab/modules/types/src/java/org/scilab/modules/types/ScilabIntegerTypeEnum.java
scilab/modules/ui_data/Makefile.am
scilab/modules/ui_data/Makefile.in
scilab/modules/ui_data/includes/gw_ui_data.h
scilab/modules/ui_data/sci_gateway/c/gw_ui_data.c
scilab/modules/ui_data/sci_gateway/cpp/sci_editvar.cpp
scilab/modules/ui_data/src/c/ui_data.vcproj
scilab/modules/umfpack/Makefile.am
scilab/modules/umfpack/Makefile.in
scilab/modules/windows_tools/Makefile.in
scilab/modules/xcos/Makefile.am
scilab/modules/xcos/Makefile.in
scilab/modules/xcos/includes/gw_xcos.h
scilab/modules/xcos/sci_gateway/c/gw_xcos.c
scilab/modules/xcos/sci_gateway/cpp/sci_closeXcosFromScilab.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosConfigureXmlFile.cpp
scilab/modules/xcos/src/c/xcos.vcproj

Simple merge
@@@ -1523,44 -1257,74 +1523,72 @@@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C
                {142D643B-A9EC-49DB-9D48-A925A20F63B1} = {142D643B-A9EC-49DB-9D48-A925A20F63B1}
                {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
                {ABCB724E-8534-4420-AC12-7C33A606ABA3} = {ABCB724E-8534-4420-AC12-7C33A606ABA3}
 -              {B2911268-79E2-4FE5-AD59-2C3CB7CB794E} = {B2911268-79E2-4FE5-AD59-2C3CB7CB794E}
                {2EA61E81-0F0C-4006-985C-12785093CD2F} = {2EA61E81-0F0C-4006-985C-12785093CD2F}
 -              {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
 -      EndProjectSection
 -EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "history_browser-Ant", "modules\history_browser\src\java\history_browser-JAVA.vcproj", "{95C21D50-FFD1-4FCE-A545-49FA1F825B28}"
 -      ProjectSection(ProjectDependencies) = postProject
 -              {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
 -              {63965A84-E354-4CBC-BFAC-FDFC8224573F} = {63965A84-E354-4CBC-BFAC-FDFC8224573F}
                {E9783492-017E-4811-9CC7-6B71856F847C} = {E9783492-017E-4811-9CC7-6B71856F847C}
 +              {8A654CC5-22C1-4972-A8CF-1B89F78B5383} = {8A654CC5-22C1-4972-A8CF-1B89F78B5383}
+               {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
        EndProjectSection
  EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "history_browser", "modules\history_browser\src\c\history_browser.vcproj", "{AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}"
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scinotes", "modules\scinotes\src\c\scinotes.vcproj", "{BAE68B54-2C1A-44D0-A0E9-05156A784E79}"
        ProjectSection(ProjectDependencies) = postProject
 +              {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
 +              {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F} = {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F}
 +              {4FC72D4A-80EE-4B1A-8724-0201C1A35621} = {4FC72D4A-80EE-4B1A-8724-0201C1A35621}
 +              {53A01263-92BE-4C87-AA9A-79297F882310} = {53A01263-92BE-4C87-AA9A-79297F882310}
 +              {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
                {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470} = {8BA2DDA8-BD04-4D4D-8EE6-6CAA955F7470}
 -      EndProjectSection
 -EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations", "modules\operations\operations.vcproj", "{1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}"
 -EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "elem_func", "modules\elementary_functions\src\cpp\elem_func\elem_func.vcproj", "{E1284D3E-4B3F-446B-B541-F661A8A166A7}"
 -      ProjectSection(ProjectDependencies) = postProject
 -              {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D} = {DBC45B0D-6E0A-4107-B284-5A3B0C5BB50D}
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nolibjvm", "modules\jvm\src\nojvm\nojvm.vcproj", "{889AD61B-12E9-4F85-8525-B83C16C88C3F}"
 -      ProjectSection(ProjectDependencies) = postProject
 -              {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
 +              {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
 +              {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
                {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
 +              {64E090DA-DCB5-4F4D-93D7-E88DDEC9C2EF} = {64E090DA-DCB5-4F4D-93D7-E88DDEC9C2EF}
 +              {7CA60AEF-9AFA-4D06-AF28-613C0AA27640} = {7CA60AEF-9AFA-4D06-AF28-613C0AA27640}
        EndProjectSection
  EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nogui", "modules\gui\src\nogui\nogui.vcproj", "{58A50B97-FA8D-4700-9E4A-C4993638EB7A}"
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scinotes-Ant", "modules\scinotes\src\java\scinotes-JAVA.vcproj", "{43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}"
        ProjectSection(ProjectDependencies) = postProject
 -              {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
 -              {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
 +              {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
 +              {B2911268-79E2-4FE5-AD59-2C3CB7CB794E} = {B2911268-79E2-4FE5-AD59-2C3CB7CB794E}
 +              {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
        EndProjectSection
  EndProject
 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nohistory_browser", "modules\history_browser\src\nohistory_browser\nohistory_browser.vcproj", "{6EA99B1F-99B4-4528-8195-7508EF70CFED}"
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel", "modules\parallel\src\c\parallel.vcproj", "{56A2E2F3-26CF-45D5-BE7A-534C39CD7003}"
        ProjectSection(ProjectDependencies) = postProject
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
 -              {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
 +              {8028F371-6A94-4A26-8804-6E7F05F1D1AA} = {8028F371-6A94-4A26-8804-6E7F05F1D1AA}
 +              {EAB6C580-22B3-4359-BA1D-DD7499A96163} = {EAB6C580-22B3-4359-BA1D-DD7499A96163}
 +              {A09E8584-0713-48A5-97BA-ACED0F3728F8} = {A09E8584-0713-48A5-97BA-ACED0F3728F8}
 +              {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
 +              {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
 +              {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
        EndProjectSection
  EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "commons-Ant", "modules\commons\src\java\commons-JAVA.vcproj", "{9188FA91-E039-485D-AF1D-781CEA92F541}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
+       EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "output_stream-Ant", "modules\output_stream\src\java\output_stream-JAVA.vcproj", "{F3943691-FF61-48B4-9CA4-10E9D1F600A6}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
+               {9188FA91-E039-485D-AF1D-781CEA92F541} = {9188FA91-E039-485D-AF1D-781CEA92F541}
+               {E9783492-017E-4811-9CC7-6B71856F847C} = {E9783492-017E-4811-9CC7-6B71856F847C}
+       EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core-Ant", "modules\core\src\java\core-JAVA.vcproj", "{78D8B862-964A-4D0E-93D2-CA8A25BA1207}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43} = {FBA3BC3F-8A2C-4D47-A50D-EB808BE42F43}
+               {E9783492-017E-4811-9CC7-6B71856F847C} = {E9783492-017E-4811-9CC7-6B71856F847C}
+               {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC} = {F01C26E3-E409-4E74-BA84-C7C4A71A7FDC}
+       EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "commons", "modules\commons\src\c\commons.vcproj", "{ECA09A1E-6D12-4A47-92E1-A671C181DF77}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
+               {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+       EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "javasci-java-tests", "modules\javasci\tests\java\javasci-JAVA-tests.vcproj", "{9BE8D73A-7E83-46ED-A9E2-1E3472F52AE5}"
+ EndProject
  Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
                {405E6B33-DBA9-4850-A19F-19298DA5A64D}.Release|Win32.Build.0 = Release|Win32
                {405E6B33-DBA9-4850-A19F-19298DA5A64D}.Release|x64.ActiveCfg = Release|x64
                {405E6B33-DBA9-4850-A19F-19298DA5A64D}.Release|x64.Build.0 = Release|x64
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Debug|Win32.ActiveCfg = Debug|Win32
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Debug|Win32.Build.0 = Debug|Win32
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Debug|x64.ActiveCfg = Debug|x64
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Debug|x64.Build.0 = Debug|x64
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Release|Win32.ActiveCfg = Release|Win32
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Release|Win32.Build.0 = Release|Win32
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Release|x64.ActiveCfg = Release|x64
 +              {BAE68B54-2C1A-44D0-A0E9-05156A784E79}.Release|x64.Build.0 = Release|x64
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Debug|Win32.ActiveCfg = Debug|Win32
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Debug|Win32.Build.0 = Debug|Win32
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Debug|x64.ActiveCfg = Debug|x64
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Debug|x64.Build.0 = Debug|x64
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Release|Win32.ActiveCfg = Release|Win32
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Release|Win32.Build.0 = Release|Win32
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Release|x64.ActiveCfg = Release|x64
 +              {43B095CB-B86C-44CB-BCE8-87FE8E7D2A0E}.Release|x64.Build.0 = Release|x64
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Debug|Win32.ActiveCfg = Debug|Win32
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Debug|Win32.Build.0 = Debug|Win32
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Debug|x64.ActiveCfg = Debug|x64
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Debug|x64.Build.0 = Debug|x64
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Release|Win32.ActiveCfg = Release|Win32
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Release|Win32.Build.0 = Release|Win32
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Release|x64.ActiveCfg = Release|x64
 +              {56A2E2F3-26CF-45D5-BE7A-534C39CD7003}.Release|x64.Build.0 = Release|x64
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Debug|Win32.ActiveCfg = Debug|Win32
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Debug|Win32.Build.0 = Debug|Win32
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Debug|x64.ActiveCfg = Debug|x64
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Debug|x64.Build.0 = Debug|x64
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Release|Win32.ActiveCfg = Release|Win32
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Release|Win32.Build.0 = Release|Win32
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Release|x64.ActiveCfg = Release|x64
+               {95C21D50-FFD1-4FCE-A545-49FA1F825B28}.Release|x64.Build.0 = Release|x64
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Debug|Win32.ActiveCfg = Debug|Win32
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Debug|Win32.Build.0 = Debug|Win32
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Debug|x64.ActiveCfg = Debug|x64
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Debug|x64.Build.0 = Debug|x64
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Release|Win32.ActiveCfg = Release|Win32
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Release|Win32.Build.0 = Release|Win32
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Release|x64.ActiveCfg = Release|x64
+               {AB1EEB8F-86F7-45B7-8CEC-B18C8E97EEFF}.Release|x64.Build.0 = Release|x64
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Debug|Win32.ActiveCfg = Debug|Win32
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Debug|Win32.Build.0 = Debug|Win32
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Debug|x64.ActiveCfg = Debug|x64
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Debug|x64.Build.0 = Debug|x64
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Release|Win32.ActiveCfg = Release|Win32
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Release|Win32.Build.0 = Release|Win32
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Release|x64.ActiveCfg = Release|x64
+               {1BB396F7-CE61-4CFC-9C22-266B2CFB2E74}.Release|x64.Build.0 = Release|x64
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Debug|Win32.ActiveCfg = Debug|Win32
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Debug|Win32.Build.0 = Debug|Win32
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Debug|x64.ActiveCfg = Debug|x64
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Debug|x64.Build.0 = Debug|x64
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Release|Win32.ActiveCfg = Release|Win32
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Release|Win32.Build.0 = Release|Win32
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Release|x64.ActiveCfg = Release|x64
+               {E1284D3E-4B3F-446B-B541-F661A8A166A7}.Release|x64.Build.0 = Release|x64
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Debug|Win32.ActiveCfg = Debug|Win32
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Debug|Win32.Build.0 = Debug|Win32
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Debug|x64.ActiveCfg = Debug|x64
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Debug|x64.Build.0 = Debug|x64
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Release|Win32.ActiveCfg = Release|Win32
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Release|Win32.Build.0 = Release|Win32
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Release|x64.ActiveCfg = Release|x64
+               {889AD61B-12E9-4F85-8525-B83C16C88C3F}.Release|x64.Build.0 = Release|x64
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Debug|Win32.ActiveCfg = Debug|Win32
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Debug|Win32.Build.0 = Debug|Win32
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Debug|x64.ActiveCfg = Debug|x64
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Debug|x64.Build.0 = Debug|x64
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Release|Win32.ActiveCfg = Release|Win32
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Release|Win32.Build.0 = Release|Win32
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Release|x64.ActiveCfg = Release|x64
+               {58A50B97-FA8D-4700-9E4A-C4993638EB7A}.Release|x64.Build.0 = Release|x64
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Debug|Win32.ActiveCfg = Debug|Win32
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Debug|Win32.Build.0 = Debug|Win32
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Debug|x64.ActiveCfg = Debug|x64
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Debug|x64.Build.0 = Debug|x64
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Release|Win32.ActiveCfg = Release|Win32
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Release|Win32.Build.0 = Release|Win32
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Release|x64.ActiveCfg = Release|x64
+               {6EA99B1F-99B4-4528-8195-7508EF70CFED}.Release|x64.Build.0 = Release|x64
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Debug|Win32.ActiveCfg = Debug|Win32
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Debug|Win32.Build.0 = Debug|Win32
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Debug|x64.ActiveCfg = Debug|x64
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Debug|x64.Build.0 = Debug|x64
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Release|Win32.ActiveCfg = Release|Win32
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Release|Win32.Build.0 = Release|Win32
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Release|x64.ActiveCfg = Release|x64
+               {9188FA91-E039-485D-AF1D-781CEA92F541}.Release|x64.Build.0 = Release|x64
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Debug|Win32.ActiveCfg = Debug|Win32
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Debug|Win32.Build.0 = Debug|Win32
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Debug|x64.ActiveCfg = Debug|x64
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Debug|x64.Build.0 = Debug|x64
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Release|Win32.ActiveCfg = Release|Win32
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Release|Win32.Build.0 = Release|Win32
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Release|x64.ActiveCfg = Release|x64
+               {F3943691-FF61-48B4-9CA4-10E9D1F600A6}.Release|x64.Build.0 = Release|x64
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Debug|Win32.ActiveCfg = Debug|Win32
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Debug|Win32.Build.0 = Debug|Win32
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Debug|x64.ActiveCfg = Debug|x64
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Debug|x64.Build.0 = Debug|x64
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Release|Win32.ActiveCfg = Release|Win32
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Release|Win32.Build.0 = Release|Win32
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Release|x64.ActiveCfg = Release|x64
+               {78D8B862-964A-4D0E-93D2-CA8A25BA1207}.Release|x64.Build.0 = Release|x64
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Debug|Win32.ActiveCfg = Debug|Win32
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Debug|Win32.Build.0 = Debug|Win32
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Debug|x64.ActiveCfg = Debug|x64
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Debug|x64.Build.0 = Debug|x64
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Release|Win32.ActiveCfg = Release|Win32
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Release|Win32.Build.0 = Release|Win32
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Release|x64.ActiveCfg = Release|x64
+               {ECA09A1E-6D12-4A47-92E1-A671C181DF77}.Release|x64.Build.0 = Release|x64
+               {9BE8D73A-7E83-46ED-A9E2-1E3472F52AE5}.Debug|Win32.ActiveCfg = Debug|Win32
+               {9BE8D73A-7E83-46ED-A9E2-1E3472F52AE5}.Debug|x64.ActiveCfg = Debug|x64
+               {9BE8D73A-7E83-46ED-A9E2-1E3472F52AE5}.Release|Win32.ActiveCfg = Release|Win32
+               {9BE8D73A-7E83-46ED-A9E2-1E3472F52AE5}.Release|x64.ActiveCfg = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
Simple merge
@@@ -10190,7 -9894,7 +10186,7 @@@ $as_echo "$ac_java_classpath" >&6; 
  $as_echo_n "checking to see if the java compiler works... " >&6; }
  
      cat << \EOF > conftest.java
- // #line 10193 "configure"
 -// #line 9897 "configure"
++// #line 10189 "configure"
  
  
  public class conftest {
@@@ -10256,7 -9960,7 +10252,7 @@@ $as_echo_n "checking type of jvm... " >
      if test "x$ac_java_jvm_name" = "x" ; then
  
      cat << \EOF > conftest.java
- // #line 10259 "configure"
 -// #line 9963 "configure"
++// #line 10255 "configure"
  import gnu.java.io.EncodingManager;
  
  public class conftest {
@@@ -10320,7 -10024,7 +10316,7 @@@ $as_echo_n "checking java API version..
  
  
      cat << \EOF > conftest.java
- // #line 10323 "configure"
 -// #line 10027 "configure"
++// #line 10319 "configure"
  import java.nio.charset.Charset;
  
  public class conftest {
  
  
      cat << \EOF > conftest.java
- // #line 10368 "configure"
 -// #line 10072 "configure"
++// #line 10364 "configure"
  import java.lang.StringBuilder;
  
  public class conftest {
@@@ -11624,7 -11328,7 +11620,7 @@@ $as_echo_n "checking jgraphx... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 11627 "configure"
 -// #line 11331 "configure"
++// #line 11623 "configure"
  import com.mxgraph.model.mxCell;
  
  public class conftest {
@@@ -11711,13 -11415,65 +11707,65 @@@ $as_echo "$as_me: WARNING: Could not fi
  
  
  
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.4.0.2) of jgraphx" >&5
- $as_echo_n "checking minimal version (1.4.0.2) of jgraphx... " >&6; }
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.4.1.0) of jgraphx" >&5
+ $as_echo_n "checking minimal version (1.4.1.0) of jgraphx... " >&6; }
     saved_ac_java_classpath=$ac_java_classpath
     export ac_java_classpath="$JGRAPHX:$ac_java_classpath"
+    if test "x=" == "x"; then
+     cat << \EOF > conftest.java
 -// #line 11425 "configure"
++// #line 11717 "configure"
+ import com.mxgraph.view.mxGraph;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="1.4.1.0";
+                             System.out.println(mxGraph.VERSION);
+                                   if (minVersion.compareTo(mxGraph.VERSION) < 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of jgraphx. Expected at least 1.4.1.0. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of jgraphx. Expected at least 1.4.1.0. Found $STDOUT" "$LINENO" 5
+             fi
+    else
  
      cat << \EOF > conftest.java
- // #line 11720 "configure"
 -// #line 11476 "configure"
++// #line 11768 "configure"
  import com.mxgraph.view.mxGraph;
  
  public class conftest {
@@@ -11789,7 -11546,7 +11838,7 @@@ $as_echo_n "checking flexdock... " >&6
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 11792 "configure"
 -// #line 11549 "configure"
++// #line 11841 "configure"
  import org.flexdock.docking.DockingManager;
  
  public class conftest {
@@@ -11875,6 -11632,117 +11924,117 @@@ $as_echo "$as_me: WARNING: Could not fi
                                FLEXDOCK=$PACKAGE_JAR_FILE
  
  
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (0.5.2) of flexdock" >&5
+ $as_echo_n "checking minimal version (0.5.2) of flexdock... " >&6; }
+    saved_ac_java_classpath=$ac_java_classpath
+    export ac_java_classpath="$FLEXDOCK:$ac_java_classpath"
+    if test "x" == "x"; then
+     cat << \EOF > conftest.java
 -// #line 11643 "configure"
++// #line 11935 "configure"
+ import org.flexdock.util.Utilities;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="0.5.2";
+                             System.out.println(Utilities.VERSION);
+                                   if (minVersion.compareTo(Utilities.VERSION) < 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of flexdock. Expected at least 0.5.2. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of flexdock. Expected at least 0.5.2. Found $STDOUT" "$LINENO" 5
+             fi
+    else
+     cat << \EOF > conftest.java
 -// #line 11694 "configure"
++// #line 11986 "configure"
+ import org.flexdock.util.Utilities;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="0.5.2";
+                             System.out.println(Utilities.VERSION);
+                                   if (minVersion.compareTo(Utilities.VERSION) != 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of flexdock. Expected exact version 0.5.2. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of flexdock. Expected exact version 0.5.2. Found $STDOUT" "$LINENO" 5
+             fi
+     fi
+    ac_java_classpath=$saved_ac_java_classpath
                                # Swing look&feel implementations
  
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking looks" >&5
@@@ -11896,7 -11764,7 +12056,7 @@@ $as_echo_n "checking looks... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 11899 "configure"
 -// #line 11767 "configure"
++// #line 12059 "configure"
  import com.jgoodies.looks.common.RenderingUtils;
  
  public class conftest {
@@@ -12003,7 -11871,7 +12163,7 @@@ $as_echo_n "checking jgoodies-looks... 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12006 "configure"
 -// #line 11874 "configure"
++// #line 12166 "configure"
  import com.jgoodies.looks.common.RenderingUtils;
  
  public class conftest {
@@@ -12111,7 -11979,7 +12271,7 @@@ $as_echo_n "checking skinlf... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12114 "configure"
 -// #line 11982 "configure"
++// #line 12274 "configure"
  import com.l2fprod.util.AccessUtils;
  
  public class conftest {
@@@ -12218,7 -12086,7 +12378,7 @@@ $as_echo_n "checking jogl... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12221 "configure"
 -// #line 12089 "configure"
++// #line 12381 "configure"
  import javax.media.opengl.glu.GLUnurbs;
  
  public class conftest {
@@@ -12428,7 -12296,7 +12588,7 @@@ $as_echo_n "checking gluegen-rt... " >&
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12431 "configure"
 -// #line 12299 "configure"
++// #line 12591 "configure"
  import com.sun.gluegen.runtime.CPU;
  
  public class conftest {
@@@ -12590,7 -12458,7 +12750,7 @@@ $as_echo_n "checking jhall... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12593 "configure"
 -// #line 12461 "configure"
++// #line 12753 "configure"
  import javax.help.JHelp;
  
  public class conftest {
@@@ -12697,7 -12565,7 +12857,7 @@@ $as_echo_n "checking javahelp2... " >&6
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12700 "configure"
 -// #line 12568 "configure"
++// #line 12860 "configure"
  import javax.help.JHelp;
  
  public class conftest {
@@@ -12805,7 -12673,7 +12965,7 @@@ $as_echo_n "checking jrosetta-API... " 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12808 "configure"
 -// #line 12676 "configure"
++// #line 12968 "configure"
  import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
  
  public class conftest {
@@@ -12912,7 -12780,7 +13072,7 @@@ $as_echo_n "checking jrosetta-engine..
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 12915 "configure"
 -// #line 12783 "configure"
++// #line 13075 "configure"
  import com.artenum.rosetta.core.action.AbstractConsoleAction;
  
  public class conftest {
@@@ -13021,7 -12889,7 +13181,7 @@@ $as_echo_n "checking jeuclid-core... " 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13024 "configure"
 -// #line 12892 "configure"
++// #line 13184 "configure"
  import net.sourceforge.jeuclid.LayoutContext;
  
  public class conftest {
@@@ -13130,7 -12998,7 +13290,7 @@@ $as_echo_n "checking fop... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13133 "configure"
 -// #line 13001 "configure"
++// #line 13293 "configure"
  import org.apache.fop.pdf.PDFInfo;
  
  public class conftest {
@@@ -13237,7 -13105,7 +13397,7 @@@ $as_echo_n "checking batik-all... " >&6
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13240 "configure"
 -// #line 13108 "configure"
++// #line 13400 "configure"
  import org.apache.batik.parser.Parser;
  
  public class conftest {
@@@ -13344,7 -13212,7 +13504,7 @@@ $as_echo_n "checking batik... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13347 "configure"
 -// #line 13215 "configure"
++// #line 13507 "configure"
  import org.apache.batik.parser.Parser;
  
  public class conftest {
@@@ -13435,9 -13303,10 +13595,10 @@@ $as_echo "$as_me: WARNING: Could not fi
  $as_echo_n "checking minimal version (1.7) of batik... " >&6; }
     saved_ac_java_classpath=$ac_java_classpath
     export ac_java_classpath="$BATIK:$ac_java_classpath"
+    if test "x" == "x"; then
  
      cat << \EOF > conftest.java
- // #line 13440 "configure"
 -// #line 13309 "configure"
++// #line 13601 "configure"
  import org.apache.batik.Version;
  
  public class conftest {
            as_fn_error "Wrong version of batik. Expected at least 1.7. Found $STDOUT" "$LINENO" 5
              fi
  
+    else
+     cat << \EOF > conftest.java
 -// #line 13360 "configure"
++// #line 13652 "configure"
+ import org.apache.batik.Version;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="1.7";
+                             System.out.println(Version.getVersion());
+                                   if (minVersion.compareTo(Version.getVersion()) != 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5
+             fi
+     fi
     ac_java_classpath=$saved_ac_java_classpath
  
  
@@@ -13509,7 -13430,7 +13722,7 @@@ $as_echo_n "checking commons-io... " >&
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13512 "configure"
 -// #line 13433 "configure"
++// #line 13725 "configure"
  import org.apache.commons.io.output.CountingOutputStream;
  
  public class conftest {
@@@ -13616,7 -13537,7 +13829,7 @@@ $as_echo_n "checking xmlgraphics-common
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13619 "configure"
 -// #line 13540 "configure"
++// #line 13832 "configure"
  import org.apache.xmlgraphics.util.Service;
  
  public class conftest {
@@@ -13723,7 -13644,7 +13936,7 @@@ $as_echo_n "checking avalon-framework..
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13726 "configure"
 -// #line 13647 "configure"
++// #line 13939 "configure"
  import org.apache.avalon.framework.configuration.ConfigurationException;
  
  public class conftest {
@@@ -13830,7 -13751,7 +14043,7 @@@ $as_echo_n "checking xml-apis-ext... " 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13833 "configure"
 -// #line 13754 "configure"
++// #line 14046 "configure"
  import org.w3c.dom.svg.SVGDocument;
  
  public class conftest {
@@@ -13937,7 -13858,7 +14150,7 @@@ $as_echo_n "checking xml-commons-apis-e
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 13940 "configure"
 -// #line 13861 "configure"
++// #line 14153 "configure"
  import org.w3c.dom.svg.SVGDocument;
  
  public class conftest {
@@@ -14048,7 -13969,7 +14261,7 @@@ $as_echo_n "checking commons-logging..
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14051 "configure"
 -// #line 13972 "configure"
++// #line 14264 "configure"
  import org.apache.commons.logging.LogFactory;
  
  public class conftest {
@@@ -14155,7 -14076,7 +14368,7 @@@ $as_echo_n "checking jlatexmath... " >&
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14158 "configure"
 -// #line 14079 "configure"
++// #line 14371 "configure"
  import org.scilab.forge.jlatexmath.TeXFormula;
  
  public class conftest {
@@@ -14242,13 -14163,65 +14455,65 @@@ $as_echo "$as_me: WARNING: Could not fi
  
  
  
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (0.8.8) of jlatexmath" >&5
- $as_echo_n "checking minimal version (0.8.8) of jlatexmath... " >&6; }
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (0.9.3) of jlatexmath" >&5
+ $as_echo_n "checking minimal version (0.9.3) of jlatexmath... " >&6; }
     saved_ac_java_classpath=$ac_java_classpath
     export ac_java_classpath="$JLATEXMATH:$ac_java_classpath"
+    if test "x" == "x"; then
+     cat << \EOF > conftest.java
 -// #line 14173 "configure"
++// #line 14465 "configure"
+ import org.scilab.forge.jlatexmath.TeXFormula;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="0.9.3";
+                             System.out.println(TeXFormula.VERSION);
+                                   if (minVersion.compareTo(TeXFormula.VERSION) < 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of jlatexmath. Expected at least 0.9.3. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of jlatexmath. Expected at least 0.9.3. Found $STDOUT" "$LINENO" 5
+             fi
+    else
  
      cat << \EOF > conftest.java
- // #line 14251 "configure"
 -// #line 14224 "configure"
++// #line 14516 "configure"
  import org.scilab.forge.jlatexmath.TeXFormula;
  
  public class conftest {
@@@ -14326,7 -14300,7 +14592,7 @@@ $as_echo_n "checking checkstyle... " >&
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14329 "configure"
 -// #line 14303 "configure"
++// #line 14595 "configure"
  import com.puppycrawl.tools.checkstyle.CheckStyleTask;
  
  public class conftest {
@@@ -14433,7 -14407,7 +14699,7 @@@ $as_echo_n "checking commons-beanutils.
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14436 "configure"
 -// #line 14410 "configure"
++// #line 14702 "configure"
  import org.apache.commons.beanutils.Converter;
  
  public class conftest {
@@@ -14540,7 -14514,7 +14806,7 @@@ $as_echo_n "checking antlr... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14543 "configure"
 -// #line 14517 "configure"
++// #line 14809 "configure"
  import antlr.TokenStreamException;
  
  public class conftest {
@@@ -14647,7 -14621,7 +14913,7 @@@ $as_echo_n "checking testng... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14650 "configure"
 -// #line 14624 "configure"
++// #line 14916 "configure"
  import org.testng.TestNG;
  
  public class conftest {
@@@ -14754,7 -14728,7 +15020,7 @@@ $as_echo_n "checking qdox... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14757 "configure"
 -// #line 14731 "configure"
++// #line 15023 "configure"
  import com.thoughtworks.qdox.tools.QDoxTester;
  
  public class conftest {
@@@ -14861,7 -14835,7 +15127,7 @@@ $as_echo_n "checking bsh... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14864 "configure"
 -// #line 14838 "configure"
++// #line 15130 "configure"
  import bsh.Console;
  
  public class conftest {
@@@ -14968,7 -14942,7 +15234,7 @@@ $as_echo_n "checking junit... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 14971 "configure"
 -// #line 14945 "configure"
++// #line 15237 "configure"
  import junit.framework.Assert;
  
  public class conftest {
@@@ -18881,7 -18855,7 +19147,7 @@@ $as_echo_n "checking jhdf5... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 18884 "configure"
 -// #line 18858 "configure"
++// #line 19150 "configure"
  import ncsa.hdf.hdf5lib.HDF5Constants;
  
  public class conftest {
  $as_echo_n "checking minimal version (1.8.4) of hdf5... " >&6; }
     saved_ac_java_classpath=$ac_java_classpath
     export ac_java_classpath="$JHDF5:$ac_java_classpath"
+    if test "x" == "x"; then
  
      cat << \EOF > conftest.java
- // #line 19032 "configure"
 -// #line 19007 "configure"
++// #line 19299 "configure"
  import ncsa.hdf.hdf5lib.H5;
  
  public class conftest {
            as_fn_error "Wrong version of hdf5. Expected at least 1.8.4. Found $STDOUT" "$LINENO" 5
              fi
  
+    else
+     cat << \EOF > conftest.java
 -// #line 19062 "configure"
++// #line 19354 "configure"
+ import ncsa.hdf.hdf5lib.H5;
+ public class conftest {
+     public static void main(String[] argv) {
+         String minVersion="1.8.4";
+                             int[] vers = new int[3];
+                 try { H5.H5get_libversion(vers); }
+                 catch (Throwable ex) {System.exit(-1);}
+                 String ver = vers[0] + "."+ vers[1] +"."+vers[2];
+                             System.out.println(ver);
+                                   if (minVersion.compareTo(ver) != 0) {
+                                    System.exit(-1);
+                                 }
+     }
+ }
+ EOF
+     CLASSPATH=$ac_java_classpath
+     export CLASSPATH
+     cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
+     if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
+        if test ""yes"" = "no"; then
+            echo "yes" >&5
+                  echo "yes"
+          else
+                  cmd="$JAVA conftest"
+                  if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
+                  echo "yes" >&5
+                          echo "yes"
+                       else
+                       echo "configure: failed program was:" >&5
+                               cat conftest.java >&5
+                 if test -s conftest.java.output; then
+                    STDOUT=`cat conftest.java.output`
+                 fi
+                       echo "configure: CLASSPATH was $CLASSPATH" >&5
+                         as_fn_error "Wrong version of hdf5. Expected exact version 1.8.4. Found $STDOUT" "$LINENO" 5
+                                               fi
+               fi
+         if test -f conftest.java.output; then
+            rm conftest.java.output
+         fi
+     else
+         echo "configure: failed program was:" >&5
+         cat conftest.java >&5
+         echo "configure: CLASSPATH was $CLASSPATH" >&5
+           as_fn_error "Wrong version of hdf5. Expected exact version 1.8.4. Found $STDOUT" "$LINENO" 5
+             fi
+     fi
     ac_java_classpath=$saved_ac_java_classpath
  
        unset LD_LIBRARY_PATH
@@@ -23614,7 -23644,7 +23937,7 @@@ CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
  $as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
  cat > conftest.$ac_ext <<EOF
- #line 23617 "configure"
 -#line 23647 "configure"
++#line 23940 "configure"
  #include "confdefs.h"
  
  #include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
@@@ -23926,7 -23956,7 +24249,7 @@@ CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CH
  $as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
  
  cat > conftest.$ac_ext <<EOF
- #line 23929 "configure"
 -#line 23959 "configure"
++#line 24252 "configure"
  #include "confdefs.h"
  
  #include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
@@@ -24510,7 -24540,7 +24833,7 @@@ $as_echo_n "checking saxon... " >&6; 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 24513 "configure"
 -// #line 24543 "configure"
++// #line 24836 "configure"
  import com.icl.saxon.Loader;
  
  public class conftest {
@@@ -24617,7 -24647,7 +24940,7 @@@ $as_echo_n "checking jlatexmath-fop... 
            export ac_java_classpath="$jar_resolved:$ac_java_classpath"
  
      cat << \EOF > conftest.java
- // #line 24620 "configure"
 -// #line 24650 "configure"
++// #line 24943 "configure"
  import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj;
  
  public class conftest {
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 30921 "configure"
 -#line 30951 "configure"
++#line 31244 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 31027 "configure"
 -#line 31057 "configure"
++#line 31350 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -37046,7 -37076,7 +37369,7 @@@ if test "$enable_stop_on_warning" = yes
     CPPFLAGS="$CPPFLAGS -Werror -O0"
  fi
  
- ac_config_files="$ac_config_files libs/MALLOC/Makefile libs/dynamiclibrary/Makefile libs/doublylinkedlist/Makefile libs/hashtable/Makefile libs/libst/Makefile contrib/Makefile modules/abstractSyntaxTree/Makefile modules/parse/Makefile modules/symbol/Makefile modules/functions_manager/Makefile modules/system_env/Makefile modules/helptools/Makefile modules/helptools/macros/xmlfiletohtml.sci modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/shell/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/symbolic/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/intersci/Makefile modules/localization/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/double/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/pvm/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/types/Makefile modules/hdf5/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/maple2scilab/Makefile modules/m2sci/Makefile modules/compatibility_functions/Makefile modules/texmacs/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/genetic_algorithms/Makefile modules/simulated_annealing/Makefile modules/parameters/Makefile modules/matio/Makefile modules/operations/Makefile modules/atoms/Makefile modules/xcos/Makefile modules/scinotes/Makefile modules/ui_data/Makefile modules/graph/Makefile modules/parallel/Makefile modules/modules_manager/Makefile modules/history_browser/Makefile modules/Makefile libs/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml etc/jvm_options.xml scilab-lib.properties scilab-lib-doc.properties"
 -ac_config_files="$ac_config_files libs/MALLOC/Makefile libs/dynamiclibrary/Makefile libs/doublylinkedlist/Makefile libs/hashtable/Makefile libs/libst/Makefile contrib/Makefile modules/helptools/Makefile modules/helptools/macros/xmlfiletohtml.sci modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/shell/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/commons/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/symbolic/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/intersci/Makefile modules/localization/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/double/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/pvm/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/types/Makefile modules/hdf5/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/maple2scilab/Makefile modules/m2sci/Makefile modules/compatibility_functions/Makefile modules/texmacs/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/genetic_algorithms/Makefile modules/simulated_annealing/Makefile modules/parameters/Makefile modules/matio/Makefile modules/operations/Makefile modules/atoms/Makefile modules/xcos/Makefile modules/scinotes/Makefile modules/ui_data/Makefile modules/graph/Makefile modules/parallel/Makefile modules/modules_manager/Makefile modules/history_browser/Makefile modules/Makefile libs/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml etc/jvm_options.xml scilab-lib.properties scilab-lib-doc.properties"
++ac_config_files="$ac_config_files libs/MALLOC/Makefile libs/dynamiclibrary/Makefile libs/doublylinkedlist/Makefile libs/hashtable/Makefile libs/libst/Makefile contrib/Makefile modules/abstractSyntaxTree/Makefile modules/parse/Makefile modules/symbol/Makefile modules/functions_manager/Makefile modules/system_env/Makefile modules/helptools/Makefile modules/helptools/macros/xmlfiletohtml.sci modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/shell/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/commons/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/symbolic/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/intersci/Makefile modules/localization/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/double/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/pvm/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/types/Makefile modules/hdf5/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/maple2scilab/Makefile modules/m2sci/Makefile modules/compatibility_functions/Makefile modules/texmacs/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/genetic_algorithms/Makefile modules/simulated_annealing/Makefile modules/parameters/Makefile modules/matio/Makefile modules/operations/Makefile modules/atoms/Makefile modules/xcos/Makefile modules/scinotes/Makefile modules/ui_data/Makefile modules/graph/Makefile modules/parallel/Makefile modules/modules_manager/Makefile modules/history_browser/Makefile modules/Makefile libs/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml etc/jvm_options.xml scilab-lib.properties scilab-lib-doc.properties"
  
  
  # Detection of the module for the future version of Scilab 6
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -151,21 -154,20 +154,21 @@@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARG
        distdir
  ETAGS = etags
  CTAGS = ctags
- DIST_SUBDIRS = core operations output_stream arnoldi \
-       elementary_functions matio functions_manager string api_scilab \
-       dynamic_link fileio history_manager spreadsheet tclsci \
-       localization action_binding renderer shell completion console \
-       graphic_export gui jvm graphics optimization symbolic randlib \
+ DIST_SUBDIRS = operations output_stream arnoldi elementary_functions \
 -      string api_scilab dynamic_link fileio history_manager \
 -      spreadsheet tclsci localization commons jvm action_binding \
 -      renderer shell completion console graphic_export gui graphics \
 -      optimization symbolic randlib statistics special_functions \
 -      interpolation linear_algebra integer data_structures mexlib \
 -      differential_equations cacsd polynomials boolean double pvm io \
 -      intersci signal_processing core call_scilab sound time sparse \
 -      windows_tools functions overloading maple2scilab m2sci texmacs \
 -      development_tools compatibility_functions helptools fftw \
 -      umfpack demo_tools genetic_algorithms simulated_annealing \
 -      parameters matio atoms types hdf5 graph xcos scinotes parallel \
 -      modules_manager ui_data history_browser scicos_blocks scicos . \
 -      javasci
++      matio functions_manager string api_scilab dynamic_link fileio \
++      history_manager spreadsheet tclsci localization commons jvm \
++      action_binding renderer shell completion console \
++      graphic_export gui graphics optimization symbolic randlib \
 +      statistics special_functions interpolation linear_algebra \
 +      integer data_structures mexlib differential_equations cacsd \
 +      polynomials boolean double pvm io intersci signal_processing \
-       call_scilab sound time sparse windows_tools functions \
++      core call_scilab sound time sparse windows_tools functions \
 +      overloading maple2scilab m2sci texmacs development_tools \
 +      compatibility_functions helptools fftw umfpack demo_tools \
 +      genetic_algorithms simulated_annealing parameters atoms types \
 +      hdf5 graph xcos system_env abstractSyntaxTree symbol parse \
 +      scinotes parallel modules_manager ui_data history_browser \
 +      scicos_blocks scicos . javasci
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
  am__relativize = \
    dir0=`pwd`; \
@@@ -441,26 -438,21 +444,23 @@@ target_alias = @target_alias
  top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 -SUBDIRS = operations output_stream arnoldi elementary_functions string \
 -      api_scilab dynamic_link fileio history_manager spreadsheet \
 -      tclsci localization commons jvm action_binding renderer shell \
 -      completion console graphic_export gui graphics optimization \
 -      symbolic randlib statistics special_functions interpolation \
 -      linear_algebra integer data_structures mexlib \
 -      differential_equations cacsd polynomials boolean double pvm io \
 -      intersci signal_processing core call_scilab interpolation \
 -      sound time randlib sparse windows_tools functions overloading \
 -      maple2scilab m2sci texmacs development_tools \
 -      compatibility_functions helptools fftw umfpack demo_tools \
 -      genetic_algorithms simulated_annealing parameters matio atoms \
 -      types hdf5 graph xcos scinotes parallel modules_manager \
 -      ui_data history_browser $(am__append_1) scicos . \
 -      $(am__append_2)
 +yacc_present = @yacc_present@
- # core is the main module of Scilab. All the compilation deps has been removed
- # since it already linked almost the whole world
- SUBDIRS = core operations output_stream arnoldi elementary_functions \
-       matio functions_manager string api_scilab dynamic_link fileio \
-       history_manager spreadsheet tclsci localization action_binding \
-       renderer shell completion console graphic_export gui jvm \
-       graphics optimization symbolic randlib statistics \
-       special_functions interpolation linear_algebra integer \
-       data_structures mexlib differential_equations cacsd \
++SUBDIRS = operations output_stream arnoldi elementary_functions matio \
++      functions_manager string api_scilab dynamic_link fileio \
++      history_manager spreadsheet tclsci localization commons jvm \
++      action_binding renderer shell completion console \
++      graphic_export gui graphics optimization symbolic randlib \
++      statistics special_functions interpolation linear_algebra \
++      integer data_structures mexlib differential_equations cacsd \
 +      polynomials boolean double pvm io intersci signal_processing \
 +      core call_scilab interpolation sound time randlib sparse \
 +      windows_tools functions overloading maple2scilab m2sci texmacs \
 +      development_tools compatibility_functions helptools fftw \
 +      umfpack demo_tools genetic_algorithms simulated_annealing \
 +      parameters atoms types hdf5 graph xcos system_env \
 +      abstractSyntaxTree symbol parse types scinotes parallel \
 +      modules_manager ui_data history_browser $(am__append_1) scicos \
 +      . $(am__append_2)
  
  #### Basic files ####
  libscilab_la_rootdir = $(mydatadir)
Simple merge
Simple merge
  extern "C" {
  #endif
  
 +#include "dynlib_api_scilab.h"
 +
  /*******************************/
- /*   boolean sparse functions   */
+ /*   boolean sparse functions  */
  /*******************************/
  /**
   * Get boolean sparse variable
  extern "C" {
  #endif
  
 +#include "version.h"
 +#include "dynlib_api_scilab.h"
  
- #define SCI_INT8              1
- #define SCI_INT16             2
- #define SCI_INT32             4
- #define SCI_INT64             8
+ #define SCI_INT8      1
+ #define SCI_INT16     2
+ #define SCI_INT32     4
+ #define SCI_INT64     8
  
- #define SCI_UINT8             11
+ #define SCI_UINT8     11
  #define SCI_UINT16    12
  #define SCI_UINT32    14
  #define SCI_UINT64    18
@@@ -251,6 -186,6 +251,8 @@@ SciErr getVarType(void* _pvCtx, int* _p
        return sciErr;
  }
  /*--------------------------------------------------------------------------*/
++// _pvCtx will not be used by getVarAddressFromName neither getVarType
++// it can then be NULL.
  SciErr getNamedVarType(void* _pvCtx, char* _pstName, int* _piType)
  {
        SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
        sciErr = getVarAddressFromName(_pvCtx, _pstName, &piAddr);
        if(sciErr.iErr)
        {
-               addErrorMessage(&sciErr, API_ERROR_NAMED_TYPE, _("%s: Unable to get type of variable \"%s\""), "getNamedVarType", _pstName);
+               addErrorMessage(&sciErr, API_ERROR_NAMED_UNDEFINED_VAR, _("%s: Unable to get variable \"%s\""), "getNamedVarType", _pstName);
                return sciErr;
        }
 -      
 +
        sciErr = getVarType(_pvCtx, piAddr, _piType);
        if(sciErr.iErr)
        {
@@@ -9,7 -9,7 +9,7 @@@
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   * Please note that piece of code will be rewrited for the Scilab 6 family
-- * However, the API (profile of the functions in the header files) will be 
++ * However, the API (profile of the functions in the header files) will be
   * still available and supported in Scilab 6.
   */
  
@@@ -161,43 -136,24 +161,43 @@@ SciErr createMatrixOfUnsignedInteger16(
        return sciErr;
  }
  
- SciErr createMatrixOfUnsignedInteger32(void* _pvCtx, int _iVar, int _iRows, int _iCols, unsigned int* _puiData32)
+ SciErr createMatrixOfUnsignedInteger32(void* _pvCtx, int _iVar, int _iRows, int _iCols, const unsigned int* _puiData32)
  {
        SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
 -      unsigned int *piData32  = NULL;
 +      unsigned int *puiData32 = NULL;
        int iSize                       = _iRows * _iCols;
  
 -      sciErr = allocMatrixOfUnsignedInteger32(_pvCtx, _iVar, _iRows, _iCols, &piData32);
 +      sciErr = allocMatrixOfUnsignedInteger32(_pvCtx, _iVar, _iRows, _iCols, &puiData32);
        if(sciErr.iErr)
        {
                addErrorMessage(&sciErr, API_ERROR_CREATE_INT, _("%s: Unable to create variable in Scilab memory"), "createMatrixOfUnsignedInteger32");
                return sciErr;
        }
  
 -      memcpy(piData32, _puiData32, sizeof(unsigned int) * iSize);
 +      memcpy(puiData32, _puiData32, sizeof(unsigned int) * iSize);
 +      return sciErr;
 +}
 +
 +#ifdef __SCILAB_INT64__
- SciErr createMatrixOfUnsignedInteger64(void* _pvCtx, int _iVar, int _iRows, int _iCols, unsigned long long* _pullData64)
++SciErr createMatrixOfUnsignedInteger64(void* _pvCtx, int _iVar, int _iRows, int _iCols, const unsigned long long* _pullData64)
 +{
 +      SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
 +      unsigned long long *pullData64  = NULL;
 +      int iSize                       = _iRows * _iCols;
 +
 +      sciErr = allocMatrixOfUnsignedInteger64(_pvCtx, _iVar, _iRows, _iCols, &pullData64);
 +      if(sciErr.iErr)
 +      {
 +              addErrorMessage(&sciErr, API_ERROR_CREATE_INT, _("%s: Unable to create variable in Scilab memory"), "createMatrixOfUnsignedInteger64");
 +              return sciErr;
 +      }
 +
 +      memcpy(pullData64, _pullData64, sizeof(unsigned long long) * iSize);
        return sciErr;
  }
 +#endif
  
- SciErr createMatrixOfInteger8(void* _pvCtx, int _iVar, int _iRows, int _iCols, char* _pcData8)
+ SciErr createMatrixOfInteger8(void* _pvCtx, int _iVar, int _iRows, int _iCols, const char* _pcData8)
  {
        SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
        char *pcData8   = NULL;
@@@ -249,7 -205,7 +249,7 @@@ SciErr createMatrixOfInteger32(void* _p
  }
  
  #ifdef __SCILAB_INT64__
- SciErr createMatrixOfInteger64(void* _pvCtx, int _iVar, int _iRows, int _iCols, long long* _pllData64)
 -SciErr createMatrixOfInteger64(void* _pvCtx, int _iVar, int _iRows, int _iCols, const ong long* _pllData64)
++SciErr createMatrixOfInteger64(void* _pvCtx, int _iVar, int _iRows, int _iCols, const long long* _pllData64)
  {
        SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
        long long  *pllData64   = NULL;
@@@ -487,14 -442,7 +487,14 @@@ SciErr createNamedMatrixOfUnsignedInteg
        return createCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_UINT32, _iRows, _iCols, _puiData32);
  }
  
 +#ifdef __SCILAB_INT64__
- SciErr createNamedMatrixOfUnsignedInteger64(void* _pvCtx, char* _pstName, int _iRows, int _iCols, unsigned long long* _pullData64)
++SciErr createNamedMatrixOfUnsignedInteger64(void* _pvCtx, char* _pstName, int _iRows, int _iCols, const unsigned long long* _pullData64)
 +{
 +      return createCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_UINT64, _iRows, _iCols, _pullData64);
 +}
 +#endif
 +
- SciErr createNamedMatrixOfInteger8(void* _pvCtx, char* _pstName, int _iRows, int _iCols, char* _pcData8)
+ SciErr createNamedMatrixOfInteger8(void* _pvCtx, char* _pstName, int _iRows, int _iCols, const char* _pcData8)
  {
        return createCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_INT8, _iRows, _iCols, _pcData8);
  }
@@@ -510,9 -458,9 +510,9 @@@ SciErr createNamedMatrixOfInteger32(voi
  }
  
  #ifdef __SCILAB_INT64__
- SciErr createNamedMatrixOfInteger64(void* _pvCtx, char* _pstName, int _iRows, int _iCols, long long* _pllData64)
+ SciErr createNamedMatrixOfInteger64(void* _pvCtx, char* _pstName, int _iRows, int _iCols, const long long* _pllData64)
  {
 -      return -1;
 +      return createCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_INT64, _iRows, _iCols, _pllData64);
  }
  #endif
  
@@@ -600,13 -548,6 +600,13 @@@ SciErr readNamedMatrixOfUnsignedInteger
        return readCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_UINT32, _piRows, _piCols, _puiData32);
  }
  
 +#ifdef __SCILAB_INT64__
- SciErr readNamedMatrixOfUnsignedInteger64(void* _pvCtx, char* _pstName, int* _piRows, int* _piCols, unsigned int* _pullData64)
++SciErr readNamedMatrixOfUnsignedInteger64(void* _pvCtx, char* _pstName, int* _piRows, int* _piCols, unsigned long long* _pullData64)
 +{
 +      return readCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_UINT64, _piRows, _piCols, _pullData64);
 +}
 +#endif
 +
  SciErr readNamedMatrixOfInteger8(void* _pvCtx, char* _pstName, int* _piRows, int* _piCols, char* _pcData8)
  {
        return readCommonNamedMatrixOfInteger(_pvCtx, _pstName, SCI_INT8, _piRows, _piCols, _pcData8);
@@@ -108,17 -104,20 +108,17 @@@ SciErr getMatrixOfString(void* _pvCtx, 
        return sciErr;
  }
  /*--------------------------------------------------------------------------*/
- SciErr createMatrixOfString(void* _pvCtx, int _iVar, int _iRows, int _iCols, char** _pstStrings)
+ SciErr createMatrixOfString(void* _pvCtx, int _iVar, int _iRows, int _iCols, const char* const * _pstStrings)
  {
        SciErr sciErr; sciErr.iErr = 0; sciErr.iMsgCount = 0;
 -      int iNewPos                     = Top - Rhs + _iVar;
 -      int iAddr                               = *Lstk(iNewPos);
 -      int iTotalLen           = 0;
 -      int *piAddr                     = NULL;
  
 -      getNewVarAddressFromPosition(_pvCtx, iNewPos, &piAddr);
 +      GatewayStruct* pStr = (GatewayStruct*)_pvCtx;
 +  InternalType** out = pStr->m_pOut;
  
 -      sciErr = fillMatrixOfString(_pvCtx, piAddr, _iRows, _iCols, _pstStrings, &iTotalLen);
 -      if(sciErr.iErr)
 +      String* pS = new String(_iRows, _iCols);
 +      if(pS == NULL)
        {
 -              addErrorMessage(&sciErr, API_ERROR_CREATE_STRING, _("%s: Unable to create variable in Scilab memory"), "createMatrixOfString");
 +              addErrorMessage(&sciErr, API_ERROR_NO_MORE_MEMORY, _("%s: No more memory to allocated variable"), "createMatrixOfString");
                return sciErr;
        }
  
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -5,17 -5,18 +5,19 @@@ EXPORT
  scirun_
  inisci_
  settmpdir_
- checkrhs_
- checklhs_
- com_
- intersci_
+ setSCIpath
+ InitializeLaunchScilabSignal
+ ReleaseLaunchScilabSignal
+ TerminateCorePart2
+ ExitScilab
 -getScilabMode
+ callFunctionFromGateway
  putlhsvar_
+ intersci_
  createvarfromptr_
- callFunctionFromGateway
+ checklhs_
+ checkrhs_
+ com_
  freeArrayOfString
 +cwritechain_
 +cmatptr_
 +creadmat_
- ExitScilab
- TerminateCorePart2
- InitializeLaunchScilabSignal
  #include <string.h>
  #include <stdio.h>
  #include <stdlib.h>
+ #include "BOOL.h"
  #include "call_scilab.h"
  #include "MALLOC.h"
 -#include "scilabmode.h"
 +#include "sci_mode.h"
  #include "fromc.h"
  #include "LaunchScilabSignal.h"
  #include "localization.h"
  #include "storeCommand.h"
  #include "WindowList.h"
  #include "../../core/src/c/TerminateCore.h"
 -#include "api_scilab.h"
 +#include "os_strdup.h"
  #include "call_scilab_engine_state.h"
+ #include "api_scilab.h"
  
  #ifdef _MSC_VER
  #include "SetScilabEnvironmentVariables.h"
  #include "getScilabDirectory.h"
 -#include "strdup_windows.h"
  #endif
- #ifdef _MSC_VER
- #define putenv _putenv
- #endif
  /*--------------------------------------------------------------------------*/
  static CALL_SCILAB_ENGINE_STATE csEngineState = CALL_SCILAB_ENGINE_STOP;
  /*--------------------------------------------------------------------------*/
@@@ -67,9 -67,26 +65,26 @@@ void DisableInteractiveMode(void
      setScilabMode(SCILAB_NWNI);
  }
  /*--------------------------------------------------------------------------*/
- BOOL StartScilab(char *SCIpath,char *ScilabStartup,int *Stacksize)
+ BOOL StartScilab(char *SCIpath,char *ScilabStartup, int Stacksize) {
+     return Call_ScilabOpen (SCIpath, TRUE, ScilabStartup, Stacksize) == 0;
+ }
+ /*--------------------------------------------------------------------------*/
+ /**
+  * Start Scilab engine
+  * Function created in the context of javasci v2.
+  * This function is just like StartScilab but provides more error messages
+  * in case or error. For now, it is only used in javasci v2 but it might
+  * be public sooner or later.
+  * @return
+  * 0: success
+  * -1: already running
+  * -2: Could not find SCI
+  * -3: No existing directory
+  * Any other positive integer: A Scilab internal error
+  */
+ int Call_ScilabOpen(char* SCIpath, BOOL advancedMode, char *ScilabStartup, int Stacksize)
  {
 -#define FORMAT_SCRIPT_STARTUP "exec(\"%s\",-1);quit;"
 +    #define FORMAT_SCRIPT_STARTUP "exec(\"%s\",-1);quit;"
      char *ScilabStartupUsed = NULL;
      char *InitStringToScilab = NULL;
      int StacksizeUsed = 0;
      }
      else
      {
-         if (!isdir(SCIpath)){
+         if (!isdir(SCIpath))
+         {
              /* Check if the directory actually exists */
 -            fprintf(stderr,"StartScilab: Could not find the directory %s\n", SCIpath);
 -            return -3;
 +            fprintf(stderr,"StartScilab: Could not find the directory %s\n",SCIpath);
 +            return FALSE;
-         }else{
+         }
+         else
+         {
 -#ifdef _MSC_VER
              char env[2048];
 -            sprintf(env, "SCI=%s", SCIpath);
 -            _putenv(env);
 -#else
 -            setenv("SCI", SCIpath, 0);
 -#endif
 -            setSCIpath(SCIpath);
 +            setSCI(SCIpath);
 +            sprintf(env,"SCI=%s",SCIpath);
 +            putenv(env);
          }
      }
  
      }
      else
      {
 -        ScilabStartupUsed = strdup(ScilabStartup);
 +        ScilabStartupUsed = os_strdup(ScilabStartup);
      }
  
-     if (Stacksize==NULL)
+     if (Stacksize==NULL || Stacksize == -1)
      {
          StacksizeUsed = DEFAULTSTACKSIZE;
      }
      }
  
      /* creates TMPDIR */
 -    C2F(settmpdir)();
 +    defineTMPDIR();
  
      /* Scilab Initialization */
 -    C2F(inisci)(&iflag, &StacksizeUsed, &ierr);
 -
 +    C2F(inisci)(&iflag,&StacksizeUsed,&ierr);
-     if ( ierr > 0 ) return FALSE;
+     if ( ierr > 0 ) return ierr;
  
      lengthStringToScilab = (int)(strlen(FORMAT_SCRIPT_STARTUP) + strlen(ScilabStartupUsed + 1));
      InitStringToScilab = (char*)MALLOC(lengthStringToScilab*sizeof(char));
 -    sprintf(InitStringToScilab, FORMAT_SCRIPT_STARTUP, ScilabStartupUsed);
 +    sprintf(InitStringToScilab,FORMAT_SCRIPT_STARTUP,ScilabStartupUsed);
  
 -    C2F(scirun)(InitStringToScilab, (long int)strlen(InitStringToScilab));
 +    C2F(scirun)(InitStringToScilab,(long int)strlen(InitStringToScilab));
  
 -    if (ScilabStartupUsed) {FREE(ScilabStartupUsed); ScilabStartupUsed = NULL;}
 -    if (InitStringToScilab) {FREE(InitStringToScilab); InitStringToScilab = NULL;}
 +    if (ScilabStartupUsed) {FREE(ScilabStartupUsed);ScilabStartupUsed=NULL;}
 +    if (InitStringToScilab) {FREE(InitStringToScilab);InitStringToScilab=NULL;}
  
      setCallScilabEngineState(CALL_SCILAB_ENGINE_STARTED);
-     return TRUE;
+     return 0;
  }
  /*--------------------------------------------------------------------------*/
  BOOL TerminateScilab(char *ScilabQuit)
@@@ -197,3 -230,17 +223,17 @@@ CALL_SCILAB_ENGINE_STATE getCallScilabE
      return csEngineState;
  }
  /*--------------------------------------------------------------------------*/
+ sci_types getVariableType(char *varName) {
+     int iSciType = -1;
 -    SciErr sciErr = getNamedVarType(pvApiCtx, (char*)varName, &iSciType);
++    SciErr sciErr = getNamedVarType(NULL, (char*)varName, &iSciType);
+     if (sciErr.iErr == API_ERROR_NAMED_UNDEFINED_VAR) {
+         return -2;
+     }
+     if(sciErr.iErr)
+     {
+         printError(&sciErr, 0);
+         return -1;
+     }
+     return (sci_types) iSciType;
+ }
+ /*--------------------------------------------------------------------------*/
index 0000000,c4fe0f2..f339fed
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,92 +1,92 @@@
+ #
+ # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ # Copyright (C) DIGITEO - 2010 - Allan CORNET
 -# 
++#
+ # This file must be used under the terms of the CeCILL.
+ # This source file is licensed as described in the file COPYING, which
+ # you should have received as part of this distribution.  The terms
 -# are also available at    
++# are also available at
+ # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ #
+ #### Target ######
+ modulename=commons
+ #### commons : Conf files ####
+ libscicommons_la_rootdir = $(mydatadir)
+ libscicommons_la_root_DATA = changelog.txt license.txt readme.txt version.xml
+ #### commons : init scripts ####
+ libscicommons_la_etcdir = $(mydatadir)/etc
+ libscicommons_la_etc_DATA = etc/commons.quit \
+                               etc/commons.start
+ include $(top_srcdir)/Makefile.incl.am
 -COMMONS_JNI_SOURCES = 
++COMMONS_JNI_SOURCES =
+ COMMONS_C_SOURCES =  src/jni/ScilabCommons_wrap.c
+ COMMONS_CPP_SOURCES =
+ COMMONS_FORTRAN_SOURCES = src/fortran/empty.f
 -GIWS_WRAPPERS = 
++GIWS_WRAPPERS =
+ if GIWS
+ BUILT_SOURCES=giws
+ endif
 -GATEWAY_C_SOURCES = 
++GATEWAY_C_SOURCES =
 -GATEWAY_CPP_SOURCES = 
++GATEWAY_CPP_SOURCES =
+ libscicommons_la_CFLAGS= $(JAVA_JNI_INCLUDE)
 -libscicommons_la_CPPFLAGS = 
++libscicommons_la_CPPFLAGS =
 -# Without the commons module 
 -libscicommons_disable_la_CFLAGS = 
++# Without the commons module
++libscicommons_disable_la_CFLAGS =
 -COMMONS_DISABLE_C_SOURCES = 
++COMMONS_DISABLE_C_SOURCES =
+ libscicommons_disable_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
+ libscicommons_disable_la_SOURCES = $(COMMONS_DISABLE_C_SOURCES)
+ pkglib_LTLIBRARIES = libscicommons-disable.la
+ if GUI
 -pkglib_LTLIBRARIES += libscicommons.la 
++pkglib_LTLIBRARIES += libscicommons.la
+ endif
+ libscicommons_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
+ libscicommons_la_SOURCES = $(COMMONS_C_SOURCES) $(COMMONS_FORTRAN_SOURCES) $(COMMONS_JNI_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES) $(COMMONS_CPP_SOURCES)
+ # For the code check (splint)
+ CHECK_SRC= $(COMMONS_C_SOURCES) $(GATEWAY_C_SOURCES)
+ INCLUDE_FLAGS = $(libscicommons_la_CFLAGS)
+ #### SWIG Declaration ####
 -SWIG_WRAPPERS = 
++SWIG_WRAPPERS = src/jni/ScilabCommons.i
+ if SWIG
+ BUILT_SOURCES=swig
+ endif
+ libscicommons_la_LIBADD = $(top_builddir)/libs/MALLOC/libscimalloc.la \
+ $(top_builddir)/modules/output_stream/libscioutput_stream.la
+ #### commons : gateway declaration ####
+ libscicommons_la_sci_gatewaydir = $(mydatadir)/sci_gateway
 -libscicommons_la_sci_gateway_DATA = 
++libscicommons_la_sci_gateway_DATA =
+ if GUI
+ USEANT=1
+ endif
index 0000000,9e1ebb0..e5e4682
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1126 +1,1132 @@@
+ # Makefile.in generated by automake 1.11.1 from Makefile.am.
+ # @configure_input@
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+ # Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+ @SET_MAKE@
+ #
+ # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ # Copyright (C) DIGITEO - 2010 - Allan CORNET
 -# 
++#
+ # This file must be used under the terms of the CeCILL.
+ # This source file is licensed as described in the file COPYING, which
+ # you should have received as part of this distribution.  The terms
 -# are also available at    
++# are also available at
+ # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ #
+ # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ # Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
+ # Copyright (C) 2008      - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
+ #
+ # This file must be used under the terms of the CeCILL.
+ # This source file is licensed as described in the file COPYING, which
+ # you should have received as part of this distribution.  The terms
+ # are also available at
+ # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ #
+ ##########
+ ### Makefile included stuff
+ ### Target, variable, suffixes which are supposed to be usefull in every makefile.am
+ ##########
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkglibexecdir = $(libexecdir)/@PACKAGE@
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+ INSTALL_HEADER = $(INSTALL_DATA)
+ transform = $(program_transform_name)
+ NORMAL_INSTALL = :
+ PRE_INSTALL = :
+ POST_INSTALL = :
+ NORMAL_UNINSTALL = :
+ PRE_UNINSTALL = :
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/Makefile.incl.am
+ @NEED_JAVA_TRUE@am__append_1 = java
+ # With --enable-compilation-tests, launch java unitary tests
+ @COMPILATION_TESTS_TRUE@am__append_2 = test
 -@GUI_TRUE@am__append_3 = libscicommons.la 
++@GUI_TRUE@am__append_3 = libscicommons.la
+ subdir = modules/commons
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
+       $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
+       $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
+       $(top_srcdir)/m4/intel_compiler.m4 \
+       $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/libsmath.m4 \
+       $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libxml2.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/ocaml.m4 $(top_srcdir)/m4/pcre.m4 \
+       $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/pvm.m4 \
+       $(top_srcdir)/m4/relocatable.m4 $(top_srcdir)/m4/swig.m4 \
+       $(top_srcdir)/m4/symlinks.m4 $(top_srcdir)/m4/tcltk.m4 \
+       $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+ CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+ am__vpath_adj = case $$p in \
+     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+     *) f=$$p;; \
+   esac;
+ am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+ am__install_max = 40
+ am__nobase_strip_setup = \
+   srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+ am__nobase_strip = \
+   for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+ am__nobase_list = $(am__nobase_strip_setup); \
+   for p in $$list; do echo "$$p $$p"; done | \
+   sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+   $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+     if (++n[$$2] == $(am__install_max)) \
+       { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+     END { for (dir in files) print dir, files[dir] }'
+ am__base_list = \
+   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+       "$(DESTDIR)$(libscicommons_la_etcdir)" \
+       "$(DESTDIR)$(libscicommons_la_rootdir)" \
+       "$(DESTDIR)$(libscicommons_la_sci_gatewaydir)"
+ LTLIBRARIES = $(pkglib_LTLIBRARIES)
+ libscicommons_disable_la_LIBADD =
+ am__objects_1 =
+ am_libscicommons_disable_la_OBJECTS = $(am__objects_1)
+ libscicommons_disable_la_OBJECTS =  \
+       $(am_libscicommons_disable_la_OBJECTS)
+ libscicommons_disable_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libscicommons_disable_la_CFLAGS) $(CFLAGS) \
+       $(libscicommons_disable_la_LDFLAGS) $(LDFLAGS) -o $@
+ libscicommons_la_DEPENDENCIES =  \
+       $(top_builddir)/libs/MALLOC/libscimalloc.la \
+       $(top_builddir)/modules/output_stream/libscioutput_stream.la
+ am__objects_2 = libscicommons_la-ScilabCommons_wrap.lo
+ am__objects_3 = empty.lo
+ am_libscicommons_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
+       $(am__objects_1) $(am__objects_1) $(am__objects_1) \
+       $(am__objects_1)
+ libscicommons_la_OBJECTS = $(am_libscicommons_la_OBJECTS)
+ libscicommons_la_LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \
+       $(libscicommons_la_LDFLAGS) $(LDFLAGS) -o $@
+ @GUI_TRUE@am_libscicommons_la_rpath = -rpath $(pkglibdir)
+ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+ am__depfiles_maybe = depfiles
+ am__mv = mv -f
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ CCLD = $(CC)
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+ F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+ LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
+ F77LD = $(F77)
+ F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+ SOURCES = $(libscicommons_disable_la_SOURCES) \
+       $(libscicommons_la_SOURCES)
+ DIST_SOURCES = $(libscicommons_disable_la_SOURCES) \
+       $(libscicommons_la_SOURCES)
+ DATA = $(libscicommons_la_etc_DATA) $(libscicommons_la_root_DATA) \
+       $(libscicommons_la_sci_gateway_DATA)
+ ETAGS = etags
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+ ALL_LINGUAS = @ALL_LINGUAS@
+ AMTAR = @AMTAR@
+ ANT = @ANT@
+ ANTLR = @ANTLR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+ AUTOHEADER = @AUTOHEADER@
+ AUTOMAKE = @AUTOMAKE@
+ AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
+ AWK = @AWK@
+ BATIK = @BATIK@
+ BLAS_LIBS = @BLAS_LIBS@
+ BSH = @BSH@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+ CHECKSTYLE = @CHECKSTYLE@
+ COMMONS_BEANUTILS = @COMMONS_BEANUTILS@
+ COMMONS_IO = @COMMONS_IO@
+ COMMONS_LOGGING = @COMMONS_LOGGING@
+ CPP = @CPP@
+ CPPFLAGS = @CPPFLAGS@
+ CXX = @CXX@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
+ DEPDIR = @DEPDIR@
+ DOCBOOK_ROOT = @DOCBOOK_ROOT@
+ DSYMUTIL = @DSYMUTIL@
+ DUMPBIN = @DUMPBIN@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+ FFLAGS = @FFLAGS@
+ FFTW3_LIB = @FFTW3_LIB@
+ FFTW_ENABLE = @FFTW_ENABLE@
+ FGREP = @FGREP@
+ FLEXDOCK = @FLEXDOCK@
+ FLIBS = @FLIBS@
+ FOP = @FOP@
+ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+ GIWS_BIN = @GIWS_BIN@
+ GLUEGEN_RT = @GLUEGEN_RT@
+ GMSGFMT = @GMSGFMT@
+ GMSGFMT_015 = @GMSGFMT_015@
+ GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
+ GREP = @GREP@
+ GUI_ENABLE = @GUI_ENABLE@
+ HDF5_CFLAGS = @HDF5_CFLAGS@
+ HDF5_ENABLE = @HDF5_ENABLE@
+ HDF5_LIBS = @HDF5_LIBS@
+ HELP_ENABLE = @HELP_ENABLE@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INTLLIBS = @INTLLIBS@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+ JAR = @JAR@
+ JAVA = @JAVA@
+ JAVAC = @JAVAC@
+ JAVAH = @JAVAH@
+ JAVASCI_ENABLE = @JAVASCI_ENABLE@
+ JAVA_DEBUG_OPTIONS = @JAVA_DEBUG_OPTIONS@
+ JAVA_ENABLE = @JAVA_ENABLE@
+ JAVA_G = @JAVA_G@
+ JAVA_HOME = @JAVA_HOME@
+ JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
+ JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
+ JDB = @JDB@
+ JEUCLID_CORE = @JEUCLID_CORE@
+ JGRAPHX = @JGRAPHX@
+ JHALL = @JHALL@
+ JHDF5 = @JHDF5@
+ JLATEXMATH = @JLATEXMATH@
+ JLATEXMATH_FOP = @JLATEXMATH_FOP@
+ JOGL = @JOGL@
+ JROSETTA_API = @JROSETTA_API@
+ JROSETTA_ENGINE = @JROSETTA_ENGINE@
+ JUNIT = @JUNIT@
+ LAPACK_LIBS = @LAPACK_LIBS@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
++LEX = @LEX@
++LEXLIB = @LEXLIB@
++LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+ LIBM = @LIBM@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+ LIPO = @LIPO@
+ LN_S = @LN_S@
+ LOOKS = @LOOKS@
+ LTLIBICONV = @LTLIBICONV@
+ LTLIBINTL = @LTLIBINTL@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAKEINFO = @MAKEINFO@
+ MATIO_CFLAGS = @MATIO_CFLAGS@
+ MATIO_ENABLE = @MATIO_ENABLE@
+ MATIO_LIBS = @MATIO_LIBS@
+ MKDIR_P = @MKDIR_P@
+ MSGCAT = @MSGCAT@
+ MSGFMT = @MSGFMT@
+ MSGFMT_015 = @MSGFMT_015@
+ MSGMERGE = @MSGMERGE@
+ NM = @NM@
+ NMEDIT = @NMEDIT@
+ OBJDUMP = @OBJDUMP@
+ OBJEXT = @OBJEXT@
+ OCAMLC = @OCAMLC@
+ OCAMLDEP = @OCAMLDEP@
+ OCAMLLEX = @OCAMLLEX@
+ OCAMLOPT = @OCAMLOPT@
+ OCAMLYACC = @OCAMLYACC@
+ OPENMP_CFLAGS = @OPENMP_CFLAGS@
+ OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+ OPENMP_ENABLE = @OPENMP_ENABLE@
+ OPENMP_LIBS = @OPENMP_LIBS@
+ OTOOL = @OTOOL@
+ OTOOL64 = @OTOOL64@
+ PACKAGE = @PACKAGE@
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+ PACKAGE_NAME = @PACKAGE_NAME@
+ PACKAGE_STRING = @PACKAGE_STRING@
+ PACKAGE_TARNAME = @PACKAGE_TARNAME@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PCRE_CFLAGS = @PCRE_CFLAGS@
+ PCRE_CONFIG = @PCRE_CONFIG@
+ PCRE_LIBS = @PCRE_LIBS@
+ PCRE_VERSION = @PCRE_VERSION@
+ PKG_CONFIG = @PKG_CONFIG@
+ POSUB = @POSUB@
+ POW_LIB = @POW_LIB@
+ PVMGETARCH = @PVMGETARCH@
+ PVM_ARCH = @PVM_ARCH@
+ PVM_ENABLE = @PVM_ENABLE@
+ PVM_INCLUDE = @PVM_INCLUDE@
+ PVM_LIB = @PVM_LIB@
+ PYTHON = @PYTHON@
+ QDOX = @QDOX@
+ RANLIB = @RANLIB@
+ RELOCATABLE = @RELOCATABLE@
+ RT_LIB = @RT_LIB@
+ SAXON = @SAXON@
+ SCICOS_ENABLE = @SCICOS_ENABLE@
+ SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
+ SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SET_RELOCATABLE = @SET_RELOCATABLE@
+ SHELL = @SHELL@
+ SKINLF = @SKINLF@
+ SPLINT = @SPLINT@
+ STRIP = @STRIP@
+ SWIG_BIN = @SWIG_BIN@
+ SWIG_JAVA = @SWIG_JAVA@
+ SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
+ TCLTK_LIBS = @TCLTK_LIBS@
+ TCL_INC_PATH = @TCL_INC_PATH@
+ TESTNG = @TESTNG@
+ TK_INC_PATH = @TK_INC_PATH@
+ UMFPACK_ENABLE = @UMFPACK_ENABLE@
+ UMFPACK_LIB = @UMFPACK_LIB@
+ USE_NLS = @USE_NLS@
+ VERSION = @VERSION@
+ WITH_OCAML = @WITH_OCAML@
+ WITH_TKSCI = @WITH_TKSCI@
+ XGETTEXT = @XGETTEXT@
+ XGETTEXT_015 = @XGETTEXT_015@
+ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+ XMKMF = @XMKMF@
+ XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
+ XML_APIS_EXT = @XML_APIS_EXT@
+ XML_CONFIG = @XML_CONFIG@
+ XML_FLAGS = @XML_FLAGS@
+ XML_LIBS = @XML_LIBS@
+ XML_VERSION = @XML_VERSION@
+ X_CFLAGS = @X_CFLAGS@
+ X_EXTRA_LIBS = @X_EXTRA_LIBS@
+ X_LIBS = @X_LIBS@
+ X_PRE_LIBS = @X_PRE_LIBS@
++YACC = @YACC@
++YFLAGS = @YFLAGS@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+ abs_top_srcdir = @abs_top_srcdir@
+ ac_ct_CC = @ac_ct_CC@
+ ac_ct_CXX = @ac_ct_CXX@
+ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ ac_ct_F77 = @ac_ct_F77@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+ am__tar = @am__tar@
+ am__untar = @am__untar@
+ bindir = @bindir@
+ build = @build@
+ build_alias = @build_alias@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
+ builddir = @builddir@
+ cxx_present = @cxx_present@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+ host = @host@
+ host_alias = @host_alias@
+ host_cpu = @host_cpu@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
+ htmldir = @htmldir@
+ includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
+ libdir = @libdir@
+ libexecdir = @libexecdir@
+ localedir = @localedir@
+ localstatedir = @localstatedir@
+ mandir = @mandir@
+ mkdir_p = @mkdir_p@
+ oldincludedir = @oldincludedir@
+ pdfdir = @pdfdir@
+ prefix = @prefix@
+ program_transform_name = @program_transform_name@
+ psdir = @psdir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
+ srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
++yacc_present = @yacc_present@
+ #### Target ######
+ modulename = commons
+ #### commons : Conf files ####
+ libscicommons_la_rootdir = $(mydatadir)
+ libscicommons_la_root_DATA = changelog.txt license.txt readme.txt version.xml
+ #### commons : init scripts ####
+ libscicommons_la_etcdir = $(mydatadir)/etc
+ libscicommons_la_etc_DATA = etc/commons.quit \
+                               etc/commons.start
+ # Where all the Scilab stuff is installed (macros, help, ...)
+ mydatadir = $(pkgdatadir)/modules/$(modulename)
+ # splint options
+ SPLINT_OPTIONS = -weak -booltype BOOL
+ ########################### JAVA ######################################
+ #### We are delegating java compilation to ant... Thanks to that
+ #### the procedure will be the same with Microsoft Windows (C)
+ #### and Linux/Unix
+ #######################################################################
+ TARGETS_ALL = $(am__append_1) $(am__append_2)
+ ################ MACROS ######################
+ # Rule to build a macro
+ # NOT USED  AT THE MOMENT
+ SUFFIXES = .sci 
+ ########### INSTALL DOCUMENTATION ###################
+ # Install documentation files into the right target
+ # We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
+ # automake needs the html files to be present which is not the case when
+ # we are building Scilab
+ # Where it should be installed
+ pkgdocdir = $(mydatadir)
+ # What is the mask of the help source
+ DOCMASKXML = *.xml
+ # What is the mask of the MathML sources
+ DOCMASKMML = *.mml
+ ########### INSTALL DATA ###################
+ # Install macros, help & demos
+ # Where it should be installed
+ pkgmacrosdir = $(mydatadir)
+ # Which directory we process
+ MACRODIRS = macros/
+ # Mask of the Scilab sources macros
+ MACROMASK = *.sci
+ # Mask of the Scilab executable sources macros
+ MACROBUILDMASK = *.sce
+ # Mask of the Scilab compiled macros
+ MACROBINMASK = *.bin
+ # List of the standard directory for tests
+ TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests
+ # Where the demos should be installed
+ pkgdemosdir = $(mydatadir)
+ # List of the standard directory for demos
+ DEMOS_DIR = demos
+ # List of the standard directory for examples
+ EXAMPLES_DIR = examples
+ # Where to export JAVA archives (.jar)
+ JARDIR = jar/
+ # JAR files mask
+ JARMASK = *.jar
+ # Chapter file 
+ HELP_CHAPTERDIR = help/
+ HELP_CHAPTERFILE = addchapter.sce
+ HELP_CHAPTERLANG = en_US fr_FR pt_BR
+ COMMONS_JNI_SOURCES = 
+ COMMONS_C_SOURCES = src/jni/ScilabCommons_wrap.c
+ COMMONS_CPP_SOURCES = 
+ COMMONS_FORTRAN_SOURCES = src/fortran/empty.f
+ GIWS_WRAPPERS = 
+ @GIWS_TRUE@BUILT_SOURCES = giws
+ @SWIG_TRUE@BUILT_SOURCES = swig
+ GATEWAY_C_SOURCES = 
+ GATEWAY_CPP_SOURCES = 
+ libscicommons_la_CFLAGS = $(JAVA_JNI_INCLUDE)
+ libscicommons_la_CPPFLAGS = 
 -# Without the commons module 
++# Without the commons module
+ libscicommons_disable_la_CFLAGS = 
+ COMMONS_DISABLE_C_SOURCES = 
+ libscicommons_disable_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
+ libscicommons_disable_la_SOURCES = $(COMMONS_DISABLE_C_SOURCES)
+ pkglib_LTLIBRARIES = libscicommons-disable.la $(am__append_3)
+ libscicommons_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
+ libscicommons_la_SOURCES = $(COMMONS_C_SOURCES) $(COMMONS_FORTRAN_SOURCES) $(COMMONS_JNI_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES) $(COMMONS_CPP_SOURCES)
+ # For the code check (splint)
+ CHECK_SRC = $(COMMONS_C_SOURCES) $(GATEWAY_C_SOURCES)
+ INCLUDE_FLAGS = $(libscicommons_la_CFLAGS)
+ #### SWIG Declaration ####
 -SWIG_WRAPPERS = 
++SWIG_WRAPPERS = src/jni/ScilabCommons.i
+ libscicommons_la_LIBADD = $(top_builddir)/libs/MALLOC/libscimalloc.la \
+ $(top_builddir)/modules/output_stream/libscioutput_stream.la
+ #### commons : gateway declaration ####
+ libscicommons_la_sci_gatewaydir = $(mydatadir)/sci_gateway
+ libscicommons_la_sci_gateway_DATA = 
+ @GUI_TRUE@USEANT = 1
+ all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+ .SUFFIXES:
+ .SUFFIXES: .sci .bin .c .f .lo .o .obj
+ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/commons/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign modules/commons/Makefile
+ .PRECIOUS: Makefile
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ $(am__aclocal_m4_deps):
+ install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+       @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+       }
+ uninstall-pkglibLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+       done
+ clean-pkglibLTLIBRARIES:
+       -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+       @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+ libscicommons-disable.la: $(libscicommons_disable_la_OBJECTS) $(libscicommons_disable_la_DEPENDENCIES) 
+       $(libscicommons_disable_la_LINK) -rpath $(pkglibdir) $(libscicommons_disable_la_OBJECTS) $(libscicommons_disable_la_LIBADD) $(LIBS)
+ libscicommons.la: $(libscicommons_la_OBJECTS) $(libscicommons_la_DEPENDENCIES) 
+       $(libscicommons_la_LINK) $(am_libscicommons_la_rpath) $(libscicommons_la_OBJECTS) $(libscicommons_la_LIBADD) $(LIBS)
+ mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+ distclean-compile:
+       -rm -f *.tab.c
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Plo@am__quote@
+ .c.o:
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ .c.obj:
+ @am__fastdepCC_TRUE@  $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ .c.lo:
+ @am__fastdepCC_TRUE@  $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ libscicommons_la-ScilabCommons_wrap.lo: src/jni/ScilabCommons_wrap.c
+ @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -MT libscicommons_la-ScilabCommons_wrap.lo -MD -MP -MF $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Tpo -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Tpo $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/jni/ScilabCommons_wrap.c' object='libscicommons_la-ScilabCommons_wrap.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
+ .f.o:
+       $(F77COMPILE) -c -o $@ $<
+ .f.obj:
+       $(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+ .f.lo:
+       $(LTF77COMPILE) -c -o $@ $<
+ empty.lo: src/fortran/empty.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o empty.lo `test -f 'src/fortran/empty.f' || echo '$(srcdir)/'`src/fortran/empty.f
+ mostlyclean-libtool:
+       -rm -f *.lo
+ clean-libtool:
+       -rm -rf .libs _libs
+ install-libscicommons_la_etcDATA: $(libscicommons_la_etc_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(libscicommons_la_etcdir)" || $(MKDIR_P) "$(DESTDIR)$(libscicommons_la_etcdir)"
+       @list='$(libscicommons_la_etc_DATA)'; test -n "$(libscicommons_la_etcdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscicommons_la_etcdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(libscicommons_la_etcdir)" || exit $$?; \
+       done
+ uninstall-libscicommons_la_etcDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(libscicommons_la_etc_DATA)'; test -n "$(libscicommons_la_etcdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libscicommons_la_etcdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libscicommons_la_etcdir)" && rm -f $$files
+ install-libscicommons_la_rootDATA: $(libscicommons_la_root_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(libscicommons_la_rootdir)" || $(MKDIR_P) "$(DESTDIR)$(libscicommons_la_rootdir)"
+       @list='$(libscicommons_la_root_DATA)'; test -n "$(libscicommons_la_rootdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscicommons_la_rootdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(libscicommons_la_rootdir)" || exit $$?; \
+       done
+ uninstall-libscicommons_la_rootDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(libscicommons_la_root_DATA)'; test -n "$(libscicommons_la_rootdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libscicommons_la_rootdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libscicommons_la_rootdir)" && rm -f $$files
+ install-libscicommons_la_sci_gatewayDATA: $(libscicommons_la_sci_gateway_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(libscicommons_la_sci_gatewaydir)" || $(MKDIR_P) "$(DESTDIR)$(libscicommons_la_sci_gatewaydir)"
+       @list='$(libscicommons_la_sci_gateway_DATA)'; test -n "$(libscicommons_la_sci_gatewaydir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libscicommons_la_sci_gatewaydir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(libscicommons_la_sci_gatewaydir)" || exit $$?; \
+       done
+ uninstall-libscicommons_la_sci_gatewayDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(libscicommons_la_sci_gateway_DATA)'; test -n "$(libscicommons_la_sci_gatewaydir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libscicommons_la_sci_gatewaydir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libscicommons_la_sci_gatewaydir)" && rm -f $$files
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+ tags: TAGS
+ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ ctags: CTAGS
+ CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+ GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+ distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+ check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+ all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
+ installdirs:
+       for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libscicommons_la_etcdir)" "$(DESTDIR)$(libscicommons_la_rootdir)" "$(DESTDIR)$(libscicommons_la_sci_gatewaydir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+ install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+ install-exec: install-exec-am
+ install-data: install-data-am
+ uninstall: uninstall-am
+ install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+ installcheck: installcheck-am
+ install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ mostlyclean-generic:
+ clean-generic:
+ distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ clean: clean-am
+ clean-am: clean-generic clean-libtool clean-local \
+       clean-pkglibLTLIBRARIES mostlyclean-am
+ distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-local distclean-tags
+ dvi: dvi-am
+ dvi-am:
+ html: html-am
+ html-am:
+ info: info-am
+ info-am:
+ install-data-am: install-data-local install-libscicommons_la_etcDATA \
+       install-libscicommons_la_rootDATA \
+       install-libscicommons_la_sci_gatewayDATA
+ install-dvi: install-dvi-am
+ install-dvi-am:
+ install-exec-am: install-pkglibLTLIBRARIES
+ install-html: install-html-am
+ install-html-am: install-html-local
+ install-info: install-info-am
+ install-info-am:
+ install-man:
+ install-pdf: install-pdf-am
+ install-pdf-am:
+ install-ps: install-ps-am
+ install-ps-am:
+ installcheck-am:
+ maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+ maintainer-clean-am: distclean-am maintainer-clean-generic
+ mostlyclean: mostlyclean-am
+ mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+ pdf: pdf-am
+ pdf-am:
+ ps: ps-am
+ ps-am:
+ uninstall-am: uninstall-libscicommons_la_etcDATA \
+       uninstall-libscicommons_la_rootDATA \
+       uninstall-libscicommons_la_sci_gatewayDATA \
+       uninstall-pkglibLTLIBRARIES
+ .MAKE: all check check-am install install-am install-strip
+ .PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
+       clean clean-generic clean-libtool clean-local \
+       clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-local \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am \
+       install-data-local install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am \
+       install-html-local install-info install-info-am \
+       install-libscicommons_la_etcDATA \
+       install-libscicommons_la_rootDATA \
+       install-libscicommons_la_sci_gatewayDATA install-man \
+       install-pdf install-pdf-am install-pkglibLTLIBRARIES \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-libscicommons_la_etcDATA \
+       uninstall-libscicommons_la_rootDATA \
+       uninstall-libscicommons_la_sci_gatewayDATA \
+       uninstall-pkglibLTLIBRARIES
+ # This target enables tests for Scilab
+ check-local: $(top_builddir)/scilab-bin test
+       @COMMAND="test_run('$(modulename)');quit";\
+       export LANG=C;\
+       $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"
+ check-code:
+       if test -f build.xml; then \
+               $(ANT) checkstyle; \
+       fi
+       if test -x "$(SPLINT)"; then \
+               $(SPLINT) $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC); \
+       fi
+ @NEED_JAVA_TRUE@java:
+ # Some configurations needs to export JAVA_HOME in the current env
+ @NEED_JAVA_TRUE@      @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ @NEED_JAVA_TRUE@      if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ @NEED_JAVA_TRUE@      if test -f build.xml -a $$USEANT -eq 1; then \
+ @NEED_JAVA_TRUE@              $(ANT); \
+ @NEED_JAVA_TRUE@      fi
+ @NEED_JAVA_TRUE@clean-java:
+ # Some configurations needs to export JAVA_HOME in the current env
+ @NEED_JAVA_TRUE@      @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
+ @NEED_JAVA_TRUE@      if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+ @NEED_JAVA_TRUE@      if test -f build.xml -a $$USEANT -eq 1; then \
+ @NEED_JAVA_TRUE@              $(ANT) clean; \
+ @NEED_JAVA_TRUE@      fi;
+ # If the user request for the SWIG generation of the wrappers Java => C/C++ 
+ # We call the target swig-build on the variable SWIG_WRAPPERS
+ @SWIG_TRUE@swig: $(SWIG_WRAPPERS)
+ @SWIG_TRUE@   @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
+ @SWIG_TRUE@   SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
+ @SWIG_TRUE@   if test -n "$(SWIG_WRAPPERS)"; then \
+ @SWIG_TRUE@           for file in $(SWIG_WRAPPERS) ; do \
+ @SWIG_TRUE@                   echo "Swig process of $$file ..."; \
+ @SWIG_TRUE@                   $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME  -outdir $$SWIG_OUTDIR $$file; \
+ @SWIG_TRUE@           done; \
+ @SWIG_TRUE@   fi
+ # If the user request for the SWIG generation of the wrappers Java => C/C++ 
+ # We call the target swig-build on the variable SWIG_WRAPPERS
+ @GIWS_TRUE@giws: $(GIWS_WRAPPERS)
+ @GIWS_TRUE@   @GIWS_OUTPUTDIR=src/jni/;\
+ @GIWS_TRUE@   if test -n "$(GIWS_WRAPPERS)"; then \
+ @GIWS_TRUE@           for file in $(GIWS_WRAPPERS) ; do \
+ @GIWS_TRUE@                   echo "GIWS process of $$file ..."; \
+ @GIWS_TRUE@                   $(GIWS_BIN) --disable-return-size-array --output-dir $$GIWS_OUTPUTDIR --throws-exception-on-error --description-file $$file; \
+ @GIWS_TRUE@           done; \
+ @GIWS_TRUE@   fi
+ macros:
+       -@( if test ! -x $(top_builddir)/scilab-bin; then \
+               echo "Error : Cannot build $< : Scilab has not been built"; \
+       else \
+               $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
+       fi)
+ # Removes the macros
+ clean-macros:
+ # Removes macros (*.bin generated from .sci)
+       @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+               echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
+               rm -f $(builddir)/$$dir/$(MACROBINMASK); \
+       done
+ test:
+ # More tests could be added here
+       @if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
+       if test -f build.xml -a $$USEANT -eq 1; then \
+               $(ANT) test; \
+       fi
+ all-local: $(TARGETS_ALL)
+ .sci.bin:
+       -@( if test ! -x $(top_builddir)/scilab-bin; then \
+       echo "Error : Cannot build $< : Scilab has not been build"; \
+       else \
+       echo "Creating $@"; \
+       $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
+       fi )
+ install-html-local:
+ # If the user wants the help sources to be installed
+ @INSTALL_HELP_XML_TRUE@       @echo "-------- Install of XML sources of help files --------"; \
+ @INSTALL_HELP_XML_TRUE@       for lang in $(ALL_LINGUAS); do \
+ @INSTALL_HELP_XML_TRUE@        if test -d $(srcdir)/help/$$lang; then \
+ @INSTALL_HELP_XML_TRUE@         $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
+ @INSTALL_HELP_XML_TRUE@               if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
+ @INSTALL_HELP_XML_TRUE@                 for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
+ @INSTALL_HELP_XML_TRUE@                   echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
+ @INSTALL_HELP_XML_TRUE@               $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
+ @INSTALL_HELP_XML_TRUE@                 done ; \
+ @INSTALL_HELP_XML_TRUE@               fi; \
+ @INSTALL_HELP_XML_TRUE@        fi; \
+ @INSTALL_HELP_XML_TRUE@       done; \
+ @INSTALL_HELP_XML_TRUE@       @echo "-------- Install of MathML sources --------"; \
+ @INSTALL_HELP_XML_TRUE@        if test -d $(srcdir)/help/mml/; then \
+ @INSTALL_HELP_XML_TRUE@         $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
+ @INSTALL_HELP_XML_TRUE@               if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
+ @INSTALL_HELP_XML_TRUE@                 for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
+ @INSTALL_HELP_XML_TRUE@                   echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
+ @INSTALL_HELP_XML_TRUE@               $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
+ @INSTALL_HELP_XML_TRUE@                 done ; \
+ @INSTALL_HELP_XML_TRUE@               fi; \
+ @INSTALL_HELP_XML_TRUE@       fi
+ install-data-local:
+ # Install the tests
+       @echo "-------- Install tests (if any) --------"; \
+       for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
+         if test -d $(srcdir)/$$dir/; then \
+           $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+                 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+                   if test -d "$(srcdir)/$$dir/$$file"; then \
+                         echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
+                         $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
+                   else \
+                     echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+                 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
+                   fi \
+                 done; \
+         fi; \
+       done
+ # Install the help chapter
+       @echo "-------- Install the help chapter (if any) --------"; \
+       for lang in $(HELP_CHAPTERLANG); do \
+               HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
+               if test -f $$HELPFILE; then \
+                       echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+                       $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
+                       echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+                       $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
+               fi; \
+       done
+ # Install the demos & examples
+       @echo "-------- Install demos & examples (if any) --------"; \
+       for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
+         if test -d $(srcdir)/$$dir/; then \
+           $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
+                 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
+                   if test -d "$(srcdir)/$$dir/$$file"; then \
+                         echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
+                         $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
+                   else \
+                     echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+                 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
+                   fi \
+                 done; \
+         fi; \
+       done
+ # Install the macros
+       @echo "-------- Install macros (if any) --------"; \
+       for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
+         $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
+               if test -d $(srcdir)/$$dir/; then \
+                       FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
+                       if test -n "$(MACROSSPECIALEXT)"; then \
+                               specialExtDir=""; \
+                               for specialExt in $(MACROSSPECIALEXT); do \
+                                       specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
+                               done; \
+                               FILELIST="$$FILELIST $$specialExtDir"; \
+                       fi; \
+                 for file in `ls -1 $$FILELIST 2>/dev/null`; do \
+                   echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
+               $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
+                 done; \
+               fi; \
+       done
+ # Install java files (.jar)
+       @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
+       echo "-------- Install jar files --------"; \
+     $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
+         for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
+                   echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
+               $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
+         done ; \
+       fi
+ ########### CLEAN ###################
+ # Clean help (generated automatically by Scilab)
+ # It used to clean the macro (clean-macros) but this was causing
+ # make clean && make to fail Scilab startup
+ @NEED_JAVA_TRUE@clean-local: clean-java
+ @NEED_JAVA_FALSE@clean-local:
+ distclean-local:
+       rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
+ .PHONY: macros java swig giws
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
index 0000000,8527851..a6ecebe
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,38 +1,38 @@@
+ /* ----------------------------------------------------------------------------
+  * This file was automatically generated by SWIG (http://www.swig.org).
+  * Version 1.3.40
+  *
+  * Do not make changes to this file unless you know what you are doing--modify
+  * the SWIG interface file instead.
+  * ----------------------------------------------------------------------------- */
+ package org.scilab.modules.commons;
 - /** 
++ /**
+    * Some commons values from Scilab engine to Java
+    * @author Sylvestre LEDRU
+    * @copyright DIGITEO 2010
+    */
+ public class ScilabCommons {
+  /**
+    * Constructor
+    */
+  protected ScilabCommons() {
+     throw new UnsupportedOperationException();
+  }
+   
+  /**
+    * Get SCIHOME variable from Scilab
+    * @return SCIHOME value
+    */
+ public static String getSCIHOME() {
+     return ScilabCommonsJNI.getSCIHOME();
+   }
+   public static String getTMPDIR() {
+     return ScilabCommonsJNI.getTMPDIR();
+   }
+ }
index 0000000,4c1e5b4..c902a53
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,49 +1,49 @@@
+ /* ----------------------------------------------------------------------------
+  * This file was automatically generated by SWIG (http://www.swig.org).
+  * Version 1.3.40
+  *
+  * Do not make changes to this file unless you know what you are doing--modify
+  * the SWIG interface file instead.
+  * ----------------------------------------------------------------------------- */
+ package org.scilab.modules.commons;
+ /* It is generated code. Disable checkstyle */
+ //CHECKSTYLE:OFF
 - /** 
++ /**
+    * Some commons values from Scilab engine to Java
+    * @author Sylvestre LEDRU
+    * @copyright DIGITEO 2010
+    */
+ public class ScilabCommonsJNI {
+   /**
+     * Constructor
+     */
+   protected ScilabCommonsJNI() {
+     throw new UnsupportedOperationException();
+   }
+   static {
+     try {
+         System.loadLibrary("scicommons");
+     } catch (SecurityException e) {
+         System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
+         System.err.println(e.getLocalizedMessage());
+         System.exit(-1);
+     } catch (UnsatisfiedLinkError e)    {
+            System.err.println("The native library scicommons does not exist or cannot be found.");
+         if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
+            System.err.println(e.getLocalizedMessage());
+            System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
+            System.exit(-1);
+         }else{
+            System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
+         }
+     }
+   }
+   public final static native String getSCIHOME();
+   public final static native String getTMPDIR();
+ }
index 0000000,6016c81..26e3a50
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,103 +1,103 @@@
+ /*
+  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+  * Copyright (C) INRIA - 2010 - Sylvestre Ledru
 - * 
++ *
+  * This file must be used under the terms of the CeCILL.
+  * This source file is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution.  The terms
 - * are also available at    
++ * are also available at
+  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+  *
+  */
+ /* ScilabCommons.i */
 -/** 
 - * Windows: swig -java -package org.scilab.modules.commons -outdir ../java/org/scilab/modules/commons/ ScilabCommons.i 
++/**
++ * Windows: swig -java -package org.scilab.modules.commons -outdir ../java/org/scilab/modules/commons/ ScilabCommons.i
+  * Other: Use the option --enable-build-swig to the configure
+ */
+ %module ScilabCommons
+ %{
 -#include "../../../core/includes/SCIHOME.h"
 -#include "../../../core/includes/tmpdir.h"
++#include "../../../system_env/includes/sci_home.h"
++#include "../../../system_env/includes/sci_tmpdir.h"
+ %}
+ /* JavaDoc for ScilabCommonsJNI class */
+ %pragma(java) jniclassclassmodifiers=%{
+ /* It is generated code. Disable checkstyle */
+ //CHECKSTYLE:OFF
 - /** 
++ /**
+    * Some commons values from Scilab engine to Java
+    * @author Sylvestre LEDRU
+    * @copyright DIGITEO 2010
+    */
+ public class%}
+ /* Constructor for ScilabCommonsJNI class */
+ %pragma(java) jniclasscode="
+   /**
+     * Constructor
+     */
+   protected ScilabCommonsJNI() {
+     throw new UnsupportedOperationException();
+   }";
 -  
++
+ /* static load of library */
+ %pragma(java) jniclasscode=%{
+   static {
+     try {
+         System.loadLibrary("scicommons");
+     } catch (SecurityException e) {
+         System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
+         System.err.println(e.getLocalizedMessage());
+         System.exit(-1);
+     } catch (UnsatisfiedLinkError e)    {
+            System.err.println("The native library scicommons does not exist or cannot be found.");
+         if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
+            System.err.println(e.getLocalizedMessage());
+            System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
+            System.exit(-1);
+         }else{
+            System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
+         }
+     }
+   }
+ %}
+ /* JavaDoc for ScilabCommons class */
+ %pragma(java) moduleclassmodifiers="
 - /** 
++ /**
+    * Some commons values from Scilab engine to Java
+    * @author Sylvestre LEDRU
+    * @copyright DIGITEO 2010
+    */
+ public class";
+ /* Constructor for ScilabCommons class */
+ %pragma(java) modulecode="
+  /**
+    * Constructor
+    */
+  protected ScilabCommons() {
+     throw new UnsupportedOperationException();
+  }";
+ /* JavaDoc */
+ %javamethodmodifiers getSCIHOME() "
+  /**
+    * Get SCIHOME variable from Scilab
+    * @return SCIHOME value
+    */
+ public";
+ char* getSCIHOME();
+ /* JavaDoc */
+ %javamethodmodifiers getTMPDIR() "
+  /**
+    * returns TMPDIR directory value
+    * @return TMPDIR value
+    */
+ public";
+ char *getTMPDIR(void);
index 0000000,1be988b..786dac4
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,225 +1,225 @@@
+ /* ----------------------------------------------------------------------------
+  * This file was automatically generated by SWIG (http://www.swig.org).
+  * Version 1.3.40
+  * 
+  * This file is not intended to be easily readable and contains a number of 
+  * coding conventions designed to improve portability and efficiency. Do not make
+  * changes to this file unless you know what you are doing--modify the SWIG 
+  * interface file instead. 
+  * ----------------------------------------------------------------------------- */
+ #define SWIGJAVA
+ /* -----------------------------------------------------------------------------
+  *  This section contains generic SWIG labels for method/variable
+  *  declarations/attributes, and other compiler dependent labels.
+  * ----------------------------------------------------------------------------- */
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
+ #  define SWIGTEMPLATEDISAMBIGUATOR template
+ # elif defined(__HP_aCC)
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
+ #  define SWIGTEMPLATEDISAMBIGUATOR template
+ # else
+ #  define SWIGTEMPLATEDISAMBIGUATOR
+ # endif
+ #endif
+ /* inline attribute */
+ #ifndef SWIGINLINE
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
+ #   define SWIGINLINE inline
+ # else
+ #   define SWIGINLINE
+ # endif
+ #endif
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
+ #ifndef SWIGUNUSED
+ # if defined(__GNUC__)
+ #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+ #     define SWIGUNUSED __attribute__ ((__unused__)) 
+ #   else
+ #     define SWIGUNUSED
+ #   endif
+ # elif defined(__ICC)
+ #   define SWIGUNUSED __attribute__ ((__unused__)) 
+ # else
+ #   define SWIGUNUSED 
+ # endif
+ #endif
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
+ # if defined(_MSC_VER)
+ #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
+ # endif 
+ #endif
+ #ifndef SWIGUNUSEDPARM
+ # ifdef __cplusplus
+ #   define SWIGUNUSEDPARM(p)
+ # else
+ #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
+ # endif
+ #endif
+ /* internal SWIG method */
+ #ifndef SWIGINTERN
+ # define SWIGINTERN static SWIGUNUSED
+ #endif
+ /* internal inline SWIG method */
+ #ifndef SWIGINTERNINLINE
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
+ #endif
+ /* exporting methods */
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ #  ifndef GCC_HASCLASSVISIBILITY
+ #    define GCC_HASCLASSVISIBILITY
+ #  endif
+ #endif
+ #ifndef SWIGEXPORT
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+ #   if defined(STATIC_LINKED)
+ #     define SWIGEXPORT
+ #   else
+ #     define SWIGEXPORT __declspec(dllexport)
+ #   endif
+ # else
+ #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
+ #     define SWIGEXPORT __attribute__ ((visibility("default")))
+ #   else
+ #     define SWIGEXPORT
+ #   endif
+ # endif
+ #endif
+ /* calling conventions for Windows */
+ #ifndef SWIGSTDCALL
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+ #   define SWIGSTDCALL __stdcall
+ # else
+ #   define SWIGSTDCALL
+ # endif 
+ #endif
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
+ # define _CRT_SECURE_NO_DEPRECATE
+ #endif
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
+ # define _SCL_SECURE_NO_DEPRECATE
+ #endif
+ /* Fix for jlong on some versions of gcc on Windows */
+ #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+   typedef long long __int64;
+ #endif
+ /* Fix for jlong on 64-bit x86 Solaris */
+ #if defined(__x86_64)
+ # ifdef _LP64
+ #   undef _LP64
+ # endif
+ #endif
+ #include <jni.h>
+ #include <stdlib.h>
+ #include <string.h>
+ /* Support for throwing Java exceptions */
+ typedef enum {
+   SWIG_JavaOutOfMemoryError = 1, 
+   SWIG_JavaIOException, 
+   SWIG_JavaRuntimeException, 
+   SWIG_JavaIndexOutOfBoundsException,
+   SWIG_JavaArithmeticException,
+   SWIG_JavaIllegalArgumentException,
+   SWIG_JavaNullPointerException,
+   SWIG_JavaDirectorPureVirtual,
+   SWIG_JavaUnknownError
+ } SWIG_JavaExceptionCodes;
+ typedef struct {
+   SWIG_JavaExceptionCodes code;
+   const char *java_exception;
+ } SWIG_JavaExceptions_t;
+ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
+   jclass excep;
+   static const SWIG_JavaExceptions_t java_exceptions[] = {
+     { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
+     { SWIG_JavaIOException, "java/io/IOException" },
+     { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
+     { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
+     { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
+     { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
+     { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
+     { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
+     { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
+     { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" }
+   };
+   const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
+   while (except_ptr->code != code && except_ptr->code)
+     except_ptr++;
+   (*jenv)->ExceptionClear(jenv);
+   excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
+   if (excep)
+     (*jenv)->ThrowNew(jenv, excep, msg);
+ }
+ /* Contract support */
+ #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
 -#include "../../../core/includes/SCIHOME.h"
 -#include "../../../core/includes/tmpdir.h"
++#include "../../../system_env/includes/sci_home.h"
++#include "../../../system_env/includes/sci_tmpdir.h"
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getSCIHOME(JNIEnv *jenv, jclass jcls) {
+   jstring jresult = 0 ;
+   char *result = 0 ;
+   
+   (void)jenv;
+   (void)jcls;
+   result = (char *)getSCIHOME();
+   if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+   return jresult;
+ }
+ SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getTMPDIR(JNIEnv *jenv, jclass jcls) {
+   jstring jresult = 0 ;
+   char *result = 0 ;
+   
+   (void)jenv;
+   (void)jcls;
+   result = (char *)getTMPDIR();
+   if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+   return jresult;
+ }
+ #ifdef __cplusplus
+ }
+ #endif
Simple merge
Simple merge
@@@ -227,10 -227,10 +227,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -268,10 -268,10 +268,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -309,10 -309,10 +309,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -350,10 -350,10 +350,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -391,10 -391,10 +391,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -432,10 -432,10 +432,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -473,10 -473,10 +473,10 @@@ SWIGEXPORT jobjectArray JNICALL Java_or
          temp_string = (*jenv)->NewStringUTF(jenv, result[i]);
          (*jenv)->SetObjectArrayElement(jenv, jresult, i, temp_string);
          (*jenv)->DeleteLocalRef(jenv, temp_string);
--        FREE(result[i]);
++        free(result[i]);
          result[i] = NULL;
        }
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -502,7 -502,7 +502,7 @@@ SWIGEXPORT jstring JNICALL Java_org_sci
      if (result != NULL)
      {
        jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -528,7 -528,7 +528,7 @@@ SWIGEXPORT jstring JNICALL Java_org_sci
      if (result != NULL)
      {
        jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
@@@ -549,12 -549,12 +549,12 @@@ SWIGEXPORT jstring JNICALL Java_org_sci
    {
      int i = 0;
      size1 = (*jenv)->GetArrayLength(jenv, jarg1);
--    arg1 = (char **) MALLOC((size1+1)*sizeof(char *));
++    arg1 = (char **) malloc((size1+1)*sizeof(char *));
      /* make a copy of each string */
      for (i = 0; i<size1; i++) {
        jstring j_string = (jstring)(*jenv)->GetObjectArrayElement(jenv, jarg1, i);
        const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0);
--      arg1[i] = MALLOC((strlen(c_string)+1)*sizeof(const char *));
++      arg1[i] = malloc((strlen(c_string)+1)*sizeof(const char *));
        strcpy(arg1[i], c_string);
        (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string);
        (*jenv)->DeleteLocalRef(jenv, j_string);
      if (result != NULL)
      {
        jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
    {
      int i;
      for (i=0; i<size1-1; i++)
--    FREE(arg1[i]);
--    FREE(arg1);
++    free(arg1[i]);
++    free(arg1);
    }
    return jresult;
  }
@@@ -615,7 -615,7 +615,7 @@@ SWIGEXPORT jstring JNICALL Java_org_sci
      if (result != NULL)
      {
        jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
--      FREE(result);
++      free(result);
        result = NULL;
      }       
    }
Simple merge
@@@ -9,10 -9,10 +9,10 @@@
  package org.scilab.modules.console;
  
  
-- /** 
--   * All Scilab gui management used in Java console 
++ /**
++   * All Scilab gui management used in Java console
     * @author Vincent COUVERT
--   * @copyright INRIA 2007 
++   * @copyright INRIA 2007
     */
  public class GuiManagement {
  
@@@ -11,8 -11,8 +11,8 @@@ package org.scilab.modules.console
  
  /* It is generated code. Disable checkstyle */
  //CHECKSTYLE:OFF
-- /** 
--   * All Scilab gui management used in Java console 
++ /**
++   * All Scilab gui management used in Java console
     * @author Vincent COUVERT
     * @copyright INRIA 2007
     */
@@@ -207,12 -207,12 +207,12 @@@ SWIGEXPORT jboolean JNICALL Java_org_sc
    {
      int i = 0;
      size1 = (*jenv)->GetArrayLength(jenv, jarg1);
--    arg1 = (char **) MALLOC((size1+1)*sizeof(char *));
++    arg1 = (char **) malloc((size1+1)*sizeof(char *));
      /* make a copy of each string */
      for (i = 0; i<size1; i++) {
        jstring j_string = (jstring)(*jenv)->GetObjectArrayElement(jenv, jarg1, i);
        const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0);
--      arg1[i] = MALLOC((strlen(c_string)+1)*sizeof(const char *));
++      arg1[i] = malloc((strlen(c_string)+1)*sizeof(const char *));
        strcpy(arg1[i], c_string);
        (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string);
        (*jenv)->DeleteLocalRef(jenv, j_string);
    {
      int i;
      for (i=0; i<size1-1; i++)
--    FREE(arg1[i]);
--    FREE(arg1);
++    free(arg1[i]);
++    free(arg1);
    }
    return jresult;
  }
@@@ -1,6 -1,19 +1,19 @@@
+ /*
+  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+  * Copyright (C) INRIA - 2007 - Vincent Couvert
 - * 
++ *
+  * This file must be used under the terms of the CeCILL.
+  * This source file is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution.  The terms
 - * are also available at    
++ * are also available at
+  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+  *
+  */
  /* GuiManagement.i */
--/** 
-- * Windows: swig -java -package org.scilab.modules.console -outdir ../java/org/scilab/modules/console/ GuiManagement.i 
++/**
++ * Windows: swig -java -package org.scilab.modules.console -outdir ../java/org/scilab/modules/console/ GuiManagement.i
   * Other: Use the option --enable-build-swig to the configure
  */
  %module GuiManagement
@@@ -16,8 -28,8 +29,8 @@@
  %pragma(java) jniclassclassmodifiers=%{
  /* It is generated code. Disable checkstyle */
  //CHECKSTYLE:OFF
-- /** 
--   * All Scilab gui management used in Java console 
++ /**
++   * All Scilab gui management used in Java console
     * @author Vincent COUVERT
     * @copyright INRIA 2007
     */
@@@ -31,7 -43,7 +44,7 @@@ public class%
    protected GuiManagementJNI() {
      throw new UnsupportedOperationException();
    }";
--  
++
  /* static load of library */
  %pragma(java) jniclasscode=%{
    static {
  
  /* JavaDoc for GuiManagement class */
  %pragma(java) moduleclassmodifiers="
-- /** 
--   * All Scilab gui management used in Java console 
++ /**
++   * All Scilab gui management used in Java console
     * @author Vincent COUVERT
--   * @copyright INRIA 2007 
++   * @copyright INRIA 2007
     */
  public class";
  
@@@ -208,25 -207,6 +208,25 @@@ SWIGEXPORT void JNICALL Java_org_scilab
  }
  
  
 +SWIGEXPORT jstring JNICALL Java_org_scilab_modules_console_GuiManagementJNI_getSCIHOME(JNIEnv *jenv, jclass jcls) {
 +  jstring jresult = 0 ;
 +  char *result = 0 ;
 +  
 +  (void)jenv;
 +  (void)jcls;
 +  result = (char *)getSCIHOME();
 +  {
 +    if (result != NULL)
 +    {
 +      jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
-       FREE(result);
++      free(result);
 +      result = NULL;
 +    }       
 +  }
 +  return jresult;
 +}
 +
 +
  #ifdef __cplusplus
  }
  #endif
@@@ -79,7 -85,13 +79,13 @@@ src/c/funcprot.c 
  src/c/eqid.c \
  src/c/exitCodeValue.c \
  src/c/getversion.c \
- src/c/dynamic_tclsci.c
+ src/c/dynamic_tclsci.c \
 -src/c/dynamic_parallel.c \
 -src/c/storeCommand.c
++src/c/dynamic_parallel.c
+ CORE_CPP_SOURCES = src/cpp/hashtable_core.cpp \
+ src/cpp/namstr.cpp \
 -src/cpp/search_functions.cpp
++src/cpp/search_functions.cpp \
++src/cpp/storeCommand.cpp
  
  if USE_DYNAMIC_STACK
  CORE_C_SOURCES += src/c/scimem64.c
@@@ -233,12 -246,16 +239,12 @@@ sci_gateway/c/gw_core.c 
  sci_gateway/c/gw_user.c \
  sci_gateway/c/gw_user2.c \
  sci_gateway/c/sci_error.c \
 -sci_gateway/c/sci_sciargs.c \
 -sci_gateway/c/sci_with_module.c \
  sci_gateway/c/sci_islittleendian.c \
 -sci_gateway/c/sci_getscilabmode.c \
  sci_gateway/c/sci_getvariablesonstack.c \
  sci_gateway/c/sci_readgateway.c \
 -sci_gateway/c/sci_comp.c \
 -sci_gateway/c/sci_exit.c
 +sci_gateway/c/sci_comp.c
  
- GATEWAY_FORTRAN_SOURCES =  sci_gateway/fortran/sci_errclear.f \
+ GATEWAY_FORTRAN_SOURCES =  sci_gateway/fortran/sci_global.f \
  sci_gateway/fortran/sci_mtlb_mode.f \
  sci_gateway/fortran/sci_resume.f \
  sci_gateway/fortran/sci_dispbpt.f \
@@@ -376,6 -374,12 +382,11 @@@ includes/stackinfo.h 
  includes/stackTypeVariable.h \
  includes/version.h \
  includes/getversion.h \
 -includes/warningmode.h \
  includes/Thread_Wrapper.h
  
+ if GUI
+ USEANT=1
+ endif
  include $(top_srcdir)/Makefile.incl.am
@@@ -152,9 -154,12 +152,10 @@@ am__libscicore_la_SOURCES_DIST = src/c/
        src/c/recursionFunction.c src/c/typename.c \
        src/c/inittypenames.c src/c/funcprot.c src/c/eqid.c \
        src/c/exitCodeValue.c src/c/getversion.c \
-       src/c/dynamic_tclsci.c src/c/scimem64.c src/fortran/clunit.f \
-       src/fortran/getlin.f src/fortran/allowptr.f \
-       src/fortran/isany.f src/fortran/hmcreate.f src/fortran/nextj.f \
+       src/c/dynamic_tclsci.c src/c/dynamic_parallel.c \
 -      src/c/storeCommand.c src/c/scimem64.c \
 -      src/cpp/hashtable_core.cpp src/cpp/namstr.cpp \
 -      src/cpp/search_functions.cpp src/fortran/clunit.f \
 -      src/fortran/getlin.f src/fortran/allowptr.f \
 -      src/fortran/isany.f src/fortran/hmcreate.f src/fortran/nextj.f \
++      src/c/scimem64.c src/fortran/clunit.f src/fortran/getlin.f \
++      src/fortran/allowptr.f src/fortran/isany.f \
++      src/fortran/hmcreate.f src/fortran/nextj.f \
        src/fortran/setgetmode.f src/fortran/showstack.f \
        src/fortran/misops.f src/fortran/iseye.f src/fortran/chkvar.f \
        src/fortran/setippty.f src/fortran/compil.f \
        sci_gateway/c/sci_getdebuginfo.c sci_gateway/c/sci_debug.c \
        sci_gateway/c/gw_core.c sci_gateway/c/gw_user.c \
        sci_gateway/c/gw_user2.c sci_gateway/c/sci_error.c \
 -      sci_gateway/c/sci_sciargs.c sci_gateway/c/sci_with_module.c \
        sci_gateway/c/sci_islittleendian.c \
 -      sci_gateway/c/sci_getscilabmode.c \
        sci_gateway/c/sci_getvariablesonstack.c \
        sci_gateway/c/sci_readgateway.c sci_gateway/c/sci_comp.c \
-       sci_gateway/fortran/sci_errclear.f \
 -      sci_gateway/c/sci_exit.c sci_gateway/fortran/sci_global.f \
++      sci_gateway/fortran/sci_global.f \
        sci_gateway/fortran/sci_mtlb_mode.f \
        sci_gateway/fortran/sci_resume.f \
        sci_gateway/fortran/sci_dispbpt.f \
@@@ -283,9 -288,12 +284,9 @@@ am__objects_2 = libscicore_la-inffic.l
        libscicore_la-inittypenames.lo libscicore_la-funcprot.lo \
        libscicore_la-eqid.lo libscicore_la-exitCodeValue.lo \
        libscicore_la-getversion.lo libscicore_la-dynamic_tclsci.lo \
-       $(am__objects_1)
 -      libscicore_la-dynamic_parallel.lo \
 -      libscicore_la-storeCommand.lo $(am__objects_1)
 -am__objects_3 = libscicore_la-hashtable_core.lo \
 -      libscicore_la-namstr.lo libscicore_la-search_functions.lo
 -@USE_DYNAMIC_STACK_TRUE@am__objects_4 = relocstack.lo
 -am__objects_5 = clunit.lo getlin.lo allowptr.lo isany.lo hmcreate.lo \
++      libscicore_la-dynamic_parallel.lo $(am__objects_1)
 +@USE_DYNAMIC_STACK_TRUE@am__objects_3 = relocstack.lo
 +am__objects_4 = clunit.lo getlin.lo allowptr.lo isany.lo hmcreate.lo \
        nextj.lo setgetmode.lo showstack.lo misops.lo iseye.lo \
        chkvar.lo setippty.lo compil.lo funnam.lo isnum.lo cmdstr.lo \
        logops.lo atome.lo hndlops.lo cmplxt.lo skpins.lo folhp.lo \
@@@ -327,23 -335,20 +328,23 @@@ am__objects_6 = libscicore_la-sci_stack
        libscicore_la-sci_getdebuginfo.lo libscicore_la-sci_debug.lo \
        libscicore_la-gw_core.lo libscicore_la-gw_user.lo \
        libscicore_la-gw_user2.lo libscicore_la-sci_error.lo \
 -      libscicore_la-sci_sciargs.lo libscicore_la-sci_with_module.lo \
        libscicore_la-sci_islittleendian.lo \
 -      libscicore_la-sci_getscilabmode.lo \
        libscicore_la-sci_getvariablesonstack.lo \
 -      libscicore_la-sci_readgateway.lo libscicore_la-sci_comp.lo \
 -      libscicore_la-sci_exit.lo
 +      libscicore_la-sci_readgateway.lo libscicore_la-sci_comp.lo
- am__objects_7 = sci_errclear.lo sci_mtlb_mode.lo sci_resume.lo \
+ am__objects_7 = sci_global.lo sci_mtlb_mode.lo sci_resume.lo \
        sci_dispbpt.lo sci_useascommand.lo sci_intppty.lo sci_ieee.lo \
 -      sci_macrovar.lo sci_exists.lo sci_errcatch.lo sci_clear.lo \
 -      sci_argn.lo sci_setbpt.lo sci_clearglobal.lo sci_delbpt.lo \
 -      where.lo sci_iserror.lo sci_debug.lo sci_comp.lo \
 -      sci_isglobal.lo
 -am_libscicore_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
 -      $(am__objects_5) $(am__objects_6) $(am__objects_7)
 +      sci_macrovar.lo sci_errcatch.lo sci_setbpt.lo sci_delbpt.lo \
 +      where.lo sci_iserror.lo sci_debug.lo sci_comp.lo
 +am__objects_8 = libscicore_la-sci_getmodules.lo \
 +      libscicore_la-sci_clear.lo libscicore_la-sci_banner.lo \
 +      libscicore_la-sci_quit.lo libscicore_la-sci_exit.lo \
 +      libscicore_la-sci_argn.lo libscicore_la-sci_clearglobal.lo \
 +      libscicore_la-sci_global.lo libscicore_la-sci_isglobal.lo \
 +      libscicore_la-sci_getscilabmode.lo libscicore_la-sci_getos.lo \
 +      libscicore_la-sci_exists.lo libscicore_la-sci_with_module.lo
 +am_libscicore_la_OBJECTS = $(am__objects_2) $(am__objects_4) \
 +      $(am__objects_5) $(am__objects_6) $(am__objects_7) \
 +      $(am__objects_8)
  libscicore_la_OBJECTS = $(am_libscicore_la_OBJECTS)
  libscicore_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
@@@ -661,7 -663,12 +662,17 @@@ CORE_C_SOURCES = src/c/inffic.c src/c/c
        src/c/recursionFunction.c src/c/typename.c \
        src/c/inittypenames.c src/c/funcprot.c src/c/eqid.c \
        src/c/exitCodeValue.c src/c/getversion.c \
-       src/c/dynamic_tclsci.c $(am__append_1)
+       src/c/dynamic_tclsci.c src/c/dynamic_parallel.c \
 -      src/c/storeCommand.c $(am__append_1)
 -CORE_CPP_SOURCES = src/cpp/hashtable_core.cpp \
++      $(am__append_1)
++CORE_CPP_SOURCES = \
++src/cpp/core_gw.cpp \
++src/cpp/hashtable_core.cpp \
+ src/cpp/namstr.cpp \
 -src/cpp/search_functions.cpp
++src/cpp/search_functions.cpp \
++src/cpp/storeCommand.cpp \
++src/cpp/banner.cpp \
++src/cpp/overload.cpp
  CORE_FORTRAN_SOURCES = src/fortran/clunit.f src/fortran/getlin.f \
        src/fortran/allowptr.f src/fortran/isany.f \
        src/fortran/hmcreate.f src/fortran/nextj.f \
@@@ -748,12 -756,16 +750,12 @@@ sci_gateway/c/gw_core.c 
  sci_gateway/c/gw_user.c \
  sci_gateway/c/gw_user2.c \
  sci_gateway/c/sci_error.c \
 -sci_gateway/c/sci_sciargs.c \
 -sci_gateway/c/sci_with_module.c \
  sci_gateway/c/sci_islittleendian.c \
 -sci_gateway/c/sci_getscilabmode.c \
  sci_gateway/c/sci_getvariablesonstack.c \
  sci_gateway/c/sci_readgateway.c \
 -sci_gateway/c/sci_comp.c \
 -sci_gateway/c/sci_exit.c
 +sci_gateway/c/sci_comp.c
  
- GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/sci_errclear.f \
+ GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/sci_global.f \
  sci_gateway/fortran/sci_mtlb_mode.f \
  sci_gateway/fortran/sci_resume.f \
  sci_gateway/fortran/sci_dispbpt.f \
@@@ -880,8 -873,10 +882,9 @@@ includes/stackinfo.h 
  includes/stackTypeVariable.h \
  includes/version.h \
  includes/getversion.h \
 -includes/warningmode.h \
  includes/Thread_Wrapper.h
  
+ @GUI_TRUE@USEANT = 1
  
  # Where all the Scilab stuff is installed (macros, help, ...)
  mydatadir = $(pkgdatadir)/modules/$(modulename)
@@@ -1673,6 -1715,20 +1677,13 @@@ libscicore_la-dynamic_tclsci.lo: src/c/
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -c -o libscicore_la-dynamic_tclsci.lo `test -f 'src/c/dynamic_tclsci.c' || echo '$(srcdir)/'`src/c/dynamic_tclsci.c
  
+ libscicore_la-dynamic_parallel.lo: src/c/dynamic_parallel.c
+ @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -MT libscicore_la-dynamic_parallel.lo -MD -MP -MF $(DEPDIR)/libscicore_la-dynamic_parallel.Tpo -c -o libscicore_la-dynamic_parallel.lo `test -f 'src/c/dynamic_parallel.c' || echo '$(srcdir)/'`src/c/dynamic_parallel.c
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-dynamic_parallel.Tpo $(DEPDIR)/libscicore_la-dynamic_parallel.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/dynamic_parallel.c' object='libscicore_la-dynamic_parallel.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -c -o libscicore_la-dynamic_parallel.lo `test -f 'src/c/dynamic_parallel.c' || echo '$(srcdir)/'`src/c/dynamic_parallel.c
 -libscicore_la-storeCommand.lo: src/c/storeCommand.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -MT libscicore_la-storeCommand.lo -MD -MP -MF $(DEPDIR)/libscicore_la-storeCommand.Tpo -c -o libscicore_la-storeCommand.lo `test -f 'src/c/storeCommand.c' || echo '$(srcdir)/'`src/c/storeCommand.c
 -@am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-storeCommand.Tpo $(DEPDIR)/libscicore_la-storeCommand.Plo
 -@AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/storeCommand.c' object='libscicore_la-storeCommand.lo' libtool=yes @AMDEPBACKSLASH@
 -@AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 -@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -c -o libscicore_la-storeCommand.lo `test -f 'src/c/storeCommand.c' || echo '$(srcdir)/'`src/c/storeCommand.c
 -
  libscicore_la-scimem64.lo: src/c/scimem64.c
  @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(libscicore_la_CFLAGS) $(CFLAGS) -MT libscicore_la-scimem64.lo -MD -MP -MF $(DEPDIR)/libscicore_la-scimem64.Tpo -c -o libscicore_la-scimem64.lo `test -f 'src/c/scimem64.c' || echo '$(srcdir)/'`src/c/scimem64.c
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-scimem64.Tpo $(DEPDIR)/libscicore_la-scimem64.Plo
@@@ -53,22 -65,17 +53,21 @@@ int C2F(sci_fromjava)(char *fname,unsig
  int C2F(sci_getmemory)(char *fname,unsigned long fname_len);
  int C2F(sci_fromc)(char *fname,unsigned long fname_len);
  int C2F(sci_getmd5)(char *fname,unsigned long fname_len);
 -int C2F(sci_getmodules)(char *fname,unsigned long fname_len);
 -int C2F(sci_with_module)(char *fname,unsigned long fname_len);
  int C2F(sci_islittleendian)(char *fname,unsigned long fname_len);
 -int C2F(sci_getscilabmode)(char *fname,unsigned long fname_len);
  int C2F(sci_librarieslist)(char *fname,unsigned long fname_len);
- int C2F(sci_libraryinfo)(char *fname,unsigned long fname_len);
  int C2F(sci_getvariablesonstack)(char *fname,unsigned long fname_len);
 -int C2F(sci_getdebuginfo)(char *fname,unsigned long fname_len);
  int C2F(sci_readgateway)(char *fname,unsigned long fname_len);
 -int C2F(sci_exit)(char *fname,unsigned long fname_len);
  int C2F(sci_comp)(char *fname,unsigned long fname_len);
 -/*--------------------------------------------------------------------------*/
 +
 +int C2F(sci_typename)(char *fname,int* _piKey);
 +int C2F(sci_funcprot)(char *fname,int* _piKey);
 +int C2F(sci_newfun)(char *fname, int* _piKey);
 +
 +//Yasp
 +int sci_type(char *fname, int* _piKey);
 +int sci_getdebuginfo(char *fname, int* _piKey);
 +int sci_getversion(char *fname, int* _piKey);
 +/*--------------------------------------------------------------------------*/ 
  #endif /*  __GW_CORE__ */
  /*--------------------------------------------------------------------------*/
  
@@@ -2,11 -2,11 +2,11 @@@
   * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
   * Copyright (C) INRIA
   * Copyright (C) ENPC
-- * 
++ *
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
@@@ -40,9 -40,22 +40,22 @@@ typedef enum 
  
  } sci_types;
  
-  /* lufact pointer... Done for backward compatibility. 
+ typedef enum {
 -    sci_int8 = 1,
 -    sci_int16 = 2,
 -    sci_int32 = 4,
 -    sci_int64 = 8,
 -    sci_uint8 = 11,
 -    sci_uint16 = 12,
 -    sci_uint32 = 14,
 -    sci_uint64 = 18
++    sci_integer8 = 1,
++    sci_integer16 = 2,
++    sci_integer32 = 4,
++    sci_integer64 = 8,
++    sci_uinteger8 = 11,
++    sci_uinteger16 = 12,
++    sci_uinteger32 = 14,
++    sci_uinteger64 = 18
+ } sci_int_types;
 - /* lufact pointer... Done for backward compatibility. 
++ /* lufact pointer... Done for backward compatibility.
    *   sci_lufact_pointer has been added to be able to handle umfpack data type
--  * Since the use of pointer data structure is very interesting for Scilab 
++  * Since the use of pointer data structure is very interesting for Scilab
    * we decided to rename it to remove the reference of the initial use.
    */
  #define sci_lufact_pointer sci_pointer
@@@ -31,13 -31,13 +31,13 @@@ static gw_generic_table Tab[]
  {C2F(sci_resume),"resume"},
  {C2F(sci_return),"return"},
  {C2F(sci_format),"format"},
 -{C2F(sci_isdef),"isdef"},
 -{C2F(sci_exists),"exists"},
 +{NULL, ""}, // isdef
 +{NULL, ""}, //exists
  {C2F(sci_errcatch),"errcatch"},
--{C2F(sci_errclear),"errclear"},
++{NULL, ""}, // "errclear"
  {C2F(sci_iserror),"iserror"},
  {C2F(sci_predef),"predef"},
 -{C2F(sci_newfun),"newfun"},
 +{NULL,""}, //newfun
  {C2F(sci_clearfun),"clearfun"},
  {C2F(sci_funptr),"funptr"},
  {C2F(sci_macr2lst),"macr2lst"},
  {C2F(sci_havewindow),"havewindow"},
  {C2F(sci_stacksize),"stacksize"},
  {C2F(sci_mtlb_mode),"mtlb_mode"},
 -{C2F(sci_clear),"clear"},
 +{NULL,""}, // clear
  {C2F(sci_what),"what"},
 -{C2F(sci_sciargs),"sciargs"},
 +{NULL, ""}, //sciargs
  {C2F(sci_ieee),"ieee"},
 -{C2F(sci_typename),"typename"},
 -{C2F(sci_global),"global"},
 -{C2F(sci_clearglobal),"clearglobal"},
 -{C2F(sci_isglobal),"isglobal"},
 +{NULL,""},//typename
 +{NULL, ""}, //global
 +{NULL, ""}, //clearglobal
 +{NULL, ""}, //isglobal
  {C2F(sci_gstacksize),"gstacksize"},
  {C2F(sci_intppty),"intppty"},
--{C2F(sci_lasterror),"lasterror"},
 -{sci_getversion,"getversion"},
++{NULL, ""}, // "last_error"
 +{NULL, ""}, //getversion
  {C2F(sci_macr2tree),"macr2tree"},
 -{C2F(sci_getos),"getos"},
 -{C2F(sci_banner),"banner"},
 +{NULL, ""}, //getos
 +{NULL, ""}, //banner
  {C2F(sci_getmemory),"getmemory"},
  {C2F(sci_getmd5),"getmd5"},
 -{C2F(sci_getmodules),"getmodules"},
 -{C2F(sci_with_module),"with_module"},
 -{C2F(sci_getdebuginfo),"getdebuginfo"},
 +{NULL,""}, //getmodules
 +{NULL, ""}, //with_module
 +{NULL, ""}, //getdebuginfo
  {C2F(sci_readgateway),"readgateway"},
 -{C2F(sci_exit),"exit"}
 +{NULL, ""} //exit
  };
  /*--------------------------------------------------------------------------*/
  int gw_core(void)
                        Fin = 6;
                }
        }
-       
 -      if(pvApiCtx == NULL)
 -      {
 -              pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
 -      }
 -
 -      pvApiCtx->pstName = (char*)Tab[Fin-1].name;
        callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
        return 0;
  }
@@@ -1,22 -1,87 +1,88 @@@
  /*
   * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
   * Copyright (C) 2006 - INRIA - Allan CORNET
-  * 
+  * Copyright (C) 2010 - DIGITEO - Allan CORNET
 - * 
++ *
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
+ /*--------------------------------------------------------------------------*/
  #include "gw_core.h"
+ #include "api_scilab.h"
  #include "stack-c.h"
++#include "api_oldstack.h"
+ #include "lasterror.h"
+ #include "localization.h"
+ #include "Scierror.h"
  /*--------------------------------------------------------------------------*/
- extern int C2F(interrclear)(void);
- /*--------------------------------------------------------------------------*/
--int C2F(sci_errclear)(char *fname,unsigned long fname_len)
++int sci_errclear(char *fname, int *_piKey)
  {
-       C2F(interrclear)();
 -    Rhs = Max(0,Rhs);
++    //Rhs = Max(0,Rhs);
+     CheckRhs(0,2);
+     CheckLhs(1,1);
+     if (Rhs == 1)
+     {
+         SciErr sciErr;
+         int *piAddressVarOne = NULL;
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
++        sciErr = getVarAddressFromPosition(_piKey, 1, &piAddressVarOne);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
 -        if (isDoubleType(pvApiCtx, piAddressVarOne))
++        if (isDoubleType(_piKey, piAddressVarOne))
+         {
+             double dValue = 0.;
+             int iValue = 0;
+             int iLastErrorValue = getLastErrorValue();
 -            if (!isScalar(pvApiCtx, piAddressVarOne))
++            if (!isScalar(_piKey, piAddressVarOne))
+             {
+                 Scierror(999,_("%s: Wrong size for input argument #%d: A scalar expected.\n"), fname, 1);
+                 return 0;
+             }
 -             getScalarDouble(pvApiCtx, piAddressVarOne, &dValue);
++             getScalarDouble(_piKey, piAddressVarOne, &dValue);
+              iValue = (int)dValue;
+              if ((double)iValue != dValue)
+              {
+                  Scierror(999,_("%s: Wrong value for input argument #%d: A integer value expected.\n"), fname, 1);
+                  return 0;
+              }
+              if ((iValue == iLastErrorValue) || (iValue <= 0))
+              {
+                 /* clear fortran common error */
+                 C2F(errgst).err2 = 0;
+                 /* clear last error buffer (C) */
+                 clearLastError();
+              }
+         }
+         else
+         {
+             Scierror(999,_("%s: Wrong type for input argument #%d: An integer value expected.\n"), fname, 1);
+             return 0;
+         }
+     }
+     else
+     {
+         /* clear fortran common error */
+         C2F(errgst).err2 = 0;
+         /* clear last error buffer (C) */
+         clearLastError();
+     }
+     LhsVar(1) = 0;
+     C2F(putlhsvar)();
        return 0;
  }
  /*--------------------------------------------------------------------------*/
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
+ /*--------------------------------------------------------------------------*/
  #include "gw_core.h"
+ #include "api_scilab.h"
  #include "stack-c.h"
++#include "api_oldstack.h"
+ #include "lasterror.h"
+ #include "BOOL.h"
+ #include "localization.h"
+ #include "Scierror.h"
  /*--------------------------------------------------------------------------*/
- extern int C2F(lasterror)(char *fname,unsigned long fname_len);
- /*--------------------------------------------------------------------------*/
--int C2F(sci_lasterror)(char *fname,unsigned long fname_len)
++int sci_lasterror(char *fname, int *_piKey)
  {
-       C2F(lasterror)(fname,fname_len);
-       return 0;
+     SciErr sciErr;
+     BOOL bClearLastError = TRUE;
+     int NbLines = 0;
+     const char **errorMessage = NULL;
 -    Rhs = Max(0, Rhs);
++    //Rhs = Max(0, Rhs);
+     CheckRhs(0,1);
+     CheckLhs(1,4);
+     if (Rhs == 1)
+     {
+         int iType = 0;
+         int *piAddressVarOne = NULL;
+         /* get Address of inputs */
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
++        sciErr = getVarAddressFromPosition(_piKey, 1, &piAddressVarOne);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
 -        if (isBooleanType(pvApiCtx, piAddressVarOne))
++        if (isBooleanType(_piKey, piAddressVarOne))
+         {
 -            if (isScalar(pvApiCtx, piAddressVarOne))
++            if (isScalar(_piKey, piAddressVarOne))
+             {
 -                getScalarBoolean(pvApiCtx, piAddressVarOne, &bClearLastError);
++                getScalarBoolean(_piKey, piAddressVarOne, &bClearLastError);
+             }
+             else
+             {
+                 Scierror(999,_("%s: Wrong size for input argument #%d: A boolean expected.\n"), fname, 1);
+             }
+         }
+         else
+         {
+             Scierror(999,_("%s: Wrong type for input argument #%d: A boolean expected.\n"), fname, 1);
+         }
+     }
+     errorMessage = getLastErrorMessage(&NbLines);
+     if ((NbLines <= 0) || (errorMessage == NULL))
+     {
 -        createEmptyMatrix(pvApiCtx, Rhs + 1);
++        createEmptyMatrix(_piKey, Rhs + 1);
+     }
+     else
+     {
 -        sciErr = createMatrixOfString(pvApiCtx, Rhs + 1, NbLines, 1, (char**)errorMessage);
++        sciErr = createMatrixOfString(_piKey, Rhs + 1, NbLines, 1, (char**)errorMessage);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
+     }
+     LhsVar(1) = Rhs + 1;
+     if (Lhs >= 2)
+     {
+         double dLastErrorValue = (double) getLastErrorValue();
 -        createScalarDouble(pvApiCtx, Rhs + 2, dLastErrorValue);
++        createScalarDouble(_piKey, Rhs + 2, dLastErrorValue);
+         LhsVar(2) = Rhs + 2;
+     }
+     if (Lhs >= 3)
+     {
+         double dLinePosition = (double)  getLastErrorLinePosition();
 -        createScalarDouble(pvApiCtx, Rhs + 3, dLinePosition);
++        createScalarDouble(_piKey, Rhs + 3, dLinePosition);
+         LhsVar(3) = Rhs + 3;
+     }
+     if (Lhs == 4)
+     {
 -        createSingleString(pvApiCtx, Rhs + 4, (char*)getLastErrorFunctionName());
++        createSingleString(_piKey, Rhs + 4, (char*)getLastErrorFunctionName());
+         LhsVar(4) = Rhs + 4;
+     }
+     if (bClearLastError)
+     {
+         clearLastError();
+     }
+     C2F(putlhsvar)();
+     return 0;
  }
  /*--------------------------------------------------------------------------*/
  #include "scirun.h" /* scirun */
  #include "getmodules.h"
  #include "scimem.h" /* freegmem */
 -#include "tmpdir.h" /* tmpdirc */
 +#include "sci_tmpdir.h" /* tmpdirc */
  #include "hashtable_core.h" /* destroy_hashtable_scilab_functions */
  #include "filesmanagement.h"
 -#include "scilabmode.h"
 +#include "sci_mode.h"
- /*--------------------------------------------------------------------------*/ 
+ #include "dynamic_gateways.h" /* freeAllDynamicGateways */
+ /*--------------------------------------------------------------------------*/
  BOOL TerminateCorePart1(void)
  {
-       if ( Get_no_startup_flag() == 0) 
-       {
-               char *quit_script = NULL;
+     if ( Get_no_startup_flag() == 0)
+     {
+         char *quit_script = NULL;
  
-               /* bug 3672 */
-               if (getScilabMode() == SCILAB_STD) quit_script = get_sci_data_strings(QUIT_ERRCATCH_ID);
-               else quit_script = get_sci_data_strings(QUIT_ID);
+         /* bug 3672 */
+         if (getScilabMode() == SCILAB_STD) quit_script = get_sci_data_strings(QUIT_ERRCATCH_ID);
+         else quit_script = get_sci_data_strings(QUIT_ID);
  
-               /* launch scilab.quit script */
-               C2F(scirun)(quit_script,(long int)strlen(quit_script));
-       }
-       return TRUE;
+         /* launch scilab.quit script */
+         C2F(scirun)(quit_script,(long int)strlen(quit_script));
+     }
+     return TRUE;
  }
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  BOOL TerminateCorePart2(void)
  {
-       #ifdef _MSC_VER /* Bug sous Linux lors de la liberation memoire */
-               #ifndef _WIN64
-               C2F(freegmem)();
-               C2F(freemem)();
-               #endif
-       #endif
+ #ifdef _MSC_VER /* Bug under Linux on freeing memory */
+ #ifndef _WIN64
+     C2F(freegmem)();
+     C2F(freemem)();
+ #endif
+ #endif
  
-       DisposeModulesInfo();
+     DisposeModulesInfo();
  
-       destroy_hashtable_scilab_functions();
+     destroy_hashtable_scilab_functions();
  
-       /* Close all scilab's files */
-       TerminateScilabFilesList();
+     /* Close all scilab's files */
+     TerminateScilabFilesList();
  
-       /*
-        * Cleanup function for the XML library.
-        */
-       xmlCleanupParser();
+     /*
+     * Cleanup function for the XML library.
+     */
+     xmlCleanupParser();
  
 -    /** clean tmpfiles **/
 -    C2F(tmpdirc)();
 +      /** clean tmpfiles **/
 +      clearTMPDIR();
  
-       return TRUE;
+     /* free dynamic gateways and dynamic libraries */
+     freeAllDynamicGateways();
+     return TRUE;
  }
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
@@@ -2,11 -2,12 +2,12 @@@
   * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
   * Copyright (C) 2008 - INRIA - Allan CORNET
   * Copyright (C) 2008 - INRIA - Sylvestre LEDRU
-  * 
+  * Copyright (C) 2010 - DIGITEO - Allan CORNET
 - * 
++ *
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
@@@ -36,7 -38,7 +37,7 @@@ dynamic_gateway_error_code callDynamicG
          wchar_t *wcdynLibName = to_wide_string(dynLibName);
          if (wcdynLibName)
          {
--            *hlib = LoadDynLibraryW(wcdynLibName); 
++            *hlib = LoadDynLibraryW(wcdynLibName);
              FREE(wcdynLibName);
              wcdynLibName = NULL;
          }
              return DYN_GW_LOAD_LIBRARY_ERROR;
          }
  #else
--        *hlib = LoadDynLibrary(dynLibName); 
++        *hlib = LoadDynLibrary(dynLibName);
  
--        if (*hlib == NULL) 
++        if (*hlib == NULL)
          {
              char *previousError = GetLastDynLibError();
  
--            /* Haven't been able to find the lib with dlopen... 
 -            * This can happen for two reasons:
 -            * - the lib must be dynamically linked
 -            * - Some silly issues under Suse (see bug #2875)
 -            * Note that we are handling only the "source tree build"
 -            * because libraries are split (they are in the same directory 
 -            * in the binary)
 -            */
 -            char *SciPath = getSCIpath();
 -#define PATHTOMODULE "/modules/"
 -#ifndef LT_OBJDIR
 -#define LT_OBJDIR ".libs/"
 -#endif
++            /* Haven't been able to find the lib with dlopen...
 +             * This can happen for two reasons:
 +             * - the lib must be dynamically linked
 +             * - Some silly issues under Suse (see bug #2875)
 +             * Note that we are handling only the "source tree build"
-              * because libraries are split (they are in the same directory 
++             * because libraries are split (they are in the same directory
 +             * in the binary)
 +             */
 +            char *SciPath = getSCI();
 +            #define PATHTOMODULE "/modules/"
 +            #ifndef LT_OBJDIR
 +            #define LT_OBJDIR ".libs/"
 +            #endif
  
              /* Build the full path to the library */
              char *pathToLib=(char*) MALLOC((strlen(SciPath)+strlen(PATHTOMODULE)+strlen(moduleName)+strlen("/")+strlen(LT_OBJDIR)+strlen(dynLibName)+1)*sizeof(char));
              sprintf(pathToLib,"%s%s%s/%s%s",SciPath,PATHTOMODULE,moduleName,LT_OBJDIR,dynLibName);
  
              *hlib = LoadDynLibrary(pathToLib);
-               
-             if (*hlib == NULL) 
 -            if (*hlib == NULL) 
++            if (*hlib == NULL)
              {
                  if (previousError != NULL)
                  {
      if (*ptrGateway == NULL)
      {
          *ptrGateway = (PROC_GATEWAY) GetDynLibFuncPtr(*hlib,gw_name);
--        if (*ptrGateway == NULL) 
-           {
++        if (*ptrGateway == NULL)
+         {
              return DYN_GW_PTR_FUNCTION_ERROR ;
-           }
+         }
      }
  
      if ( (*hlib) && (*ptrGateway) )
@@@ -158,7 -160,7 +159,7 @@@ char *buildModuleDynLibraryName(char *m
  char *buildGatewayName(char *modulename)
  {
      /* example gw_scicos */
-     #define FORMATGATEWAYNAME "gw_%s" 
 -#define FORMATGATEWAYNAME "gw_%s" 
++#define FORMATGATEWAYNAME "gw_%s"
  
      char *gatewayname = NULL;
      int lenName = (int)(strlen(modulename)+strlen(FORMATGATEWAYNAME));
Simple merge
@@@ -230,18 -234,18 +231,18 @@@ struct has_namefunction : std::unary_fu
  };
  
  struct copy_name : std::unary_function<entry const&, char**> {
-       copy_name(char** n): names(n) { }
-       char** operator()(entry const& e)
-       {
-               if(e.namefunction[0] != '\0')
-               {
-                       *names = os_strdup(e.namefunction);
-                       ++names;
-               }
-               return names;
-       }
+     copy_name(char** n): names(n) { }
+     char** operator()(entry const& e)
+     {
+         if(e.namefunction[0] != '\0')
+         {
 -            *names = strdup(e.namefunction);
++            *names = os_strdup(e.namefunction);
+             ++names;
+         }
+         return names;
+     }
  
-       char** names;
+     char** names;
  };
  /*----------------------------------------------------------------------------*/
  char **GetFunctionsList(int *sizeList)
@@@ -154,7 -155,8 +154,6 @@@ cd .."/
                <File RelativePath="..\..\sci_gateway\fortran\sci_delbpt.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_dispbpt.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_errcatch.f"/>
-               <File RelativePath="..\..\sci_gateway\fortran\sci_errclear.f"/>
 -              <File RelativePath="..\..\sci_gateway\fortran\sci_exists.f"/>
 -              <File RelativePath="..\..\sci_gateway\fortran\sci_global.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_ieee.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_intppty.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_iserror.f"/>
Simple merge
@@@ -406,10 -400,9 +405,10 @@@ target_alias = @target_alias
  top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 +yacc_present = @yacc_present@
  DOUBLE_C_SOURCES = src/c/matmult.c \
                        src/c/matldiv.c \
-                       src/c/matrdiv.c 
+                       src/c/matrdiv.c
  
  GATEWAY_C_SOURCES = sci_gateway/c/gw_double.c
  GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/vecldiv.f \
  /*--------------------------------------------------------------------------*/
  static gw_generic_table Tab[] =
  {
 -      {sci_abs, "abs"},
 -      {sci_real, "real"},
 -      {sci_imag, "imag"},
 -      {sci_conj, "conj"},
 -      {sci_round, "round"},
 -      {sci_int, "int"},
 -      {sci_size, "size"},
 -      {sci_sum, "sum"},
 -      {sci_prod, "prod"},
 -      {sci_diag, "diag"},
 -      {sci_triu, "triu"},
 -      {sci_tril, "tril"},
 -      {sci_eye, "eye"},
 -      {sci_rand, "rand"},
 -      {sci_ones, "ones"},
 -      {sci_maxi, "max"},
 -      {sci_maxi, "min"},
 -      {sci_kron, "kron"},
 -      {sci_kron, "kron"},
 -      {sci_kron, "kron"},
 -      {sci_kron, "kron"},
 -      {sci_sin, "sin"},
 -      {sci_cos, "cos"},
 -      {sci_atan, "atan"},
 -      {sci_exp, "exp"},
 -      {sci_sqrt, "sqrt"},
 -      {sci_log, "log"},
 -      {sci_chinesehat, "^"},
 -      {sci_sign, "sign"},
 -      {sci_clean, "clean"},
 -      {sci_floor, "floor"},
 -      {sci_ceil, "ceil"},
 -      {sci_expm, "expm"},
 -      {sci_cumsum, "cumsum"},
 -      {sci_cumprod, "cumprod"},
 -      {sci_testmatrix, "testmatrix"},
 -      {sci_isreal, "isreal"},
 -      {sci_frexp, "frexp"},
 -      {sci_zeros, "zeros"},
 -      {sci_tan, "tan"},
 -      {sci_log1p, "log1p"},
 -      {sci_imult, "imult"},
 -      {sci_asin, "asin"},
 -      {sci_acos, "acos"},
 -      {sci_number_properties, "number_properties"},
 -      {sci_nearfloat, "nearfloat"},
 -      {sci_dsearch, "dsearch"},
 -      {sci_isequal, "isequal"},
 -      {sci_spones, "spones"},
 -      {sci_gsort, "gsort"},
 -      {sci_isequalbitwise, "isequalbitwise"},
 -    {sci_scimatrix, "matrix"},
 -    {sci_rat, "rat"},
 +      {NULL, ""}, //abs
 +      {NULL, ""}, //real
 +      {NULL, ""}, //imag
 +      {NULL, ""}, //conj
 +      {NULL, ""}, //round
 +      {NULL, ""}, //int
 +      {NULL, ""}, //size
 +      {NULL, ""}, //sum
 +      {NULL, ""}, //prod
 +      {NULL, ""}, //diag
 +      {NULL, ""}, //trui
 +      {NULL, ""}, //tril
 +      {NULL, ""}, //eye
 +      {NULL, ""}, //rand
 +      {NULL ,""}, //ones
-       {NULL ,""}, //maxi
-       {NULL ,""}, //mini
++      {NULL ,""}, //max
++      {NULL ,""}, //min
 +      {NULL ,""}, //kron
 +      {NULL ,""}, //kron
 +      {NULL ,""}, //kron
 +      {NULL ,""}, //kron
 +      {NULL ,""}, //sin
 +      {NULL ,""}, //cos
 +      {NULL ,""}, //atan
 +      {NULL ,""}, //exp
 +      {NULL ,""}, //sqrt
 +      {NULL ,""}, //log
 +      {sci_chinesehat,"^"},
 +      {NULL, ""}, //sign
 +      {NULL, ""}, //clean
 +      {NULL, ""}, //floor
 +      {NULL, ""}, //ceil
 +      {NULL, ""}, //expm
 +      {NULL, ""}, //cumsum
 +      {NULL, ""}, //cumprod
 +      {NULL, ""}, //testmatrix
 +      {NULL, ""}, //isreal
 +      {NULL, ""}, //frexp
 +      {NULL, ""}, //zeros
 +      {NULL, ""}, //tan
 +      {NULL, ""}, //log1p
 +      {NULL, ""}, //imult
 +      {NULL, ""}, //asin
 +      {NULL, ""}, //acos
 +      {NULL, ""}, //number_properties
 +      {NULL, ""}, //nearfloat
 +      {NULL, ""}, //dsearch
 +      {NULL, ""}, //isequal
 +      {sci_spones,"spones"},
 +      {NULL, ""}, //gsort
 +      {sci_isequalbitwise,"isequalbitwise"},
-       {NULL, ""} //matrix
++    {NULL, ""}, //matrix
++    {NULL, ""}, //rat
+     {sci_maxi, "maxi"},
+     {sci_maxi, "mini"}
  };
  /*--------------------------------------------------------------------------*/
  int gw_elementary_functions(void)
@@@ -59,13 -58,13 +59,13 @@@ int sci_frexp(char *fname, int* _piKey
                return 0;
        }
  
 -      if(isVarComplex(pvApiCtx, piAddr))
 +      if(isVarComplex(_piKey, piAddr))
        {
-               SciError(9999);
-               sciprint(_("%s: real data only.\n"), fname);
+               Scierror(999,_("%s: Wrong type for input argument #%d: Real matrix expected.\n"), fname, 1);
+         return 0;
        }
  
 -      sciErr = getMatrixOfDouble(pvApiCtx, piAddr, &iRows, &iCols, &pdblReal);
 +      sciErr = getMatrixOfDouble(_piKey, piAddr, &iRows, &iCols, &pdblReal);
        if(sciErr.iErr)
        {
                printError(&sciErr, 0);
  #include "gw_elementary_functions.h"
  #include "stack-c.h"
  #include "basic_functions.h"
 +#include "Scierror.h"
 +#include "api_scilab.h"
 +#include "api_oldstack.h"
  
 -#define _NEW_TONIO_
  /*--------------------------------------------------------------------------*/
 -extern int C2F(intzeros) (int *id);
 -/*--------------------------------------------------------------------------*/
 -int sci_zeros(char *fname,unsigned long fname_len)
 +int sci_zeros(char *fname, int* _piKey)
  {
 -      static int id[6];
 -#ifdef _NEW_TONIO_
 -      int iIndex                              = 0;
 -      int iRows                               = 0;
 -      int iCols                               = 0;
 -      double *pReturnRealData = 0;
 +      SciErr sciErr;
 +      int iRet                                        = 0;
 +      int iRows                                       = 0;
 +      int iCols                                       = 0;
 +      double *pdblReal        = 0;
 +      int* piAddr1                    = NULL;
 +      int* piAddr2                    = NULL;
  
-       CheckLhs(1,1);
+     CheckLhs(1,1);
  
 +
        if(Rhs > 2)
-       {//call %hm_ones
+       {
                int iStart      = 1;
                int iRhs                = Rhs;
                int iLhs                = Lhs;
                        OverLoad(1);
                        return 0;
                }
-               
 -              GetVarDimension(1, &iRows, &iCols);
 -              CheckVarUsed(1);
++
 +              sciErr = getVarDimension(_piKey, piAddr1, &iRows, &iCols);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
        }
        else if(Rhs == 2)
        {
Simple merge
Simple merge
@@@ -46,9 -52,12 +46,12 @@@ src/c/basename.c 
  src/c/pathconvert.c \
  src/c/copyfile_others.c \
  src/c/getFullFilename.c \
- src/c/os_wfopen.c
 -src/c/mputl.c \
++src/c/os_wfopen.c \
+ src/c/fscanfMat.c \
+ src/c/fprintfMat.c
  
 -GATEWAY_SOURCES = \
 +GATEWAY_C_SOURCES = \
  sci_gateway/c/gw_fileio.c \
  sci_gateway/c/sci_mfprintf.c \
  sci_gateway/c/sci_mscanf.c \
@@@ -140,16 -143,12 +141,17 @@@ am__objects_1 = libscifileio_la-FileExi
        libscifileio_la-fullpath.lo libscifileio_la-fileinfo.lo \
        libscifileio_la-getrelativefilename.lo \
        libscifileio_la-splitpath.lo libscifileio_la-movefile.lo \
 -      libscifileio_la-expandPathVariable.lo \
        libscifileio_la-basename.lo libscifileio_la-pathconvert.lo \
        libscifileio_la-copyfile_others.lo \
 -      libscifileio_la-getFullFilename.lo libscifileio_la-mputl.lo \
 -      libscifileio_la-fscanfMat.lo libscifileio_la-fprintfMat.lo
 -am__objects_2 = libscifileio_la-gw_fileio.lo \
 +      libscifileio_la-getFullFilename.lo \
-       libscifileio_la-os_wfopen.lo
++      libscifileio_la-os_wfopen.lo libscifileio_la-fscanfMat.lo \
++      libscifileio_la-fprintfMat.lo
 +am__objects_2 = libscifileio_la-expandPathVariable.lo \
 +      libscifileio_la-mopen.lo libscifileio_la-mclose.lo \
 +      libscifileio_la-mput.lo libscifileio_la-mget.lo \
 +      libscifileio_la-mputl.lo libscifileio_la-mgetl.lo \
 +      libscifileio_la-filemanager.lo
 +am__objects_3 = libscifileio_la-gw_fileio.lo \
        libscifileio_la-sci_mfprintf.lo libscifileio_la-sci_mscanf.lo \
        libscifileio_la-sci_msscanf.lo libscifileio_la-sci_mfscanf.lo \
        libscifileio_la-sci_fprintfMat.lo \
@@@ -509,9 -498,11 +512,11 @@@ src/c/basename.c 
  src/c/pathconvert.c \
  src/c/copyfile_others.c \
  src/c/getFullFilename.c \
- src/c/os_wfopen.c
 -src/c/mputl.c \
++src/c/os_wfopen.c \
+ src/c/fscanfMat.c \
+ src/c/fprintfMat.c
  
 -GATEWAY_SOURCES = \
 +GATEWAY_C_SOURCES = \
  sci_gateway/c/gw_fileio.c \
  sci_gateway/c/sci_mfprintf.c \
  sci_gateway/c/sci_mscanf.c \
@@@ -780,10 -755,10 +791,12 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-do_xxscanf.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-expandPathVariable.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-fileinfo.Plo@am__quote@
 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-fileio_gw.Plo@am__quote@
 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-filemanager.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-filesmanagement.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-findfiles.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-fprintfMat.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-fscanfMat.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-fullpath.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-getFullFilename.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscifileio_la-getdrives.Plo@am__quote@
@@@ -1179,13 -1195,27 +1192,27 @@@ libscifileio_la-getFullFilename.lo: src
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-getFullFilename.lo `test -f 'src/c/getFullFilename.c' || echo '$(srcdir)/'`src/c/getFullFilename.c
  
 -libscifileio_la-mputl.lo: src/c/mputl.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-mputl.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-mputl.Tpo -c -o libscifileio_la-mputl.lo `test -f 'src/c/mputl.c' || echo '$(srcdir)/'`src/c/mputl.c
 -@am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-mputl.Tpo $(DEPDIR)/libscifileio_la-mputl.Plo
 -@AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/mputl.c' object='libscifileio_la-mputl.lo' libtool=yes @AMDEPBACKSLASH@
 +libscifileio_la-os_wfopen.lo: src/c/os_wfopen.c
 +@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-os_wfopen.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-os_wfopen.Tpo -c -o libscifileio_la-os_wfopen.lo `test -f 'src/c/os_wfopen.c' || echo '$(srcdir)/'`src/c/os_wfopen.c
 +@am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-os_wfopen.Tpo $(DEPDIR)/libscifileio_la-os_wfopen.Plo
 +@AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/os_wfopen.c' object='libscifileio_la-os_wfopen.lo' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 -@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-mputl.lo `test -f 'src/c/mputl.c' || echo '$(srcdir)/'`src/c/mputl.c
 +@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-os_wfopen.lo `test -f 'src/c/os_wfopen.c' || echo '$(srcdir)/'`src/c/os_wfopen.c
  
+ libscifileio_la-fscanfMat.lo: src/c/fscanfMat.c
+ @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-fscanfMat.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-fscanfMat.Tpo -c -o libscifileio_la-fscanfMat.lo `test -f 'src/c/fscanfMat.c' || echo '$(srcdir)/'`src/c/fscanfMat.c
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-fscanfMat.Tpo $(DEPDIR)/libscifileio_la-fscanfMat.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/fscanfMat.c' object='libscifileio_la-fscanfMat.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-fscanfMat.lo `test -f 'src/c/fscanfMat.c' || echo '$(srcdir)/'`src/c/fscanfMat.c
+ libscifileio_la-fprintfMat.lo: src/c/fprintfMat.c
+ @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-fprintfMat.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-fprintfMat.Tpo -c -o libscifileio_la-fprintfMat.lo `test -f 'src/c/fprintfMat.c' || echo '$(srcdir)/'`src/c/fprintfMat.c
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-fprintfMat.Tpo $(DEPDIR)/libscifileio_la-fprintfMat.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/fprintfMat.c' object='libscifileio_la-fprintfMat.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -c -o libscifileio_la-fprintfMat.lo `test -f 'src/c/fprintfMat.c' || echo '$(srcdir)/'`src/c/fprintfMat.c
  libscifileio_la-gw_fileio.lo: sci_gateway/c/gw_fileio.c
  @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(libscifileio_la_CFLAGS) $(CFLAGS) -MT libscifileio_la-gw_fileio.lo -MD -MP -MF $(DEPDIR)/libscifileio_la-gw_fileio.Tpo -c -o libscifileio_la-gw_fileio.lo `test -f 'sci_gateway/c/gw_fileio.c' || echo '$(srcdir)/'`sci_gateway/c/gw_fileio.c
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscifileio_la-gw_fileio.Tpo $(DEPDIR)/libscifileio_la-gw_fileio.Plo
Simple merge
@@@ -1,56 -1,66 +1,56 @@@
  /*
   * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
   * Copyright (C) 2006 - INRIA - Allan CORNET
-- * 
++ *
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
--/*--------------------------------------------------------------------------*/ 
++/*--------------------------------------------------------------------------*/
  #ifndef __GW_FILEIO_H__
  #define __GW_FILEIO_H__
  #include "dynlib_fileio.h"
  #include "api_scilab.h"
--/*--------------------------------------------------------------------------*/ 
++/*--------------------------------------------------------------------------*/
  FILEIO_IMPEXP int gw_fileio(void);
--/*--------------------------------------------------------------------------*/ 
 -int sci_meof(char *fname,unsigned long fname_len);
 -int sci_mopen(char *fname,unsigned long fname_len);
 -int sci_mclose(char *fname,unsigned long fname_len);
 -int sci_merror(char *fname,unsigned long fname_len);
 -int sci_mputstr(char *fname,unsigned long fname_len);
 -int sci_mput(char *fname,unsigned long fname_len);
 -int sci_mget(char *fname,unsigned long fname_len);
 -int sci_mgetstr(char *fname,unsigned long fname_len);
 -int sci_mseek(char *fname,unsigned long fname_len);
 -int sci_mtell(char *fname,unsigned long fname_len);
 -int sci_mclearerr(char *fname,unsigned long fname_len);
 -int sci_fscanfMat(char *fname,unsigned long fname_len);
 -int sci_mfprintf(char *fname,unsigned long fname_len);
 -int sci_scanf(char *fname,unsigned long fname_len);
 -int sci_fprintfMat(char *fname,unsigned long fname_len);
 -int sci_sscanf(char *fname,unsigned long fname_len);
 -int sci_fscanf(char *fname,unsigned long fname_len);
 -int sci_findfiles(char *fname,unsigned long fname_len);
 -int sci_maxfiles(char *fname,unsigned long fname_len);
 -int sci_getdrives(char *fname,unsigned long fname_len);
 -int sci_fullpath(char *fname,unsigned long fname_len);
 -int sci_deletefile(char *fname,unsigned long fname_len);
 -int sci_pathsep(char *fname,unsigned long fname_len);
 -int sci_filesep(char *fname,unsigned long fname_len);
 -int sci_getlongpathname(char *fname,unsigned long fname_len);
 -int sci_getshortpathname(char *fname,unsigned long fname_len);
 -int sci_fileext(char *fname,unsigned long fname_len);
 -int sci_isdir(char *fname,unsigned long fname_len);
 -int sci_createdir(char *fname,unsigned long fname_len);
 -int sci_removedir(char *fname,unsigned long fname_len);
 -int sci_chdir(char *fname,unsigned long fname_len);
 -int sci_pwd(char *fname,unsigned long fname_len);
 -int sci_fileinfo(char *fname,unsigned long fname_len);
 -int sci_newest(char *fname,unsigned long fname_len);
 -int sci_getrelativefilename(char *fname, unsigned long l);
 -int sci_get_absolute_file_path(char *fname,unsigned long fname_len);
 -int sci_copyfile(char *fname,unsigned long fname_len);
 -int sci_isfile(char *fname,unsigned long fname_len);
 -int sci_fileparts(char *fname,unsigned long fname_len);
 -int sci_movefile(char *fname,unsigned long fname_len);
 -int sci_basename(char *fname,unsigned long fname_len);
 -int sci_pathconvert(char *fname,unsigned long fname_len);
 -int sci_mgetl(char *fname,unsigned long fname_len);
 -int sci_mputl(char *fname,unsigned long fname_len);
 -/*--------------------------------------------------------------------------*/ 
++/*--------------------------------------------------------------------------*/
 +FILEIO_IMPEXP int sci_meof(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_merror(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mputstr(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mgetstr(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mseek(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mtell(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mclearerr(char *fname,unsigned long fname_len);
- FILEIO_IMPEXP int sci_fscanfMat(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_mfprintf(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_scanf(char *fname,unsigned long fname_len);
- FILEIO_IMPEXP int sci_fprintfMat(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_sscanf(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_fscanf(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_maxfiles(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_getdrives(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_fullpath(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_deletefile(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_pathsep(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_getlongpathname(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_getshortpathname(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_fileext(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_createdir(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_removedir(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_fileinfo(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_newest(char *fname,unsigned long fname_len);
 +FILEIO_IMPEXP int sci_getrelativefilename(char *fname, unsigned long l);
 +FILEIO_IMPEXP int sci_get_absolute_file_path(char *fname,unsigned long fname_len);
 +
 +//YaSp
 +FILEIO_IMPEXP int sci_pwd(char *fname, int* _piKey);
 +FILEIO_IMPEXP int sci_chdir(char *fname, int* _piKey);
 +FILEIO_IMPEXP int sci_copyfile(char *fname,int* _piKey);
 +FILEIO_IMPEXP int sci_movefile(char *fname, int* _piKey);
++FILEIO_IMPEXP int sci_fscanfMat(char *fname, int *_piKey);
++FILEIO_IMPEXP int sci_fprintfMat(char *fname, int *_piKey);
 +
- /*--------------------------------------------------------------------------*/ 
++/*--------------------------------------------------------------------------*/
  #endif /* __GW_FILEIO_H__ */
  /*--------------------------------------------------------------------------*/
  /*
-  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-  * Copyright (C) INRIA
-  * Copyright (C) DIGITEO - 2010 - Allan CORNET
-  * 
-  * This file must be used under the terms of the CeCILL.
-  * This source file is licensed as described in the file COPYING, which
-  * you should have received as part of this distribution.  The terms
-  * are also available at    
-  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-  *
-  */
- #include <stdio.h>
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) INRIA
+ * Copyright (C) DIGITEO - 2010 - Allan CORNET
 -* 
++*
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
 -* are also available at    
++* are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+ #include <string.h>
+ #include "api_scilab.h"
  #include "MALLOC.h"
  #include "stack-c.h"
++#include "api_oldstack.h"
  #include "gw_fileio.h"
  #include "Scierror.h"
  #include "localization.h"
  #include "freeArrayOfString.h"
- #include "charEncoding.h"
- #include "StringConvert.h"
- #include "BOOL.h"
+ #include "expandPathVariable.h"
 -
 -#ifdef _MSC_VER
 -#include "strdup_windows.h"
 -#endif
++#include "os_strdup.h"
+ #include "fprintfMat.h"
  /*--------------------------------------------------------------------------*/
- #define EOL "\n"
- #define DEFAULT_FPRINTF_FORMAT "%lf"
- /*--------------------------------------------------------------------------*/
--int sci_fprintfMat(char *fname,unsigned long fname_len)
++int sci_fprintfMat(char *fname, int *_piKey)
  {
-       int l1 = 0, m1 = 0, n1 = 0,l2 = 0,m2 = 0,n2 = 0,m3 = 0,n3 = 0,l3 = 0,i = 0,j = 0,mS = 0,nS = 0;
-       FILE  *f = NULL;
-       char *filename = NULL;
-       char **Str2 = NULL;
-       char *Format = NULL;
-       Nbvars = 0;
-       CheckRhs(1,4);
-       CheckLhs(1,1);
-       if (GetType(1) == sci_strings)
-       {
-               char *filename2 = NULL;
-               GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);/* file name */
-               /* BUG 3714 */
-               filename = cstk(l1);
-       }
-       else
-       {
-               Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,1);
-               return 0;
-       }
-       if (GetType(2) == sci_matrix)
-       {
-               #define COMPLEXPART 1
-               int *header = NULL;
-               int Cmplx;
-               header = (int *) GetData(2);
-               Cmplx = header[3];
-               if (Cmplx != COMPLEXPART)
-               {
-                       GetRhsVar(2,MATRIX_OF_DOUBLE_DATATYPE,&m2,&n2,&l2); /* data */
-               }
-               else
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: Real values expected.\n"),fname,2);
-                       return 0;
-               }
-       }
-       else
-       {
-               Scierror(999,_("%s: Wrong type for input argument #%d: Matrix of floating point numbers expected.\n"),fname,2);
-               return 0;
-       }
-       if ( Rhs >= 3)
-       {
-               GetRhsVar(3,STRING_DATATYPE,&m3,&n3,&l3);/* format */
-               StringConvert(cstk(l3));  /* conversion */
-               Format = cstk(l3);
-       }
-       else
-       {
-               Format = DEFAULT_FPRINTF_FORMAT;
-       }
-       if ( Rhs >= 4 )
-       {
-               GetRhsVar(4,MATRIX_OF_STRING_DATATYPE,&mS,&nS,&Str2);
-       }
-       #if _MSC_VER
-       #define MODEFD "wt"
-       #else
-       #define MODEFD "w"
-       #endif
-       wcfopen(f , filename, MODEFD);
-       if ( f == (FILE *)0 )
-       {
-               Scierror(999, _("%s: Cannot open file %s.\n"), fname, filename);
-               return 0;
-       }
-       if ( Rhs >= 4 )
-       {
-               for ( i=0 ; i < mS*nS ; i++) fprintf(f,"%s\n",Str2[i]);
-       }
-       for (i = 0 ; i < m2 ; i++ )
-       {
-               for ( j = 0 ; j < n2 ; j++)
-               {
-                       fprintf(f, Format, *stk(l2+i + m2*j));
-                       fprintf(f, " ");
-               }
-               fprintf(f, EOL);
-       }
-       fclose(f);
-       LhsVar(1) = 0 ; /** no return value **/
-       if ( Rhs >= 4)
-       {
-               freeArrayOfString(Str2, mS*nS);
-       }
-       PutLhsVar();
-       return 0;
+     SciErr sciErr;
+     int *piAddressVarOne = NULL;
+     int m1 = 0, n1 = 0;
+     int iType1 = 0;
+     int *piAddressVarTwo = NULL;
+     int m2 = 0, n2 = 0;
+     int iType2 = 0;
+     fprintfMatError ierr = FPRINTFMAT_ERROR;
+     char *filename = NULL;
+     char *expandedFilename = NULL;
+     char **textAdded = NULL;
+     char *Format = NULL;
+     double *dValues = NULL;
+     char *separator = NULL;
+     int m4n4 = 0;
+     int i = 0;
+     Nbvars = 0;
+     CheckRhs(1,5);
+     CheckLhs(1,1);
+     if (Rhs >= 3)
+     {
+         int *piAddressVarThree = NULL;
+         int iType3    = 0;
+         int m3 = 0, n3 = 0;
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 3, &piAddressVarThree);
++        sciErr = getVarAddressFromPosition(_piKey, 3, &piAddressVarThree);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
 -        sciErr = getVarType(pvApiCtx, piAddressVarThree, &iType3);
++        sciErr = getVarType(_piKey, piAddressVarThree, &iType3);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
+         if (iType3 != sci_strings)
+         {
+             Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 3);
+             return 0;
+         }
 -        sciErr = getVarDimension(pvApiCtx, piAddressVarThree, &m3, &n3);
++        sciErr = getVarDimension(_piKey, piAddressVarThree, &m3, &n3);
 -        if ( (m3 != n3) && (n3 != 1) ) 
++        if ( (m3 != n3) && (n3 != 1) )
+         {
+             Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 3);
+             return 0;
+         }
 -        if (getAllocatedSingleString(pvApiCtx, piAddressVarThree, &Format))
++        if (getAllocatedSingleString(_piKey, piAddressVarThree, &Format))
+         {
+             Scierror(999,_("%s: Memory allocation error.\n"), fname);
+             return 0;
+         }
+     }
+     else
+     {
 -        Format = strdup(DEFAULT_FPRINTFMAT_FORMAT);
++        Format = os_strdup(DEFAULT_FPRINTFMAT_FORMAT);
+     }
+     if ( Rhs >= 4 )
+     {
+         int *piAddressVarFour = NULL;
+         int *lengthStrings = NULL;
+         int iType4    = 0;
+         int m4 = 0, n4 = 0;
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 4, &piAddressVarFour);
++        sciErr = getVarAddressFromPosition(_piKey, 4, &piAddressVarFour);
+         if(sciErr.iErr)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             printError(&sciErr, 0);
+             return 0;
+         }
 -        sciErr = getVarType(pvApiCtx, piAddressVarFour, &iType4);
++        sciErr = getVarType(_piKey, piAddressVarFour, &iType4);
+         if(sciErr.iErr)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             printError(&sciErr, 0);
+             return 0;
+         }
+         if (iType4 != sci_strings)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 4);
+             return 0;
+         }
 -        sciErr = getVarDimension(pvApiCtx, piAddressVarFour, &m4, &n4);
++        sciErr = getVarDimension(_piKey, piAddressVarFour, &m4, &n4);
+         if(sciErr.iErr)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             printError(&sciErr, 0);
+             return 0;
+         }
+         if  (! ((m4 == 1) || (n4 == 1)))
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             Scierror(999,_("%s: Wrong size for input argument #%d.\n"), fname, 4);
+             return 0;
+         }
+         lengthStrings = (int*)MALLOC(sizeof(int) * (m4 * n4));
+         if (lengthStrings == NULL)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             Scierror(999,_("%s: Memory allocation error.\n"),fname);
+             return 0;
+         }
+         // get lengthStrings value
 -        sciErr = getMatrixOfString(pvApiCtx, piAddressVarFour, &m4, &n4, lengthStrings, NULL);
++        sciErr = getMatrixOfString(_piKey, piAddressVarFour, &m4, &n4, lengthStrings, NULL);
+         if(sciErr.iErr)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             if (lengthStrings) {FREE(lengthStrings); lengthStrings = NULL;}
+             printError(&sciErr, 0);
+             return 0;
+         }
+         textAdded = (char**)MALLOC(sizeof(char*) * (m4 * n4));
+         if (textAdded == NULL)
+         {
+             if (Format) {FREE(Format); Format = NULL;}
+             if (lengthStrings) {FREE(lengthStrings); lengthStrings = NULL;}
+             Scierror(999,_("%s: Memory allocation error.\n"),fname);
+             return 0;
+         }
+         for (i = 0; i < (m4 * n4); i++)
+         {
+             textAdded[i] = (char*)MALLOC(sizeof(char) * (lengthStrings[i] + 1));
+             if (textAdded[i] == NULL)
+             {
+                 freeArrayOfString(textAdded, m4 * n4);
+                 if (Format) {FREE(Format); Format = NULL;}
+                 if (lengthStrings) {FREE(lengthStrings); lengthStrings = NULL;}
+                 Scierror(999,_("%s: Memory allocation error.\n"),fname);
+                 return 0;
+             }
+         }
+         // get textAdded
 -        sciErr = getMatrixOfString(pvApiCtx, piAddressVarFour, &m4, &n4, lengthStrings, textAdded);
++        sciErr = getMatrixOfString(_piKey, piAddressVarFour, &m4, &n4, lengthStrings, textAdded);
+         if (lengthStrings) {FREE(lengthStrings); lengthStrings = NULL;}
+         if(sciErr.iErr)
+         {
+             freeArrayOfString(textAdded, m4 * n4);
+             if (Format) {FREE(Format); Format = NULL;}
+             printError(&sciErr, 0);
+             return 0;
+         }
+         m4n4 = m4 * n4;
+     }
+     if (Rhs > 4)
+     {
+         int *piAddressVarFive = NULL;
+         int iType5    = 0;
+         int m5 = 0, n5 = 0;
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 5, &piAddressVarFive);
++        sciErr = getVarAddressFromPosition(_piKey, 5, &piAddressVarFive);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
 -        sciErr = getVarType(pvApiCtx, piAddressVarFive, &iType5);
++        sciErr = getVarType(_piKey, piAddressVarFive, &iType5);
+         if(sciErr.iErr)
+         {
+             printError(&sciErr, 0);
+             return 0;
+         }
+         if (iType5 != sci_strings)
+         {
+             Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 5);
+             return 0;
+         }
 -        sciErr = getVarDimension(pvApiCtx, piAddressVarFive, &m5, &n5);
++        sciErr = getVarDimension(_piKey, piAddressVarFive, &m5, &n5);
 -        if ( (m5 != n5) && (n5 != 1) ) 
++        if ( (m5 != n5) && (n5 != 1) )
+         {
+             Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 5);
+             return 0;
+         }
 -        if (getAllocatedSingleString(pvApiCtx, piAddressVarFive, &separator))
++        if (getAllocatedSingleString(_piKey, piAddressVarFive, &separator))
+         {
+             Scierror(999,_("%s: Memory allocation error.\n"), fname);
+             return 0;
+         }
+     }
+     else
+     {
 -        separator = strdup(DEFAULT_FPRINTFMAT_SEPARATOR);
++        separator = os_strdup(DEFAULT_FPRINTFMAT_SEPARATOR);
+     }
 -    sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
++    sciErr = getVarAddressFromPosition(_piKey, 2, &piAddressVarTwo);
+     if(sciErr.iErr)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         printError(&sciErr, 0);
+         return 0;
+     }
 -    sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
++    sciErr = getVarType(_piKey, piAddressVarTwo, &iType2);
+     if(sciErr.iErr)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         printError(&sciErr, 0);
+         return 0;
+     }
+     if (iType2 != sci_matrix)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         Scierror(999,_("%s: Wrong type for input argument #%d: Matrix of floating point numbers expected.\n"), fname, 2);
+         return 0;
+     }
 -    if (isVarComplex(pvApiCtx, piAddressVarTwo))
++    if (isVarComplex(_piKey, piAddressVarTwo))
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         Scierror(999,_("%s: Wrong type for input argument #%d: Real values expected.\n"), fname, 2);
+         return 0;
+     }
 -    sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarTwo, &m2, &n2, &dValues);
++    sciErr = getMatrixOfDouble(_piKey, piAddressVarTwo, &m2, &n2, &dValues);
+     if(sciErr.iErr)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         printError(&sciErr, 0);
+         return 0;
+     }
 -    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
++    sciErr = getVarAddressFromPosition(_piKey, 1, &piAddressVarOne);
+     if(sciErr.iErr)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         printError(&sciErr, 0);
+         return 0;
+     }
 -    sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
++    sciErr = getVarType(_piKey, piAddressVarOne, &iType1);
+     if(sciErr.iErr)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         printError(&sciErr, 0);
+         return 0;
+     }
+     if (iType1 != sci_strings)
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
+         return 0;
+     }
 -    sciErr = getVarDimension(pvApiCtx, piAddressVarOne, &m1, &n1);
++    sciErr = getVarDimension(_piKey, piAddressVarOne, &m1, &n1);
 -    if ( (m1 != n1) && (n1 != 1) ) 
++    if ( (m1 != n1) && (n1 != 1) )
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 1);
+         return 0;
+     }
 -    if (getAllocatedSingleString(pvApiCtx, piAddressVarOne, &filename))
++    if (getAllocatedSingleString(_piKey, piAddressVarOne, &filename))
+     {
+         if (textAdded) freeArrayOfString(textAdded, m4n4);
+         if (Format) {FREE(Format); Format = NULL;}
+         if (separator){FREE(separator); separator = NULL;}
+         Scierror(999,_("%s: Memory allocation error.\n"), fname);
+         return 0;
+     }
+     expandedFilename = expandPathVariable(filename);
+     ierr = fprintfMat(expandedFilename, Format, separator, dValues, m2, n2,textAdded, m4n4);
+     if (expandedFilename) {FREE(expandedFilename); expandedFilename = NULL;}
+     if (textAdded) freeArrayOfString(textAdded, m4n4);
+     if (Format) {FREE(Format); Format = NULL;}
+     if (separator){FREE(separator); separator = NULL;}
+     switch(ierr)
+     {
+     case FPRINTFMAT_NO_ERROR:
+         {
+             LhsVar(1) = 0;
+             C2F(putlhsvar)();
+         }
+         break;
+     case FPRINTFMAT_FOPEN_ERROR:
+         {
+             Scierror(999,_("%s: can not open file %s.\n"), fname, filename);
+         }
+         break;
+     case FPRINTMAT_FORMAT_ERROR:
+         {
+             Scierror(999,_("%s: Invalid format.\n"), fname);
+         }
+         break;
+     default:
+     case FPRINTFMAT_ERROR:
+         {
+             Scierror(999,_("%s: error.\n"), fname);
+         }
+         break;
+     }
+     if (filename) {FREE(filename); filename = NULL;}
+     return 0;
  }
  /*--------------------------------------------------------------------------*/
   * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
   * Copyright (C) 2006 - INRIA - Allan CORNET
   * Copyright (C) 2010 - DIGITEO - Allan CORNET
-- * 
++ *
   * This file must be used under the terms of the CeCILL.
   * This source file is licensed as described in the file COPYING, which
   * you should have received as part of this distribution.  The terms
-- * are also available at    
++ * are also available at
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
  /*--------------------------------------------------------------------------*/
- #if defined(__linux__)
- #define _GNU_SOURCE /* Bug 5673 fix: avoid dependency on GLIBC_2.7 */
- #endif
- /*--------------------------------------------------------------------------*/
- #include "gw_fileio.h"
- #include "stack-c.h"
+ #include <string.h>
+ #include "api_scilab.h"
  #include "MALLOC.h"
- #include "scanf_functions.h"
+ #include "stack-c.h"
+ #include "gw_fileio.h"
  #include "Scierror.h"
  #include "localization.h"
- #include "expandPathVariable.h"
  #include "freeArrayOfString.h"
 -#include "expandPathVariable.h"
 -
 -#ifdef _MSC_VER
 -#include "strdup_windows.h"
 -#endif
 +#include "PATH_MAX.h"
 +#include "charEncoding.h"
 +#include "StringConvert.h"
 +#include "os_strdup.h"
+ #include "fscanfMat.h"
  /*--------------------------------------------------------------------------*/
 -int sci_fscanfMat(char *fname,unsigned long fname_len)
 +#define INFOSIZE 1024
 +#define DEFAULT_FORMAT_FSCANFMAT "%lf"
 +#define NUMTOKENS_ERROR -1
 +/*--------------------------------------------------------------------------*/
 +static int  Info_size = 0;
 +static char *Info = NULL;
 +/*--------------------------------------------------------------------------*/
 +static int ReadLine(FILE *fd,int *mem);
 +static BOOL checkFormat(char *fmt);
 +static BOOL checkLineHaveSeparator(char *line);
 +static int NumTokens(char *string);
 +/*--------------------------------------------------------------------------*/
- int sci_fscanfMat(char *fname,unsigned long fname_len)
++int sci_fscanfMat(char *fname, int *_piKey)
  {
-     char **Str = NULL;
-     int mem = 0;
-     double x = 0.;
-     int l1 = 0, m1 = 0, n1 = 0, l2 = 0, m2 = 0,n2 = 0;
-     int i = 0, j = 0,rows = 0,cols = 0,lres = 0,n = 0;
-     int vl = -1;
-     FILE  *f = NULL;
+     SciErr sciErr;
+     int *piAddressVarOne = NULL;
+     int m1 = 0, n1 = 0;
+     int iType1 = 0;
+     char *filename = NULL;
+     char *expandedFilename = NULL;
      char *Format = NULL;
+     char *separator = NULL;
  
-     char *shortcut_path = NULL;       // filename process
-     char *real_path     = NULL; //       "
-     if ( Info == NULL )
-     {
-         if (( Info = (char*)MALLOC(INFOSIZE*sizeof(char))) == NULL)
-         {
-             Scierror(999,_("%s: No more memory.\n"), fname);
-             return 0;
-         }
-         Info_size = INFOSIZE;
-   &n