funcprot plugged. 22/11522/3
Cedric Delamarre [Thu, 16 May 2013 13:50:03 +0000 (15:50 +0200)]
Change-Id: I8895ee8f7880950dbcd9919660b24cfb8c300be5

19 files changed:
scilab/Scilab.sln
scilab/modules/ast/includes/runvisitor.hxx
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/core_yasp.vcxproj
scilab/modules/core/includes/core_gw.hxx
scilab/modules/core/sci_gateway/c/sci_funcprot.c [deleted file]
scilab/modules/core/sci_gateway/cpp/core_gw.cpp [moved from scilab/modules/core/src/cpp/core_gw.cpp with 97% similarity]
scilab/modules/core/sci_gateway/cpp/core_gw.vcxproj [moved from scilab/modules/core/src/cpp/core_gw.vcxproj with 88% similarity]
scilab/modules/core/sci_gateway/cpp/core_gw.vcxproj.filters [moved from scilab/modules/core/src/cpp/core_gw.vcxproj.filters with 63% similarity]
scilab/modules/core/sci_gateway/cpp/sci_funcprot.cpp [new file with mode: 0644]
scilab/modules/core/src/c/core.vcxproj
scilab/modules/core/src/c/core.vcxproj.filters
scilab/modules/core/src/c/funcprot.c [deleted file]
scilab/modules/core/src/fortran/inisci.f [deleted file]
scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp
scilab/modules/functions_manager/functions_manager.vcxproj
scilab/modules/system_env/includes/configvariable.hxx
scilab/modules/system_env/src/cpp/configvariable.cpp

index 9f3f934..f7a826b 100644 (file)
@@ -480,11 +480,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_yasp", "modules\core\c
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boolean_gw", "modules\boolean\src\cpp\boolean_gw.vcxproj", "{09E6CF32-EF2F-4C63-A2B8-B04964768BD6}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_gw", "modules\core\src\cpp\core_gw.vcxproj", "{3E933EB6-D427-4828-9B30-B6B9987491F6}"
-       ProjectSection(ProjectDependencies) = postProject
-               {1F4A0344-99ED-461B-BD53-1593788FB34D} = {1F4A0344-99ED-461B-BD53-1593788FB34D}
-       EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "io_gw", "modules\io\src\cpp\io_gw.vcxproj", "{719EC179-3AD3-4C6B-BBD8-B44C96B1A204}"
        ProjectSection(ProjectDependencies) = postProject
                {9252A034-7F22-4CB1-A634-4577DA69F2D0} = {9252A034-7F22-4CB1-A634-4577DA69F2D0}
@@ -627,6 +622,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparse_gw", "modules\sparse
                {13082624-97F9-47DB-A9A1-AD7D6BF3856A} = {13082624-97F9-47DB-A9A1-AD7D6BF3856A}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_gw", "modules\core\sci_gateway\cpp\core_gw.vcxproj", "{3E933EB6-D427-4828-9B30-B6B9987491F6}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -1515,14 +1512,6 @@ Global
                {09E6CF32-EF2F-4C63-A2B8-B04964768BD6}.Release|Win32.Build.0 = Release|Win32
                {09E6CF32-EF2F-4C63-A2B8-B04964768BD6}.Release|x64.ActiveCfg = Release|x64
                {09E6CF32-EF2F-4C63-A2B8-B04964768BD6}.Release|x64.Build.0 = Release|x64
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|Win32.ActiveCfg = Debug|Win32
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|Win32.Build.0 = Debug|Win32
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|x64.ActiveCfg = Debug|x64
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|x64.Build.0 = Debug|x64
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|Win32.ActiveCfg = Release|Win32
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|Win32.Build.0 = Release|Win32
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|x64.ActiveCfg = Release|x64
-               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|x64.Build.0 = Release|x64
                {719EC179-3AD3-4C6B-BBD8-B44C96B1A204}.Debug|Win32.ActiveCfg = Debug|Win32
                {719EC179-3AD3-4C6B-BBD8-B44C96B1A204}.Debug|Win32.Build.0 = Debug|Win32
                {719EC179-3AD3-4C6B-BBD8-B44C96B1A204}.Debug|x64.ActiveCfg = Debug|x64
@@ -1907,6 +1896,14 @@ Global
                {7FC7AEC9-4922-4864-83F1-EAED67981AAC}.Release|Win32.Build.0 = Release|Win32
                {7FC7AEC9-4922-4864-83F1-EAED67981AAC}.Release|x64.ActiveCfg = Release|x64
                {7FC7AEC9-4922-4864-83F1-EAED67981AAC}.Release|x64.Build.0 = Release|x64
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|Win32.ActiveCfg = Debug|Win32
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|Win32.Build.0 = Debug|Win32
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|x64.ActiveCfg = Debug|x64
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Debug|x64.Build.0 = Debug|x64
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|Win32.ActiveCfg = Release|Win32
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|Win32.Build.0 = Release|Win32
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|x64.ActiveCfg = Release|x64
+               {3E933EB6-D427-4828-9B30-B6B9987491F6}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index bf547fe..2c79b18 100644 (file)
@@ -43,6 +43,7 @@ extern "C" {
 #include "matrix_transpose.h"
 #include "os_swprintf.h"
 #include "more.h"
+#include "sciprint.h"
     //#include "HandleManagement.h"
 }
 
@@ -1673,6 +1674,42 @@ public :
         function foo
         endfunction
         */
+
+        // funcprot(0) : do nothing
+        // funcprot(1) && warning(on) : warning
+        // funcprot(2) : error
+        if (ConfigVariable::getFuncprot() == 1 && ConfigVariable::getWarningMode())
+        {
+            types::InternalType* pITFunc = symbol::Context::getInstance()->get(symbol::Symbol(e.name_get().name_get()));
+
+            if (pITFunc && pITFunc->isCallable())
+            {
+                wchar_t pwstFuncName[1024];
+                os_swprintf(pwstFuncName, 1024, L"%-24ls", e.name_get().name_get().c_str());
+                char* pstFuncName = wide_string_to_UTF8(pwstFuncName);
+
+                sciprint(_("Warning : redefining function: %s. Use funcprot(0) to avoid this message"), pstFuncName);
+                sciprint("\n");
+                FREE(pstFuncName);
+            }
+        }
+        else if (ConfigVariable::getFuncprot() == 2)
+        {
+            types::InternalType* pITFunc = symbol::Context::getInstance()->get(symbol::Symbol(e.name_get().name_get()));
+
+            if (pITFunc && pITFunc->isCallable())
+            {
+                char pstError[1024];
+                char* pstFuncName = wide_string_to_UTF8(e.name_get().name_get().c_str());
+                sprintf(pstError, _("It is not possible to redefine the %s primitive this way (see clearfun).\n"), pstFuncName);
+                wchar_t* pwstError = to_wide_string(pstError);
+                std::wstring wstError(pwstError);
+                FREE(pstFuncName);
+                FREE(pwstError);
+                throw ScilabError(wstError, 999, e.location_get());
+            }
+        }
+
         std::list<ast::Var *>::const_iterator  i;
 
         //get input parameters list
