Merge remote-tracking branch 'origin/master' into yasp 76/11176/3
Antoine ELIAS [Fri, 29 Mar 2013 17:09:10 +0000 (18:09 +0100)]
Conflicts:
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/c/core.vcxproj.filters
scilab/modules/core/src/c/signal_mgmt.c
scilab/modules/core/tests/unit_tests/varargout.dia.ref
scilab/modules/core/tests/unit_tests/varargout.tst
scilab/modules/differential_equations/Makefile.am
scilab/modules/differential_equations/Makefile.in
scilab/modules/differential_equations/includes/gw_differential_equations2.h
scilab/modules/differential_equations/sci_gateway/c/gw_differential_equations2.c
scilab/modules/differential_equations/sci_gateway/differential_equations_gateway.xml
scilab/modules/differential_equations/sci_gateway/fortran/sci_f_bvode.f
scilab/modules/differential_equations/src/c/DllmainDifferential_equations.c
scilab/modules/differential_equations/src/c/dassltable.c
scilab/modules/differential_equations/src/c/differential_equations.vcxproj
scilab/modules/differential_equations/src/c/differential_equations_f_Import.def
scilab/modules/differential_equations/src/fortran/differential_equations_f.vfproj
scilab/modules/differential_equations/src/fortran/differential_equations_f2c.vcxproj
scilab/modules/differential_equations/src/fortran/differential_equations_f2c.vcxproj.filters
scilab/modules/fftw/sci_gateway/c/sci_get_fftw_wisdom.c
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/fileio.vcxproj
scilab/modules/fileio/fileio.vcxproj.filters
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/sci_gateway/c/gw_fileio.c
scilab/modules/fileio/sci_gateway/c/sci_getURLcontent.c
scilab/modules/fileio/src/c/dlManager.h
scilab/modules/helptools/macros/xmltoformat.sci
scilab/modules/io/src/c/setenvc.c
scilab/modules/io/src/fortran/newsave.f
scilab/modules/linear_algebra/sci_gateway/c/sci_qr.c
scilab/modules/output_stream/tests/unit_tests/msprintf.tst
scilab/modules/signal_processing/tests/unit_tests/corr.dia.ref
scilab/modules/signal_processing/tests/unit_tests/corr.tst
scilab/modules/signal_processing/tests/unit_tests/rpem.dia.ref
scilab/modules/signal_processing/tests/unit_tests/rpem.tst
scilab/modules/string/Makefile.in
scilab/modules/string/sci_gateway/c/sci_code2str.c
scilab/modules/string/sci_gateway/c/sci_str2code.c
scilab/modules/string/sci_gateway/c/sci_strsplit.c
scilab/modules/string/src/c/strsplit.h
scilab/tools/innosetup/components.iss

Change-Id: Id2d0cc07fbe710a1d43abe472ab6df6d01716c8b

57 files changed:
1  2 
scilab/Makefile.am
scilab/Makefile.in
scilab/configure
scilab/configure.ac
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/c/core.vcxproj.filters
scilab/modules/core/src/c/signal_mgmt.c
scilab/modules/core/tests/unit_tests/varargout.dia.ref
scilab/modules/core/tests/unit_tests/varargout.tst
scilab/modules/differential_equations/includes/gw_differential_equations2.h
scilab/modules/differential_equations/sci_gateway/c/gw_differential_equations2.c
scilab/modules/differential_equations/src/c/DllmainDifferential_equations.c
scilab/modules/differential_equations/src/c/differential_equations.vcxproj
scilab/modules/differential_equations/src/c/differential_equations.vcxproj.filters
scilab/modules/differential_equations/src/c/differential_equations_f_Import.def
scilab/modules/differential_equations/src/fortran/differential_equations_Import.def
scilab/modules/differential_equations/src/fortran/differential_equations_f2c.vcxproj.filters
scilab/modules/differential_equations/tests/unit_tests/ode.tst
scilab/modules/external_objects/src/cpp/ScilabObjects.cpp
scilab/modules/fftw/sci_gateway/c/sci_get_fftw_wisdom.c
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/fileio.vcxproj
scilab/modules/fileio/fileio.vcxproj.filters
scilab/modules/fileio/includes/dlManager.h
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/sci_gateway/c/gw_fileio.c
scilab/modules/fileio/sci_gateway/c/sci_getURL.c
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcxproj
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcxproj.filters
scilab/modules/fileio/src/c/dlManager.c
scilab/modules/graphic_objects/Makefile.am
scilab/modules/graphic_objects/Makefile.in
scilab/modules/graphics/graphics.iss
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/sci_gateway/c/sci_xfpolys.c
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/sci_gateway/c/sci_uicontrol.c
scilab/modules/helptools/data/pages/homepage-en_US.html
scilab/modules/helptools/macros/xmltoformat.sci
scilab/modules/io/src/c/getenvc.c
scilab/modules/io/src/c/setenvc.c
scilab/modules/linear_algebra/sci_gateway/c/sci_qr.c
scilab/modules/renderer/renderer.iss
scilab/modules/string/Makefile.am
scilab/modules/string/Makefile.in
scilab/modules/string/sci_gateway/c/sci_strsplit.c
scilab/modules/string/src/c/string.vcxproj
scilab/modules/string/src/c/string.vcxproj.filters
scilab/modules/string/src/c/strsplit.h
scilab/modules/windows_tools/src/c/scilab_windows/FilesAssociations.c
scilab/modules/xml/sci_gateway/cpp/sci_xmlAppend.cpp
scilab/tools/innosetup/base.iss
scilab/tools/innosetup/components.iss