index ea395ea..c24eada 100644 (file)
@@ -15,7 +15,6 @@ 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 \
@@ -63,7 +62,6 @@ 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 \
@@ -82,7 +80,6 @@ src/c/hashtable/hashtable_itr.c \
 src/c/hashtable/hashtable_utility.c
 
 CORE_CPP_SOURCES = \
-src/cpp/core_gw.cpp \
 src/cpp/hashtable_core.cpp \
 src/cpp/namstr.cpp \
 src/cpp/search_functions.cpp \
@@ -146,7 +143,6 @@ 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 \
@@ -181,7 +177,6 @@ GATEWAY_C_SOURCES = \
        sci_gateway/c/sci_delbpt.c \
        sci_gateway/c/sci_macr2lst.c \
        sci_gateway/c/sci_errclear.c \
-       sci_gateway/c/sci_funcprot.c \
        sci_gateway/c/sci_newfun.c \
        sci_gateway/c/sci_dispbpt.c \
        sci_gateway/c/sci_intppty.c \
@@ -218,6 +213,7 @@ sci_gateway/fortran/where.f \
 sci_gateway/fortran/sci_f_iserror.f
 
 GATEWAY_CPP_SOURCES =  \
+       sci_gateway/cpp/core_gw.cpp \
        sci_gateway/cpp/sci_getmodules.cpp \
        sci_gateway/cpp/sci_clear.cpp \
        sci_gateway/cpp/sci_banner.cpp \
@@ -243,7 +239,8 @@ GATEWAY_CPP_SOURCES =       \
        sci_gateway/cpp/sci_stacksize.cpp \
        sci_gateway/cpp/sci_format.cpp \
        sci_gateway/cpp/sci_sciargs.cpp \
-       sci_gateway/cpp/sci_ieee.cpp
+       sci_gateway/cpp/sci_ieee.cpp \
+       sci_gateway/cpp/sci_funcprot.cpp
 
 
 libscicore_la_CPPFLAGS = \
index 446fd64..663a19b 100644 (file)
@@ -150,8 +150,8 @@ 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/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/md5.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/stack2.c src/c/xscion.c \
@@ -168,8 +168,8 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.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/typename.c src/c/inittypenames.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/backtrace.c src/c/signal_mgmt.c src/c/suspendProcess.c \
        src/c/setlines.c src/c/setformat.c \
@@ -177,11 +177,10 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.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/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/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 \
@@ -201,9 +200,8 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.c \
        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/istrue.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 \
        src/fortran/ftob.f src/fortran/seteol.f src/fortran/compcl.f \
@@ -216,11 +214,10 @@ am__libscicore_algo_la_SOURCES_DIST = src/c/inffic.c src/c/cs2st.c \
 am__objects_2 = libscicore_algo_la-inffic.lo \
        libscicore_algo_la-cs2st.lo libscicore_algo_la-intmacr2tree.lo \
        libscicore_algo_la-InitScilab.lo libscicore_algo_la-getval.lo \
-       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-stack3.lo libscicore_algo_la-str2sci.lo \
-       libscicore_algo_la-getmodules.lo \
+       libscicore_algo_la-md5.lo libscicore_algo_la-IsAScalar.lo \
+       libscicore_algo_la-texmacs.lo libscicore_algo_la-sciquit.lo \
+       libscicore_algo_la-stack1.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-isanan.lo \
@@ -253,8 +250,7 @@ am__objects_2 = libscicore_algo_la-inffic.lo \
        libscicore_algo_la-transposeMatrix.lo \
        libscicore_algo_la-recursionFunction.lo \
        libscicore_algo_la-typename.lo \
-       libscicore_algo_la-inittypenames.lo \
-       libscicore_algo_la-funcprot.lo libscicore_algo_la-eqid.lo \
+       libscicore_algo_la-inittypenames.lo libscicore_algo_la-eqid.lo \
        libscicore_algo_la-exitCodeValue.lo \
        libscicore_algo_la-getversion.lo \
        libscicore_algo_la-dynamic_tclsci.lo \
@@ -269,8 +265,7 @@ am__objects_2 = libscicore_algo_la-inffic.lo \
        libscicore_algo_la-hashtable.lo \
        libscicore_algo_la-hashtable_itr.lo \
        libscicore_algo_la-hashtable_utility.lo $(am__objects_1)
-am__objects_3 = libscicore_algo_la-core_gw.lo \
-       libscicore_algo_la-hashtable_core.lo \
+am__objects_3 = libscicore_algo_la-hashtable_core.lo \
        libscicore_algo_la-namstr.lo \
        libscicore_algo_la-search_functions.lo \
        libscicore_algo_la-demangle.lo \
@@ -287,11 +282,11 @@ am__objects_5 = clunit.lo getlin.lo allowptr.lo isany.lo hmcreate.lo \
        mrknmd.lo ref2val.lo stack.lo isbrk.lo xerbla.lo dtosci.lo \
        bexec.lo varfunptr.lo getfun.lo savlod.lo error.lo cvdm.lo \
        tradsl.lo mkindx.lo whatln.lo errmgr.lo defmat.lo mklist.lo \
-       sigbas.lo indxg.lo istrue.lo inisci.lo getfunction.lo \
-       extlarg.lo getstr.lo cvwm.lo storeglobal.lo lst2vars.lo \
-       basnms.lo ptrback.lo getch.lo ftob.lo seteol.lo compcl.lo \
-       expsum.lo copyvar.lo putid.lo itosci.lo stackr2d.lo \
-       stacki2d.lo stackc2i.lo isinstring.lo $(am__objects_4)
+       sigbas.lo indxg.lo istrue.lo getfunction.lo extlarg.lo \
+       getstr.lo cvwm.lo storeglobal.lo lst2vars.lo basnms.lo \
+       ptrback.lo getch.lo ftob.lo seteol.lo compcl.lo expsum.lo \
+       copyvar.lo putid.lo itosci.lo stackr2d.lo stacki2d.lo \
+       stackc2i.lo isinstring.lo $(am__objects_4)
 am_libscicore_algo_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
        $(am__objects_5)
 libscicore_algo_la_OBJECTS = $(am_libscicore_algo_la_OBJECTS)
@@ -302,27 +297,28 @@ am__objects_6 = libscicore_la-sci_mtlb_mode.lo \
        libscicore_la-sci_where.lo libscicore_la-sci_errcatch.lo \
        libscicore_la-sci_getmemory.lo libscicore_la-sci_havewindow.lo \
        libscicore_la-sci_delbpt.lo libscicore_la-sci_macr2lst.lo \