Simple merge
@@@ -662,33 -633,15 +662,33 @@@ AM_CFLAGS = $(SCI_CFLAGS
  AM_CXXFLAGS = $(SCI_CXXFLAGS)
  AM_FFLAGS = $(SCI_FFLAGS)
  AM_LDFLAGS = $(SCI_LDFLAGS)
 -changelogs = CHANGES CHANGES_5.1.X CHANGES_5.2.X CHANGES_5.3.X CHANGES_5.4.X  CHANGES_5.5.X
 +changelogs = CHANGES CHANGES_5.1.X CHANGES_5.2.X CHANGES_5.3.X CHANGES_5.4.X CHANGES_5.5.X CHANGES_6.0.X
  bin_SCRIPTS = bin/scilab bin/scilab-adv-cli bin/scilab-cli \
-       $(am__append_1)
+       bin/scinotes bin/xcos $(am__append_1)
  scilab_bin_LDFLAGS = $(AM_LDFLAGS) $(am__append_2)
  scilab_cli_bin_LDFLAGS = $(AM_LDFLAGS)
 -scilab_bin_CPPFLAGS = -I$(top_srcdir)/modules/io/includes/ \
 -                    -I$(top_srcdir)/modules/console/includes/ \
 -                    -I$(top_srcdir)/modules/localization/includes/ \
 -                    $(AM_CPPFLAGS)
 +scilab_bin_CPPFLAGS = \
 +-I$(top_srcdir)/modules/console/includes/ \
 +-I$(top_srcdir)/modules/output_stream/includes/ \
 +-I$(top_srcdir)/modules/parse/includes/ \
 +-I$(top_srcdir)/modules/ast/includes/ \
 +-I$(top_srcdir)/modules/symbol/includes/ \
 +-I$(top_srcdir)/modules/functions_manager/includes/ \
 +-I$(top_srcdir)/modules/types/includes/ \
 +-I$(top_srcdir)/modules/system_env/includes/ \
 +-I$(top_srcdir)/modules/operations/includes/ \
 +-I$(top_srcdir)/modules/elementary_functions/includes/ \
 +-I$(top_srcdir)/modules/fileio/includes/ \
 +-I$(top_srcdir)/modules/string/includes/ \
 +-I$(top_srcdir)/modules/history_manager/includes/ \
 +-I$(top_srcdir)/modules/threads/includes/ \
 +-I$(top_srcdir)/modules/api_scilab/includes/ \
 +-I$(top_srcdir)/modules/localization/includes/ \
 +-I$(top_srcdir)/modules/core/src/c/ \
 +-I$(top_srcdir)/modules/dynamic_link/includes/ \
 +$(EIGEN_CPPFLAGS) \
 +$(AM_CPPFLAGS)
 +
  
  # --no-undefined --relax
  
Simple merge
Simple merge
@@@ -28,12 -32,15 +28,11 @@@ src/c/Funtab.c 
  src/c/csignal.c \
  src/c/callinterf.c \
  src/c/scimem.c \
 -src/c/banier.c \
  src/c/isanan.c \
- src/c/timer.c \
 -src/c/parse.c \
  src/c/stack2.c \
  src/c/xscion.c \
 -src/c/SetScilabEnvironment.c \
  src/c/returnanan.c \
  src/c/LoadFunctionsTab.c \
 -src/c/with_module.c \
  src/c/loadversion.c \
  src/c/version.c \
  src/c/stackinfo.c \
@@@ -73,7 -89,8 +72,6 @@@ src/c/dynamic_parallel.c 
  src/c/backtrace.c \
  src/c/signal_mgmt.c \
  src/c/suspendProcess.c \
- src/c/windowsChangeManagement.c \
 -src/c/setieee.c \
  src/c/setlines.c \
  src/c/setformat.c \
  src/c/InitializePreferences.c \
@@@ -149,61 -149,69 +149,61 @@@ am__installdirs = "$(DESTDIR)$(pkglibdi
  LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
  libscicore_algo_la_LIBADD =
  am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.c \
 -      src/c/tmpdir.c src/c/intmacr2tree.c src/c/run.c \
 -      src/c/InitScilab.c src/c/getval.c src/c/md5.c src/c/inisci-c.c \
 -      src/c/IsAScalar.c src/c/texmacs.c src/c/sciquit.c \
 -      src/c/stack1.c src/c/realmain.c src/c/stack3.c src/c/str2sci.c \
 -      src/c/getmodules.c src/c/setgetSCIpath.c src/c/getmemory.c \
 -      src/c/Funtab.c src/c/csignal.c src/c/callinterf.c \
 -      src/c/scimem.c src/c/banier.c src/c/isanan.c src/c/parse.c \
 -      src/c/stack2.c src/c/xscion.c src/c/SetScilabEnvironment.c \
 +      src/c/intmacr2tree.c src/c/InitScilab.c src/c/getval.c \
 +      src/c/md5.c src/c/inisci-c.c src/c/IsAScalar.c src/c/texmacs.c \
 +      src/c/sciquit.c src/c/stack1.c src/c/stack3.c src/c/str2sci.c \
 +      src/c/getmodules.c src/c/getmemory.c src/c/Funtab.c \
 +      src/c/csignal.c src/c/callinterf.c src/c/scimem.c \
-       src/c/isanan.c src/c/timer.c src/c/stack2.c src/c/xscion.c \
++      src/c/isanan.c src/c/stack2.c src/c/xscion.c \
        src/c/returnanan.c src/c/LoadFunctionsTab.c \
 -      src/c/with_module.c src/c/loadversion.c src/c/version.c \
 -      src/c/stackinfo.c src/c/scirun.c src/c/SCIHOME.c \
 -      src/c/warningmode.c src/c/InitializeCore.c \
 -      src/c/TerminateCore.c src/c/coretable.c src/c/returnProperty.c \
 -      src/c/returnPropertyList.c src/c/scilabmode.c \
 +      src/c/loadversion.c src/c/version.c src/c/stackinfo.c \
 +      src/c/InitializeCore.c src/c/TerminateCore.c src/c/coretable.c \
        src/c/GetXmlFileEncoding.c src/c/islittleendian.c \
 -      src/c/terme.c src/c/ifexpr.c src/c/expr.c \
 -      src/c/getcommandlineargs.c src/c/syncexec.c \
 +      src/c/terme.c src/c/ifexpr.c src/c/getcommandlineargs.c \
        src/c/callFunctionFromGateway.c src/c/getvariablesname.c \
        src/c/commandwords.c src/c/freeArrayOfString.c \
        src/c/getstaticdebuginfo.c src/c/getdynamicdebuginfo.c \
 -      src/c/callDynamicGateway.c src/c/gw_dynamic_generic.c \
 -      src/c/dynamic_gateways.c src/c/readGateway.c \
 -      src/c/comparehandles.c src/c/setPrecisionFPU.c \
 -      src/c/LaunchScilabSignal.c src/c/getos.c src/c/mode_exec.c \
 -      src/c/predef.c src/c/transposeMatrix.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/gw_dynamic_generic.c src/c/dynamic_gateways.c \
 +      src/c/readGateway.c src/c/comparehandles.c \
 +      src/c/setPrecisionFPU.c src/c/LaunchScilabSignal.c \
 +      src/c/getos.c src/c/mode_exec.c src/c/predef.c \
 +      src/c/transposeMatrix.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/dynamic_parallel.c \
 -      src/c/storeCommand.c src/c/backtrace.c src/c/signal_mgmt.c \
 -      src/c/suspendProcess.c src/c/setieee.c src/c/setlines.c \
 -      src/c/setformat.c src/c/InitializePreferences.c \
 -      src/c/sci_tools.c src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
 -      src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
 +      src/c/backtrace.c src/c/signal_mgmt.c src/c/suspendProcess.c \
-       src/c/windowsChangeManagement.c src/c/setlines.c \
-       src/c/setformat.c src/c/InitializePreferences.c \
-       src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
-       src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
++      src/c/setlines.c src/c/setformat.c \
++      src/c/InitializePreferences.c src/c/getmaxMALLOC.c \
++      src/c/sci_mem_alloc.c src/c/hashtable/hashtable.c \
++      src/c/hashtable/hashtable_itr.c \
        src/c/hashtable/hashtable_utility.c src/c/scimem64.c \
 -      src/cpp/hashtable_core.cpp src/cpp/namstr.cpp \
 -      src/cpp/search_functions.cpp src/cpp/demangle.cpp \
 -      src/cpp/backtrace_print.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/cpp/core_gw.cpp src/cpp/hashtable_core.cpp \
 +      src/cpp/namstr.cpp src/cpp/search_functions.cpp \
 +      src/cpp/demangle.cpp src/cpp/backtrace_print.cpp \
 +      src/cpp/storeCommand.cpp src/cpp/banner.cpp \
 +      src/cpp/with_module.cpp src/cpp/runner.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/fortran/setgetmode.f src/fortran/showstack.f \
 -      src/fortran/misops.f src/fortran/setippty.f \
 -      src/fortran/compil.f src/fortran/funnam.f src/fortran/cmdstr.f \
 +      src/fortran/setippty.f src/fortran/compil.f \
 +      src/fortran/funnam.f src/fortran/cmdstr.f \
        src/fortran/hndlops.f src/fortran/cmplxt.f \
        src/fortran/skpins.f src/fortran/folhp.f src/fortran/cvname.f \
 -      src/fortran/funs.f src/fortran/fact.f src/fortran/typ2cod.f \
 -      src/fortran/prompt.f src/fortran/intstr.f \
 -      src/fortran/createref.f src/fortran/btof.f \
 -      src/fortran/getnum.f src/fortran/btofm.f src/fortran/getsym.f \
 -      src/fortran/findequal.f src/fortran/stackg.f \
 -      src/fortran/find.f src/fortran/setlnb.f src/fortran/mrknmd.f \
 -      src/fortran/stackgl.f src/fortran/allops.f src/fortran/mname.f \
 -      src/fortran/command.f src/fortran/ref2val.f \
 -      src/fortran/stack.f src/fortran/isbrk.f src/fortran/xerbla.f \
 -      src/fortran/dtosci.f src/fortran/bexec.f \
 -      src/fortran/varfunptr.f src/fortran/getfun.f \
 -      src/fortran/savlod.f src/fortran/error.f src/fortran/cvdm.f \
 -      src/fortran/tradsl.f src/fortran/mkindx.f src/fortran/whatln.f \
 -      src/fortran/errmgr.f src/fortran/defmat.f src/fortran/mklist.f \
 -      src/fortran/sigbas.f src/fortran/indxg.f src/fortran/istrue.f \
 -      src/fortran/inisci.f src/fortran/ptover.f \
 -      src/fortran/getfunction.f src/fortran/stackp.f \
 -      src/fortran/dbasin.f src/fortran/macro.f src/fortran/extlarg.f \
 +      src/fortran/typ2cod.f src/fortran/prompt.f \
 +      src/fortran/intstr.f src/fortran/createref.f \
 +      src/fortran/btof.f src/fortran/getnum.f src/fortran/btofm.f \
 +      src/fortran/getsym.f src/fortran/findequal.f \
 +      src/fortran/stackg.f src/fortran/find.f src/fortran/setlnb.f \
 +      src/fortran/mrknmd.f src/fortran/ref2val.f src/fortran/stack.f \
 +      src/fortran/isbrk.f src/fortran/xerbla.f src/fortran/dtosci.f \
 +      src/fortran/bexec.f src/fortran/varfunptr.f \
 +      src/fortran/getfun.f src/fortran/savlod.f src/fortran/error.f \
 +      src/fortran/cvdm.f src/fortran/tradsl.f src/fortran/mkindx.f \
 +      src/fortran/whatln.f src/fortran/errmgr.f src/fortran/defmat.f \
 +      src/fortran/mklist.f src/fortran/sigbas.f src/fortran/indxg.f \
 +      src/fortran/istrue.f src/fortran/inisci.f \
 +      src/fortran/getfunction.f src/fortran/extlarg.f \
        src/fortran/getstr.f src/fortran/cvwm.f \
        src/fortran/storeglobal.f src/fortran/lst2vars.f \
        src/fortran/basnms.f src/fortran/ptrback.f src/fortran/getch.f \
@@@ -220,16 -230,22 +220,16 @@@ am__objects_2 = libscicore_algo_la-inff
        libscicore_algo_la-md5.lo libscicore_algo_la-inisci-c.lo \
        libscicore_algo_la-IsAScalar.lo libscicore_algo_la-texmacs.lo \
        libscicore_algo_la-sciquit.lo libscicore_algo_la-stack1.lo \
 -      libscicore_algo_la-realmain.lo libscicore_algo_la-stack3.lo \
 -      libscicore_algo_la-str2sci.lo libscicore_algo_la-getmodules.lo \
 -      libscicore_algo_la-setgetSCIpath.lo \
 +      libscicore_algo_la-stack3.lo libscicore_algo_la-str2sci.lo \
 +      libscicore_algo_la-getmodules.lo \
        libscicore_algo_la-getmemory.lo libscicore_algo_la-Funtab.lo \
        libscicore_algo_la-csignal.lo libscicore_algo_la-callinterf.lo \
 -      libscicore_algo_la-scimem.lo libscicore_algo_la-banier.lo \
 -      libscicore_algo_la-isanan.lo libscicore_algo_la-parse.lo \
 +      libscicore_algo_la-scimem.lo libscicore_algo_la-isanan.lo \
-       libscicore_algo_la-timer.lo libscicore_algo_la-stack2.lo \
-       libscicore_algo_la-xscion.lo libscicore_algo_la-returnanan.lo \
+       libscicore_algo_la-stack2.lo libscicore_algo_la-xscion.lo \
 -      libscicore_algo_la-SetScilabEnvironment.lo \
+       libscicore_algo_la-returnanan.lo \
        libscicore_algo_la-LoadFunctionsTab.lo \
 -      libscicore_algo_la-with_module.lo \
        libscicore_algo_la-loadversion.lo \
        libscicore_algo_la-version.lo libscicore_algo_la-stackinfo.lo \
 -      libscicore_algo_la-scirun.lo libscicore_algo_la-SCIHOME.lo \
 -      libscicore_algo_la-warningmode.lo \
        libscicore_algo_la-InitializeCore.lo \
        libscicore_algo_la-TerminateCore.lo \
        libscicore_algo_la-coretable.lo \
        libscicore_algo_la-backtrace.lo \
        libscicore_algo_la-signal_mgmt.lo \
        libscicore_algo_la-suspendProcess.lo \
-       libscicore_algo_la-windowsChangeManagement.lo \
 -      libscicore_algo_la-setieee.lo libscicore_algo_la-setlines.lo \
 -      libscicore_algo_la-setformat.lo \
 +      libscicore_algo_la-setlines.lo libscicore_algo_la-setformat.lo \
        libscicore_algo_la-InitializePreferences.lo \
 -      libscicore_algo_la-sci_tools.lo \
        libscicore_algo_la-getmaxMALLOC.lo \
        libscicore_algo_la-sci_mem_alloc.lo \
        libscicore_algo_la-hashtable.lo \
@@@ -648,39 -666,43 +647,39 @@@ target_alias = @target_alias
  top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 -CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/tmpdir.c \
 -      src/c/intmacr2tree.c src/c/run.c src/c/InitScilab.c \
 -      src/c/getval.c src/c/md5.c src/c/inisci-c.c src/c/IsAScalar.c \
 -      src/c/texmacs.c src/c/sciquit.c src/c/stack1.c \
 -      src/c/realmain.c src/c/stack3.c src/c/str2sci.c \
 -      src/c/getmodules.c src/c/setgetSCIpath.c src/c/getmemory.c \
 -      src/c/Funtab.c src/c/csignal.c src/c/callinterf.c \
 -      src/c/scimem.c src/c/banier.c src/c/isanan.c src/c/parse.c \
 -      src/c/stack2.c src/c/xscion.c src/c/SetScilabEnvironment.c \
 +yacc_present = @yacc_present@
 +CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/intmacr2tree.c \
 +      src/c/InitScilab.c src/c/getval.c src/c/md5.c src/c/inisci-c.c \
 +      src/c/IsAScalar.c src/c/texmacs.c src/c/sciquit.c \
 +      src/c/stack1.c src/c/stack3.c src/c/str2sci.c \
 +      src/c/getmodules.c src/c/getmemory.c src/c/Funtab.c \
 +      src/c/csignal.c src/c/callinterf.c src/c/scimem.c \
-       src/c/isanan.c src/c/timer.c src/c/stack2.c src/c/xscion.c \
++      src/c/isanan.c src/c/stack2.c src/c/xscion.c \
        src/c/returnanan.c src/c/LoadFunctionsTab.c \
 -      src/c/with_module.c src/c/loadversion.c src/c/version.c \
 -      src/c/stackinfo.c src/c/scirun.c src/c/SCIHOME.c \
 -      src/c/warningmode.c src/c/InitializeCore.c \
 -      src/c/TerminateCore.c src/c/coretable.c src/c/returnProperty.c \
 -      src/c/returnPropertyList.c src/c/scilabmode.c \
 +      src/c/loadversion.c src/c/version.c src/c/stackinfo.c \
 +      src/c/InitializeCore.c src/c/TerminateCore.c src/c/coretable.c \
        src/c/GetXmlFileEncoding.c src/c/islittleendian.c \
 -      src/c/terme.c src/c/ifexpr.c src/c/expr.c \
 -      src/c/getcommandlineargs.c src/c/syncexec.c \
 +      src/c/terme.c src/c/ifexpr.c src/c/getcommandlineargs.c \
        src/c/callFunctionFromGateway.c src/c/getvariablesname.c \
        src/c/commandwords.c src/c/freeArrayOfString.c \
        src/c/getstaticdebuginfo.c src/c/getdynamicdebuginfo.c \
 -      src/c/callDynamicGateway.c src/c/gw_dynamic_generic.c \
 -      src/c/dynamic_gateways.c src/c/readGateway.c \
 -      src/c/comparehandles.c src/c/setPrecisionFPU.c \
 -      src/c/LaunchScilabSignal.c src/c/getos.c src/c/mode_exec.c \
 -      src/c/predef.c src/c/transposeMatrix.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/gw_dynamic_generic.c src/c/dynamic_gateways.c \
 +      src/c/readGateway.c src/c/comparehandles.c \
 +      src/c/setPrecisionFPU.c src/c/LaunchScilabSignal.c \
 +      src/c/getos.c src/c/mode_exec.c src/c/predef.c \
 +      src/c/transposeMatrix.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/dynamic_parallel.c \
 -      src/c/storeCommand.c src/c/backtrace.c src/c/signal_mgmt.c \
 -      src/c/suspendProcess.c src/c/setieee.c src/c/setlines.c \
 -      src/c/setformat.c src/c/InitializePreferences.c \
 -      src/c/sci_tools.c src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
 -      src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
 +      src/c/backtrace.c src/c/signal_mgmt.c src/c/suspendProcess.c \
-       src/c/windowsChangeManagement.c src/c/setlines.c \
-       src/c/setformat.c src/c/InitializePreferences.c \
-       src/c/getmaxMALLOC.c src/c/sci_mem_alloc.c \
-       src/c/hashtable/hashtable.c src/c/hashtable/hashtable_itr.c \
++      src/c/setlines.c src/c/setformat.c \
++      src/c/InitializePreferences.c src/c/getmaxMALLOC.c \
++      src/c/sci_mem_alloc.c src/c/hashtable/hashtable.c \
++      src/c/hashtable/hashtable_itr.c \
        src/c/hashtable/hashtable_utility.c $(am__append_1)
 -CORE_CXX_SOURCES = src/cpp/hashtable_core.cpp \
 +CORE_CPP_SOURCES = \
 +src/cpp/core_gw.cpp \
 +src/cpp/hashtable_core.cpp \
  src/cpp/namstr.cpp \
  src/cpp/search_functions.cpp \
  src/cpp/demangle.cpp \
@@@ -1128,13 -1160,14 +1127,11 @@@ distclean-compile
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-storeCommand.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-str2sci.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-suspendProcess.Plo@am__quote@
 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-syncexec.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-terme.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-texmacs.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-transposeMatrix.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-typename.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-version.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Plo@am__quote@
 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-warningmode.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-with_module.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-xscion.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_la-gw_core.Plo@am__quote@
@@@ -1357,13 -1423,13 +1354,6 @@@ libscicore_algo_la-isanan.lo: src/c/isa
  @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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-isanan.lo `test -f 'src/c/isanan.c' || echo '$(srcdir)/'`src/c/isanan.c
  
- libscicore_algo_la-timer.lo: src/c/timer.c
- @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-timer.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-timer.Tpo -c -o libscicore_algo_la-timer.lo `test -f 'src/c/timer.c' || echo '$(srcdir)/'`src/c/timer.c
- @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-timer.Tpo $(DEPDIR)/libscicore_algo_la-timer.Plo
- @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/timer.c' object='libscicore_algo_la-timer.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-timer.lo `test -f 'src/c/timer.c' || echo '$(srcdir)/'`src/c/timer.c
 -libscicore_algo_la-parse.lo: src/c/parse.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-parse.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-parse.Tpo -c -o libscicore_algo_la-parse.lo `test -f 'src/c/parse.c' || echo '$(srcdir)/'`src/c/parse.c
 -@am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-parse.Tpo $(DEPDIR)/libscicore_algo_la-parse.Plo
 -@AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/parse.c' object='libscicore_algo_la-parse.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-parse.lo `test -f 'src/c/parse.c' || echo '$(srcdir)/'`src/c/parse.c
 -
  libscicore_algo_la-stack2.lo: src/c/stack2.c
  @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-stack2.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-stack2.Tpo -c -o libscicore_algo_la-stack2.lo `test -f 'src/c/stack2.c' || echo '$(srcdir)/'`src/c/stack2.c
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-stack2.Tpo $(DEPDIR)/libscicore_algo_la-stack2.Plo
@@@ -1665,13 -1815,13 +1655,6 @@@ libscicore_algo_la-suspendProcess.lo: s
  @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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-suspendProcess.lo `test -f 'src/c/suspendProcess.c' || echo '$(srcdir)/'`src/c/suspendProcess.c
  
- libscicore_algo_la-windowsChangeManagement.lo: src/c/windowsChangeManagement.c
- @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-windowsChangeManagement.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Tpo -c -o libscicore_algo_la-windowsChangeManagement.lo `test -f 'src/c/windowsChangeManagement.c' || echo '$(srcdir)/'`src/c/windowsChangeManagement.c
- @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Tpo $(DEPDIR)/libscicore_algo_la-windowsChangeManagement.Plo
- @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/windowsChangeManagement.c' object='libscicore_algo_la-windowsChangeManagement.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-windowsChangeManagement.lo `test -f 'src/c/windowsChangeManagement.c' || echo '$(srcdir)/'`src/c/windowsChangeManagement.c
 -libscicore_algo_la-setieee.lo: src/c/setieee.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-setieee.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-setieee.Tpo -c -o libscicore_algo_la-setieee.lo `test -f 'src/c/setieee.c' || echo '$(srcdir)/'`src/c/setieee.c
 -@am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-setieee.Tpo $(DEPDIR)/libscicore_algo_la-setieee.Plo
 -@AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/setieee.c' object='libscicore_algo_la-setieee.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-setieee.lo `test -f 'src/c/setieee.c' || echo '$(srcdir)/'`src/c/setieee.c
 -
  libscicore_algo_la-setlines.lo: src/c/setlines.c
  @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_algo_la-setlines.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-setlines.Tpo -c -o libscicore_algo_la-setlines.lo `test -f 'src/c/setlines.c' || echo '$(srcdir)/'`src/c/setlines.c
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-setlines.Tpo $(DEPDIR)/libscicore_algo_la-setlines.Plo
@@@ -343,7 -368,8 +343,6 @@@ cd .
      <ClCompile Include="terme.c" />
      <ClCompile Include="TerminateCore.c" />
      <ClCompile Include="texmacs.c" />
-     <ClCompile Include="timer.c" />
 -    <ClCompile Include="tmpdir.c" />
      <ClCompile Include="transposeMatrix.c" />
      <ClCompile Include="typename.c" />
      <ClCompile Include="version.c" />
        <Project>{9594ac02-20ee-4fbf-95b4-bfa5865ed7ca}</Project>
      </ProjectReference>
    </ItemGroup>
 +  <ItemGroup>
 +    <ClInclude Include="..\..\includes\backtrace_print.h" />
 +    <ClInclude Include="..\..\includes\banner.hxx" />
 +    <ClInclude Include="..\..\includes\BOOL.h" />
 +    <ClInclude Include="..\..\includes\callFunctionFromGateway.h" />
 +    <ClInclude Include="..\..\includes\callinter.h" />
 +    <ClInclude Include="..\..\includes\callinterf.h" />
 +    <ClInclude Include="..\..\includes\commandwords.h" />
 +    <ClInclude Include="..\..\includes\core_gw.hxx" />
 +    <ClInclude Include="..\..\includes\core_math.h" />
 +    <ClInclude Include="..\..\includes\ExceptionMessage.h" />
 +    <ClInclude Include="..\..\includes\existfunction.h" />
 +    <ClInclude Include="..\..\includes\exit_status.hxx" />
 +    <ClInclude Include="..\..\includes\freeArrayOfString.h" />
 +    <ClInclude Include="..\..\includes\Funtab.h" />
 +    <ClInclude Include="..\..\includes\getcommandlineargs.h" />
 +    <ClInclude Include="..\..\includes\GetExceptionCode.h" />
 +    <ClInclude Include="..\..\includes\getfunctionslist.h" />
 +    <ClInclude Include="..\..\includes\getmaxMALLOC.h" />
 +    <ClInclude Include="..\..\includes\getmemory.h" />
 +    <ClInclude Include="..\..\includes\getmodules.h" />
 +    <ClInclude Include="..\..\includes\getos.h" />
 +    <ClInclude Include="..\..\includes\getvariablesname.h" />
 +    <ClInclude Include="..\..\includes\getversion.h" />
 +    <ClInclude Include="..\..\includes\GetXmlFileEncoding.h" />
 +    <ClInclude Include="..\..\includes\gw_core.h" />
 +    <ClInclude Include="..\..\includes\gw_user.h" />
 +    <ClInclude Include="..\..\includes\gw_user2.h" />
 +    <ClInclude Include="..\..\includes\hashtable.h" />
 +    <ClInclude Include="..\..\includes\hashtable_itr.h" />
 +    <ClInclude Include="..\..\includes\hashtable_private.h" />
 +    <ClInclude Include="..\..\includes\hashtable_utility.h" />
 +    <ClInclude Include="..\..\includes\inffic.h" />
 +    <ClInclude Include="..\..\includes\inisci-c.h" />
 +    <ClInclude Include="..\..\includes\InitializeCore.h" />
 +    <ClInclude Include="..\..\includes\InitializePreferences.h" />
 +    <ClInclude Include="..\..\includes\initMacOSXEnv.h" />
 +    <ClInclude Include="..\..\includes\intmacr2tree.h" />
 +    <ClInclude Include="..\..\includes\isanan.h" />
 +    <ClInclude Include="..\..\includes\IsAScalar.h" />
 +    <ClInclude Include="..\..\includes\islittleendian.h" />
 +    <ClInclude Include="..\..\includes\LaunchScilabSignal.h" />
 +    <ClInclude Include="..\..\includes\loadversion.h" />
 +    <ClInclude Include="..\..\includes\machine.h" />
 +    <ClInclude Include="..\..\includes\MALLOC.h" />
 +    <ClInclude Include="..\..\includes\mode_exec.h" />
 +    <ClInclude Include="..\..\includes\PARAMS.h" />
 +    <ClInclude Include="..\..\includes\PATH_MAX.h" />
 +    <ClInclude Include="..\..\includes\realmain.h" />
 +    <ClInclude Include="..\..\includes\recursionFunction.h" />
 +    <ClInclude Include="..\..\includes\returnanan.h" />
 +    <ClInclude Include="..\..\includes\runner.hxx" />
 +    <ClInclude Include="..\..\includes\scilabDefaults.h" />
 +    <ClInclude Include="..\..\includes\scimem.h" />
 +    <ClInclude Include="..\..\includes\sciquit.h" />
 +    <ClInclude Include="..\..\includes\scirun.h" />
 +    <ClInclude Include="..\..\includes\scisparse.h" />
 +    <ClInclude Include="..\..\includes\sci_types.h" />
 +    <ClInclude Include="..\..\includes\setformat.h" />
 +    <ClInclude Include="..\..\includes\setieee.h" />
 +    <ClInclude Include="..\..\includes\setlines.h" />
 +    <ClInclude Include="..\..\includes\setPrecisionFPU.h" />
 +    <ClInclude Include="..\..\includes\sigbas.h" />
 +    <ClInclude Include="..\..\includes\signal_mgmt.h" />
 +    <ClInclude Include="..\..\includes\stack-c.h" />
 +    <ClInclude Include="..\..\includes\stack-def.h" />
 +    <ClInclude Include="..\..\includes\stack.h" />
 +    <ClInclude Include="..\..\includes\stack1.h" />
 +    <ClInclude Include="..\..\includes\stack2.h" />
 +    <ClInclude Include="..\..\includes\stack3.h" />
 +    <ClInclude Include="..\..\includes\stackinfo.h" />
 +    <ClInclude Include="..\..\includes\stackTypeVariable.h" />
 +    <ClInclude Include="..\..\includes\storeCommand.h" />
 +    <ClInclude Include="..\..\includes\suspendProcess.h" />
 +    <ClInclude Include="..\..\includes\syncexec.h" />
 +    <ClInclude Include="..\..\includes\tasks.hxx" />
 +    <ClInclude Include="..\..\includes\texmacs.h" />
 +    <ClInclude Include="..\..\includes\timer.hxx" />
-     <ClInclude Include="..\..\includes\timerEvents.h" />
 +    <ClInclude Include="..\..\includes\transposeMatrix.h" />
 +    <ClInclude Include="..\..\includes\version.h" />
-     <ClInclude Include="..\..\includes\windowsChangeManagement.h" />
 +    <ClInclude Include="..\..\includes\win_mem_alloc.h" />
 +    <ClInclude Include="..\..\includes\with_module.h" />
 +    <ClInclude Include="..\..\includes\xscion.h" />
 +    <ClInclude Include="..\cpp\partition.hxx" />
 +    <ClInclude Include="..\cpp\unrolled_algorithms.hxx" />
 +    <ClInclude Include="backtrace.h" />
 +    <ClInclude Include="cs2st.h" />
 +    <ClInclude Include="csignal.h" />
 +    <ClInclude Include="dynamic_gateways.h" />
 +    <ClInclude Include="dynamic_parallel.h" />
 +    <ClInclude Include="dynamic_tclsci.h" />
 +    <ClInclude Include="eqid.h" />
 +    <ClInclude Include="exitCodeValue.h" />
 +    <ClInclude Include="expr.h" />
 +    <ClInclude Include="funcprot.h" />
 +    <ClInclude Include="getdebuginfo.h" />
 +    <ClInclude Include="getdynamicdebuginfo.h" />
 +    <ClInclude Include="getdynamicDebugInfo_Windows.h" />
 +    <ClInclude Include="getstaticdebuginfo.h" />
 +    <ClInclude Include="getstaticDebugInfo_Windows.h" />
 +    <ClInclude Include="getval.h" />
 +    <ClInclude Include="gw_dynamic_generic.h" />
 +    <ClInclude Include="hashtable_core.h" />
 +    <ClInclude Include="ifexpr.h" />
 +    <ClInclude Include="InitScilab.h" />
 +    <ClInclude Include="inittypenames.h" />
 +    <ClInclude Include="LoadFunctionsTab.h" />
 +    <ClInclude Include="md5.h" />
 +    <ClInclude Include="parse.h" />
 +    <ClInclude Include="parserConstant.h" />
 +    <ClInclude Include="predef.h" />
 +    <ClInclude Include="readGateway.h" />
 +    <ClInclude Include="run.h" />
 +    <ClInclude Include="str2sci.h" />
 +    <ClInclude Include="terme.h" />
 +    <ClInclude Include="TerminateCore.h" />
 +    <ClInclude Include="typename.h" />
 +  </ItemGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    <ImportGroup Label="ExtensionTargets">
    </ImportGroup>
--</Project>
++</Project>
      <ClCompile Include="texmacs.c">
        <Filter>Source Files</Filter>
      </ClCompile>
-     <ClCompile Include="timer.c">
-       <Filter>Source Files</Filter>
-     </ClCompile>
 -    <ClCompile Include="tmpdir.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
      <ClCompile Include="transposeMatrix.c">
        <Filter>Source Files</Filter>
      </ClCompile>
      <ClInclude Include="..\..\includes\core_math.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="cs2st.h">
 +    <ClInclude Include="..\..\includes\ExceptionMessage.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="csignal.h">
 +    <ClInclude Include="..\..\includes\existfunction.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\doublecomplex.h">
 +    <ClInclude Include="..\..\includes\exit_status.hxx">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="dynamic_gateways.h">
 +    <ClInclude Include="..\..\includes\freeArrayOfString.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="dynamic_parallel.h">
 +    <ClInclude Include="..\..\includes\Funtab.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="dynamic_tclsci.h">
 +    <ClInclude Include="..\..\includes\getcommandlineargs.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="eqid.h">
 +    <ClInclude Include="..\..\includes\GetExceptionCode.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\ExceptionMessage.h">
 +    <ClInclude Include="..\..\includes\getfunctionslist.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\existfunction.h">
 +    <ClInclude Include="..\..\includes\getmemory.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="exitCodeValue.h">
 +    <ClInclude Include="..\..\includes\getmodules.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="expr.h">
 +    <ClInclude Include="..\..\includes\getos.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\freeArrayOfString.h">
 +    <ClInclude Include="..\..\includes\getvariablesname.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="funcprot.h">
 +    <ClInclude Include="..\..\includes\getversion.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="getdebuginfo.h">
 +    <ClInclude Include="..\..\includes\GetXmlFileEncoding.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="getdynamicdebuginfo.h">
 +    <ClInclude Include="..\..\includes\gw_core.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="getdynamicDebugInfo_Windows.h">
 +    <ClInclude Include="..\..\includes\gw_user.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\GetExceptionCode.h">
 +    <ClInclude Include="..\..\includes\gw_user2.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\getfunctionslist.h">
 +    <ClInclude Include="..\..\includes\inffic.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\getmodules.h">
 +    <ClInclude Include="..\..\includes\inisci-c.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\getos.h">
 +    <ClInclude Include="..\..\includes\InitializeCore.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="getstaticDebugInfo_Windows.h">
 +    <ClInclude Include="..\..\includes\InitializePreferences.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="getval.h">
 +    <ClInclude Include="..\..\includes\initMacOSXEnv.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\getvariablesname.h">
 +    <ClInclude Include="..\..\includes\intmacr2tree.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\getversion.h">
 +    <ClInclude Include="..\..\includes\isanan.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\GetXmlFileEncoding.h">
 +    <ClInclude Include="..\..\includes\IsAScalar.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\gw_core.h">
 +    <ClInclude Include="..\..\includes\islittleendian.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="gw_dynamic_generic.h">
 +    <ClInclude Include="..\..\includes\LaunchScilabSignal.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\gw_user.h">
 +    <ClInclude Include="..\..\includes\loadversion.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\gw_user2.h">
 +    <ClInclude Include="..\..\includes\machine.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="hashtable_core.h">
 +    <ClInclude Include="..\..\includes\mode_exec.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="ifexpr.h">
 +    <ClInclude Include="..\..\includes\PARAMS.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\inisci-c.h">
 +    <ClInclude Include="..\..\includes\PATH_MAX.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\InitializeCore.h">
 +    <ClInclude Include="..\..\includes\realmain.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="InitScilab.h">
 +    <ClInclude Include="..\..\includes\recursionFunction.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="inittypenames.h">
 +    <ClInclude Include="..\..\includes\returnanan.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\intmacr2tree.h">
 +    <ClInclude Include="..\..\includes\runner.hxx">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\isanan.h">
 +    <ClInclude Include="..\..\includes\sci_types.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\islittleendian.h">
 +    <ClInclude Include="..\..\includes\scilabDefaults.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\LaunchScilabSignal.h">
 +    <ClInclude Include="..\..\includes\scimem.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="LoadFunctionsTab.h">
 +    <ClInclude Include="..\..\includes\sciquit.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\loadversion.h">
 +    <ClInclude Include="..\..\includes\scirun.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\machine.h">
 +    <ClInclude Include="..\..\includes\scisparse.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="md5.h">
 +    <ClInclude Include="..\..\includes\setformat.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\mode_exec.h">
 +    <ClInclude Include="..\..\includes\setieee.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\PARAMS.h">
 +    <ClInclude Include="..\..\includes\setPrecisionFPU.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="parse.h">
 +    <ClInclude Include="..\..\includes\sigbas.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\cpp\partition.hxx">
 +    <ClInclude Include="..\..\includes\signal_mgmt.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\PATH_MAX.h">
 +    <ClInclude Include="..\..\includes\stack.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="predef.h">
 +    <ClInclude Include="..\..\includes\stack1.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="readGateway.h">
 +    <ClInclude Include="..\..\includes\stack2.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\realmain.h">
 +    <ClInclude Include="..\..\includes\stack3.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\recursionFunction.h">
 +    <ClInclude Include="..\..\includes\stack-c.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\returnanan.h">
 +    <ClInclude Include="..\..\includes\stack-def.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\returnProperty.h">
 +    <ClInclude Include="..\..\includes\stackinfo.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\returnPropertyList.h">
 +    <ClInclude Include="..\..\includes\stackTypeVariable.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="run.h">
 +    <ClInclude Include="..\..\includes\storeCommand.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\..\mexlib\includes\sci_gateway.h">
 +    <ClInclude Include="..\..\includes\suspendProcess.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\SCIHOME.h">
 +    <ClInclude Include="..\..\includes\syncexec.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\scilabDefaults.h">
 +    <ClInclude Include="..\..\includes\tasks.hxx">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\scilabmode.h">
 +    <ClInclude Include="..\..\includes\texmacs.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\scimem.h">
 +    <ClInclude Include="..\..\includes\timer.hxx">
        <Filter>Header Files</Filter>
      </ClInclude>
-     <ClInclude Include="..\..\includes\timerEvents.h">
-       <Filter>Header Files</Filter>
-     </ClInclude>
 -    <ClInclude Include="..\..\includes\sciquit.h">
 +    <ClInclude Include="..\..\includes\transposeMatrix.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\scirun.h">
 +    <ClInclude Include="..\..\includes\version.h">
        <Filter>Header Files</Filter>
      </ClInclude>
-     <ClInclude Include="..\..\includes\windowsChangeManagement.h">
-       <Filter>Header Files</Filter>
-     </ClInclude>
 -    <ClInclude Include="..\..\includes\scisparse.h">
 +    <ClInclude Include="..\..\includes\with_module.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\setgetSCIpath.h">
 +    <ClInclude Include="..\..\includes\xscion.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\SetScilabEnvironment.h">
 +    <ClInclude Include="backtrace.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack-c.h">
 +    <ClInclude Include="cs2st.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack-def.h">
 +    <ClInclude Include="csignal.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack.h">
 +    <ClInclude Include="dynamic_gateways.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack1.h">
 +    <ClInclude Include="dynamic_parallel.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack2.h">
 +    <ClInclude Include="dynamic_tclsci.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stack3.h">
 +    <ClInclude Include="eqid.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\stackinfo.h">
 +    <ClInclude Include="exitCodeValue.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\storeCommand.h">
 +    <ClInclude Include="expr.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="str2sci.h">
 +    <ClInclude Include="funcprot.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\syncexec.h">
 +    <ClInclude Include="getdebuginfo.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="terme.h">
 +    <ClInclude Include="getdynamicdebuginfo.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="TerminateCore.h">
 +    <ClInclude Include="getdynamicDebugInfo_Windows.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\texmacs.h">
 +    <ClInclude Include="getstaticdebuginfo.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\Thread_Wrapper.h">
 +    <ClInclude Include="getstaticDebugInfo_Windows.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\tmpdir.h">
 +    <ClInclude Include="getval.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\transposeMatrix.h">
 +    <ClInclude Include="gw_dynamic_generic.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="typename.h">
 +    <ClInclude Include="hashtable_core.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\cpp\unrolled_algorithms.hxx">
 +    <ClInclude Include="ifexpr.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\version.h">
 +    <ClInclude Include="InitScilab.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\warningmode.h">
 +    <ClInclude Include="inittypenames.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="with_module.h">
 +    <ClInclude Include="LoadFunctionsTab.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\xscion.h">
 +    <ClInclude Include="md5.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\sci_types.h">
 +    <ClInclude Include="parse.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\InitializePreferences.h">
 +    <ClInclude Include="parserConstant.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\setformat.h">
 +    <ClInclude Include="predef.h">
        <Filter>Header Files</Filter>
      </ClInclude>
 -    <ClInclude Include="..\..\includes\setieee.h">
 +    <ClInclude Include="readGateway.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="run.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="str2sci.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="terme.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="TerminateCore.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="typename.h">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="..\cpp\partition.hxx">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +    <ClInclude Include="..\cpp\unrolled_algorithms.hxx">
        <Filter>Header Files</Filter>
      </ClInclude>
      <ClInclude Include="..\..\includes\backtrace_print.h">
    <ItemGroup>
      <CustomBuildStep Include="..\..\includes\machine.h.vc" />
    </ItemGroup>
--</Project>
++</Project>
@@@ -39,8 -39,7 +39,7 @@@
  #include "machine.h"
  #include "Scierror.h"
  #include "suspendProcess.h"
 -#include "scilabmode.h"
 +#include "sci_mode.h"
- #include "windowsChangeManagement.h"
  #include "backtrace_print.h"
  extern jmp_buf jmp_env;
  
++<<<<<<< HEAD
 +
  // =============================================================================
 +
  // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 +
  // Copyright (C) 2011 - DIGITEO - Bruno JOFRET
 +
  //
 +
  //  This file is distributed under the same license as the Scilab package.
 +
  // =============================================================================
 +
  //
 +
  // Return 3 values
 +
  //
 +
++=======
++// =============================================================================
++// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
++// Copyright (C) 2011 - DIGITEO - Bruno JOFRET
++//
++//  This file is distributed under the same license as the Scilab package.
++// =============================================================================
++//
++// Return 3 values
++//
++>>>>>>> origin/master
  function varargout=__test_function__()
    varargout(1) = 42;
    varargout(2) = "value";
    varargout(3) = list(51);
  endfunction
  // Simple call
++<<<<<<< HEAD
 +
 +__test_function__();
 +
 +a = __test_function__();
 +
 +if a <> 42 then bugmes();quit;end;
 +
 +clear a;
 +
 +[a,b] = __test_function__();
 +
 +if a <> 42 then bugmes();quit;end;
 +
 +if b <> "value" then bugmes();quit;end;
 +
 +clear a;
 +
 +clear b;
 +
 +[a,b,c] = __test_function__();
 +
 +if a <> 42 then bugmes();quit;end;
 +
 +if b <> "value" then bugmes();quit;end;
 +
 +if c <> list(51) then bugmes();quit;end;
 +
 +clear a;
 +
 +clear b;
 +
 +clear c;
 +
 +// Check call with too much output values.
 +
 +ierr = execstr("[a,b,c,d] = __test_function__();", "errcatch")
 +ierr = 
 +
 +  999
 +
 +if ierr == 0 then bugmes();quit;end;
 +
 +//
 +
 +// Return a list of 3 elements with second missing.
 +
 +//
 +
++=======
+ __test_function__();
+ a = __test_function__();
+ if a <> 42 then bugmes();quit;end;
+ clear a;
+ [a,b] = __test_function__();
+ if a <> 42 then bugmes();quit;end;
+ if b <> "value" then bugmes();quit;end;
+ clear a;
+ clear b;
+ [a,b,c] = __test_function__();
+ if a <> 42 then bugmes();quit;end;
+ if b <> "value" then bugmes();quit;end;
+ if c <> list(51) then bugmes();quit;end;
+ clear a;
+ clear b;
+ clear c;
+ // Check call with too much output values.
+ ierr = execstr("[a,b,c,d] = __test_function__();", "errcatch");
+ assert_checkfalse(ierr == 0);
+ //
+ // Return a list of 3 elements with second missing.
+ //
++>>>>>>> origin/master
  function varargout=__test_function2__()
    varargout(1) = 42;
    varargout(3) = "value";
  endfunction
  // Simple call
++<<<<<<< HEAD
 +
 +__test_function2__();
 +
 +a = __test_function2__();
 +
 +if a <> 42 then bugmes();quit;end;
 +
 +clear a;
 +
 +// varargout(2) is undefined
 +
 +ierr = execstr("[a,b] = __test_function2__();", "errcatch");
 +
 +if ierr == 0 then bugmes();quit;end;
 +
 +//
 +
 +// varargout is not set : should not work.
 +
 +//
 +
 +function varargout=__test_function3__()
 +endfunction
 +ierr = execstr("__test_function3__();", "errcatch");
 +
 +if ierr == 0 then bugmes();quit;end;
 +
++=======
+ __test_function2__();
+ a = __test_function2__();
+ if a <> 42 then bugmes();quit;end;
+ clear a;
+ // varargout(2) is undefined
+ ierr = execstr("[a,b] = __test_function2__();", "errcatch");
+ assert_checkfalse(ierr == 0);
+ //
+ // varargout is not set : should not work.
+ //
+ function varargout=__test_function3__()
+ endfunction
+ ierr = execstr("__test_function3__();", "errcatch");
+ assert_checkfalse(ierr == 0);
++>>>>>>> origin/master
@@@ -36,8 -36,8 +36,13 @@@ clear b
  clear c;
  
  // Check call with too much output values.
++<<<<<<< HEAD
 +ierr = execstr("[a,b,c,d] = __test_function__();", "errcatch")
 +if ierr == 0 then pause, end;
++=======
+ ierr = execstr("[a,b,c,d] = __test_function__();", "errcatch");
+ assert_checkfalse(ierr == 0);
++>>>>>>> origin/master
  
  //
  // Return a list of 3 elements with second missing.
@@@ -56,7 -56,7 +61,11 @@@ clear a
  
  // varargout(2) is undefined
  ierr = execstr("[a,b] = __test_function2__();", "errcatch");
++<<<<<<< HEAD
 +if ierr == 0 then pause, end;
++=======
+ assert_checkfalse(ierr == 0);
++>>>>>>> origin/master
  
  //
  // varargout is not set : should not work.
@@@ -65,4 -65,4 +74,8 @@@ function varargout=__test_function3__(
  endfunction
  
  ierr = execstr("__test_function3__();", "errcatch");
- if ierr == 0 then pause, end;
++<<<<<<< HEAD
++if ierr == 0 then pause, end;
++=======
+ assert_checkfalse(ierr == 0);
++>>>>>>> origin/master
   * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
   *
   */
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  #ifndef __GW_DIFFERENTIAL_EQUATIONS2__
  #define __GW_DIFFERENTIAL_EQUATIONS2__
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  #include "machine.h"
  #include "dynlib_differential_equations.h"
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  DIFFERENTIAL_EQUATIONS_IMPEXP int gw_differential_equations2(void);
 -/*--------------------------------------------------------------------------*/
 -int C2F(sciimpl)(char *fname, unsigned long fname_len);
 -int C2F(dassli)(char *fname, unsigned long fname_len);
 -int C2F(dasrti)(char *fname, unsigned long fname_len);
 -int C2F(daskri)(char *fname, unsigned long fname_len);
 +/*--------------------------------------------------------------------------*/ 
 +//int C2F(sciimpl)(char *fname,unsigned long fname_len);
 +//int C2F(dassli)(char *fname,unsigned long fname_len);
 +//int C2F(dasrti)(char *fname,unsigned long fname_len);
- /*--------------------------------------------------------------------------*/ 
++//int C2F(daskri)(char *fname, unsigned long fname_len);
+ /*--------------------------------------------------------------------------*/
  #endif  /* __GW_DIFFERENTIAL_EQUATIONS2__ */
  /*--------------------------------------------------------------------------*/
  #include "api_scilab.h"
  #include "MALLOC.h"
  /*--------------------------------------------------------------------------*/
- static gw_generic_table Tab[]=
+ static gw_generic_table Tab[] =
  {
 -    {C2F(sciimpl), "impl"},
 -    {C2F(dassli), "dassl"},
 -    {C2F(dasrti), "dasrt"},
 -    {C2F(daskri), "daskr"}
 +      {NULL,""}, // impl
 +      {NULL,""}, // dassl
-       {NULL,""}  // dasrt
++      {NULL,""}, // dasrt
++      {NULL,""}  // daskr
  };
  
  /*--------------------------------------------------------------------------*/
  int gw_differential_equations2(void)
- {  
-       if(pvApiCtx == NULL)
-       {
-               pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
-       }
-       pvApiCtx->pstName = (char*)Tab[Fin-1].name;
-       callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
-       return 0;
+ {
 -    if (pvApiCtx == NULL)
 -    {
 -        pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx));
 -    }
 -
 -    pvApiCtx->pstName = (char*)Tab[Fin - 1].name;
 -    callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab));
+     return 0;
  }
  /*--------------------------------------------------------------------------*/
   *
   */
  
- #include <windows.h> 
+ #include <windows.h>
  #include "machine.h"
 +#include "common_structure.h"
  #include "dynlib_differential_equations.h"
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  #pragma comment(lib,"../../../../bin/libintl.lib")
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  
  /* we force fortran COMMON initialization */
  
@@@ -167,22 -195,88 +195,21 @@@ DIFFERENTIAL_EQUATIONS_IMPEXP struc
      char namef[6];
  } C2F(cintg);
  
- /*--------------------------------------------------------------------------*/ 
 -DIFFERENTIAL_EQUATIONS_IMPEXP struct
 -{
 -    double rownr3[2];
 -    double t0;
 -    double tlast;
 -    double toutc;
 -    int lg0;
 -    int lg1;
 -    int lgx;
 -    int iownr3[2];
 -    int irfnd;
 -    int itaskc;
 -    int ngc;
 -    int nge;
 -} C2F(lsr001);
 -
 -DIFFERENTIAL_EQUATIONS_IMPEXP struct
 -{
 -    double tret;
 -    double rowns[209];
 -    double ccmax;
 -    double el0;
 -    double h__;
 -    double hmin;
 -    double hmxi;
 -    double hu;
 -    double rc;
 -    double tn;
 -    double uround;
 -    int illin;
 -    int init;
 -    int lyh;
 -    int lewt;
 -    int lacor;
 -    int lsavf;
 -    int lwm;
 -    int liwm;
 -    int mxstep;
 -    int mxhnil;
 -
 -    int nhnil;
 -    int ntrep;
 -    int nslast;
 -    int nyh;
 -    int iowns[6];
 -    int icf;
 -    int ierpj;
 -    int iersl;
 -    int jcur;
 -
 -    int jstart;
 -    int kflag;
 -    int l;
 -    int meth;
 -    int miter;
 -    int maxord;
 -    int maxcor;
 -    int msbp;
 -    int mxncf;
 -    int n;
 -    int nq;
 -    int nst;
 -    int nfe;
 -    int nje;
 -    int nqu;
 -} C2F(ls0001);
 -
+ /*--------------------------------------------------------------------------*/
  int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved)
  {
-   switch (reason) 
+     switch (reason)
      {
-     case DLL_PROCESS_ATTACH:
-       break;
-     case DLL_PROCESS_DETACH:
-       break;
-     case DLL_THREAD_ATTACH:
-       break;
-     case DLL_THREAD_DETACH:
-       break;
+         case DLL_PROCESS_ATTACH:
+             break;
+         case DLL_PROCESS_DETACH:
+             break;
+         case DLL_THREAD_ATTACH:
+             break;
+         case DLL_THREAD_DETACH:
+             break;
      }
-   return 1;
+     return 1;
  }
- /*--------------------------------------------------------------------------*/ 
+ /*--------------------------------------------------------------------------*/
  
@@@ -190,20 -190,35 +190,21 @@@ lib /DEF:"$(ProjectDir)differential_equ
      </Link>
    </ItemDefinitionGroup>
    <ItemGroup>
 +    <ClCompile Include="..\cpp\checkodeerror.cpp" />
 +    <ClCompile Include="..\cpp\differentialequationfunctions.cpp" />
 +    <ClCompile Include="..\cpp\scifunctions.cpp" />
+     <ClCompile Include="..\..\sci_gateway\c\Ex-daskr.c" />
      <ClCompile Include="arnol.c" />
 -    <ClCompile Include="colnewtable.c" />
      <ClCompile Include="dassl.c" />
 -    <ClCompile Include="dassltable.c" />
      <ClCompile Include="DllmainDifferential_equations.c" />
      <ClCompile Include="feval.c" />
 -    <ClCompile Include="fevaltable.c" />
 -    <ClCompile Include="fydot2table.c" />
 -    <ClCompile Include="fydottable.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\gw_differential_equations1.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\gw_differential_equations2.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\gw_differential_equations3.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\gw_differential_equations4.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\gw_differential_equations6.c" />
 -    <ClCompile Include="impltable.c" />
 -    <ClCompile Include="int2dtable.c" />
 -    <ClCompile Include="int3dtable.c" />
 -    <ClCompile Include="intgtable.c" />
      <ClCompile Include="rk4.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_bvode.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_feval.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_int2d.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_int3d.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_intg.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_odc.c" />
 -    <ClCompile Include="..\..\sci_gateway\c\sci_ode.c" />
    </ItemGroup>
    <ItemGroup>
 +    <ClInclude Include="..\..\includes\checkodeerror.h" />
 +    <ClInclude Include="..\..\includes\common_structure.h" />
 +    <ClInclude Include="..\..\includes\differentialequationfunctions.hxx" />
 +    <ClInclude Include="..\..\includes\scifunctions.h" />
      <ClInclude Include="arnol.h" />
      <ClInclude Include="..\..\includes\dynlib_differential_equations.h" />
      <ClInclude Include="feval.h" />
        <Project>{5b110267-7c18-437c-b87d-dba2b50729e9}</Project>
        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      </ProjectReference>
 +    <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
 +      <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\operations\operations.vcxproj">
 +      <Project>{1bb396f7-ce61-4cfc-9c22-266b2cfb2e74}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
 +      <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\symbol\symbol.vcxproj">
 +      <Project>{2c60033b-0dbd-4ca4-80d3-176c9be9ce2f}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\system_env\system_env.vcxproj">
 +      <Project>{7ca60aef-9afa-4d06-af28-613c0aa27640}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\types\types.vcxproj">
 +      <Project>{64e090da-dcb5-4f4d-93d7-e88ddec9c2ef}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\types\typesmacro\typesmacro.vcxproj">
 +      <Project>{9252a034-7f22-4cb1-a634-4577da69f2d0}</Project>
 +    </ProjectReference>
    </ItemGroup>
+   <ItemGroup>
+     <Library Include="..\..\..\..\bin\blasplus.lib" />
+     <Library Include="..\..\..\..\bin\lapack.lib" />
+   </ItemGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    <ImportGroup Label="ExtensionTargets">
    </ImportGroup>
      <ClCompile Include="rk4.c">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_bvode.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_feval.c">
 +    <ClCompile Include="..\cpp\checkodeerror.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_int2d.c">
 +    <ClCompile Include="..\cpp\scifunctions.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_int3d.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_intg.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_odc.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\c\sci_ode.c">
 +    <ClCompile Include="..\cpp\differentialequationfunctions.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
+     <ClCompile Include="..\..\sci_gateway\c\Ex-daskr.c">
+       <Filter>Source Files</Filter>
+     </ClCompile>
    </ItemGroup>
    <ItemGroup>
      <ClInclude Include="arnol.h">
@@@ -1,4 -1,4 +1,4 @@@
--<?xml version="1.0" encoding="utf-8"?>
++<?xml version="1.0" encoding="utf-8"?>
  <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ItemGroup>
      <Filter Include="Source Files">