-       libscicore_la-sci_errclear.lo libscicore_la-sci_funcprot.lo \
-       libscicore_la-sci_newfun.lo libscicore_la-sci_dispbpt.lo \
-       libscicore_la-sci_intppty.lo libscicore_la-sci_gstacksize.lo \
-       libscicore_la-sci_funptr.lo libscicore_la-sci_return.lo \
-       libscicore_la-sci_clearfun.lo libscicore_la-sci_setbpt.lo \
-       libscicore_la-sci_what.lo libscicore_la-sci_predef.lo \
-       libscicore_la-sci_type.lo libscicore_la-sci_typename.lo \
-       libscicore_la-sci_mode.lo libscicore_la-sci_macr2tree.lo \
-       libscicore_la-sci_iserror.lo libscicore_la-sci_getdebuginfo.lo \
-       libscicore_la-sci_debug.lo libscicore_la-gw_core.lo \
-       libscicore_la-gw_user.lo libscicore_la-gw_user2.lo \
+       libscicore_la-sci_errclear.lo libscicore_la-sci_newfun.lo \
+       libscicore_la-sci_dispbpt.lo libscicore_la-sci_intppty.lo \
+       libscicore_la-sci_gstacksize.lo libscicore_la-sci_funptr.lo \
+       libscicore_la-sci_return.lo libscicore_la-sci_clearfun.lo \
+       libscicore_la-sci_setbpt.lo libscicore_la-sci_what.lo \
+       libscicore_la-sci_predef.lo libscicore_la-sci_type.lo \
+       libscicore_la-sci_typename.lo libscicore_la-sci_mode.lo \
+       libscicore_la-sci_macr2tree.lo libscicore_la-sci_iserror.lo \
+       libscicore_la-sci_getdebuginfo.lo libscicore_la-sci_debug.lo \
+       libscicore_la-gw_core.lo libscicore_la-gw_user.lo \
+       libscicore_la-gw_user2.lo \
        libscicore_la-sci_getvariablesonstack.lo \
        libscicore_la-sci_readgateway.lo libscicore_la-sci_comp.lo
 am__objects_7 = sci_f_mtlb_mode.lo sci_f_dispbpt.lo sci_f_intppty.lo \
        sci_f_macrovar.lo sci_f_errcatch.lo sci_f_setbpt.lo \
        sci_f_delbpt.lo where.lo sci_f_iserror.lo
-am__objects_8 = libscicore_la-sci_getmodules.lo \
-       libscicore_la-sci_clear.lo libscicore_la-sci_banner.lo \
-       libscicore_la-sci_quit.lo libscicore_la-sci_exit.lo \
-       libscicore_la-sci_argn.lo libscicore_la-sci_clearglobal.lo \
-       libscicore_la-sci_global.lo libscicore_la-sci_isglobal.lo \
+am__objects_8 = libscicore_la-core_gw.lo \
+       libscicore_la-sci_getmodules.lo libscicore_la-sci_clear.lo \
+       libscicore_la-sci_banner.lo libscicore_la-sci_quit.lo \
+       libscicore_la-sci_exit.lo libscicore_la-sci_argn.lo \
+       libscicore_la-sci_clearglobal.lo libscicore_la-sci_global.lo \
+       libscicore_la-sci_isglobal.lo \
        libscicore_la-sci_getscilabmode.lo libscicore_la-sci_getos.lo \
        libscicore_la-sci_exists.lo libscicore_la-sci_with_module.lo \
        libscicore_la-sci_lasterror.lo libscicore_la-sci_getversion.lo \
@@ -331,7 +327,7 @@ am__objects_8 = libscicore_la-sci_getmodules.lo \
        libscicore_la-sci_resume.lo libscicore_la-sci_abort.lo \
        libscicore_la-sci_who.lo libscicore_la-sci_stacksize.lo \
        libscicore_la-sci_format.lo libscicore_la-sci_sciargs.lo \
-       libscicore_la-sci_ieee.lo
+       libscicore_la-sci_ieee.lo libscicore_la-sci_funcprot.lo
 am_libscicore_la_OBJECTS = $(am__objects_6) $(am__objects_7) \
        $(am__objects_8)
 libscicore_la_OBJECTS = $(am_libscicore_la_OBJECTS)
@@ -649,7 +645,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 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/InitScilab.c src/c/getval.c src/c/md5.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 \
@@ -668,8 +664,8 @@ CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/intmacr2tree.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/typename.c src/c/inittypenames.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/backtrace.c src/c/signal_mgmt.c src/c/suspendProcess.c \
        src/c/setlines.c src/c/setformat.c \
@@ -678,7 +674,6 @@ CORE_C_SOURCES = src/c/inffic.c src/c/cs2st.c src/c/intmacr2tree.c \
        src/c/hashtable/hashtable_itr.c \
        src/c/hashtable/hashtable_utility.c $(am__append_1)
 CORE_CPP_SOURCES = \
-src/cpp/core_gw.cpp \
 src/cpp/hashtable_core.cpp \
 src/cpp/namstr.cpp \
 src/cpp/search_functions.cpp \
@@ -708,9 +703,8 @@ CORE_FORTRAN_SOURCES = src/fortran/clunit.f src/fortran/getlin.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/istrue.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 \
        src/fortran/ftob.f src/fortran/seteol.f src/fortran/compcl.f \
@@ -727,7 +721,6 @@ GATEWAY_C_SOURCES = \
        sci_gateway/c/sci_delbpt.c \
        sci_gateway/c/sci_macr2lst.c \
        sci_gateway/c/sci_errclear.c \
-       sci_gateway/c/sci_funcprot.c \
        sci_gateway/c/sci_newfun.c \
        sci_gateway/c/sci_dispbpt.c \
        sci_gateway/c/sci_intppty.c \
@@ -764,6 +757,7 @@ sci_gateway/fortran/where.f \
 sci_gateway/fortran/sci_f_iserror.f
 
 GATEWAY_CPP_SOURCES = \
+       sci_gateway/cpp/core_gw.cpp \
        sci_gateway/cpp/sci_getmodules.cpp \
        sci_gateway/cpp/sci_clear.cpp \
        sci_gateway/cpp/sci_banner.cpp \
@@ -789,7 +783,8 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_stacksize.cpp \
        sci_gateway/cpp/sci_format.cpp \
        sci_gateway/cpp/sci_sciargs.cpp \
-       sci_gateway/cpp/sci_ieee.cpp
+       sci_gateway/cpp/sci_ieee.cpp \
+       sci_gateway/cpp/sci_funcprot.cpp
 
 libscicore_la_CPPFLAGS = -I$(srcdir)/includes/ -I$(srcdir)/src/c/ \
        -I$(srcdir)/src/cpp/ \
@@ -1067,7 +1062,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-callinterf.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-commandwords.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-comparehandles.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-core_gw.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-coretable.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-cs2st.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-csignal.Plo@am__quote@
@@ -1078,7 +1072,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-eqid.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-exitCodeValue.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-freeArrayOfString.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-funcprot.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-getcommandlineargs.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-getdynamicdebuginfo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-getmaxMALLOC.Plo@am__quote@
@@ -1096,7 +1089,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-hashtable_utility.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-ifexpr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-inffic.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-inisci-c.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-inittypenames.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-intmacr2tree.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-isanan.Plo@am__quote@
@@ -1133,6 +1125,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_algo_la-version.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-core_gw.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_la-gw_core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_la-gw_user.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicore_la-gw_user2.Plo@am__quote@
@@ -1255,13 +1248,6 @@ libscicore_algo_la-md5.lo: src/c/md5.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-md5.lo `test -f 'src/c/md5.c' || echo '$(srcdir)/'`src/c/md5.c
 