@@@ -12,7 -12,7 +12,8 @@@
  *
  */
  /*--------------------------------------------------------------------------*/
 +#include <string.h>
+ #include <stdlib.h>
  #include "callfftw.h"
  #include "api_scilab.h"
  #include "MALLOC.h"
  # This file is distributed under the same license as the Scilab package.
  
  
 -FILEIO_SOURCES = src/c/FileExist.c \
 -src/c/scanf_functions.c \
 -src/c/do_xxscanf.c \
 -src/c/findfiles.c \
 -src/c/Status2Mode.c \
 -src/c/addfile.c \
 -src/c/delfile.c \
 -src/c/filesmanagement.c \
 -src/c/getfiledesc.c \
 -src/c/getfileinfo.c \
 -src/c/getfiletype.c \
 -src/c/mclearerr.c \
 -src/c/mclose.c \
 -src/c/meof.c \
 -src/c/merror.c \
 -src/c/mget.c \
 -src/c/mgetl.c \
 -src/c/mgeti.c \
 -src/c/mgetstr.c \
 -src/c/mopen.c \
 -src/c/mput.c \
 -src/c/mputi.c \
 -src/c/mputstr.c \
 -src/c/mseek.c \
 -src/c/mtell.c \
 -src/c/readline.c \
 -src/c/getdrives.c \
 -src/c/deleteafile.c \
 -src/c/getshortpathname.c \
 -src/c/getlongpathname.c \
 -src/c/FindFileExtension.c \
 -src/c/URIFileToFilename.c \
 -src/c/createdirectory.c \
 -src/c/isdir.c \
 -src/c/isDrive.c \
 -src/c/removedir.c \
 -src/c/cluni0.c \
 -src/c/scicurdir.c \
 -src/c/fullpath.c \
 -src/c/fileinfo.c \
 -src/c/getrelativefilename.c \
 -src/c/splitpath.c \
 -src/c/movefile.c \
 -src/c/expandPathVariable.c \
 -src/c/basename.c \
 -src/c/pathconvert.c \
 -src/c/copyfile_others.c \
 -src/c/getFullFilename.c \
 -src/c/mputl.c \
 -src/c/fscanfMat.c \
 -src/c/fprintfMat.c \
 -src/c/createtempfilename.c \
 -src/c/dlManager.c \
 -src/c/convert_tools.c
 -
 -GATEWAY_SOURCES = \
 -sci_gateway/c/gw_fileio.c \
 -sci_gateway/c/sci_mfprintf.c \
 -sci_gateway/c/sci_mscanf.c \
 -sci_gateway/c/sci_msscanf.c \
 -sci_gateway/c/sci_mfscanf.c \
 -sci_gateway/c/sci_fprintfMat.c \
 -sci_gateway/c/sci_fscanfMat.c \
 -sci_gateway/c/sci_findfiles.c \
 -sci_gateway/c/sci_maxfiles.c \
 -sci_gateway/c/sci_getdrives.c \
 -sci_gateway/c/sci_fullpath.c \
 -sci_gateway/c/sci_deletefile.c \
 -sci_gateway/c/sci_pathsep.c \
 -sci_gateway/c/sci_filesep.c \
 -sci_gateway/c/sci_getshortpathname.c \
 -sci_gateway/c/sci_getlongpathname.c \
 -sci_gateway/c/sci_fileext.c \
 -sci_gateway/c/sci_isdir.c \
 -sci_gateway/c/sci_removedir.c \
 -sci_gateway/c/sci_createdir.c \
 -sci_gateway/c/sci_chdir.c \
 -sci_gateway/c/sci_pwd.c \
 -sci_gateway/c/sci_mclearerr.c \
 -sci_gateway/c/sci_mclose.c \
 -sci_gateway/c/sci_merror.c \
 -sci_gateway/c/sci_mget.c \
 -sci_gateway/c/sci_mgetl.c \
 -sci_gateway/c/sci_mgetstr.c \
 -sci_gateway/c/sci_moef.c \
 -sci_gateway/c/sci_mopen.c \
 -sci_gateway/c/sci_mput.c \
 -sci_gateway/c/sci_mputstr.c \
 -sci_gateway/c/sci_mseek.c \
 -sci_gateway/c/sci_mtell.c \
 -sci_gateway/c/sci_fileinfo.c \
 -sci_gateway/c/sci_newest.c \
 -sci_gateway/c/sci_get_absolute_file_path.c  \
 -sci_gateway/c/sci_getrelativefilename.c \
 -sci_gateway/c/sci_copyfile.c \
 -sci_gateway/c/sci_fileparts.c \
 -sci_gateway/c/sci_movefile.c \
 -sci_gateway/c/sci_basename.c \
 -sci_gateway/c/sci_pathconvert.c \
 -sci_gateway/c/sci_isfile.c \
 -sci_gateway/c/sci_mputl.c \
 -sci_gateway/c/sci_tempname.c \
 -sci_gateway/c/sci_getURL.c \
 -sci_gateway/c/sci_splitURL.c
 -
 -
 -libscifileio_la_CPPFLAGS = -I$(srcdir)/includes/ \
 -                              -I$(srcdir)/src/c/ \
 -                              -I$(top_srcdir)/modules/output_stream/includes/ \
 -                              -I$(top_srcdir)/modules/io/includes/ \
 -                              -I$(top_srcdir)/modules/api_scilab/includes/ \
 -                              -I$(top_srcdir)/modules/string/includes/ \
 -                              -I$(top_srcdir)/modules/localization/includes/ \
 -                          $(XML_FLAGS) \
 -                              $(AM_CPPFLAGS)
 +FILEIO_C_SOURCES = \
 +    src/c/FileExist.c \
 +    src/c/scanf_functions.c \
 +    src/c/do_xxscanf.c \
 +    src/c/findfiles.c \
 +    src/c/Status2Mode.c \
 +    src/c/addfile.c \
 +    src/c/delfile.c \
 +    src/c/filesmanagement.c \
 +    src/c/getfiledesc.c \
 +    src/c/getfileinfo.c \
 +    src/c/getfiletype.c \
 +    src/c/mgeti.c \
 +    src/c/mputi.c \
 +    src/c/readline.c \
 +    src/c/getdrives.c \
 +    src/c/deleteafile.c \
 +    src/c/getshortpathname.c \
 +    src/c/getlongpathname.c \
 +    src/c/FindFileExtension.c \
 +    src/c/URIFileToFilename.c \
 +    src/c/createdirectory.c \
 +    src/c/isdir.c \
 +    src/c/isDrive.c \
 +    src/c/removedir.c \
 +    src/c/cluni0.c \
 +    src/c/scicurdir.c \
 +    src/c/fullpath.c \
 +    src/c/fileinfo.c \
 +    src/c/getrelativefilename.c \
 +    src/c/splitpath.c \
 +    src/c/movefile.c \
 +    src/c/basename.c \
 +    src/c/pathconvert.c \
 +    src/c/copyfile_others.c \
 +    src/c/getFullFilename.c \
 +    src/c/os_wfopen.c \
 +    src/c/fscanfMat.c \
 +    src/c/fprintfMat.c \
 +    src/c/createtempfilename.c \
 +      src/c/dlManager.c \
 +      src/c/convert_tools.c
 +
 +GATEWAY_C_SOURCES = \
 +    sci_gateway/c/gw_fileio.c \
 +    sci_gateway/c/sci_fprintfMat.c \
 +    sci_gateway/c/sci_fscanfMat.c \
 +    sci_gateway/c/sci_chdir.c \
 +    sci_gateway/c/sci_pwd.c \
 +    sci_gateway/c/sci_copyfile.c \
 +    sci_gateway/c/sci_tempname.c \
 +    sci_gateway/c/sci_movefile.c \
 +      sci_gateway/c/sci_getURL.c \
-       sci_gateway/c/sci_getURLcontent.c \
 +      sci_gateway/c/sci_splitURL.c
 +
 +GATEWAY_CPP_SOURCES = \
 +      sci_gateway/cpp/fileio_gw.cpp \
 +      sci_gateway/cpp/sci_mopen.cpp \
 +      sci_gateway/cpp/sci_mclose.cpp \
 +      sci_gateway/cpp/sci_mget.cpp \
 +      sci_gateway/cpp/sci_mput.cpp \
 +      sci_gateway/cpp/sci_mputl.cpp \
 +      sci_gateway/cpp/sci_mgetl.cpp \
 +      sci_gateway/cpp/sci_pathconvert.cpp \
 +      sci_gateway/cpp/sci_isdir.cpp \
 +      sci_gateway/cpp/sci_filesep.cpp \
 +      sci_gateway/cpp/sci_fileparts.cpp \
 +      sci_gateway/cpp/sci_findfiles.cpp \
 +      sci_gateway/cpp/sci_basename.cpp \
 +      sci_gateway/cpp/sci_fileinfo.cpp \
 +      sci_gateway/cpp/sci_isfile.cpp \
 +      sci_gateway/cpp/sci_deletefile.cpp \
 +      sci_gateway/cpp/sci_getshortpathname.cpp \
 +      sci_gateway/cpp/sci_getlongpathname.cpp \
 +      sci_gateway/cpp/sci_fileext.cpp \
 +      sci_gateway/cpp/sci_createdir.cpp \
 +      sci_gateway/cpp/sci_fullpath.cpp \
 +      sci_gateway/cpp/sci_removedir.cpp \
 +      sci_gateway/cpp/sci_meof.cpp \
 +      sci_gateway/cpp/sci_mputstr.cpp \
 +      sci_gateway/cpp/sci_mgetstr.cpp \
 +      sci_gateway/cpp/sci_mseek.cpp \
 +      sci_gateway/cpp/sci_mtell.cpp \
 +      sci_gateway/cpp/sci_newest.cpp \
 +      sci_gateway/cpp/sci_merror.cpp \
 +      sci_gateway/cpp/sci_mclearerr.cpp \
 +      sci_gateway/cpp/sci_get_absolute_file_path.cpp \
 +      sci_gateway/cpp/sci_getrelativefilename.cpp \
 +      sci_gateway/cpp/sci_pathsep.cpp \
 +      sci_gateway/cpp/sci_mfprintf.cpp \
 +      sci_gateway/cpp/sci_mfscanf.cpp \
 +      sci_gateway/cpp/sci_mscanf.cpp \
 +      sci_gateway/cpp/sci_msscanf.cpp \
 +      sci_gateway/cpp/sci_getdrives.cpp
 +
 +FILEIO_CPP_SOURCES = \
 +      src/cpp/expandPathVariable.cpp \
 +      src/cpp/mopen.cpp \
 +      src/cpp/mclose.cpp \
 +      src/cpp/mput.cpp \
 +      src/cpp/mget.cpp \
 +      src/cpp/mputl.cpp \
 +      src/cpp/mgetl.cpp \
 +      src/cpp/mgetstr.cpp \
 +      src/cpp/filemanager.cpp \
 +      src/cpp/mseek.cpp \
 +      src/cpp/mtell.cpp \
 +      src/cpp/newest.cpp \
 +      src/cpp/scilab_sscanf.cpp
 +
 +libscifileio_la_CPPFLAGS = \
 +    -I$(srcdir)/includes/ \
 +      -I$(srcdir)/src/c/ \
 +      -I$(srcdir)/src/cpp/ \
 +      -I$(top_srcdir)/modules/api_scilab/includes \
 +      -I$(top_srcdir)/modules/output_stream/includes \
 +      -I$(top_srcdir)/modules/operations/includes \
 +      -I$(top_srcdir)/modules/types/includes \
 +      -I$(top_srcdir)/modules/functions_manager/includes \
 +      -I$(top_srcdir)/modules/ast/includes \
 +      -I$(top_srcdir)/modules/symbol/includes \
 +      -I$(top_srcdir)/modules/string/includes \
 +      -I$(top_srcdir)/modules/system_env/includes \
 +      -I$(top_srcdir)/modules/io/includes \
 +      -I$(top_srcdir)/modules/shell/includes \
 +      -I$(top_srcdir)/modules/threads/includes \
 +      -I$(top_srcdir)/modules/console/includes \
 +      -I$(top_srcdir)/modules/localization/includes \
 +      -I$(top_srcdir)/modules/dynamic_link/includes \
 +      $(HDF5_CFLAGS) \
 +      $(XML_FLAGS) \
 +    $(EIGEN_CPPFLAGS) \
 +      $(AM_CPPFLAGS)
 +
  
  if MAINTAINER_MODE
  pkglib_LTLIBRARIES = libscifileio.la
@@@ -192,42 -190,41 +192,41 @@@ libscifileio_algo_la_LINK = $(LIBTOOL) 
  @MAINTAINER_MODE_FALSE@am_libscifileio_algo_la_rpath =
  @MAINTAINER_MODE_TRUE@am_libscifileio_algo_la_rpath =
  libscifileio_la_DEPENDENCIES = libscifileio-algo.la
 -am__objects_2 = 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 \
 +am__objects_3 = libscifileio_la-gw_fileio.lo \
        libscifileio_la-sci_fprintfMat.lo \
 -      libscifileio_la-sci_fscanfMat.lo \
 +      libscifileio_la-sci_fscanfMat.lo libscifileio_la-sci_chdir.lo \
 +      libscifileio_la-sci_pwd.lo libscifileio_la-sci_copyfile.lo \
 +      libscifileio_la-sci_tempname.lo \
 +      libscifileio_la-sci_movefile.lo libscifileio_la-sci_getURL.lo \
-       libscifileio_la-sci_getURLcontent.lo \
 +      libscifileio_la-sci_splitURL.lo
 +am__objects_4 = libscifileio_la-fileio_gw.lo \
 +      libscifileio_la-sci_mopen.lo libscifileio_la-sci_mclose.lo \
 +      libscifileio_la-sci_mget.lo libscifileio_la-sci_mput.lo \
 +      libscifileio_la-sci_mputl.lo libscifileio_la-sci_mgetl.lo \
 +      libscifileio_la-sci_pathconvert.lo \
 +      libscifileio_la-sci_isdir.lo libscifileio_la-sci_filesep.lo \
 +      libscifileio_la-sci_fileparts.lo \
        libscifileio_la-sci_findfiles.lo \
 -      libscifileio_la-sci_maxfiles.lo \
 -      libscifileio_la-sci_getdrives.lo \
 -      libscifileio_la-sci_fullpath.lo \
 +      libscifileio_la-sci_basename.lo \
 +      libscifileio_la-sci_fileinfo.lo libscifileio_la-sci_isfile.lo \
        libscifileio_la-sci_deletefile.lo \
 -      libscifileio_la-sci_pathsep.lo libscifileio_la-sci_filesep.lo \
        libscifileio_la-sci_getshortpathname.lo \
        libscifileio_la-sci_getlongpathname.lo \
 -      libscifileio_la-sci_fileext.lo libscifileio_la-sci_isdir.lo \
 -      libscifileio_la-sci_removedir.lo \
 -      libscifileio_la-sci_createdir.lo libscifileio_la-sci_chdir.lo \
 -      libscifileio_la-sci_pwd.lo libscifileio_la-sci_mclearerr.lo \
 -      libscifileio_la-sci_mclose.lo libscifileio_la-sci_merror.lo \
 -      libscifileio_la-sci_mget.lo libscifileio_la-sci_mgetl.lo \
 -      libscifileio_la-sci_mgetstr.lo libscifileio_la-sci_moef.lo \
 -      libscifileio_la-sci_mopen.lo libscifileio_la-sci_mput.lo \
 -      libscifileio_la-sci_mputstr.lo libscifileio_la-sci_mseek.lo \
 -      libscifileio_la-sci_mtell.lo libscifileio_la-sci_fileinfo.lo \
 -      libscifileio_la-sci_newest.lo \
 +      libscifileio_la-sci_fileext.lo \
 +      libscifileio_la-sci_createdir.lo \
 +      libscifileio_la-sci_fullpath.lo \
 +      libscifileio_la-sci_removedir.lo libscifileio_la-sci_meof.lo \
 +      libscifileio_la-sci_mputstr.lo libscifileio_la-sci_mgetstr.lo \
 +      libscifileio_la-sci_mseek.lo libscifileio_la-sci_mtell.lo \
 +      libscifileio_la-sci_newest.lo libscifileio_la-sci_merror.lo \
 +      libscifileio_la-sci_mclearerr.lo \
        libscifileio_la-sci_get_absolute_file_path.lo \
        libscifileio_la-sci_getrelativefilename.lo \
 -      libscifileio_la-sci_copyfile.lo \
 -      libscifileio_la-sci_fileparts.lo \
 -      libscifileio_la-sci_movefile.lo \
 -      libscifileio_la-sci_basename.lo \
 -      libscifileio_la-sci_pathconvert.lo \
 -      libscifileio_la-sci_isfile.lo libscifileio_la-sci_mputl.lo \
 -      libscifileio_la-sci_tempname.lo libscifileio_la-sci_getURL.lo \
 -      libscifileio_la-sci_splitURL.lo
 -am_libscifileio_la_OBJECTS = $(am__objects_2)
 +      libscifileio_la-sci_pathsep.lo libscifileio_la-sci_mfprintf.lo \
 +      libscifileio_la-sci_mfscanf.lo libscifileio_la-sci_mscanf.lo \
 +      libscifileio_la-sci_msscanf.lo \
 +      libscifileio_la-sci_getdrives.lo
 +am_libscifileio_la_OBJECTS = $(am__objects_3) $(am__objects_4)
  libscifileio_la_OBJECTS = $(am_libscifileio_la_OBJECTS)
  @MAINTAINER_MODE_FALSE@am_libscifileio_la_rpath =
  @MAINTAINER_MODE_TRUE@am_libscifileio_la_rpath = -rpath $(pkglibdir)