-libscicore_algo_la-inisci-c.lo: src/c/inisci-c.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-inisci-c.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-inisci-c.Tpo -c -o libscicore_algo_la-inisci-c.lo `test -f 'src/c/inisci-c.c' || echo '$(srcdir)/'`src/c/inisci-c.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-inisci-c.Tpo $(DEPDIR)/libscicore_algo_la-inisci-c.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/inisci-c.c' object='libscicore_algo_la-inisci-c.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-inisci-c.lo `test -f 'src/c/inisci-c.c' || echo '$(srcdir)/'`src/c/inisci-c.c
-
 libscicore_algo_la-IsAScalar.lo: src/c/IsAScalar.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-IsAScalar.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-IsAScalar.Tpo -c -o libscicore_algo_la-IsAScalar.lo `test -f 'src/c/IsAScalar.c' || echo '$(srcdir)/'`src/c/IsAScalar.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-IsAScalar.Tpo $(DEPDIR)/libscicore_algo_la-IsAScalar.Plo
@@ -1591,13 +1577,6 @@ libscicore_algo_la-inittypenames.lo: src/c/inittypenames.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_algo_la-inittypenames.lo `test -f 'src/c/inittypenames.c' || echo '$(srcdir)/'`src/c/inittypenames.c
 
-libscicore_algo_la-funcprot.lo: src/c/funcprot.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-funcprot.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-funcprot.Tpo -c -o libscicore_algo_la-funcprot.lo `test -f 'src/c/funcprot.c' || echo '$(srcdir)/'`src/c/funcprot.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-funcprot.Tpo $(DEPDIR)/libscicore_algo_la-funcprot.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/funcprot.c' object='libscicore_algo_la-funcprot.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-funcprot.lo `test -f 'src/c/funcprot.c' || echo '$(srcdir)/'`src/c/funcprot.c
-
 libscicore_algo_la-eqid.lo: src/c/eqid.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-eqid.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-eqid.Tpo -c -o libscicore_algo_la-eqid.lo `test -f 'src/c/eqid.c' || echo '$(srcdir)/'`src/c/eqid.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_algo_la-eqid.Tpo $(DEPDIR)/libscicore_algo_la-eqid.Plo
@@ -1773,13 +1752,6 @@ libscicore_la-sci_errclear.lo: sci_gateway/c/sci_errclear.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_la-sci_errclear.lo `test -f 'sci_gateway/c/sci_errclear.c' || echo '$(srcdir)/'`sci_gateway/c/sci_errclear.c
 
-libscicore_la-sci_funcprot.lo: sci_gateway/c/sci_funcprot.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_la-sci_funcprot.lo -MD -MP -MF $(DEPDIR)/libscicore_la-sci_funcprot.Tpo -c -o libscicore_la-sci_funcprot.lo `test -f 'sci_gateway/c/sci_funcprot.c' || echo '$(srcdir)/'`sci_gateway/c/sci_funcprot.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_la-sci_funcprot.Tpo $(DEPDIR)/libscicore_la-sci_funcprot.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_funcprot.c' object='libscicore_la-sci_funcprot.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscicore_la-sci_funcprot.lo `test -f 'sci_gateway/c/sci_funcprot.c' || echo '$(srcdir)/'`sci_gateway/c/sci_funcprot.c
-
 libscicore_la-sci_newfun.lo: sci_gateway/c/sci_newfun.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscicore_la-sci_newfun.lo -MD -MP -MF $(DEPDIR)/libscicore_la-sci_newfun.Tpo -c -o libscicore_la-sci_newfun.lo `test -f 'sci_gateway/c/sci_newfun.c' || echo '$(srcdir)/'`sci_gateway/c/sci_newfun.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicore_la-sci_newfun.Tpo $(DEPDIR)/libscicore_la-sci_newfun.Plo
@@ -1962,13 +1934,6 @@ libscicore_la-sci_comp.lo: sci_gateway/c/sci_comp.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
 
-libscicore_algo_la-core_gw.lo: src/cpp/core_gw.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicore_algo_la-core_gw.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-core_gw.Tpo -c -o libscicore_algo_la-core_gw.lo `test -f 'src/cpp/core_gw.cpp' || echo '$(srcdir)/'`src/cpp/core_gw.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-core_gw.Tpo $(DEPDIR)/libscicore_algo_la-core_gw.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/cpp/core_gw.cpp' object='libscicore_algo_la-core_gw.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicore_algo_la-core_gw.lo `test -f 'src/cpp/core_gw.cpp' || echo '$(srcdir)/'`src/cpp/core_gw.cpp
-
 libscicore_algo_la-hashtable_core.lo: src/cpp/hashtable_core.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicore_algo_la-hashtable_core.lo -MD -MP -MF $(DEPDIR)/libscicore_algo_la-hashtable_core.Tpo -c -o libscicore_algo_la-hashtable_core.lo `test -f 'src/cpp/hashtable_core.cpp' || echo '$(srcdir)/'`src/cpp/hashtable_core.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicore_algo_la-hashtable_core.Tpo $(DEPDIR)/libscicore_algo_la-hashtable_core.Plo
@@ -2032,6 +1997,13 @@ libscicore_algo_la-runner.lo: src/cpp/runner.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicore_algo_la-runner.lo `test -f 'src/cpp/runner.cpp' || echo '$(srcdir)/'`src/cpp/runner.cpp
 
+libscicore_la-core_gw.lo: sci_gateway/cpp/core_gw.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicore_la-core_gw.lo -MD -MP -MF $(DEPDIR)/libscicore_la-core_gw.Tpo -c -o libscicore_la-core_gw.lo `test -f 'sci_gateway/cpp/core_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/core_gw.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-core_gw.Tpo $(DEPDIR)/libscicore_la-core_gw.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/core_gw.cpp' object='libscicore_la-core_gw.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicore_la-core_gw.lo `test -f 'sci_gateway/cpp/core_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/core_gw.cpp
+
 libscicore_la-sci_getmodules.lo: sci_gateway/cpp/sci_getmodules.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicore_la-sci_getmodules.lo -MD -MP -MF $(DEPDIR)/libscicore_la-sci_getmodules.Tpo -c -o libscicore_la-sci_getmodules.lo `test -f 'sci_gateway/cpp/sci_getmodules.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getmodules.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-sci_getmodules.Tpo $(DEPDIR)/libscicore_la-sci_getmodules.Plo
@@ -2214,6 +2186,13 @@ libscicore_la-sci_ieee.lo: sci_gateway/cpp/sci_ieee.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicore_la-sci_ieee.lo `test -f 'sci_gateway/cpp/sci_ieee.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_ieee.cpp
 
+libscicore_la-sci_funcprot.lo: sci_gateway/cpp/sci_funcprot.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicore_la-sci_funcprot.lo -MD -MP -MF $(DEPDIR)/libscicore_la-sci_funcprot.Tpo -c -o libscicore_la-sci_funcprot.lo `test -f 'sci_gateway/cpp/sci_funcprot.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_funcprot.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicore_la-sci_funcprot.Tpo $(DEPDIR)/libscicore_la-sci_funcprot.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/sci_funcprot.cpp' object='libscicore_la-sci_funcprot.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicore_la-sci_funcprot.lo `test -f 'sci_gateway/cpp/sci_funcprot.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_funcprot.cpp
+
 .f.o:
        $(F77COMPILE) -c -o $@ $<
 
@@ -2370,9 +2349,6 @@ indxg.lo: src/fortran/indxg.f
 istrue.lo: src/fortran/istrue.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o istrue.lo `test -f 'src/fortran/istrue.f' || echo '$(srcdir)/'`src/fortran/istrue.f
 
-inisci.lo: src/fortran/inisci.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o inisci.lo `test -f 'src/fortran/inisci.f' || echo '$(srcdir)/'`src/fortran/inisci.f
-
 getfunction.lo: src/fortran/getfunction.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o getfunction.lo `test -f 'src/fortran/getfunction.f' || echo '$(srcdir)/'`src/fortran/getfunction.f
 
index a2a68e2..6cd425b 100644 (file)
       <Project>{9594ac02-20ee-4fbf-95b4-bfa5865ed7ca}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="src\cpp\core_gw.vcxproj">
+    <ProjectReference Include="sci_gateway\cpp\core_gw.vcxproj">
       <Project>{3e933eb6-d427-4828-9b30-b6b9987491f6}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
     <ProjectReference Include="src\c\core.vcxproj">
       <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
index a0bf6d0..89ecc4f 100644 (file)
@@ -53,5 +53,6 @@ CPP_GATEWAY_PROTOTYPE(sci_stacksize);
 CPP_GATEWAY_PROTOTYPE(sci_sciargs);
 CPP_GATEWAY_PROTOTYPE(sci_format);
 CPP_GATEWAY_PROTOTYPE(sci_ieee);
+CPP_GATEWAY_PROTOTYPE(sci_funcprot);
 
 #endif /* __CORE_GW_HXX__ */