@@@ -530,141 -512,120 +529,140 @@@ target_alias = @target_alias
  top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
 -FILEIO_SOURCES = src/c/FileExist.c \
 -src/c/scanf_functions.c \
 -src/c/do_xxscanf.c \
 -src/c/findfiles.c \
 -src/c/Status2Mode.c \
 -src/c/addfile.c \
 -src/c/delfile.c \
 -src/c/filesmanagement.c \
 -src/c/getfiledesc.c \
 -src/c/getfileinfo.c \
 -src/c/getfiletype.c \
 -src/c/mclearerr.c \
 -src/c/mclose.c \
 -src/c/meof.c \
 -src/c/merror.c \
 -src/c/mget.c \
 -src/c/mgetl.c \
 -src/c/mgeti.c \
 -src/c/mgetstr.c \
 -src/c/mopen.c \
 -src/c/mput.c \
 -src/c/mputi.c \
 -src/c/mputstr.c \
 -src/c/mseek.c \
 -src/c/mtell.c \
 -src/c/readline.c \
 -src/c/getdrives.c \
 -src/c/deleteafile.c \
 -src/c/getshortpathname.c \
 -src/c/getlongpathname.c \
 -src/c/FindFileExtension.c \
 -src/c/URIFileToFilename.c \
 -src/c/createdirectory.c \
 -src/c/isdir.c \
 -src/c/isDrive.c \
 -src/c/removedir.c \
 -src/c/cluni0.c \
 -src/c/scicurdir.c \
 -src/c/fullpath.c \
 -src/c/fileinfo.c \
 -src/c/getrelativefilename.c \
 -src/c/splitpath.c \
 -src/c/movefile.c \
 -src/c/expandPathVariable.c \
 -src/c/basename.c \
 -src/c/pathconvert.c \
 -src/c/copyfile_others.c \
 -src/c/getFullFilename.c \
 -src/c/mputl.c \
 -src/c/fscanfMat.c \
 -src/c/fprintfMat.c \
 -src/c/createtempfilename.c \
 -src/c/dlManager.c \
 -src/c/convert_tools.c
 -
 -GATEWAY_SOURCES = \
 -sci_gateway/c/gw_fileio.c \
 -sci_gateway/c/sci_mfprintf.c \
 -sci_gateway/c/sci_mscanf.c \
 -sci_gateway/c/sci_msscanf.c \
 -sci_gateway/c/sci_mfscanf.c \
 -sci_gateway/c/sci_fprintfMat.c \
 -sci_gateway/c/sci_fscanfMat.c \
 -sci_gateway/c/sci_findfiles.c \
 -sci_gateway/c/sci_maxfiles.c \
 -sci_gateway/c/sci_getdrives.c \
 -sci_gateway/c/sci_fullpath.c \
 -sci_gateway/c/sci_deletefile.c \
 -sci_gateway/c/sci_pathsep.c \
 -sci_gateway/c/sci_filesep.c \
 -sci_gateway/c/sci_getshortpathname.c \
 -sci_gateway/c/sci_getlongpathname.c \
 -sci_gateway/c/sci_fileext.c \
 -sci_gateway/c/sci_isdir.c \
 -sci_gateway/c/sci_removedir.c \
 -sci_gateway/c/sci_createdir.c \
 -sci_gateway/c/sci_chdir.c \
 -sci_gateway/c/sci_pwd.c \
 -sci_gateway/c/sci_mclearerr.c \
 -sci_gateway/c/sci_mclose.c \
 -sci_gateway/c/sci_merror.c \
 -sci_gateway/c/sci_mget.c \
 -sci_gateway/c/sci_mgetl.c \
 -sci_gateway/c/sci_mgetstr.c \
 -sci_gateway/c/sci_moef.c \
 -sci_gateway/c/sci_mopen.c \
 -sci_gateway/c/sci_mput.c \
 -sci_gateway/c/sci_mputstr.c \
 -sci_gateway/c/sci_mseek.c \
 -sci_gateway/c/sci_mtell.c \
 -sci_gateway/c/sci_fileinfo.c \
 -sci_gateway/c/sci_newest.c \
 -sci_gateway/c/sci_get_absolute_file_path.c  \
 -sci_gateway/c/sci_getrelativefilename.c \
 -sci_gateway/c/sci_copyfile.c \
 -sci_gateway/c/sci_fileparts.c \
 -sci_gateway/c/sci_movefile.c \
 -sci_gateway/c/sci_basename.c \
 -sci_gateway/c/sci_pathconvert.c \
 -sci_gateway/c/sci_isfile.c \
 -sci_gateway/c/sci_mputl.c \
 -sci_gateway/c/sci_tempname.c \
 -sci_gateway/c/sci_getURL.c \
 -sci_gateway/c/sci_splitURL.c
 -
 -libscifileio_la_CPPFLAGS = -I$(srcdir)/includes/ \
 -                              -I$(srcdir)/src/c/ \
 -                              -I$(top_srcdir)/modules/output_stream/includes/ \
 -                              -I$(top_srcdir)/modules/io/includes/ \
 -                              -I$(top_srcdir)/modules/api_scilab/includes/ \
 -                              -I$(top_srcdir)/modules/string/includes/ \
 -                              -I$(top_srcdir)/modules/localization/includes/ \
 -                          $(XML_FLAGS) \
 -                              $(AM_CPPFLAGS)
 +yacc_present = @yacc_present@
 +FILEIO_C_SOURCES = \
 +    src/c/FileExist.c \
 +    src/c/scanf_functions.c \
 +    src/c/do_xxscanf.c \
 +    src/c/findfiles.c \
 +    src/c/Status2Mode.c \
 +    src/c/addfile.c \
 +    src/c/delfile.c \
 +    src/c/filesmanagement.c \
 +    src/c/getfiledesc.c \
 +    src/c/getfileinfo.c \
 +    src/c/getfiletype.c \
 +    src/c/mgeti.c \
 +    src/c/mputi.c \
 +    src/c/readline.c \
 +    src/c/getdrives.c \
 +    src/c/deleteafile.c \
 +    src/c/getshortpathname.c \
 +    src/c/getlongpathname.c \
 +    src/c/FindFileExtension.c \
 +    src/c/URIFileToFilename.c \
 +    src/c/createdirectory.c \
 +    src/c/isdir.c \
 +    src/c/isDrive.c \
 +    src/c/removedir.c \
 +    src/c/cluni0.c \
 +    src/c/scicurdir.c \
 +    src/c/fullpath.c \
 +    src/c/fileinfo.c \
 +    src/c/getrelativefilename.c \
 +    src/c/splitpath.c \
 +    src/c/movefile.c \
 +    src/c/basename.c \
 +    src/c/pathconvert.c \
 +    src/c/copyfile_others.c \
 +    src/c/getFullFilename.c \
 +    src/c/os_wfopen.c \
 +    src/c/fscanfMat.c \
 +    src/c/fprintfMat.c \
 +    src/c/createtempfilename.c \
 +      src/c/dlManager.c \
 +      src/c/convert_tools.c
 +
 +GATEWAY_C_SOURCES = \
 +    sci_gateway/c/gw_fileio.c \
 +    sci_gateway/c/sci_fprintfMat.c \
 +    sci_gateway/c/sci_fscanfMat.c \
 +    sci_gateway/c/sci_chdir.c \
 +    sci_gateway/c/sci_pwd.c \
 +    sci_gateway/c/sci_copyfile.c \
 +    sci_gateway/c/sci_tempname.c \
 +    sci_gateway/c/sci_movefile.c \
 +      sci_gateway/c/sci_getURL.c \
-       sci_gateway/c/sci_getURLcontent.c \
 +      sci_gateway/c/sci_splitURL.c
 +
 +GATEWAY_CPP_SOURCES = \
 +      sci_gateway/cpp/fileio_gw.cpp \
 +      sci_gateway/cpp/sci_mopen.cpp \
 +      sci_gateway/cpp/sci_mclose.cpp \
 +      sci_gateway/cpp/sci_mget.cpp \
 +      sci_gateway/cpp/sci_mput.cpp \
 +      sci_gateway/cpp/sci_mputl.cpp \
 +      sci_gateway/cpp/sci_mgetl.cpp \
 +      sci_gateway/cpp/sci_pathconvert.cpp \
 +      sci_gateway/cpp/sci_isdir.cpp \
 +      sci_gateway/cpp/sci_filesep.cpp \
 +      sci_gateway/cpp/sci_fileparts.cpp \
 +      sci_gateway/cpp/sci_findfiles.cpp \
 +      sci_gateway/cpp/sci_basename.cpp \
 +      sci_gateway/cpp/sci_fileinfo.cpp \
 +      sci_gateway/cpp/sci_isfile.cpp \
 +      sci_gateway/cpp/sci_deletefile.cpp \
 +      sci_gateway/cpp/sci_getshortpathname.cpp \
 +      sci_gateway/cpp/sci_getlongpathname.cpp \
 +      sci_gateway/cpp/sci_fileext.cpp \
 +      sci_gateway/cpp/sci_createdir.cpp \
 +      sci_gateway/cpp/sci_fullpath.cpp \
 +      sci_gateway/cpp/sci_removedir.cpp \
 +      sci_gateway/cpp/sci_meof.cpp \
 +      sci_gateway/cpp/sci_mputstr.cpp \
 +      sci_gateway/cpp/sci_mgetstr.cpp \
 +      sci_gateway/cpp/sci_mseek.cpp \
 +      sci_gateway/cpp/sci_mtell.cpp \
 +      sci_gateway/cpp/sci_newest.cpp \
 +      sci_gateway/cpp/sci_merror.cpp \
 +      sci_gateway/cpp/sci_mclearerr.cpp \
 +      sci_gateway/cpp/sci_get_absolute_file_path.cpp \
 +      sci_gateway/cpp/sci_getrelativefilename.cpp \
 +      sci_gateway/cpp/sci_pathsep.cpp \
 +      sci_gateway/cpp/sci_mfprintf.cpp \
 +      sci_gateway/cpp/sci_mfscanf.cpp \
 +      sci_gateway/cpp/sci_mscanf.cpp \
 +      sci_gateway/cpp/sci_msscanf.cpp \
 +      sci_gateway/cpp/sci_getdrives.cpp
 +
 +FILEIO_CPP_SOURCES = \
 +      src/cpp/expandPathVariable.cpp \
 +      src/cpp/mopen.cpp \
 +      src/cpp/mclose.cpp \
 +      src/cpp/mput.cpp \
 +      src/cpp/mget.cpp \
 +      src/cpp/mputl.cpp \
 +      src/cpp/mgetl.cpp \
 +      src/cpp/mgetstr.cpp \
 +      src/cpp/filemanager.cpp \
 +      src/cpp/mseek.cpp \
 +      src/cpp/mtell.cpp \
 +      src/cpp/newest.cpp \
 +      src/cpp/scilab_sscanf.cpp
 +
 +libscifileio_la_CPPFLAGS = \
 +    -I$(srcdir)/includes/ \
 +      -I$(srcdir)/src/c/ \
 +      -I$(srcdir)/src/cpp/ \
 +      -I$(top_srcdir)/modules/api_scilab/includes \
 +      -I$(top_srcdir)/modules/output_stream/includes \
 +      -I$(top_srcdir)/modules/operations/includes \
 +      -I$(top_srcdir)/modules/types/includes \
 +      -I$(top_srcdir)/modules/functions_manager/includes \
 +      -I$(top_srcdir)/modules/ast/includes \
 +      -I$(top_srcdir)/modules/symbol/includes \
 +      -I$(top_srcdir)/modules/string/includes \
 +      -I$(top_srcdir)/modules/system_env/includes \
 +      -I$(top_srcdir)/modules/io/includes \
 +      -I$(top_srcdir)/modules/shell/includes \
 +      -I$(top_srcdir)/modules/threads/includes \
 +      -I$(top_srcdir)/modules/console/includes \
 +      -I$(top_srcdir)/modules/localization/includes \
 +      -I$(top_srcdir)/modules/dynamic_link/includes \
 +      $(HDF5_CFLAGS) \
 +      $(XML_FLAGS) \
 +    $(EIGEN_CPPFLAGS) \
 +      $(AM_CPPFLAGS)
  
  @MAINTAINER_MODE_TRUE@pkglib_LTLIBRARIES = libscifileio.la
  @MAINTAINER_MODE_FALSE@noinst_LTLIBRARIES = libscifileio-algo.la libscifileio.la
@@@ -204,7 -200,9 +204,10 @@@ lib /DEF:"$(ProjectDir)System_env_Impor
      </Link>
    </ItemDefinitionGroup>
    <ItemGroup>
 +    <ClCompile Include="src\cpp\scilab_sscanf.cpp" />
+     <ClCompile Include="sci_gateway\c\sci_getURL.c" />
+     <ClCompile Include="sci_gateway\c\sci_splitURL.c" />
+     <ClCompile Include="sci_gateway\c\sci_tempname.c" />
      <ClCompile Include="src\c\addfile.c" />
      <ClCompile Include="src\c\basename.c" />
      <ClCompile Include="src\c\cluni0.c" />
      <ClCompile Include="src\c\URIFileToFilename.c">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="src\c\sendtorecyclebin.c">
 +    <ClCompile Include="src\c\createtempfilename.c">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="src\c\createtempfilename.c">
 +    <ClCompile Include="src\cpp\scilab_sscanf.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
+     <ClCompile Include="sci_gateway\c\sci_tempname.c">
+       <Filter>Source Files</Filter>
+     </ClCompile>
+     <ClCompile Include="sci_gateway\c\sci_getURL.c">
+       <Filter>Source Files</Filter>
+     </ClCompile>
+     <ClCompile Include="sci_gateway\c\sci_splitURL.c">
+       <Filter>Source Files</Filter>
+     </ClCompile>
      <ClCompile Include="src\c\dlManager.c">
        <Filter>Source Files</Filter>
      </ClCompile>
index bfdc54e,0000000..d04315c
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,30 @@@
 +/*
 +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 +* Copyright (C) 2012 - SE - 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
 +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 +*
 +*/
 +#ifndef __DLMANAGER_H__
 +#define __DLMANAGER_H__
 +
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include "BOOL.h"
 +#include "dynlib_fileio.h"
 +
 +#define DEFAULT_FILENAME "index.html"
 +
 +/**
 + * Download a file
 + * @param[in] fileUrl the location of the file
 + * @param[in] dest where to save the file
 + * @return the file pointer
 +*/