diff --git a/scilab/modules/core/sci_gateway/c/sci_funcprot.c b/scilab/modules/core/sci_gateway/c/sci_funcprot.c
deleted file mode 100644 (file)
index 56784ac..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2006 - INRIA - Allan CORNET
- * Copyright (C) 2009 - DIGITEO - Allan CORNET
- * 
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at    
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- */
-/*--------------------------------------------------------------------------*/
-#include "gw_core.h"
-#include "funcprot.h"
-#include "api_scilab.h"
-#include "Scierror.h"
-#include "localization.h"
-#include "MALLOC.h"
-/*--------------------------------------------------------------------------*/
-int C2F(sci_funcprot)(char *fname, void* pvApiCtx)
-{
-       SciErr sciErr;
-       CheckLhs(1,1);
-       CheckRhs(0,1);
-
-       if (Rhs == 0)
-       {
-               int m_out = 0, n_out = 0;
-               double dOut = (double) getfuncprot();
-
-               m_out = 1;  n_out = 1;
-               sciErr = createMatrixOfDouble(pvApiCtx, Rhs + 1, m_out, n_out, &dOut);
-               if(sciErr.iErr)
-               {
-                       printError(&sciErr, 0);
-            Scierror(999,_("%s: Memory allocation error.\n"), fname);
-                       return 0;
-               }
-
-               LhsVar(1) = Rhs + 1; 
-               PutLhsVar();
-       }
-       else if (Rhs == 1)
-       {
-               int ilevel = 0;
-               int m1 = 0, n1 = 0;
-               int iType1                                              = 0;
-               int *piAddressVarOne    = NULL;
-               double *pdVarOne                        = NULL;
-
-               /* get Address of inputs */
-               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;
-               }
-
-               sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType1);
-               if(sciErr.iErr)
-               {
-                       printError(&sciErr, 0);
-            Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
-                       return 0;
-               }
-
-               /* check input type */
-               if ( iType1 != sci_matrix )
-               {
-                       Scierror(999,_("%s: Wrong type for input argument #%d: A scalar expected.\n"),fname,1);
-                       return 0;
-               }
-
-               sciErr = getMatrixOfDouble(pvApiCtx, piAddressVarOne,&m1,&n1,&pdVarOne);
-               if(sciErr.iErr)
-               {
-                       printError(&sciErr, 0);
-            Scierror(999, _("%s: Can not read input argument #%d.\n"), fname, 1);
-                       return 0;
-               }
-
-               //if ((m1 > 0) && (n1>0))
-               //if ( (m1 != n1) && (n1 != 1) ) 
-               if( n1 != 1 || m1 != 1)
-               {
-                       Scierror(999,_("%s: Wrong size for input argument #%d: A scalar expected.\n"),fname,1);
-                       return 0;
-               }
-
-
-               ilevel = (int) *pdVarOne;
-
-               if (*pdVarOne != (double)ilevel)
-               {
-                       Scierror(999,_("%s: Wrong value for input argument #%d: 1,2 or 3 expected.\n"),fname,1);
-                       return 0;
-               }
-
-               if ( !setfuncprot(ilevel) )
-               {
-                       Scierror(999,_("%s: Wrong value for input argument #%d: 1,2 or 3 expected.\n"),fname,1);
-               }
-               else
-               {
-                       LhsVar(1) = 0; 
-                       PutLhsVar();
-               }
-       }
-       return 0;
-}
-/*--------------------------------------------------------------------------*/
similarity index 97%
rename from scilab/modules/core/src/cpp/core_gw.cpp
rename to scilab/modules/core/sci_gateway/cpp/core_gw.cpp
index c30c228..6fe13fa 100644 (file)
@@ -53,5 +53,6 @@ int CoreModule::Load()
     symbol::Context::getInstance()->addFunction(Function::createFunction(L"format", &sci_format, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(Function::createFunction(L"ieee", &sci_ieee, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(Function::createFunction(L"typename", &sci_typename, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(Function::createFunction(L"funcprot", &sci_funcprot, MODULE_NAME));
     return 1;
 }
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_format.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_ieee.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_sciargs.cpp" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_getdebuginfo.c" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_type.c" />
-    <ClCompile Include="banner.cpp" />
+    <ClCompile Include="..\..\src\cpp\banner.cpp" />
+    <ClCompile Include="..\..\src\cpp\runner.cpp" />
+    <ClCompile Include="sci_format.cpp" />
+    <ClCompile Include="sci_funcprot.cpp" />
+    <ClCompile Include="sci_ieee.cpp" />
+    <ClCompile Include="sci_sciargs.cpp" />
+    <ClCompile Include="..\c\sci_getdebuginfo.c" />
+    <ClCompile Include="..\c\sci_type.c" />
     <ClCompile Include="core_gw.cpp" />
-    <ClCompile Include="runner.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_abort.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_argn.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_banner.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_clear.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_clearglobal.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_error.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_exists.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_exit.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getmd5.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getmodules.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getos.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getscilabmode.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getversion.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_global.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_isglobal.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_lasterror.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_pause.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_quit.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_resume.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_stacksize.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_warning.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_who.cpp" />
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_with_module.cpp" />
+    <ClCompile Include="sci_abort.cpp" />
+    <ClCompile Include="sci_argn.cpp" />
+    <ClCompile Include="sci_banner.cpp" />
+    <ClCompile Include="sci_clear.cpp" />
+    <ClCompile Include="sci_clearglobal.cpp" />
+    <ClCompile Include="sci_error.cpp" />
+    <ClCompile Include="sci_exists.cpp" />
+    <ClCompile Include="sci_exit.cpp" />
+    <ClCompile Include="sci_getmd5.cpp" />
+    <ClCompile Include="sci_getmodules.cpp" />
+    <ClCompile Include="sci_getos.cpp" />
+    <ClCompile Include="sci_getscilabmode.cpp" />
+    <ClCompile Include="sci_getversion.cpp" />
+    <ClCompile Include="sci_global.cpp" />
+    <ClCompile Include="sci_isglobal.cpp" />
+    <ClCompile Include="sci_lasterror.cpp" />
+    <ClCompile Include="sci_pause.cpp" />
+    <ClCompile Include="sci_quit.cpp" />
+    <ClCompile Include="sci_resume.cpp" />
+    <ClCompile Include="sci_stacksize.cpp" />
+    <ClCompile Include="sci_warning.cpp" />
+    <ClCompile Include="sci_who.cpp" />
+    <ClCompile Include="sci_with_module.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\banner.hxx" />
       <Project>{64e090da-dcb5-4f4d-93d7-e88ddec9c2ef}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
-    <ProjectReference Include="..\c\core.vcxproj">
+    <ProjectReference Include="..\..\src\c\core.vcxproj">
       <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
     </ProjectReference>
   </ItemGroup>
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="banner.cpp">
+    <ClCompile Include="core_gw.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="core_gw.cpp">
+    <ClCompile Include="..\..\src\cpp\banner.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\cpp\runner.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="runner.cpp">
+    <ClCompile Include="sci_format.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_abort.cpp">
+    <ClCompile Include="sci_ieee.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_argn.cpp">
+    <ClCompile Include="sci_sciargs.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_banner.cpp">
+    <ClCompile Include="..\c\sci_getdebuginfo.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_clear.cpp">
+    <ClCompile Include="..\c\sci_type.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_clearglobal.cpp">
+    <ClCompile Include="sci_abort.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_error.cpp">
+    <ClCompile Include="sci_argn.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_exists.cpp">
+    <ClCompile Include="sci_banner.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_exit.cpp">
+    <ClCompile Include="sci_clear.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getmd5.cpp">
+    <ClCompile Include="sci_clearglobal.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getmodules.cpp">
+    <ClCompile Include="sci_error.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getos.cpp">
+    <ClCompile Include="sci_exists.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getscilabmode.cpp">
+    <ClCompile Include="sci_exit.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_getversion.cpp">
+    <ClCompile Include="sci_getmd5.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_global.cpp">
+    <ClCompile Include="sci_getmodules.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_isglobal.cpp">
+    <ClCompile Include="sci_getos.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_lasterror.cpp">
+    <ClCompile Include="sci_getscilabmode.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_pause.cpp">
+    <ClCompile Include="sci_getversion.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_quit.cpp">
+    <ClCompile Include="sci_global.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_resume.cpp">
+    <ClCompile Include="sci_isglobal.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_stacksize.cpp">
+    <ClCompile Include="sci_lasterror.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_warning.cpp">
+    <ClCompile Include="sci_pause.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_who.cpp">
+    <ClCompile Include="sci_quit.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_with_module.cpp">
+    <ClCompile Include="sci_resume.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_sciargs.cpp">
+    <ClCompile Include="sci_stacksize.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_type.c">
+    <ClCompile Include="sci_warning.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_getdebuginfo.c">
+    <ClCompile Include="sci_who.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_format.cpp">
+    <ClCompile Include="sci_with_module.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\cpp\sci_ieee.cpp">
+    <ClCompile Include="sci_funcprot.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_funcprot.cpp b/scilab/modules/core/sci_gateway/cpp/sci_funcprot.cpp
new file mode 100644 (file)
index 0000000..f2817aa
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
+ *
+ *  This file must be used under the terms of the CeCILL.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "core_gw.hxx"
+#include "function.hxx"
+#include "configvariable.hxx"
+#include "double.hxx"
+
+extern "C"
+{
+#include "localization.h"
+#include "Scierror.h"
+}
+
+types::Function::ReturnValue sci_funcprot(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    int iFuncprotMode = 0;
+
+    if (in.size() > 1)
+    {
+        Scierror(77, _("%s: Wrong number of input argument(s): %d to %d expected."), "funcprot", 0, 1);
+        return types::Function::Error;
+    }
+
+    if (_iRetCount != 1)
+    {
+        Scierror(77, _("%s: Wrong number of output argument(s): %d expected."), "funcprot", 1);
+        return types::Function::Error;
+    }
+
+    if (in.size() == 0)
+    {
+        iFuncprotMode = ConfigVariable::getFuncprot();
+        out.push_back(new types::Double((double)iFuncprotMode));
+        return types::Function::OK;
+    }
+
+    if (in[0]->isDouble() == false)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A scalar expected.\n"), "funcprot", 1);
+        return types::Function::Error;
+    }
+
+    types::Double* pDblIn = in[0]->getAs<types::Double>();
+
+    if (pDblIn->isScalar() == false)
+    {
+        Scierror(999, _("%s: Wrong size for input argument #%d: A scalar expected.\n"), "funcprot", 1);
+        return types::Function::Error;
+    }
+
+    iFuncprotMode = (int)pDblIn->get(0);
+    if (pDblIn->get(0) != (double)iFuncprotMode)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: An integer value expected.\n"), "funcprot", 1);
+        return types::Function::Error;
+    }
+
+    if (iFuncprotMode != 0 && iFuncprotMode != 1 && iFuncprotMode != 2)
+    {
+        Scierror(999, _("%s: Wrong value for input argument #%d: 0, 1 or 2 expected.\n"), "funcprot", 1);
+        return types::Function::Error;
+    }
+
+    out.push_back(new types::Double((double)ConfigVariable::getFuncprot()));
+    ConfigVariable::setFuncprot(iFuncprotMode);
+    return types::Function::OK;
+}
index 3475634..9d1e6ab 100644 (file)
@@ -243,7 +243,6 @@ cd ..
     <ClCompile Include="exitCodeValue.c" />
     <ClCompile Include="force_link.c" />
     <ClCompile Include="freeArrayOfString.c" />
-    <ClCompile Include="funcprot.c" />
     <ClCompile Include="Funtab.c" />
     <ClCompile Include="getcommandlineargs.c" />
     <ClCompile Include="getdynamicdebuginfo.c" />
@@ -298,7 +297,6 @@ cd ..
     <ClCompile Include="..\..\sci_gateway\c\sci_dispbpt.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_errcatch.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_errclear.c" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_funcprot.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_funptr.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_getdebuginfo.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_getmd5.c" />
@@ -610,4 +608,4 @@ cd ..
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
index 4f94d64..18f2762 100644 (file)
@@ -62,9 +62,6 @@
     <ClCompile Include="freeArrayOfString.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="funcprot.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="Funtab.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\sci_errclear.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_funcprot.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\sci_funptr.c">
       <Filter>Source Files</Filter>
     </ClCompile>
   <ItemGroup>
     <CustomBuildStep Include="..\..\includes\machine.h.vc" />
   </ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/scilab/modules/core/src/c/funcprot.c b/scilab/modules/core/src/c/funcprot.c
deleted file mode 100644 (file)
index d98f32d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2009 - DIGITEO - Allan CORNET
-* 
-* This file must be used under the terms of the CeCILL.
-* This source file is licensed as described in the file COPYING, which
-* you should have received as part of this distribution.  The terms
-* are also available at    
-* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-*
-*/
-/*--------------------------------------------------------------------------*/
-#include "funcprot.h"
-/*--------------------------------------------------------------------------*/
-extern MPROT_struct C2F(mprot);
-/*--------------------------------------------------------------------------*/
-int C2F(initfuncprot)()
-{
-       C2F(mprot).macprt = 1;
-       return 0;
-}
-/*--------------------------------------------------------------------------*/
-int getfuncprot(void)
-{
-       return C2F(mprot).macprt;
-}
-/*--------------------------------------------------------------------------*/
-BOOL setfuncprot(int level)
-{
-       if ( (level == 0) || (level == 1) || (level == 2) )
-       {
-               C2F(mprot).macprt = level;
-               return TRUE;
-       }
-       return FALSE;
-}
-/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/core/src/fortran/inisci.f b/scilab/modules/core/src/fortran/inisci.f
deleted file mode 100644 (file)
index f0c8728..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-c Copyright (C) INRIA
-c 
-c This file must be used under the terms of the CeCILL.
-c This source file is licensed as described in the file COPYING, which
-c you should have received as part of this distribution.  The terms
-c are also available at    
-c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-
-      subroutine inisci( ini1, vsizr, ierr)
-c!Purpose 
-c     scilab initialisation
-c!Parameters
-c     ini1 :
-c     = -1  for silent initialization
-c     = -3  for special io initialization 
-c     vsizr: initial stack size
-c     ierr : return error flag
-c!   
-c====================================================================
-      integer        ierr,ini1,vsizr
-      include 'stack.h'
-      parameter (nz1=nsiz-1,nz2=nsiz-2)
-c     
-c     common for Control-C interruptions
-      logical iflag,interruptible
-cDEC$ IF DEFINED (FORDLL)
-cDEC$ ATTRIBUTES DLLIMPORT:: /basbrk/
-cDEC$ ENDIF            
-      common /basbrk/ iflag,interruptible
-c     scilab function protection mode
-      integer macprt
-cDEC$ IF DEFINED (FORDLL)
-cDEC$ ATTRIBUTES DLLIMPORT:: /mprot/
-cDEC$ ENDIF            
-      common /mprot/ macprt
-c     mmode : matlab ops compatibilty mode
-cDEC$ IF DEFINED (FORDLL)
-cDEC$ ATTRIBUTES DLLIMPORT:: /mtlbc/
-cDEC$ ENDIF            
-      common /mtlbc/ mmode
-c     
-c     simpmd : rational fraction simplification mode
-      integer simpmd
-cDEC$ IF DEFINED (FORDLL)
-cDEC$ ATTRIBUTES DLLIMPORT:: /csimp/
-cDEC$ ENDIF            
-      common /csimp/  simpmd
-c     ippty: interfaces properties
-      parameter (mxbyptr=40)
-      integer byptr(mxbyptr),nbyptr
-cDEC$ IF DEFINED (FORDLL)
-cDEC$ ATTRIBUTES DLLIMPORT:: /ippty/
-cDEC$ ENDIF            
-      common /ippty/ byptr,nbyptr
-
-      logical first
-      double precision dlamch
-      integer k,l,mode(2),vsizg,stacksize
-      integer eps(nsiz),im(nsiz),exp(nsiz),pi(nsiz),bl(nsiz),io(nsiz)
-      integer true(nsiz),false(nsiz),dollar(nsiz)
-      integer idloc(nsiz)
-      integer offset,goffset
-      integer iadr,sadr
-      
-      character bufcomp*(bsiz)
-      character bufsci*(bsiz)
-      character bufscihome*(bsiz)
-      character buftmp*(bsiz)
-
-c     
-      double precision  iov(2)
-      character*(nlgh) vname 
-c  
-      data im/673714744,nz1*673720360/,exp/673713720,nz1*673720360/
-      data pi/672274744,nz1*673720360/,bl/nsiz*673720360/
-      data eps/471404088,nz1*673720360/,io/672666168,nz1*673720360/
-      data dollar/673720359,nz1*673720360/
-      data first/.true./
-      data true/673717560,nz1*673720360/,false/673713976,nz1*673720360/
-      
-c     
-c     mprot used to protect function see funcprot.c
-      save /basbrk/,/mprot/
-
-c     
-
-      iadr(l)=l+l-1
-      sadr(l)=(l/2)+1
-
-      ierr=0
-      mode(2)=0
-      ieee=0
-
-c     initialization call
-c     -------------------
-
-c     initialization C environment
-      call initscilab
-c     
-c     .  scilab function protection mode
-c     .  ------------------------------
-      call initfuncprot
-c     
-c     .  standard i/o initialization
-c     .  ----------------------------
-c     .  rte = unit number for terminal input
-      err=0
-      if(ini1.ne.-3) then
-         rte = 5
-         mode(1)=0
-         call clunit(rte,buf,mode)
-         if(err.gt.0) then
-            call error(241)
-            ierr=err
-            return
-         endif
-      else
-         rte=9999
-      endif
-      rio = rte
-c     .  wte = unit number for terminal output
-      if(ini1.ne.-3) then
-         wte = 6
-         mode(1)=1
-         call clunit(wte,buf,mode)
-         if(err.gt.0) then
-            call error(240)
-            ierr=err
-            return
-         endif
-      else
-         wte=9999
-      endif
-c     
-      rio=rte
-c     
-c     .  Control-C recovery
-c     .  ------------------
-      if (first) then
-         interruptible=.true.
-         first=.false.
-      endif
-c     
-c     .  random number seed
-c     .  ------------------
-      ran(1) =  0
-      ran(2) =  0
-c     
-c     .  initial format for number display
-c     .  ---------------------------------
-      lct(6) =  1
-      lct(7) = 10
-c     
-c     .  initial debug mode
-c     .  ------------------
-      ddt = 0
-
-c     .  initial type names
-c     .  ------------------
-      call inittypenames()
-      if(err.gt.0) then
-         ierr=err
-         return
-      endif
-c     .  initial interface properties
-c     .  ----------------------------
-      call setippty(0)
-c      ier= graphicsmodels()
-c     
-c     .  Stack
-c     .  -----
-c     
-c     . initial values for number of local and global variables
-c @TODO : What is 768 (512 + 256) ?
-      isiz=isizt-768
-
-c     .  memory allocation
-c     get default stackize from c
-      call getdefaultstacksize(stacksize)
-      offset=0
-      call scimem(vsizr,offset)
-      stk(1) = stacksize
-      lstk(1) =   offset+1
-c     . hard predefined variables
-      goffset=0
-c     get default global stackize from c      
-      call getdefaultgstacksize(vsizg)
-      call scigmem(vsizg,goffset)
-
-      gtop=isiz+1
-      lstk(gtop+1)=goffset+1
-      gbot=isizt
-      lstk(gbot)=lstk(gtop+1)+vsizg-1
-c
-c     13 is the number of predefined variables 
-c     14 - 1 blank not include
-      bot = isiz - 13
-      bbot = bot
-      bot0 = bot
-c     memory requested for predefined variables 
-c     mxn bmat -> size : sadr(2+m*n+2)
-c     $        -> size : sadr(10-1) + 2 
-c     mxn mat  -> size : sadr(3)+m*n*(it+1)
-c     string   -> size : sadr(6+nchar)+1
-c     3 strings
-c     4 booleans
-      call getsci(bufsci,nbsci)
-c      call getscihome(bufscihome,nbscihome)
-      call gettmpdir(buftmp,nbtmpdir)
-      lpvar = (sadr(10-1) + 2) 
-     $     + 4*sadr(5) 
-     $     + 3*(sadr(3)+1)
-     $     + 2*(sadr(3)+2)
-     $     + 1*(sadr(6+nbsci)+1)
-     $     + 1*(sadr(6+nbscihome)+1)
-     $     + 1*(sadr(6+nbtmpdir)+1)
-
-      l=vsizr-lpvar
-      k=bot
-      lstk(k)=lstk(1)-1+l
-c     . SCI
-      vname = ' '
-      vname(1:3) =  "SCI"
-      call cvname(idloc,vname,0)
-      call cresmatvar(idloc,k,bufsci,nbsci)
-      k=k+1
-c     . SCIHOME
-      vname = ' '
-      vname(1:7) =  "SCIHOME"
-      call cvname(idloc,vname,0)
-      call cresmatvar(idloc,k,bufscihome,nbscihome)
-      k=k+1      
-c     . TMPDIR
-      vname = ' '
-      vname(1:6) = "TMPDIR"
-      call cvname(idloc,vname,0)
-      call cresmatvar(idloc,k,buftmp,nbtmpdir)
-      k=k+1
-c     . %gui
-      vname = ' '
-      vname(1:4) = "%gui"
-      call withgui(irep)
-      call cvname(idloc,vname,0)
-      call crebmatvar(idloc,k,1,1,irep)
-      k=k+1
-c     . %fftw 
-      vname = ' '
-      vname(1:5) = "%fftw"
-      call withfftw(irep)
-      call cvname(idloc,vname,0)
-      call crebmatvar(idloc,k,1,1,irep)
-      k=k+1
-c     .  $    : formal index
-      call putid(idstk(1,k),dollar)
-      il=iadr(lstk(k))
-c @TODO: What is 2 ?
-      istk(il)=2
-c @TODO: What is 1 ?
-      istk(il+1)=1
-c @TODO: What is 1 ?
-      istk(il+2)=1
-c @TODO: Why is 0 ?
-      istk(il+3)=0
-c @TODO: What is 39 ?
-      istk(il+4)=39
-c @TODO: What is 40 ?
-      istk(il+5)=40
-c @TODO: What is 40 ?
-      istk(il+6)=40
-c @TODO: What is 40 ?
-      istk(il+7)=40
-c @TODO: What is 1 ?
-      istk(il+8)=1
-c @TODO: What is 3 ?
-      istk(il+9)=3
-c @TODO: Why 10 ?
-      lw=sadr(il+10)
-      stk(lw)=0.0d0
-      stk(lw+1)=1.0d0
-      lstk(k+1)=lw+2
-      k=k+1
-c     .  %t   : True boolean
-      call crebmatvar(true,k,1,1,1)
-      k=k+1
-c     .  %f   : False boolean
-      call crebmatvar(false,k,1,1,0)
-      k=k+1
-c     .  %eps : machine precision 
-      call crematvar(eps,k,0,1,1,dlamch('p'),0.0d0)
-      leps=sadr( iadr(lstk(k)) +4)
-      k=k+1
-c     .  %io : standard input&output
-      iov(1)=dble(rte)
-      iov(2)=dble(wte)
-      call crematvar(io,k,0,1,2,iov,0.0d0)
-      k=k+1
-c     .  %i : sqrt(-1)
-      call crematvar(im,k,1,1,1,0.0d0,1.0d0)
-      k=k+1
-c     .  %e : exp(1)
-      call crematvar(exp,k,0,1,1,2.71828182845904530d+0,0.0d0)
-      k=k+1
-c     .  %pi 
-      call crematvar(pi,k,0,1,1,3.14159265358979320d+0,0.0d0)
-      k=k+1
-c     .  blanc. Memory used by getsym to store parsed number
-C     .  then by getnum.f and macro.f to retreive it (stk(lstk(isiz) -))
-
-      call crematvar(bl,k,0,1,1,0.0d0,0.0d0)
-      k=k+1
-c     
-c
-c     --------------
-c     initialize
-c     --------------
-c
-c     compilation flag
-      comp(1) =   0
-      comp(2) =   0
-      comp(3) =   0
-c     error indicators
-      err     =   0
-      errct   =   -1
-      err1    =   0
-      err2    =   0
-      catch   =   0 
-c     recursion
-      fun     =   0
-      macr    =   0
-      niv     =   0
-      paus    =   0
-      pt      =   0
-c     stack variable
-      top     =   0
-c     debug mode
-      lcntr   =   0
-      nmacs   =   0
-      lgptrs(1)=  1
-      wmac    =   0
-      mmode   =   0
-      simpmd  =   1
-
-      return
-      end
-
index adf3dbf..29e6f0e 100644 (file)
@@ -42,7 +42,7 @@ Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount, types::
 {
     int iErr            = 0;
     bool bErrCatch             = false;
-    bool bMute          = true;
+    bool bMute          = false;
     wchar_t* pstMsg     = NULL;
     Exp* pExp           = NULL;
     wchar_t *pstCommand = NULL;
@@ -75,6 +75,8 @@ Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount, types::
             Scierror(999, _("%s: Wrong value for input argument #%d: 'errcatch' expected.\n"), "execstr", 2);
             return Function::Error;
         }
+
+        bMute = true;
     }
 
     //3rd parameter
index 2246323..f0adacb 100644 (file)
     <ProjectReference Include="..\console\src\c\console.vcxproj">
       <Project>{445d3b85-c9b1-498b-9c88-0a3c2390b1cc}</Project>
     </ProjectReference>
-    <ProjectReference Include="..\core\src\cpp\core_gw.vcxproj">
+    <ProjectReference Include="..\core\sci_gateway\cpp\core_gw.vcxproj">
       <Project>{3e933eb6-d427-4828-9b30-b6b9987491f6}</Project>
-      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
     <ProjectReference Include="..\core\src\c\core.vcxproj">
       <Project>{c6e2bc17-34d8-46e4-85f3-6293cb21adcd}</Project>
index 13c5eba..3943a7b 100644 (file)
@@ -334,6 +334,14 @@ private :
 public :
     static void setSimpMode(int _iSimpMode);
     static int getSimpMode();
+
+    // funcprot mode
+private :
+    static int m_iFuncprot;
+
+public :
+    static void setFuncprot(int _iFuncprot);
+    static int getFuncprot();
 };
 
 #endif /* !__CONFIGVARIABLE_HXX__ */
index eee15bd..66a19a6 100644 (file)
@@ -946,3 +946,22 @@ int ConfigVariable::getSimpMode()
 /*
 ** \}
 */
+
+/*
+** funcprot Mode
+** \{
+*/
+int ConfigVariable::m_iFuncprot = 1;
+
+void ConfigVariable::setFuncprot(int _iFuncprot)
+{
+    m_iFuncprot = _iFuncprot;
+}
+
+int ConfigVariable::getFuncprot()
+{
+    return m_iFuncprot;
+}
+/*
+** \}
+*/