- FILEIO_IMPEXP char *downloadFile(char *url, char *dest, char *username, char *password);
- /**
-  * Download the content of an URL
-  * @param[in] Url the location
-  * @return the content
-  */
- FILEIO_IMPEXP char *downloadContent(char *url, char *username, char *password);
++FILEIO_IMPEXP char *downloadFile(char *url, char *dest, char *username, char *password, char **content);
 +
 +#endif /* __DLMANAGER_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);
 -int sci_tempname(char *fname, unsigned long fname_len);
 -int sci_getURL(char *fname, unsigned long fname_len);
 -int sci_splitURL(char *fname, unsigned long fname_len);
 +C_GATEWAY_PROTOTYPE(sci_pwd);
 +C_GATEWAY_PROTOTYPE(sci_chdir);
 +C_GATEWAY_PROTOTYPE(sci_copyfile);
 +C_GATEWAY_PROTOTYPE(sci_movefile);
 +C_GATEWAY_PROTOTYPE(sci_fscanfMat);
 +C_GATEWAY_PROTOTYPE(sci_fprintfMat);
  /*--------------------------------------------------------------------------*/
  #endif /* __GW_FILEIO_H__ */
  /*--------------------------------------------------------------------------*/
  /*--------------------------------------------------------------------------*/
  /*  interface function */
  /*--------------------------------------------------------------------------*/
 -static gw_generic_table Tab[] =
 -{
 -    {sci_mopen, "mopen"},
 -    {sci_mputstr, "mputstr"},
 -    {sci_mclose, "mclose"},
 -    {sci_mput, "mput"},
 -    {sci_mget, "mget"},
 -    {sci_mgetstr, "mgetstr"},
 -    {sci_meof, "meof"},
 -    {sci_mseek, "mseek"},
 -    {sci_mtell, "mtell"},
 -    {sci_mclearerr, "mclearerr"},
 -    {sci_mfprintf, "mfprintf"},
 -    {sci_scanf, "mscanf"},
 -    {sci_fscanf, "mfscanf"},
 -    {sci_sscanf, "msscanf"},
 -    {sci_fscanfMat, "fscanfMat"},
 -    {sci_fprintfMat, "fprintfMat"},
 -    {sci_merror, "merror"},
 -    {sci_findfiles, "findfiles"},
 -    {sci_maxfiles, "maxfiles"},
 -    {sci_getdrives, "getdrives"},
 -    {sci_fullpath, "fullpath"},
 -    {sci_deletefile, "deletefile"},
 -    {sci_pathsep, "pathsep"},
 -    {sci_filesep, "filesep"},
 -    {sci_getlongpathname, "getlongpathname"},
 -    {sci_getshortpathname, "getshortpathname"},
 -    {sci_fileext, "fileext"},
 -    {sci_isdir, "isdir"},
 -    {sci_removedir, "removedir"},
 -    {sci_createdir, "createdir"},
 -    {sci_pwd, "pwd"},
 -    {sci_chdir, "chdir"},
 -    {sci_fileinfo, "fileinfo"},
 -    {sci_newest, "newest"},
 -    {sci_getrelativefilename, "getrelativefilename"},
 -    {sci_get_absolute_file_path, "get_absolute_file_path"},
 -    {sci_copyfile, "copyfile"},
 -    {sci_isfile, "isfile"},
 -    {sci_fileparts, "fileparts"},
 -    {sci_movefile, "movefile"},
 -    {sci_basename, "basename"},
 -    {sci_pathconvert, "pathconvert"},
 -    {sci_chdir, "cd"},
 -    {sci_mgetl, "mgetl"},
 -    {sci_mputl, "mputl"},
 -    {sci_tempname, "tempname"},
 -    {sci_getURL, "getURL"},
 -    {sci_splitURL, "splitURL"}
 +static gw_generic_table Tab[]={
 +      {NULL, ""}, //mopen
 +      {NULL, ""}, //mputstr
 +      {NULL, ""}, //mclose
 +      {NULL, ""}, //mput
 +      {NULL, ""}, //mget
 +      {NULL, ""}, //mgetstr
 +      {NULL, ""}, //meof
 +      {NULL, ""}, //mseek
 +      {NULL, ""}, //mtell
 +      {NULL, ""}, //mclearerr
 +      {NULL, ""}, //mfprintf *
 +      {NULL, ""}, //mscanf *
 +      {NULL, ""}, //mfscanf *
 +      {NULL, ""}, //msscanf *
 +      {NULL,"" }, //fscanfMat
 +      {NULL,"" }, //fprintfMat
 +      {NULL, ""}, //merror
 +      {NULL, ""}, //findfiles
 +      {NULL, ""}, //maxfiles => deprecated (Scilab 5.4)
 +      {NULL, ""}, //getdrives
 +      {NULL, ""}, //fullpath
 +      {NULL, ""}, //deletefile
 +      {NULL, ""}, //pathsep
 +      {NULL, ""}, //filesep
 +      {NULL, ""}, //getlongpathname
 +      {NULL, ""}, //getshortpathname
 +      {NULL, ""}, //fileext
 +      {NULL, ""}, //isdir
 +      {NULL, ""}, //removedir
 +      {NULL, ""}, //createdir
 +      {NULL, ""}, //pwd
 +      {NULL, ""}, //chdir
 +      {NULL, ""}, //fileinfo
 +      {NULL, ""}, //newest
 +      {NULL, ""}, //getrelativefilename
 +      {NULL, ""}, //get_absolute_file_path
 +      {NULL, ""}, //copyfile
 +      {NULL, ""}, //isfile
 +      {NULL, ""}, //fileparts
 +      {NULL, ""}, //movefile
 +      {NULL, ""}, //basename
 +      {NULL, ""}, //pathconvert
 +      {NULL, ""}, //cd
 +    {NULL, ""}, //mgetl
 +    {NULL, ""}, //mputl
-     {NULL, ""} //tempname
++    {NULL, ""}, //tempname
++    {NULL, ""}, //getURL
++    {NULL, ""}  //splitURL
  };
  /*--------------------------------------------------------------------------*/
  int gw_fileio(void)
  #include "dlManager.h"
  #include "localization.h"
  /* ==================================================================== */
- static void freeAllocatedStrings(char *url, char *dest, char *username, char *password)
- {
-     if (url != NULL)
-     {
-         freeAllocatedSingleString(url);
-     }
-     if (dest != NULL)
-     {
-         freeAllocatedSingleString(dest);
-     }
-     if (username != NULL)
-     {
-         freeAllocatedSingleString(username);
-     }
-     if (password != NULL)
-     {
-         freeAllocatedSingleString(password);
-     }
- }
+ static void freeAllocatedStrings(char *url, char *dest, char *username, char *password, char* content);
  /* ==================================================================== */
 -int sci_getURL(char *fname, int fname_len)
 +int sci_getURL(char *fname, void* pvApiCtx)
  {
      SciErr sciErr;
 -    int length = 0;
  
 -    int *piAddr = NULL;
      char *url = NULL;
      char *dest = NULL;
      char *username = NULL;
      char *password = NULL;
+     char *content = NULL;
  
 -    int iRows = 0, iCols = 0;
 -    int iType = 0;
      int *piAddressVarOne = NULL;
      int ret = 0;
      char *filePath = NULL;
index eeb8566,0000000..56a2aac
mode 100644,000000..100644
--- /dev/null
@@@ -1,289 -1,0 +1,288 @@@
 +<?xml version="1.0" encoding="utf-8"?>
 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 +  <ItemGroup Label="ProjectConfigurations">
 +    <ProjectConfiguration Include="Debug|Win32">
 +      <Configuration>Debug</Configuration>
 +      <Platform>Win32</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Debug|x64">
 +      <Configuration>Debug</Configuration>
 +      <Platform>x64</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Release|Win32">
 +      <Configuration>Release</Configuration>
 +      <Platform>Win32</Platform>
 +    </ProjectConfiguration>
 +    <ProjectConfiguration Include="Release|x64">
 +      <Configuration>Release</Configuration>
 +      <Platform>x64</Platform>
 +    </ProjectConfiguration>
 +  </ItemGroup>
 +  <PropertyGroup Label="Globals">
 +    <ProjectGuid>{6D9647CE-9CB9-4B16-B34D-8542484EFBB0}</ProjectGuid>
 +    <RootNamespace>fileio_gw</RootNamespace>
 +    <Keyword>Win32Proj</Keyword>
 +  </PropertyGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <CharacterSet>Unicode</CharacterSet>
 +    <WholeProgramOptimization>true</WholeProgramOptimization>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <CharacterSet>Unicode</CharacterSet>
 +    <WholeProgramOptimization>true</WholeProgramOptimization>
 +  </PropertyGroup>
 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
 +    <CharacterSet>Unicode</CharacterSet>
 +  </PropertyGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 +  <ImportGroup Label="ExtensionSettings">
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 +  </ImportGroup>
 +  <PropertyGroup Label="UserMacros" />
 +  <PropertyGroup>
 +    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
 +    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
 +  </PropertyGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 +    <ClCompile>
 +      <Optimization>Disabled</Optimization>
 +      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../io/includes;../../../../libs/Eigen/includes;../../../../libs/libxml2;../../../dynamic_link/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MinimalRebuild>true</MinimalRebuild>
 +      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 +      <PrecompiledHeader>
 +      </PrecompiledHeader>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
 +    </ClCompile>
 +    <Link>
 +      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <SubSystem>Windows</SubSystem>
 +      <TargetMachine>MachineX86</TargetMachine>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
 +    <Midl>
 +      <TargetEnvironment>X64</TargetEnvironment>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>Disabled</Optimization>
 +      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../io/includes;../../../../libs/Eigen/includes;../../../../libs/libxml2;../../../dynamic_link/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <MinimalRebuild>true</MinimalRebuild>
 +      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 +      <PrecompiledHeader>
 +      </PrecompiledHeader>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +    </ClCompile>
 +    <Link>
 +      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <SubSystem>Windows</SubSystem>
 +      <TargetMachine>MachineX64</TargetMachine>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 +    <ClCompile>
 +      <Optimization>MaxSpeed</Optimization>
 +      <IntrinsicFunctions>true</IntrinsicFunctions>
 +      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../io/includes;../../../../libs/Eigen/includes;../../../../libs/libxml2;../../../dynamic_link/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
 +      <FunctionLevelLinking>true</FunctionLevelLinking>
 +      <PrecompiledHeader>
 +      </PrecompiledHeader>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +      <MultiProcessorCompilation>true</MultiProcessorCompilation>
 +    </ClCompile>
 +    <Link>
 +      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <SubSystem>Windows</SubSystem>
 +      <OptimizeReferences>true</OptimizeReferences>
 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
 +      <TargetMachine>MachineX86</TargetMachine>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
 +    <Midl>
 +      <TargetEnvironment>X64</TargetEnvironment>
 +    </Midl>
 +    <ClCompile>
 +      <Optimization>MaxSpeed</Optimization>
 +      <IntrinsicFunctions>true</IntrinsicFunctions>
 +      <AdditionalIncludeDirectories>../../includes;../../src/c;../../src/cpp;../../../functions_manager/includes;../../../types/includes;../../../core/includes;../../../ast/includes;../../../symbol/includes;../../../api_scilab/includes;../../../operations/includes;../../../localization/includes;../../../output_stream/includes;../../../../libs/intl;../../../system_env/includes;../../../string/includes;../../../windows_tools/includes;../../../threads/includes;../../../console/includes;../../../io/includes;../../../../libs/Eigen/includes;../../../../libs/libxml2;../../../dynamic_link/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FILEIO_GW_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
 +      <FunctionLevelLinking>true</FunctionLevelLinking>
 +      <PrecompiledHeader>
 +      </PrecompiledHeader>
 +      <WarningLevel>Level3</WarningLevel>
 +      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 +      <MultiProcessorCompilation>true</MultiProcessorCompilation>
 +    </ClCompile>
 +    <Link>
 +      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
 +      <GenerateDebugInformation>true</GenerateDebugInformation>
 +      <SubSystem>Windows</SubSystem>
 +      <OptimizeReferences>true</OptimizeReferences>
 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
 +      <TargetMachine>MachineX64</TargetMachine>
 +      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 +    </Link>
 +  </ItemDefinitionGroup>
 +  <ItemGroup>
 +    <ClCompile Include="..\c\sci_chdir.c" />
 +    <ClCompile Include="..\c\sci_copyfile.c" />
 +    <ClCompile Include="..\c\sci_fprintfMat.c" />
 +    <ClCompile Include="..\c\sci_fscanfMat.c" />
 +    <ClCompile Include="..\c\sci_getURL.c" />
-     <ClCompile Include="..\c\sci_getURLcontent.c" />
 +    <ClCompile Include="..\c\sci_maxfiles.c" />
 +    <ClCompile Include="..\c\sci_movefile.c" />
 +    <ClCompile Include="..\c\sci_pwd.c" />
 +    <ClCompile Include="..\c\sci_splitURL.c" />
 +    <ClCompile Include="..\c\sci_tempname.c" />
 +    <ClCompile Include="fileio_gw.cpp" />
 +    <ClCompile Include="sci_basename.cpp" />
 +    <ClCompile Include="sci_createdir.cpp" />
 +    <ClCompile Include="sci_deletefile.cpp" />
 +    <ClCompile Include="sci_fileext.cpp" />
 +    <ClCompile Include="sci_fileinfo.cpp" />
 +    <ClCompile Include="sci_fileparts.cpp" />
 +    <ClCompile Include="sci_filesep.cpp" />
 +    <ClCompile Include="sci_findfiles.cpp" />
 +    <ClCompile Include="sci_fullpath.cpp" />
 +    <ClCompile Include="sci_getdrives.cpp" />
 +    <ClCompile Include="sci_get_absolute_file_path.cpp" />
 +    <ClCompile Include="sci_getlongpathname.cpp" />
 +    <ClCompile Include="sci_getrelativefilename.cpp" />
 +    <ClCompile Include="sci_getshortpathname.cpp" />
 +    <ClCompile Include="sci_isdir.cpp" />
 +    <ClCompile Include="sci_isfile.cpp" />
 +    <ClCompile Include="sci_mclearerr.cpp" />
 +    <ClCompile Include="sci_mclose.cpp" />
 +    <ClCompile Include="sci_meof.cpp" />
 +    <ClCompile Include="sci_merror.cpp" />
 +    <ClCompile Include="sci_mfprintf.cpp" />
 +    <ClCompile Include="sci_mfscanf.cpp" />
 +    <ClCompile Include="sci_mget.cpp" />
 +    <ClCompile Include="sci_mgetl.cpp" />
 +    <ClCompile Include="sci_mgetstr.cpp" />
 +    <ClCompile Include="sci_mopen.cpp" />
 +    <ClCompile Include="sci_mput.cpp" />
 +    <ClCompile Include="sci_mputl.cpp" />
 +    <ClCompile Include="sci_mputstr.cpp" />
 +    <ClCompile Include="sci_mscanf.cpp" />
 +    <ClCompile Include="sci_mseek.cpp" />
 +    <ClCompile Include="sci_msscanf.cpp" />
 +    <ClCompile Include="sci_mtell.cpp" />
 +    <ClCompile Include="sci_newest.cpp" />
 +    <ClCompile Include="sci_pathconvert.cpp" />
 +    <ClCompile Include="sci_pathsep.cpp" />
 +    <ClCompile Include="sci_removedir.cpp" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClInclude Include="..\..\includes\fileio_gw.hxx" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <Library Include="..\..\..\..\bin\blasplus.lib" />
 +    <Library Include="..\..\..\..\bin\lapack.lib" />
 +    <Library Include="..\..\..\..\bin\libintl.lib" />
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ProjectReference Include="..\..\..\ast\ast-tools\ast-tools.vcxproj">
 +      <Project>{1f4a0344-99ed-461b-bd53-1593788fb34d}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\ast\ast.vcxproj">
 +      <Project>{0d3fa25b-8116-44ec-a45e-260789daa3d9}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
 +      <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\console\src\c\console.vcxproj">
 +      <Project>{445d3b85-c9b1-498b-9c88-0a3c2390b1cc}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\core\src\c\core.vcxproj">
 +      <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
 +      <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\operations\operations.vcxproj">
 +      <Project>{1bb396f7-ce61-4cfc-9c22-266b2cfb2e74}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\output_stream\sci_gateway\cpp\output_stream_gw\output_stream_gw.vcxproj">
 +      <Project>{c000fdf7-4d32-4630-9595-560d9cc66d11}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
 +      <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\symbol\symbol.vcxproj">
 +      <Project>{2c60033b-0dbd-4ca4-80d3-176c9be9ce2f}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\system_env\system_env.vcxproj">
 +      <Project>{7ca60aef-9afa-4d06-af28-613c0aa27640}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\types\types.vcxproj">
 +      <Project>{64e090da-dcb5-4f4d-93d7-e88ddec9c2ef}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\types\typesmacro\typesmacro.vcxproj">
 +      <Project>{9252a034-7f22-4cb1-a634-4577da69f2d0}</Project>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\..\windows_tools\src\c\scilab_windows\scilab_windows.vcxproj">
 +      <Project>{8028f371-6a94-4a26-8804-6e7f05f1d1aa}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +    <ProjectReference Include="..\..\fileio.vcxproj">
 +      <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
 +      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
 +    </ProjectReference>
 +  </ItemGroup>
 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 +  <ImportGroup Label="ExtensionTargets">
 +  </ImportGroup>
 +</Project>
index a192ee5,0000000..448d650
mode 100644,000000..100644
--- /dev/null
@@@ -1,176 -1,0 +1,173 @@@
 +<?xml version="1.0" encoding="utf-8"?>
 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 +  <ItemGroup>
 +    <Filter Include="Source Files">
 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
 +    </Filter>
 +    <Filter Include="Header Files">
 +      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
 +      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
 +    </Filter>
 +    <Filter Include="Resource Files">
 +      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
 +      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
 +    </Filter>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClCompile Include="fileio_gw.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_basename.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_createdir.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_deletefile.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_fileext.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_fileinfo.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_fileparts.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_filesep.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_findfiles.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_fullpath.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_get_absolute_file_path.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_getlongpathname.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_getrelativefilename.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_getshortpathname.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_isdir.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_isfile.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mclearerr.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mclose.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_meof.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_merror.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mget.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mgetl.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mgetstr.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mopen.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mput.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mputl.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mputstr.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mseek.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mtell.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_newest.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_pathconvert.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_pathsep.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_removedir.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mfprintf.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mfscanf.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_mscanf.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_msscanf.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="sci_getdrives.cpp">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_chdir.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_tempname.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_copyfile.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_fprintfMat.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_fscanfMat.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_maxfiles.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_movefile.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_pwd.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +    <ClCompile Include="..\c\sci_getURL.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
-     <ClCompile Include="..\c\sci_getURLcontent.c">
-       <Filter>Source Files</Filter>
-     </ClCompile>
 +    <ClCompile Include="..\c\sci_splitURL.c">
 +      <Filter>Source Files</Filter>
 +    </ClCompile>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <ClInclude Include="..\..\includes\fileio_gw.hxx">
 +      <Filter>Header Files</Filter>
 +    </ClInclude>
 +  </ItemGroup>
 +  <ItemGroup>
 +    <Library Include="..\..\..\..\bin\blasplus.lib" />
 +    <Library Include="..\..\..\..\bin\lapack.lib" />
 +    <Library Include="..\..\..\..\bin\libintl.lib" />
 +  </ItemGroup>
 +</Project>
  ;
  Source: modules\{#GRAPHICS}\license.txt; DestDir: {app}\modules\{#GRAPHICS}; Components: {#COMPN_GRAPHICS}
  ;
- Source: thirdparty\jlatexmath-1.0.1.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
- Source: thirdparty\jlatexmath-fop-1.0.1.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
+ Source: thirdparty\jlatexmath-1.0.2.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
+ Source: thirdparty\jlatexmath-fop-1.0.2.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
  ;
  Source: bin\{#GRAPHICS}.dll; DestDir: {app}\bin; Components: {#COMPN_GRAPHICS}
 +Source: bin\{#GRAPHICS}.lib; DestDir: {app}\bin; Components: {#COMPN_GRAPHICS}
 +Source: bin\{#GRAPHICS}_gw.dll; DestDir: {app}\bin; Components: {#COMPN_GRAPHICS}
  ;
  Source: bin\no{#GRAPHICS}.dll; DestDir: {app}\bin; DestName: {#GRAPHICS}.dll; Components: not ({#COMPN_GRAPHICS})
 +Source: bin\no{#GRAPHICS}.lib; DestDir: {app}\bin; DestName: {#GRAPHICS}.lib; Components: not ({#COMPN_GRAPHICS})
 +Source: bin\no{#GRAPHICS}.dll; DestDir: {app}\bin; DestName: {#GRAPHICS}_gw.dll; Components: not ({#COMPN_GRAPHICS})
  ;
  Source: modules\{#GRAPHICS}\sci_gateway\{#GRAPHICS}_gateway.xml; DestDir: {app}\modules\{#GRAPHICS}\sci_gateway; Components: {#COMPN_GRAPHICS}
  ;
@@@ -98,21 -98,22 +98,21 @@@ function %h_p(h
          case "Compound"
              u=h.user_data
              t=[t;
-                 "parent: "+h.parent.type
-                 "children: "+fmtchildren(h.children)
-                 "visible = "+sci2exp(h.visible)
-                 "user_data = "+fmtuser_data(u)
-                 "tag = "+h.tag
-                 ]
+             "parent: "+h.parent.type
+             "children: "+fmtchildren(h.children)
+             "visible = "+sci2exp(h.visible)
+             "user_data = "+fmtuser_data(u)
+             "tag = "+h.tag
+             ]
  
-         // Axes
-         // =====================================================================
+             // Axes
+             // =====================================================================
  
          case "Axes"
 -
              T=h.x_ticks
-             if size(T.locations,'*')>9 then
-                 locx="matrix "+strcat(string(size(T.locations)),'x')
-                 labx="matrix "+strcat(string(size(T.labels)),'x')
+             if size(T.locations,"*")>9 then
+                 locx="matrix "+strcat(string(size(T.locations)),"x")
+                 labx="matrix "+strcat(string(size(T.labels)),"x")
              else
                  locx=sci2exp(T.locations,0)
                  labx=sci2exp(T.labels,0)
  
          case "Console"
              t=[t;
-                 "Children: "+fmtchildren(h.children)
-                 "ShowHiddenHandles: "+sci2exp(h.showhiddenhandles)
-                 ]
+             "Children: "+fmtchildren(h.children)
+             "ShowHiddenHandles: "+sci2exp(h.showhiddenhandles)
+             ]
          end
      end
 -    write(%io(2),t)
 +    printf("%s\n", t);
  endfunction
  
  
Simple merge
Simple merge
@@@ -188,10 -188,11 +188,10 @@@ function generated_files = xmltoformat(
              end
          end
  
-     // Directories, title and languages are specified
-     // ---------------------------------------------------------------------
+         // Directories, title and languages are specified
+         // ---------------------------------------------------------------------
  
      elseif rhs == 4 then
 -
          language_system   = [];
          default_language  = [];
  
              fileToExec = buildDocv2(output_format,this_tree("master_document"),directory_language(k),dirs(k));
              if fileToExec ~= [] then
                  exec(fileToExec, -1);
-               buildDocv2("jar-only",this_tree("master_document"),directory_language(k),dirs(k));
+                 buildDocv2("jar-only",this_tree("master_document"),directory_language(k),dirs(k));
              end
  
 -            // Check if the help file has been generated
 -            if fileinfo(buildDoc_file)==[] then
 +             // Check if the help file has been generated
 +            if ~isfile(buildDoc_file) then
                  chdir(cur_dir);
                  error(msprintf(gettext("%s: %s has not been generated."),"xmltoformat",buildDoc_file));
              end
@@@ -32,51 -31,38 +32,38 @@@ static void searchenv_others(const cha
                               char *pathname);
  #endif
  /*--------------------------------------------------------------------------*/
 -void C2F(getenvc)(int *ierr, char *var, char *buf, int *buflen, int *iflag)
 +void getenvc(int *ierr,char *var,char *buf,int *buflen,int *iflag)
  {
  #ifdef _MSC_VER
-     BOOL bMalloc = FALSE;
+     wchar_t* wbuf = NULL;
      wchar_t *wvar = to_wide_string(var);
-     wchar_t *wbuf = _wgetenv(wvar);
+     char* temp = NULL;
+     DWORD iLen = GetEnvironmentVariableW(wvar, NULL, 0);
  
      *ierr = 0;
-     if (wbuf == NULL)
+     if (iLen == 0)
      {
-         DWORD iLen = GetEnvironmentVariableW(wvar, NULL, 0);
-         bMalloc = TRUE;
-         if (iLen == 0)
+         if (*iflag == 1)
          {
-             if ( *iflag == 1 )
-             {
-                 sciprint(_("Undefined environment variable %s.\n"), var);
-             }
-             *ierr = 1;
+             sciprint(_("Undefined environment variable %s.\n"), var);
          }
-         else
+         *ierr = 1;
+         return;
+     }
+     else
+     {
+         wbuf = (wchar_t*)MALLOC(sizeof(wchar_t) * iLen);
+         if (GetEnvironmentVariableW(wvar, wbuf, iLen) == 0)
          {
-             *buflen = iLen;
-             wbuf = (wchar_t*)MALLOC(sizeof(wchar_t) * *buflen);
-             if (GetEnvironmentVariableW(wvar, wbuf, (DWORD)*buflen) == 0)
+             if (*iflag == 1)
              {
-                 if ( *iflag == 1 )
-                 {
-                     sciprint(_("Undefined environment variable %s.\n"), var);
-                 }
-                 *ierr = 1;
+                 sciprint(_("Undefined environment variable %s.\n"), var);
              }
-         }
-     }
  
-     if (*ierr != 1)
-     {
-         *buflen = (int)wcslen(wbuf);
-         if (buf)
-         {
-             char* temp = wide_string_to_UTF8(wbuf);
-             strcpy(buf, temp);
-             *ierr = 0;
+             *ierr = 1;
+             return;
          }
      }
  
  #include "../../../core/src/c/dynamic_tclsci.h"
  #include "MALLOC.h" /* MALLOC */
  #include "charEncoding.h"
 +#include "os_swprintf.h"
  /*--------------------------------------------------------------------------*/
 -BOOL setenvc(char *stringIn, char *valueIn)
 +BOOL setenvc(char *stringIn,char *valueIn)
  {
 -    BOOL ret = TRUE;
 -    int len_env = 0;
 -    wchar_t* env;
  #ifdef _MSC_VER
 -    {
 -        wchar_t* wstringIn = to_wide_string(stringIn);
 -        wchar_t* wvalueIn = to_wide_string(valueIn);
 -        ret = SetEnvironmentVariableW(wstringIn, wvalueIn);
 -        FREE(wstringIn);
 -        FREE(wvalueIn);
 -    }
 +    wchar_t* wstringIn = to_wide_string(stringIn);
 +    wchar_t* wvalueIn = to_wide_string(valueIn);
++    BOOL ret = 0;
 +
-     return setenvcW(wstringIn, wvalueIn);
++    ret = setenvcW(wstringIn, wvalueIn);
++    FREE(wstringIn);
++    FREE(wvalueIn);
++    return ret;
  #else
      /* linux and Mac OS X */
      /* setenv() function is strongly preferred to putenv() */
      }
      else
      {
 -        ret = FALSE;
 +        return FALSE;
      }
 -
  #endif
 -
 -    if (ret)
 -    {
 -        dynamic_setenvtcl(stringIn, valueIn);
 -    }
 -
 -    return ret;
 +}
 +/*--------------------------------------------------------------------------*/
 +BOOL setenvcW(wchar_t *wstringIn,wchar_t *wvalueIn)
 +{
 +    BOOL ret = TRUE;
 +    int len_env = 0;
 +#ifdef _MSC_VER
-     {
-         /*
-         On Windows :
-         each process has two copies of the environment variables,
-         one managed by the OS and one managed by the C library. We set
-         the value in both locations, so that other software that looks in
-         one place or the other is guaranteed to see the value.
-         */
- #define ENV_FORMAT L"%ls=%ls"
-         if (SetEnvironmentVariableW(wstringIn,wvalueIn) == 0)
-         {
-             ret = FALSE;
-         }
-         len_env = (int) (wcslen(wstringIn) + wcslen(wvalueIn) + wcslen(ENV_FORMAT)) + 1;
-         if (len_env < _MAX_ENV)
-         {
-             wchar_t *env = (wchar_t*) MALLOC(len_env * sizeof(wchar_t));
-             if (env)
-             {
-                 os_swprintf(env, len_env, ENV_FORMAT, wstringIn, wvalueIn);
-                 if(_wputenv(env))
-                 {
-                     ret = FALSE;
-                 }
-                 FREE(env);env = NULL;
-             }
-         }
-         else ret = FALSE;
-     }
++    return SetEnvironmentVariableW(wstringIn,wvalueIn);
 +#else
-     ret = setenvc(wide_string_to_UTF8(wstringIn), wide_string_to_UTF8(wvalueIn));
++    return setenvc(wide_string_to_UTF8(wstringIn), wide_string_to_UTF8(wvalueIn));
 +#endif
-     // Disable TCLSCI
-     //if(ret)
-     //{
-     //    dynamic_setenvtcl(stringIn,valueIn);
-     //}
-     return ret;
  }
  /*--------------------------------------------------------------------------*/
  #include "gw_linear_algebra.h"
  #include "Scierror.h"
  #include "localization.h"
 -/*--------------------------------------------------------------------------*/
 -extern int C2F(intdgeqpf3)(char *fname, unsigned long fname_len);
 -extern int C2F(intzgeqpf3)(char *fname, unsigned long fname_len);
 -extern int C2F(intdgeqpf4)(char *fname, unsigned long fname_len);
 -extern int C2F(intzgeqpf4)(char *fname, unsigned long fname_len);
 -extern int C2F(doldqr)(double *tol,char *fname, unsigned long fname_len);
 -extern int C2F(zoldqr)(double *tol,char *fname, unsigned long fname_len);
 +#include "MALLOC.h"
 +#include "qr.h"
 +
 +
 +#include <stdio.h>
 +
 +/* conditional allocs short-circuits :
 +   MALLOC :
 +   0 -> error,  !=0 -> ok
 +   (MALLOC1 && MALLOC2 &&...) : 0-> error, !=0 ok
 +   (!Cond1 || MALLOC1) && (!Cond2 || MALLOC2) &&
 +
 +   iAlloc :
 +   0 -> ok, , !0 -> error
 +   (iAlloc1 || iAlloc2 ...)
 +   (Cond1 && iAlloc1) || (Cond2 && iAlloc2) ...
  
 +*/
 +/*
 +
 +
 +iQrM(pData, iRows, iCols, complexArg, iRowsToCompute, tol, pdblQ, pdblR, pdblE, pdblRank)
 +
 +*/
  /*--------------------------------------------------------------------------*/
 -int C2F(intqr)(char *fname,unsigned long fname_len)
 +int sci_qr(char *fname, int* _piKey)
  {
 -      int *header1;int *header2;
 -      int Cmplx;int ret; double *snd; double tol;
 +  int* arg[2]= {NULL, NULL};
 +
 +  int iRows, iCols;
 +  int type;
 +  double* pData= NULL;
 +  double* pDataReal= NULL;
 +  double* pDataImg= NULL;
 +  int complexArg= 0;
 +  int ret= 0;
  
 -      if (GetType(1)!=sci_matrix) 
 +      if (Rhs>=1)
        {
 -              OverLoad(1);
 -              return 0;
 -      }
 -      header1 = (int *) GetData(1);
 -      Cmplx=header1[3];
 +              getVarAddressFromPosition(_piKey, 1, &arg[0]);
 +              getVarType(_piKey, arg[0], &type);
 +              if( type != sci_matrix)
 +              {
 +                      OverLoad(1);
 +                      return 0;
 +              }
  
 -      if (header1[0] == 10) Cmplx=10;
 +              CheckRhs(1,2); /* qr(X[,"e"|tol]) */
 +              CheckLhs(1,4); /*[Q,R[,E]]=qr(X[,"e"]), [Q,R,rk,E]=qr(X[,tol])*/
 +              complexArg= isVarComplex(_piKey, arg[0]);
  
 -      if (Lhs==4) 
 -      {   /* obsolete : [Q,R,rk,E]=qr(A) or = qr(A,tol)   */
 -              if (Rhs==2) 
 +              if(complexArg)
                {
 -                        if (GetType(2)==sci_matrix)
 -                        {
 -                              snd = (double *) GetData(2);
 -                              tol = snd[2];
 -                        }
 -                        else
 -                        {
 -                                Scierror(999,_("%s: Wrong type for input argument #%d: Real scalar expected.\n"),
 -                              fname,2);
 -                                return 0;
 -                        }
 +                      getComplexMatrixOfDouble(_piKey, arg[0], &iRows, &iCols, &pDataReal, &pDataImg);
 +                      /* c -> z */
 +                      pData=(double*)oGetDoubleComplexFromPointer( pDataReal, pDataImg, iRows * iCols);
 +                      if(!pData)
 +                      {
 +                              Scierror(999,_("%s: Cannot allocate more memory.\n"),fname);
 +                              ret = 1;
 +                      }
                }
 -              else 
 +              else
                {
 -                      tol = -1;Rhs=1;
 +                      getMatrixOfDouble(_piKey, arg[0], &iRows, &iCols, &pData);
                }
  
 -              switch (Cmplx) 
 +              if( (iCols == 0) || (iRows == 0))
                {
 -                      case REAL :
 -                              ret = C2F(doldqr)(&tol,"qr",2L);
 -                      break;
 -                      case COMPLEX :
 -                              ret = C2F(zoldqr)(&tol,"qr",2L);
 -                      break;
 -                      default :
 -                              Scierror(999,_("%s: Wrong type for input argument #%d: Real or Complex matrix expected.\n"),
 -                              fname,1);
 -                      return 0;
 +                      if( complexArg )
 +                      {
 +                              double* pdblQReal;
 +                              double* pdblQImg;
 +                              double* pdblRReal;
 +                              double* pdblRImg;
 +                              allocComplexMatrixOfDouble(_piKey, Rhs+1, 0, 0, &pdblQReal, &pdblQImg);
 +                              allocComplexMatrixOfDouble(_piKey, Rhs+2, 0, 0, &pdblRReal, &pdblRImg);
 +                      }
 +                      else
 +                      {
 +                              double* pdblQ;
 +                              double* pdblR;
 +                              allocMatrixOfDouble(_piKey, Rhs+1, 0, 0, &pdblQ);
 +                              allocMatrixOfDouble(_piKey, Rhs+2, 0, 0, &pdblR);
 +                      }
 +                      LhsVar(1)= Rhs+1;
 +                      LhsVar(2)= Rhs+2;
 +                      if( Lhs >= 3) /* ..[rk],E] =*/
 +                      {
 +                              double* pdblE;
 +                              allocMatrixOfDouble(_piKey, Rhs+3, 0, 0, &pdblE);
 +                              if( Lhs == 4 ) /* rk */
 +                              {
 +                                      double* pdblRk;
 +                                      allocMatrixOfDouble(_piKey, Rhs+4, 1, 1, &pdblRk);
 +                                      *pdblRk= 0.;
 +                                      LhsVar(3)= Rhs+4;
 +                                      LhsVar(4)= Rhs+3;
 +                              }
 +                              else
 +                              {
 +                                      LhsVar(3)= Rhs+3;
 +                              }
 +                      }
                }
 -              return 0;
 -      }
 -
 -      switch (Rhs) 
 -      {
 -              case 1:   /*   qr(A)   */
 -                      switch (Cmplx) 
 +              else
 +              {
 +                      if( (iRows == -1) || (iCols == -1) )
                        {
 -                              case REAL :
 -                                      ret = C2F(intdgeqpf3)("qr",2L);
 -                              break;
 -                              case COMPLEX :
 -                                      ret = C2F(intzgeqpf3)("qr",2L);
 -                              break;
 -                              default :
 -                                      Scierror(999,_("%s: Wrong type for input argument #%d: Real or Complex matrix expected.\n"),
 -                                      fname,1);
 -                              break;
 +                              Scierror(999,_("Size varying argument a*eye(), (arg %d) not allowed here.\n"), 1);
 +                              ret= 1;
                        }
 -              break;
 -
 -              case 2 :   /*   qr(A, something)   */
 -                      header2 = (int *) GetData(2);
 -                      switch (header2[0]) 
 +                      else /* now at last the interesting case */
                        {
 -                              case STRING  :
 -                              /* Economy size:  ...=qr(A,"e")  */
 -                                      switch (Cmplx) 
 +                              int iRowsToCompute= iRows;
 +                              double dblTol= -1.;
 +                              if(Rhs == 2) /* first check economy mode or tolerance */
 +                              {
 +                                      getVarAddressFromPosition(_piKey, 2, &arg[1]);
 +                                      getVarType(_piKey, arg[1], &type);
-                                       switch( type)
++                                      switch(type)
                                        {
 -                                              case REAL :
 -                                              ret = C2F(intdgeqpf4)("qr",2L);
 -                                              break;
 -
 -                                              case COMPLEX :
 -                                              ret = C2F(intzgeqpf4)("qr",2L);
 -                                              break;
 -
 -                                              default :
 -                                              Scierror(999,_("%s: Wrong type for input argument #%d: Real or Complex matrix expected.\n"),
 -                                              fname,1);
 -                                              break;
 +                                              case sci_strings :
 +                                              { /* /!\ original code did not check that string is "e" so any [matrix of] string is accepted as "e" ! */
 +                                                      iRowsToCompute= Min(iRows, iCols);
 +                                                      break;
 +                                              }
 +                                              case sci_matrix :
 +                                              {/* /!\ original code do not check anything (real && 1x1 matrix)*/
 +                                                      double* pdblTol;
 +                                                      int tmpRows, tmpCols;
 +                                                      getMatrixOfDouble(_piKey, arg[1], &tmpRows, &tmpCols, &pdblTol);
 +                                                      dblTol= *pdblTol;
 +                                                      break;
 +                                              }
 +                                              default:
 +                                              {
 +                                                      Scierror(999,_("%s: Wrong type for input argument #%d: A real or a string expected.\n"),fname, 1);
 +                                                      ret= 1;
 +                                                      break;
 +                                              }
                                        }
 -                              break;
 +                              }
 +
 +                              {
 +                                      double* pdblQ= NULL;
 +                                      double* pdblQReal= NULL;
 +                                      double* pdblQImg= NULL;
 +                                      double* pdblR= NULL;
 +                                      double* pdblRReal= NULL;
 +                                      double* pdblRImg= NULL;
 +                                      double* pdblE= NULL;
 +                                      double* pdblRk= NULL;
  
 -                              default:
 -                                      Scierror(999,_("%s: Wrong type for input argument #%d: Real or Complex matrix expected.\n"),
 -                                      fname,2);
 -                              break;
 +                                      if(complexArg)
 +                                      {
 +                                              allocComplexMatrixOfDouble(_piKey, Rhs+1, iRows, iRowsToCompute, &pdblQReal, &pdblQImg);
 +                                              allocComplexMatrixOfDouble(_piKey, Rhs+2, iRowsToCompute, iCols, &pdblRReal, &pdblRImg);
 +                                              pdblQ= (double*) MALLOC(iRows * iRowsToCompute * sizeof(doublecomplex) );
 +                                              pdblR= (double*) MALLOC( iRowsToCompute * iCols * sizeof(doublecomplex) );
 +                                      }
 +                                      else
 +                                      {
 +                                              allocMatrixOfDouble(_piKey, Rhs+1, iRows, iRowsToCompute, &pdblQ);
 +                                              allocMatrixOfDouble(_piKey, Rhs+2, iRowsToCompute, iCols, &pdblR);
 +                                      }
 +
 +                                      if(Lhs >= 3) /* next alloc for E needed only for lhs>=3 */
 +                                      {
 +                                              allocMatrixOfDouble(_piKey, Rhs+3, iCols, iCols, &pdblE);
 +                                      }
 +
 +                                      if(Lhs >=4) /* next alloc for Rk needed only for lhs>=4 */
 +                                      {
 +                                              allocMatrixOfDouble(_piKey, Rhs+4, 1, 1, &pdblRk);
 +                                      }
 +
 +                                      ret = ret ? ret : iQrM(pData, iRows, iCols, complexArg, iRowsToCompute, dblTol, pdblQ, pdblR, pdblE, pdblRk);
 +                                      if( complexArg )
 +                                      {
 +                                              if(pdblQ)
 +                                              {
 +                                                      vGetPointerFromDoubleComplex((doublecomplex*)pdblQ, iRows * iRowsToCompute, pdblQReal, pdblQImg);
 +                                                      FREE(pdblQ);
 +                                              }
 +
 +                                              if(pdblR)
 +                                              {
 +                                                      vGetPointerFromDoubleComplex((doublecomplex*)pdblR, iRowsToCompute * iCols, pdblRReal, pdblRImg);
 +                                                      FREE(pdblR);
 +                                              }
 +                                      }
 +                              }
 +                              LhsVar(1)= Rhs+1;
 +                              LhsVar(2)= Rhs+2;
 +                              if(Lhs >= 3)
 +                              {
 +                                      if(Lhs == 4)
 +                                      {
 +                                              LhsVar(3)= Rhs+4;
 +                                              LhsVar(4)= Rhs+3;
 +                                      }
 +                                      else
 +                                      {
 +                                              LhsVar(3)= Rhs+3;
 +                                      }
 +                              }
                        }
 -        return 0;
 -  default :
 -        Scierror(999,_("%s: Wrong type for input argument #%d: Real or Complex matrix expected.\n"),
 -                              fname,1);
 -        break;
 +              }
        }
 -      return 0;
 +  return ret;
  }
  /*--------------------------------------------------------------------------*/
Simple merge
Simple merge
@@@ -134,10 -134,12 +134,10 @@@ am__installdirs = "$(DESTDIR)$(pkglibdi
        "$(DESTDIR)$(libscistring_la_sci_gatewaydir)"
  LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
  libscistring_algo_la_LIBADD =
 -am__objects_1 = libscistring_algo_la-code2str.lo \
 -      libscistring_algo_la-stripblanks.lo \
 -      libscistring_algo_la-convstr.lo \
 +am__objects_1 = libscistring_algo_la-convstr.lo \
        libscistring_algo_la-men_Sutils.lo \
        libscistring_algo_la-tokens.lo \
-       libscistring_algo_la-strsplitfunction.lo \
+       libscistring_algo_la-strsplit.lo \
        libscistring_algo_la-partfunction.lo \
        libscistring_algo_la-InitializeString.lo \
        libscistring_algo_la-setScilabCharactersCodes.lo \
@@@ -872,17 -847,17 +872,17 @@@ libscistring_algo_la-tokens.lo: src/c/t
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscistring_algo_la-tokens.Tpo $(DEPDIR)/libscistring_algo_la-tokens.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/tokens.c' object='libscistring_algo_la-tokens.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) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscistring_algo_la-tokens.lo `test -f 'src/c/tokens.c' || echo '$(srcdir)/'`src/c/tokens.c
 +@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -c -o libscistring_algo_la-tokens.lo `test -f 'src/c/tokens.c' || echo '$(srcdir)/'`src/c/tokens.c
  
- libscistring_algo_la-strsplitfunction.lo: src/c/strsplitfunction.c
- @am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -MT libscistring_algo_la-strsplitfunction.lo -MD -MP -MF $(DEPDIR)/libscistring_algo_la-strsplitfunction.Tpo -c -o libscistring_algo_la-strsplitfunction.lo `test -f 'src/c/strsplitfunction.c' || echo '$(srcdir)/'`src/c/strsplitfunction.c
- @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscistring_algo_la-strsplitfunction.Tpo $(DEPDIR)/libscistring_algo_la-strsplitfunction.Plo
- @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/strsplitfunction.c' object='libscistring_algo_la-strsplitfunction.lo' libtool=yes @AMDEPBACKSLASH@
+ libscistring_algo_la-strsplit.lo: src/c/strsplit.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscistring_algo_la-strsplit.lo -MD -MP -MF $(DEPDIR)/libscistring_algo_la-strsplit.Tpo -c -o libscistring_algo_la-strsplit.lo `test -f 'src/c/strsplit.c' || echo '$(srcdir)/'`src/c/strsplit.c
++@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -MT libscistring_algo_la-strsplit.lo -MD -MP -MF $(DEPDIR)/libscistring_algo_la-strsplit.Tpo -c -o libscistring_algo_la-strsplit.lo `test -f 'src/c/strsplit.c' || echo '$(srcdir)/'`src/c/strsplit.c
+ @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscistring_algo_la-strsplit.Tpo $(DEPDIR)/libscistring_algo_la-strsplit.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/strsplit.c' object='libscistring_algo_la-strsplit.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) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -c -o libscistring_algo_la-strsplitfunction.lo `test -f 'src/c/strsplitfunction.c' || echo '$(srcdir)/'`src/c/strsplitfunction.c
 -@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscistring_algo_la-strsplit.lo `test -f 'src/c/strsplit.c' || echo '$(srcdir)/'`src/c/strsplit.c
++@am__fastdepCC_FALSE@ $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -c -o libscistring_algo_la-strsplit.lo `test -f 'src/c/strsplit.c' || echo '$(srcdir)/'`src/c/strsplit.c
  
  libscistring_algo_la-partfunction.lo: src/c/partfunction.c
 -@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscistring_algo_la-partfunction.lo -MD -MP -MF $(DEPDIR)/libscistring_algo_la-partfunction.Tpo -c -o libscistring_algo_la-partfunction.lo `test -f 'src/c/partfunction.c' || echo '$(srcdir)/'`src/c/partfunction.c
 +@am__fastdepCC_TRUE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscistring_algo_la_CPPFLAGS) $(CPPFLAGS) $(libscistring_algo_la_CFLAGS) $(CFLAGS) -MT libscistring_algo_la-partfunction.lo -MD -MP -MF $(DEPDIR)/libscistring_algo_la-partfunction.Tpo -c -o libscistring_algo_la-partfunction.lo `test -f 'src/c/partfunction.c' || echo '$(srcdir)/'`src/c/partfunction.c
  @am__fastdepCC_TRUE@  $(am__mv) $(DEPDIR)/libscistring_algo_la-partfunction.Tpo $(DEPDIR)/libscistring_algo_la-partfunction.Plo
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     source='src/c/partfunction.c' object='libscistring_algo_la-partfunction.lo' libtool=yes @AMDEPBACKSLASH@
  @AMDEP_TRUE@@am__fastdepCC_FALSE@     DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  #include "localization.h"
  #include "freeArrayOfString.h"
  #include "BOOL.h"
 +#include "MALLOC.h"
  #include "api_scilab.h"
- #include "strsplitfunction.h"
+ #include "strsplit.h"
  /*----------------------------------------------------------------------------*/
 -static BOOL isValidRegExp(wchar_t *pStr);
 -/*----------------------------------------------------------------------------*/
 -int sci_strsplit(char *fname, unsigned long fname_len)
 +int sci_strsplit(char *fname, void* pvApiCtx)
  {
 -    SciErr sciErr;
 -    int lw = 0;
 -    int *piAddressVarOne = NULL;
 -    wchar_t *pStVarOne = NULL;
 -
 -    /* Check Input & Output parameters */
 -    CheckRhs(1, 3);
 -    CheckLhs(1, 2);
 -
 -    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
 -    if (sciErr.iErr)
 -    {
 -        printError(&sciErr, 0);
 -        Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
 -        return 0;
 -    }
 -
 -    if (isEmptyMatrix(pvApiCtx, piAddressVarOne))
 -    {
 -        createEmptyMatrix(pvApiCtx, Rhs + 1);
 -        LhsVar(1) = Rhs + 1;
 -        if (Lhs == 2)
 -        {
 -            // [r1, r2] = strsplit([]);
 -            // r1 eq []
 -            // r2 eq ''
 -            createSingleString(pvApiCtx, Rhs + 2, "");
 -            LhsVar(2) = Rhs + 2;
 -        }
 +      SciErr sciErr;
 +      int lw = 0;
 +      int *piAddressVarOne = NULL;
 +      wchar_t *pStVarOne = NULL;
 +      int lenStVarOne = 0;
 +      int m = 0, n = 0;
 +      int iType1              = 0;
 +      int iType2              = 0;
 +      int iType3              = 0;
 +
 +      /* Check Input & Output parameters */
 +      CheckRhs(1,3);
 +      CheckLhs(1,2);
 +
 +      if (Rhs == 3)
 +      {
 +              int *piAddressVarThree = NULL;
 +              double *pdVarThree = NULL;
 +
 +              int *piAddressVarTwo = NULL;
 +
 +              sciErr = getVarAddressFromPosition(pvApiCtx, 3, &piAddressVarThree);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              sciErr = getVarType(pvApiCtx, piAddressVarThree, &iType3);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              if (iType3 != sci_matrix)
 +              {
 +                      Scierror(999,_("%s: Wrong type for input argument #%d: A scalar expected.\n"), fname, 3);
 +                      return 0;
 +              }
 +
 +              sciErr = getVarDimension(pvApiCtx, piAddressVarThree, &m, &n);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              if ( (m != n) && (n != 1) )
 +              {
 +                      Scierror(999,_("%s: Wrong size for input argument #%d: A scalar expected.\n"), fname, 3);
 +                      return 0;
 +              }
 +
 +              // get value of third argument
 +              sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarThree, &m, &n, &pdVarThree);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +
 +              if ( ((int)pdVarThree[0] < 1) && ((int)pdVarThree[0] != -1) )
 +              {
 +                      Scierror(999,_("%s: Wrong value for input argument #%d: A value > 0 expected.\n"), fname, 3);
 +                      return 0;
 +              }
 +
 +              sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              if (iType2 != sci_strings)
 +              {
 +                      Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,2);
 +                      return 0;
 +              }
 +      }
 +
 +      sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
 +      if(sciErr.iErr)
 +      {
 +              printError(&sciErr, 0);
 +              return 0;
 +      }
 +
 +      sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
 +      if(sciErr.iErr)
 +      {
 +              printError(&sciErr, 0);
 +              return 0;
 +      }
 +
 +      if (iType1 == sci_matrix)
 +      {
 +              sciErr = getVarDimension(pvApiCtx, piAddressVarOne, &m, &n);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              if ( (m != n) && (n != 0) )
 +              {
 +                      Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,1);
 +                      return 0;
 +              }
 +
 +              // strsplit([], ...) returns []
 +
 +              sciErr = createMatrixOfDouble(pvApiCtx, Rhs + 1, 0, 0, NULL);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              LhsVar(1) = Rhs + 1;
          PutLhsVar();
 -        return 0;
 -    }
 -
 -    if (!isScalar(pvApiCtx, piAddressVarOne))
 -    {
 -        Scierror(999, _("%s: Wrong size for input argument #%d: A single string expected.\n"), fname, 1);
 -        return 0;
 -    }
 -
 -
 -    if (!isStringType(pvApiCtx, piAddressVarOne))
 -    {
 -        Scierror(999, _("%s: Wrong type for input argument #%d: A single string expected.\n"), fname, 1);
 -        return 0;
 -    }
 -
 -    if (Rhs > 2) /* Rhs eq. 3 */
 -    {
 -        int *piAddressVarThree = NULL;
 -        double dValueThree = 0.;
 -        int iValueThree = 0;
 -
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 3, &piAddressVarThree);
 -        if (sciErr.iErr)
 -        {
 -            printError(&sciErr, 0);
 -            Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 3);
 -            return 0;
 -        }
 -
 -        if (!isScalar(pvApiCtx, piAddressVarThree))
 -        {
 -            Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), fname, 3);
 -            return 0;
 -        }
 -
 -        if (!isDoubleType(pvApiCtx, piAddressVarThree))
 -        {
 -            Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), fname, 3);
 -            return 0;
 -        }
 -
 -        if (getScalarDouble(pvApiCtx, piAddressVarThree, &dValueThree) != 0)
 -        {
 -            Scierror(999, _("%s: No more memory.\n"), fname);
 -            return 0;
 -        }
 -
 -        iValueThree = (int)dValueThree;
 -        if ((double) iValueThree != dValueThree)
 -        {
 -            Scierror(999, _("%s: Wrong value for input argument #%d: An integer value expected.\n"), fname, 3);
 -            return 0;
 -        }
 -
 -        if ( (iValueThree < 1) && (iValueThree != -1) )
 -        {
 -            Scierror(999, _("%s: Wrong value for input argument #%d: A value > 0 expected.\n"), fname, 3);
 -            return 0;
 -        }
 -
 -
 -    }
 -
 -    if (Rhs > 1) /* Rhs >=  2 */
 -    {
 -        int *piAddressVarTwo = NULL;
 -        sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
 -        if (sciErr.iErr)
 -        {
 -            printError(&sciErr, 0);
 -            Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
 -            return 0;
 -        }
 -
 -        if (isDoubleType(pvApiCtx, piAddressVarTwo))
 -        {
 -            if (Lhs == 2)
 -            {
 -                Scierror(78, _("%s: Wrong number of output arguments: %d expected.\n"), fname, 1);
 -                return 0;
 -            }
 -
 -            if (isEmptyMatrix(pvApiCtx, piAddressVarTwo))
 -            {
 -                Scierror(999, _("%s: Wrong value for input argument #%d.\n"), fname, 2);
 -                return 0;
 -            }
 -
 -            if ( (isVector(pvApiCtx, piAddressVarTwo)) ||
 -                    (isRowVector(pvApiCtx, piAddressVarTwo)) ||
 -                    (isScalar(pvApiCtx, piAddressVarTwo)) )
 -            {
 -                double *pdVarTwo = NULL;
 -                int m2 = 0;
 -                int n2 = 0;
 -
 -                sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarTwo, &m2, &n2, &pdVarTwo);
 -                if (sciErr.iErr)
 -                {
 -                    printError(&sciErr, 0);
 -                    Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 2);
 -                    return 0;
 -                }
 -
 -                if (getAllocatedSingleWideString(pvApiCtx, piAddressVarOne, &pStVarOne) != 0)
 -                {
 -                    Scierror(999, _("%s: No more memory.\n"), fname);
 -                    return 0;
 -                }
 -                else
 -                {
 -                    int m_out = 0, n_out = 0;
 -                    strsplit_error ierr = STRSPLIT_NO_ERROR;
 -                    wchar_t **results = strsplit(pStVarOne, pdVarTwo, m2 * n2, &ierr);
 -
 -                    if (pStVarOne)
 -                    {
 -                        freeAllocatedSingleWideString(pStVarOne);
 -                        pStVarOne = NULL;
 -                    }
 -
 -                    switch (ierr)
 -                    {
 -                        case STRSPLIT_NO_ERROR:
 -                        {
 -                            m_out = (m2 * n2) + 1;
 -                            n_out = 1;
 -
 -                            sciErr = createMatrixOfWideString(pvApiCtx, Rhs + 1, m_out, n_out, results);
 -
 -                            freeArrayOfWideString(results, m_out);
 -                            results = NULL;
 -
 -                            if (sciErr.iErr)
 -                            {
 -                                printError(&sciErr, 0);
 -                                Scierror(999, _("%s: Memory allocation error.\n"), fname);
 -                                return 0;
 -                            }
 -                            LhsVar(1) = Rhs + 1;
 -                            PutLhsVar();
 -                            return 0;
 -                        }
 -                        break;
 -                        case STRSPLIT_INCORRECT_VALUE_ERROR:
 -                        {
 -                            Scierror(116, _("%s: Wrong value for input argument #%d.\n"), fname, 2);
 -                            return 0;
 -                        }
 -                        break;
 -                        case STRSPLIT_INCORRECT_ORDER_ERROR:
 -                        {
 -                            Scierror(99, _("%s: Elements of %dth argument must be in increasing order.\n"), fname, 2);
 -                            return 0;
 -                        }
 -                        break;
 -                        case STRSPLIT_MEMORY_ALLOCATION_ERROR:
 -                        {
 -                            Scierror(999, _("%s: Memory allocation error.\n"), fname);
 -                            return 0;
 -                        }
 -                        break;
 -                        default:
 -                        {
 -                            Scierror(999, _("%s: error.\n"), fname);
 -                            return 0;
 -                        }
 -                        break;
 -                    }
 -                }
 -            }
 -            else
 -            {
 -                Scierror(999, _("%s: Wrong size for input argument #%d.\n"), fname, 2);
 -                return 0;
 -            }
 -        }
 -        else if (isStringType(pvApiCtx, piAddressVarTwo))
 -        {
 -            if (!isScalar(pvApiCtx, piAddressVarTwo))
 -            {
 -                wchar_t **pStrsTwo = NULL;
 -                int m2 = 0;
 -                int n2 = 0;
 -
 -                if (getAllocatedMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m2, &n2, &pStrsTwo) != 0)
 -                {
 -                    Scierror(999, _("%s: No more memory.\n"), fname);
 -                    return 0;
 -                }
 -                else
 -                {
 -                    if (pStrsTwo)
 -                    {
 -                        int k = 0;
 -
 -                        /* checks that 2nd parameter is not an array of regexp pattern */
 -                        for (k = 0; k < m2 * n2; k++)
 -                        {
 -                            if (isValidRegExp(pStrsTwo[k]))
 -                            {
 -                                freeAllocatedMatrixOfWideString(m2, n2, pStrsTwo);
 -                                pStrsTwo = NULL;
 -
 -                                Scierror(999, _("%s: Wrong value for input argument #%d: a string expected, not a regexp pattern.\n"), fname, 2);
 -                                return 0;
 -                            }
 -                        }
 -                        freeAllocatedMatrixOfWideString(m2, n2, pStrsTwo);
 -                        pStrsTwo = NULL;
 -                    }
 -                }
 -            }
 -        }
 -        else
 -        {
 -            Scierror(999, _("%s: Wrong type for input argument #%d.\n"), fname, 2);
 -            return 0;
 -        }
 -    }
 -
 -    // we call %_strsplit macro
 -    C2F(overload)(&lw, fname, fname_len);
 -
 -    return 0;
 -}
 -/*----------------------------------------------------------------------------*/
 -static BOOL isValidRegExp(wchar_t *pStr)
 -{
 -    if (pStr)
 -    {
 -        int lenStr = (int)wcslen(pStr);
 -        if (lenStr > 2)
 -        {
 -            return (BOOL) ((pStr[0] == L'/') && (pStr[lenStr - 1] == L'/'));
 -        }
 -    }
 -    return FALSE;
 +              return 0;
 +      }
 +
 +      if (iType1 != sci_strings)
 +      {
 +              Scierror(999,_("%s: Wrong type for input argument #%d: A string expected.\n"),fname,1);
 +              return 0;
 +      }
 +
 +      if ( (m != n) && (n != 1) )
 +      {
 +              Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"),fname,1);
 +              return 0;
 +      }
 +
 +      if (Rhs == 2)
 +      {
 +              int *piAddressVarTwo = NULL;
 +
 +              sciErr = getVarAddressFromPosition(pvApiCtx, 2, &piAddressVarTwo);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              sciErr = getVarType(pvApiCtx, piAddressVarTwo, &iType2);
 +              if(sciErr.iErr)
 +              {
 +                      printError(&sciErr, 0);
 +                      return 0;
 +              }
 +
 +              if (iType2 == sci_matrix)
 +              {
 +                      int m2 = 0, n2 = 0;
 +                      double *pdVarTwo = NULL;
 +
 +                      if (Lhs == 2)
 +                      {
 +                              Scierror(78,_("%s: Wrong number of output arguments: %d expected.\n"), fname, 1);
 +                              return 0;
 +                      }
 +
 +                      // get lenStVarOne
 +                      sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne,&m,&n,&lenStVarOne,&pStVarOne);
 +                      if(sciErr.iErr)
 +                      {
 +                              printError(&sciErr, 0);
 +                              return 0;
 +                      }
 +
 +                      // get value of first argument only now
 +                      pStVarOne = (wchar_t*)MALLOC(sizeof(wchar_t)*(lenStVarOne + 1));
 +                      if (pStVarOne == NULL)
 +                      {
 +                              Scierror(999,_("%s: Memory allocation error.\n"),fname);
 +                              return 0;
 +                      }
 +
 +                      sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne,&m,&n,&lenStVarOne,&pStVarOne);
 +                      if(sciErr.iErr)
 +                      {
 +                              printError(&sciErr, 0);
 +                              return 0;
 +                      }
 +
 +                      // get value of second argument
 +                      sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarTwo, &m2, &n2, &pdVarTwo);
 +                      if(sciErr.iErr)
 +                      {
 +                              printError(&sciErr, 0);
 +                              return 0;
 +                      }
 +
 +                      if ( (m2 == 1) || (n2 == 1) )
 +                      {
 +                              int m_out = 0, n_out = 0;
 +                              strsplit_error ierr = STRSPLIT_NO_ERROR;
 +
-                               wchar_t **results = strsplitfunction(pStVarOne, pdVarTwo, m2 * n2, &ierr);
++                              wchar_t **results = strsplit(pStVarOne, pdVarTwo, m2 * n2, &ierr);
 +
 +                              switch (ierr)
 +                              {
 +                              case STRSPLIT_NO_ERROR:
 +                                      {
 +                                              m_out = (m2 * n2) + 1;
 +                                              n_out = 1;
 +
 +                                              sciErr = createMatrixOfWideString(pvApiCtx, Rhs + 1, m_out, n_out, results);
 +                                              if(sciErr.iErr)
 +                                              {
 +                                                      printError(&sciErr, 0);
 +                                                      return 0;
 +                                              }
 +
 +                                              freeArrayOfWideString(results, m_out);
 +                        LhsVar(1) = Rhs + 1;
 +                        PutLhsVar();
 +                                      }
 +                                      break;
 +                              case STRSPLIT_INCORRECT_VALUE_ERROR:
 +                                      {
 +                                              Scierror(116,_("%s: Wrong value for input argument #%d.\n"),fname, 2);
 +                                      }
 +                                      break;
 +                              case STRSPLIT_INCORRECT_ORDER_ERROR:
 +                                      {
 +                                              Scierror(99,_("%s: Elements of %dth argument must be in increasing order.\n"), fname, 2);
 +                                      }
 +                                      break;
 +                              case STRSPLIT_MEMORY_ALLOCATION_ERROR:
 +                                      {
 +                                              Scierror(999,_("%s: Memory allocation error.\n"), fname);
 +                                      }
 +                                      break;
 +                              default:
 +                                      {
 +                                              Scierror(999,_("%s: error.\n"),fname);
 +                                      }
 +                                      break;
 +                              }
 +                      }
 +                      else
 +                      {
 +                              Scierror(999,_("%s: Wrong size for input argument #%d.\n"),fname, 2);
 +                      }
 +
 +                      if (pStVarOne) {FREE(pStVarOne); pStVarOne = NULL;}
 +
 +                      return 0;
 +              }
 +              else if (iType2 != sci_strings)
 +              {
 +                      Scierror(999,_("%s: Wrong size for input argument #%d.\n"),fname, 2);
 +                      return 0;
 +              }
 +              else /* sci_strings */
 +              {
 +                      int m = 0, n = 0;
 +
 +                      sciErr = getVarDimension(pvApiCtx, piAddressVarTwo, &m, &n);
 +                      if(sciErr.iErr)
 +                      {
 +                              printError(&sciErr, 0);
 +                              return 0;
 +                      }
 +
 +                      if ( (m != n) && ((m * n) != 1) )
 +                      {
 +                              int k = 0;
 +                              wchar_t **pStVarTwo = NULL;
 +                              int *lenStVarTwo = NULL;
 +
 +                              lenStVarTwo = (int *)MALLOC(sizeof(int) * (m * n));
 +                              if (lenStVarTwo == NULL)
 +                              {
 +                                      Scierror(999,_("%s: Memory allocation error.\n"), fname);
 +                                      return 0;
 +                              }
 +
 +                              // get lenStVarTwo
 +                              sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m, &n, lenStVarTwo, pStVarTwo);
 +                              if(sciErr.iErr)
 +                              {
 +                                      printError(&sciErr, 0);
 +                                      return 0;
 +                              }
 +
 +                              pStVarTwo = (wchar_t **)MALLOC(sizeof(wchar_t *) * (m * n));
 +                              if (pStVarTwo== NULL)
 +                              {
 +                                      if (lenStVarTwo) {FREE(lenStVarTwo); lenStVarTwo = NULL;}
 +                                      Scierror(999,_("%s: Memory allocation error.\n"), fname);
 +                                      return 0;
 +                              }
 +
 +                              for (k = 0; k < m * n; k++)
 +                              {
 +                                      pStVarTwo[k] = (wchar_t*)MALLOC(sizeof(wchar_t) * (lenStVarTwo[k] + 1));
 +                                      if (pStVarTwo[k] == NULL)
 +                                      {
 +                                              freeArrayOfWideString(pStVarTwo, m * n);
 +                                              Scierror(999,_("%s: Memory allocation error.\n"), fname);
 +                                              return 0;
 +                                      }
 +                              }
 +
 +                              sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarTwo, &m, &n, lenStVarTwo, pStVarTwo);
 +                              if(sciErr.iErr)
 +                              {
 +                                      printError(&sciErr, 0);
 +                                      return 0;
 +                              }
 +
 +                              /* checks that 2nd parameter is not a array of regexp pattern */
 +                              if (pStVarTwo)
 +                              {
 +                                      for (k = 0; k < m * n; k++)
 +                                      {
 +                                              if (pStVarTwo[k])
 +                                              {
 +                                                      int lenStr = (int)wcslen(pStVarTwo[k]);
 +                                                      if (lenStr > 2)
 +                                                      {
 +                                                              if ( (pStVarTwo[k][0] == '/') && (pStVarTwo[k][lenStr - 1] == '/') )
 +                                                              {
 +                                                                      Scierror(999,_("%s: Wrong value for input argument #%d: a string expected, not a regexp pattern.\n"), fname, 2);
 +                                                                      if (lenStVarTwo) {FREE(lenStVarTwo); lenStVarTwo = NULL;}
 +                                                                      freeArrayOfWideString(pStVarTwo, m * n);
 +                                                                      return 0;
 +                                                              }
 +                                                      }
 +                                              }
 +                                      }
 +                              }
 +                              if (lenStVarTwo) {FREE(lenStVarTwo); lenStVarTwo = NULL;}
 +                              freeArrayOfWideString(pStVarTwo, m * n);
 +                      }
 +              }
 +      }
 +
 +      // others cases , we call %_strsplit macro
 +      OverLoad(lw);
 +
 +      return 0;
  }
  /*----------------------------------------------------------------------------*/
@@@ -276,11 -258,12 +276,11 @@@ lib /DEF:"$(ProjectDir)System_env_Impor
      <ClCompile Include="setScilabCharactersCodes.c" />
      <ClCompile Include="StringConvert.c" />
      <ClCompile Include="stringsCompare.c" />
 -    <ClCompile Include="stringsstrrchr.c" />
      <ClCompile Include="stringsstrrev.c" />
 +    <ClCompile Include="..\cpp\stripblanks.cpp" />
      <ClCompile Include="stringToDouble.c" />
 -    <ClCompile Include="stripblanks.c" />
      <ClCompile Include="stristr.c" />
-     <ClCompile Include="strsplitfunction.c" />
+     <ClCompile Include="strsplit.c" />
      <ClCompile Include="strsubst.c" />
      <ClCompile Include="tokens.c" />
    </ItemGroup>
      <ClInclude Include="pcre_internal.h" />
      <ClInclude Include="setScilabCharactersCodes.h" />
      <ClInclude Include="stringsCompare.h" />
 -    <ClInclude Include="stringsstrrchr.h" />
      <ClInclude Include="stringsstrrev.h" />
-     <ClInclude Include="strsplitfunction.h" />
+     <ClInclude Include="strsplit.h" />
      <ClInclude Include="tokens.h" />
      <ClInclude Include="ucp.h" />
    </ItemGroup>
      <ClCompile Include="stringsstrrev.c">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="stripblanks.c">
 +    <ClCompile Include="..\cpp\stripblanks.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
-     <ClCompile Include="strsplitfunction.c">
+     <ClCompile Include="strsplit.c">
        <Filter>Source Files</Filter>
      </ClCompile>
      <ClCompile Include="strsubst.c">
  #define __STRSPLITFUNCTION_H__
  
  #include <wchar.h>
 +#include "dynlib_string.h"
  
- typedef enum { 
-       STRSPLIT_NO_ERROR = 0,
-       STRSPLIT_INCORRECT_VALUE_ERROR = 1,
-       STRSPLIT_INCORRECT_ORDER_ERROR = 2,
-       STRSPLIT_MEMORY_ALLOCATION_ERROR = 3
+ typedef enum
+ {
+     STRSPLIT_NO_ERROR = 0,
+     STRSPLIT_INCORRECT_VALUE_ERROR = 1,
+     STRSPLIT_INCORRECT_ORDER_ERROR = 2,
+     STRSPLIT_MEMORY_ALLOCATION_ERROR = 3
  } strsplit_error;
  
  /**
@@@ -31,7 -31,7 +32,7 @@@
  * @param[out] error code
  * @return substrings
  */
- STRING_IMPEXP wchar_t **strsplitfunction(wchar_t * wcstringToSplit, double *indices, int sizeIndices, strsplit_error *ierr);
 -wchar_t **strsplit(wchar_t * wcstringToSplit, double *indices, int sizeIndices, strsplit_error *ierr);
++STRING_IMPEXP wchar_t **strsplit(wchar_t * wcstringToSplit, double *indices, int sizeIndices, strsplit_error *ierr);
  
  #endif /* __STRSPLITFUNCTION_H__ */
  /*----------------------------------------------------------------------------*/
@@@ -247,9 -285,9 +285,9 @@@ static void ExtensionFileIntoLowerCase(
      char *lastdot = NULL;
      char *ext = NULL;
  
 -    tmpfile = strdup(fichier);
 +    tmpfile = os_strdup(fichier);
      buffer = strtok(tmpfile, ".");
-     while ( buffer = strtok(NULL, "."))
+     while (buffer = strtok(NULL, "."))
      {
          lastdot = buffer;
      }
Simple merge
Simple merge