Xcos gateways: rewrite getscicosvars to C++ 93/16193/8
Paul Bignier [Thu, 19 Mar 2015 10:53:56 +0000 (11:53 +0100)]
Change-Id: I99a8dc056bdd0075a3d95dcab3972d37ec5a318e

15 files changed:
scilab/modules/scicos/Makefile.am
scilab/modules/scicos/Makefile.in
scilab/modules/scicos/includes/gw_scicos.h
scilab/modules/scicos/includes/gw_scicos.hxx
scilab/modules/scicos/sci_gateway/c/sci_getscicosvars.c [deleted file]
scilab/modules/scicos/sci_gateway/cpp/sci_getscicosvars.cpp [new file with mode: 0644]
scilab/modules/scicos/sci_gateway/scicos_gateway.xml
scilab/modules/scicos/src/c/cli/scicos-cli.vcxproj
scilab/modules/scicos/src/c/cli/scicos-cli.vcxproj.filters
scilab/modules/scicos/src/c/copyvarfromlistentry.c [deleted file]
scilab/modules/scicos/src/c/copyvarfromlistentry.h [deleted file]
scilab/modules/scicos/src/c/scicos.vcxproj
scilab/modules/scicos/src/c/scicos.vcxproj.filters
scilab/modules/scicos/tests/unit_tests/getscicosvars.dia.ref
scilab/modules/scicos/tests/unit_tests/getscicosvars.tst

index f38d8aa..561b90e 100644 (file)
@@ -50,7 +50,6 @@ src/c/scicos_free.c \
 src/c/sciblk2.c \
 src/c/ezxml.c \
 src/c/var2sci.c \
-src/c/copyvarfromlistentry.c \
 src/c/MlistGetFieldNumber.c \
 src/c/lsodar.c \
 src/c/ddaskr.c
@@ -81,6 +80,7 @@ sci_gateway/cpp/sci_data2sig.cpp \
 sci_gateway/cpp/sci_duplicate.cpp \
 sci_gateway/cpp/sci_end_scicosim.cpp \
 sci_gateway/cpp/sci_getblocklabel.cpp \
+sci_gateway/cpp/sci_getscicosvars.cpp \
 sci_gateway/cpp/sci_haltscicos.cpp \
 sci_gateway/cpp/sci_phase_simulation.cpp \
 sci_gateway/cpp/sci_pointer_xproperty.cpp \
@@ -103,7 +103,6 @@ sci_gateway/c/sci_diffobjs.c \
 sci_gateway/c/sci_ftree2.c \
 sci_gateway/c/sci_ftree3.c \
 sci_gateway/c/sci_ftree4.c \
-sci_gateway/c/sci_getscicosvars.c \
 sci_gateway/c/sci_loadScicos.c \
 sci_gateway/c/sci_sctree.c
 
index f0fbd9f..442c777 100644 (file)
@@ -224,11 +224,10 @@ am__libsciscicos_algo_la_SOURCES_DIST = src/c/noscicos/noscicos.c \
        src/c/scilab5_needed_stubs.c src/c/tree.c \
        src/c/scicos_malloc.c src/c/scicos_print.c src/c/import.c \
        src/c/scicos.c src/c/scicos_free.c src/c/sciblk2.c \
-       src/c/ezxml.c src/c/var2sci.c src/c/copyvarfromlistentry.c \
-       src/c/MlistGetFieldNumber.c src/c/lsodar.c src/c/ddaskr.c \
-       src/fortran/skipvars.f src/fortran/coselm.f \
-       src/fortran/sctree.f src/fortran/scierr.f src/fortran/ftree2.f \
-       src/fortran/ftree3.f src/fortran/ftree4.f \
+       src/c/ezxml.c src/c/var2sci.c src/c/MlistGetFieldNumber.c \
+       src/c/lsodar.c src/c/ddaskr.c src/fortran/skipvars.f \
+       src/fortran/coselm.f src/fortran/sctree.f src/fortran/scierr.f \
+       src/fortran/ftree2.f src/fortran/ftree3.f src/fortran/ftree4.f \
        src/fortran/scifunc.f
 am__dirstamp = $(am__leading_dot)dirstamp
 am__objects_1 = src/c/noscicos/libsciscicos_algo_la-noscicos.lo
@@ -265,7 +264,6 @@ am__objects_3 = src/c/libsciscicos_algo_la-scilab5_needed_stubs.lo \
        src/c/libsciscicos_algo_la-sciblk2.lo \
        src/c/libsciscicos_algo_la-ezxml.lo \
        src/c/libsciscicos_algo_la-var2sci.lo \
-       src/c/libsciscicos_algo_la-copyvarfromlistentry.lo \
        src/c/libsciscicos_algo_la-MlistGetFieldNumber.lo \
        src/c/libsciscicos_algo_la-lsodar.lo \
        src/c/libsciscicos_algo_la-ddaskr.lo
@@ -300,6 +298,7 @@ am__libsciscicos_cli_la_SOURCES_DIST =  \
        sci_gateway/cpp/sci_duplicate.cpp \
        sci_gateway/cpp/sci_end_scicosim.cpp \
        sci_gateway/cpp/sci_getblocklabel.cpp \
+       sci_gateway/cpp/sci_getscicosvars.cpp \
        sci_gateway/cpp/sci_haltscicos.cpp \
        sci_gateway/cpp/sci_phase_simulation.cpp \
        sci_gateway/cpp/sci_pointer_xproperty.cpp \
@@ -317,7 +316,6 @@ am__libsciscicos_cli_la_SOURCES_DIST =  \
        sci_gateway/cpp/sci_model2blk.cpp sci_gateway/c/gw_scicos.c \
        sci_gateway/c/sci_diffobjs.c sci_gateway/c/sci_ftree2.c \
        sci_gateway/c/sci_ftree3.c sci_gateway/c/sci_ftree4.c \
-       sci_gateway/c/sci_getscicosvars.c \
        sci_gateway/c/sci_loadScicos.c sci_gateway/c/sci_sctree.c \
        sci_gateway/fortran/sci_f_tree2.f \
        sci_gateway/fortran/sci_f_tree3.f \
@@ -336,6 +334,7 @@ am__objects_5 =  \
        sci_gateway/cpp/libsciscicos_cli_la-sci_duplicate.lo \
        sci_gateway/cpp/libsciscicos_cli_la-sci_end_scicosim.lo \
        sci_gateway/cpp/libsciscicos_cli_la-sci_getblocklabel.lo \
+       sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo \
        sci_gateway/cpp/libsciscicos_cli_la-sci_haltscicos.lo \
        sci_gateway/cpp/libsciscicos_cli_la-sci_phase_simulation.lo \
        sci_gateway/cpp/libsciscicos_cli_la-sci_pointer_xproperty.lo \
@@ -356,7 +355,6 @@ am__objects_6 = sci_gateway/c/libsciscicos_cli_la-gw_scicos.lo \
        sci_gateway/c/libsciscicos_cli_la-sci_ftree2.lo \
        sci_gateway/c/libsciscicos_cli_la-sci_ftree3.lo \
        sci_gateway/c/libsciscicos_cli_la-sci_ftree4.lo \
-       sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo \
        sci_gateway/c/libsciscicos_cli_la-sci_loadScicos.lo \
        sci_gateway/c/libsciscicos_cli_la-sci_sctree.lo
 am__objects_7 = sci_gateway/fortran/sci_f_tree2.lo \
@@ -385,6 +383,7 @@ am__libsciscicos_la_SOURCES_DIST =  \
        sci_gateway/cpp/sci_duplicate.cpp \
        sci_gateway/cpp/sci_end_scicosim.cpp \
        sci_gateway/cpp/sci_getblocklabel.cpp \
+       sci_gateway/cpp/sci_getscicosvars.cpp \
        sci_gateway/cpp/sci_haltscicos.cpp \
        sci_gateway/cpp/sci_phase_simulation.cpp \
        sci_gateway/cpp/sci_pointer_xproperty.cpp \
@@ -402,7 +401,6 @@ am__libsciscicos_la_SOURCES_DIST =  \
        sci_gateway/cpp/sci_model2blk.cpp sci_gateway/c/gw_scicos.c \
        sci_gateway/c/sci_diffobjs.c sci_gateway/c/sci_ftree2.c \
        sci_gateway/c/sci_ftree3.c sci_gateway/c/sci_ftree4.c \
-       sci_gateway/c/sci_getscicosvars.c \
        sci_gateway/c/sci_loadScicos.c sci_gateway/c/sci_sctree.c \
        sci_gateway/fortran/sci_f_tree2.f \
        sci_gateway/fortran/sci_f_tree3.f \
@@ -420,6 +418,7 @@ am__objects_8 = sci_gateway/cpp/libsciscicos_la-sci_scicos_debug.lo \
        sci_gateway/cpp/libsciscicos_la-sci_duplicate.lo \
        sci_gateway/cpp/libsciscicos_la-sci_end_scicosim.lo \
        sci_gateway/cpp/libsciscicos_la-sci_getblocklabel.lo \
+       sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo \
        sci_gateway/cpp/libsciscicos_la-sci_haltscicos.lo \
        sci_gateway/cpp/libsciscicos_la-sci_phase_simulation.lo \
        sci_gateway/cpp/libsciscicos_la-sci_pointer_xproperty.lo \
@@ -440,7 +439,6 @@ am__objects_9 = sci_gateway/c/libsciscicos_la-gw_scicos.lo \
        sci_gateway/c/libsciscicos_la-sci_ftree2.lo \
        sci_gateway/c/libsciscicos_la-sci_ftree3.lo \
        sci_gateway/c/libsciscicos_la-sci_ftree4.lo \
-       sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo \
        sci_gateway/c/libsciscicos_la-sci_loadScicos.lo \
        sci_gateway/c/libsciscicos_la-sci_sctree.lo
 @XCOS_TRUE@am_libsciscicos_la_OBJECTS = $(am__objects_8) \
@@ -966,7 +964,6 @@ src/c/scicos_free.c \
 src/c/sciblk2.c \
 src/c/ezxml.c \
 src/c/var2sci.c \
-src/c/copyvarfromlistentry.c \
 src/c/MlistGetFieldNumber.c \
 src/c/lsodar.c \
 src/c/ddaskr.c
@@ -996,6 +993,7 @@ sci_gateway/cpp/sci_data2sig.cpp \
 sci_gateway/cpp/sci_duplicate.cpp \
 sci_gateway/cpp/sci_end_scicosim.cpp \
 sci_gateway/cpp/sci_getblocklabel.cpp \
+sci_gateway/cpp/sci_getscicosvars.cpp \
 sci_gateway/cpp/sci_haltscicos.cpp \
 sci_gateway/cpp/sci_phase_simulation.cpp \
 sci_gateway/cpp/sci_pointer_xproperty.cpp \
@@ -1018,7 +1016,6 @@ sci_gateway/c/sci_diffobjs.c \
 sci_gateway/c/sci_ftree2.c \
 sci_gateway/c/sci_ftree3.c \
 sci_gateway/c/sci_ftree4.c \
-sci_gateway/c/sci_getscicosvars.c \
 sci_gateway/c/sci_loadScicos.c \
 sci_gateway/c/sci_sctree.c
 
@@ -1539,8 +1536,6 @@ src/c/libsciscicos_algo_la-ezxml.lo: src/c/$(am__dirstamp) \
        src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libsciscicos_algo_la-var2sci.lo: src/c/$(am__dirstamp) \
        src/c/$(DEPDIR)/$(am__dirstamp)
-src/c/libsciscicos_algo_la-copyvarfromlistentry.lo:  \
-       src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libsciscicos_algo_la-MlistGetFieldNumber.lo:  \
        src/c/$(am__dirstamp) src/c/$(DEPDIR)/$(am__dirstamp)
 src/c/libsciscicos_algo_la-lsodar.lo: src/c/$(am__dirstamp) \
@@ -1617,6 +1612,9 @@ sci_gateway/cpp/libsciscicos_cli_la-sci_end_scicosim.lo:  \
 sci_gateway/cpp/libsciscicos_cli_la-sci_getblocklabel.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/libsciscicos_cli_la-sci_haltscicos.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
@@ -1683,9 +1681,6 @@ sci_gateway/c/libsciscicos_cli_la-sci_ftree3.lo:  \
 sci_gateway/c/libsciscicos_cli_la-sci_ftree4.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo:  \
-       sci_gateway/c/$(am__dirstamp) \
-       sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/c/libsciscicos_cli_la-sci_loadScicos.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
@@ -1749,6 +1744,9 @@ sci_gateway/cpp/libsciscicos_la-sci_end_scicosim.lo:  \
 sci_gateway/cpp/libsciscicos_la-sci_getblocklabel.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/libsciscicos_la-sci_haltscicos.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
@@ -1809,9 +1807,6 @@ sci_gateway/c/libsciscicos_la-sci_ftree3.lo:  \
 sci_gateway/c/libsciscicos_la-sci_ftree4.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo:  \
-       sci_gateway/c/$(am__dirstamp) \
-       sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/c/libsciscicos_la-sci_loadScicos.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
@@ -2022,7 +2017,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_ftree2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_ftree3.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_ftree4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_loadScicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_sctree.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-gw_scicos.Plo@am__quote@
@@ -2030,7 +2024,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_ftree2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_ftree3.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_ftree4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_loadScicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_sctree.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_buildouttb.Plo@am__quote@
@@ -2044,6 +2037,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_duplicate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_end_scicosim.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_getblocklabel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_haltscicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_phase_simulation.Plo@am__quote@
@@ -2072,6 +2066,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_duplicate.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_end_scicosim.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_getblocklabel.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_haltscicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_model2blk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_phase_simulation.Plo@am__quote@
@@ -2090,7 +2085,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_var2vec.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_vec2var.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-MlistGetFieldNumber.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-copyvarfromlistentry.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-ddaskr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-ezxml.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-import.Plo@am__quote@
@@ -2248,13 +2242,6 @@ src/c/libsciscicos_algo_la-var2sci.lo: src/c/var2sci.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libsciscicos_algo_la-var2sci.lo `test -f 'src/c/var2sci.c' || echo '$(srcdir)/'`src/c/var2sci.c
 
-src/c/libsciscicos_algo_la-copyvarfromlistentry.lo: src/c/copyvarfromlistentry.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciscicos_algo_la-copyvarfromlistentry.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-copyvarfromlistentry.Tpo -c -o src/c/libsciscicos_algo_la-copyvarfromlistentry.lo `test -f 'src/c/copyvarfromlistentry.c' || echo '$(srcdir)/'`src/c/copyvarfromlistentry.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-copyvarfromlistentry.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-copyvarfromlistentry.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='src/c/copyvarfromlistentry.c' object='src/c/libsciscicos_algo_la-copyvarfromlistentry.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/c/libsciscicos_algo_la-copyvarfromlistentry.lo `test -f 'src/c/copyvarfromlistentry.c' || echo '$(srcdir)/'`src/c/copyvarfromlistentry.c
-
 src/c/libsciscicos_algo_la-MlistGetFieldNumber.lo: src/c/MlistGetFieldNumber.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciscicos_algo_la-MlistGetFieldNumber.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-MlistGetFieldNumber.Tpo -c -o src/c/libsciscicos_algo_la-MlistGetFieldNumber.lo `test -f 'src/c/MlistGetFieldNumber.c' || echo '$(srcdir)/'`src/c/MlistGetFieldNumber.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-MlistGetFieldNumber.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-MlistGetFieldNumber.Plo
@@ -2311,13 +2298,6 @@ sci_gateway/c/libsciscicos_cli_la-sci_ftree4.lo: sci_gateway/c/sci_ftree4.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscicos_cli_la-sci_ftree4.lo `test -f 'sci_gateway/c/sci_ftree4.c' || echo '$(srcdir)/'`sci_gateway/c/sci_ftree4.c
 
-sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo: sci_gateway/c/sci_getscicosvars.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo `test -f 'sci_gateway/c/sci_getscicosvars.c' || echo '$(srcdir)/'`sci_gateway/c/sci_getscicosvars.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sci_gateway/c/sci_getscicosvars.c' object='sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscicos_cli_la-sci_getscicosvars.lo `test -f 'sci_gateway/c/sci_getscicosvars.c' || echo '$(srcdir)/'`sci_gateway/c/sci_getscicosvars.c
-
 sci_gateway/c/libsciscicos_cli_la-sci_loadScicos.lo: sci_gateway/c/sci_loadScicos.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscicos_cli_la-sci_loadScicos.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_loadScicos.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_loadScicos.lo `test -f 'sci_gateway/c/sci_loadScicos.c' || echo '$(srcdir)/'`sci_gateway/c/sci_loadScicos.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_loadScicos.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_loadScicos.Plo
@@ -2367,13 +2347,6 @@ sci_gateway/c/libsciscicos_la-sci_ftree4.lo: sci_gateway/c/sci_ftree4.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscicos_la-sci_ftree4.lo `test -f 'sci_gateway/c/sci_ftree4.c' || echo '$(srcdir)/'`sci_gateway/c/sci_ftree4.c
 
-sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo: sci_gateway/c/sci_getscicosvars.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo `test -f 'sci_gateway/c/sci_getscicosvars.c' || echo '$(srcdir)/'`sci_gateway/c/sci_getscicosvars.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sci_gateway/c/sci_getscicosvars.c' object='sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libsciscicos_la-sci_getscicosvars.lo `test -f 'sci_gateway/c/sci_getscicosvars.c' || echo '$(srcdir)/'`sci_gateway/c/sci_getscicosvars.c
-
 sci_gateway/c/libsciscicos_la-sci_loadScicos.lo: sci_gateway/c/sci_loadScicos.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libsciscicos_la-sci_loadScicos.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_loadScicos.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_loadScicos.lo `test -f 'sci_gateway/c/sci_loadScicos.c' || echo '$(srcdir)/'`sci_gateway/c/sci_loadScicos.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_loadScicos.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_loadScicos.Plo
@@ -2797,6 +2770,13 @@ sci_gateway/cpp/libsciscicos_cli_la-sci_getblocklabel.lo: sci_gateway/cpp/sci_ge
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_getblocklabel.lo `test -f 'sci_gateway/cpp/sci_getblocklabel.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getblocklabel.cpp
 
+sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo: sci_gateway/cpp/sci_getscicosvars.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Tpo -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo `test -f 'sci_gateway/cpp/sci_getscicosvars.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getscicosvars.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_getscicosvars.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_getscicosvars.cpp' object='sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_getscicosvars.lo `test -f 'sci_gateway/cpp/sci_getscicosvars.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getscicosvars.cpp
+
 sci_gateway/cpp/libsciscicos_cli_la-sci_haltscicos.lo: sci_gateway/cpp/sci_haltscicos.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_cli_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscicos_cli_la-sci_haltscicos.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_haltscicos.Tpo -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_haltscicos.lo `test -f 'sci_gateway/cpp/sci_haltscicos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_haltscicos.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_haltscicos.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_haltscicos.Plo
@@ -2993,6 +2973,13 @@ sci_gateway/cpp/libsciscicos_la-sci_getblocklabel.lo: sci_gateway/cpp/sci_getblo
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscicos_la-sci_getblocklabel.lo `test -f 'sci_gateway/cpp/sci_getblocklabel.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getblocklabel.cpp
 
+sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo: sci_gateway/cpp/sci_getscicosvars.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Tpo -c -o sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo `test -f 'sci_gateway/cpp/sci_getscicosvars.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getscicosvars.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_getscicosvars.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_getscicosvars.cpp' object='sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libsciscicos_la-sci_getscicosvars.lo `test -f 'sci_gateway/cpp/sci_getscicosvars.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_getscicosvars.cpp
+
 sci_gateway/cpp/libsciscicos_la-sci_haltscicos.lo: sci_gateway/cpp/sci_haltscicos.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libsciscicos_la-sci_haltscicos.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_haltscicos.Tpo -c -o sci_gateway/cpp/libsciscicos_la-sci_haltscicos.lo `test -f 'sci_gateway/cpp/sci_haltscicos.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_haltscicos.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_haltscicos.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_haltscicos.Plo
index 21bc198..da39126 100644 (file)
@@ -38,7 +38,6 @@ SCICOS_IMPEXP int sci_ftree3(char *fname, void* pvApiCtx);
 SCICOS_IMPEXP int sci_ftree4(char *fname, void* pvApiCtx);
 
 SCICOS_IMPEXP int sci_diffobjs(char *fname, void* pvApiCtx);
-SCICOS_IMPEXP int sci_getscicosvars(char *fname, void* pvApiCtx);
 
 /* it was in a separate gateway */
 //SCICOS_IMPEXP int sci_model2blk(char *fname, void* pvApiCtx);
index 310628d..84af5a7 100644 (file)
@@ -26,6 +26,7 @@ CPP_GATEWAY_PROTOTYPE_EXPORT(sci_data2sig, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_duplicate, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_end_scicosim, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_getblocklabel, SCICOS_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_getscicosvars, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_haltscicos, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_phase_simulation, SCICOS_IMPEXP);
 CPP_GATEWAY_PROTOTYPE_EXPORT(sci_pointer_xproperty, SCICOS_IMPEXP);
diff --git a/scilab/modules/scicos/sci_gateway/c/sci_getscicosvars.c b/scilab/modules/scicos/sci_gateway/c/sci_getscicosvars.c
deleted file mode 100644 (file)
index 4f47035..0000000
+++ /dev/null
@@ -1,583 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) INRIA - Allan CORNET
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* See the file ./license.txt
-*/
-
-/*--------------------------------------------------------------------------*/
-#include "gw_scicos.h"
-#include "stack-c.h"
-#include "sciprint.h"
-#include "localization.h"
-#include "Scierror.h"
-#include "cvstr.h"
-#include "import.h"
-#include "il_state.h"
-#include "il_sim.h"
-#include "copyvarfromlistentry.h"
-#include "sci_malloc.h"
-//#include "createblklist.hxx"
-/*--------------------------------------------------------------------------*/
-extern void str2sci(char** x, int n, int m); /* core/src/c/str2sci.h */
-extern int C2F(mktlist)();
-/*--------------------------------------------------------------------------*/
-/* intgetscicosvarsc getscicosvars interface routine
-* retrieve some information during simulation.
-*
-* [myvar]=getscicosvars(str)
-*
-* rhs 1  : str : a character string matrix with choice,
-*               - 'x' to retrieve continuous state
-*               - 'xptr' to retrieve ptr of continuous state
-*               - 'z' to retrieve discrete state
-*               - 'zptr' to retrieve ptr of discrete state
-*               - 'rpar' to retrieve real parameters
-*               - 'rpptr' to retrieve ptr of real parameters
-*               - 'ipar' to retrieve int parameters
-*               - 'ipptr' to retrieve  ptr of int parameters
-*               - 'outtb' to retrieve output register (list of scilb object)
-*               - 'inpptr' to retrieve number of input ports
-*               - 'outptr' to retrieve number of output ports
-*               - 'inplnk' to retrieve link number of input ports
-*               - 'outlnk' to retrieve link number of output ports
-*               ...... -see below-
-*
-* lhs 1  : myvar : matrix of int32 or double, or list or a Tlist
-*
-* 31/05/06, Alan : Rewritten from original fortran
-* source code intgetscicosvars in coselm.f.
-*
-* 22/06/06, Alan : Allow multiple string in rhs(1).
-*                  Create Tlist for Lhs(1).
-*
-* 23/06/06, Alan : Create blocks list for Lhs(1).
-*
-* 13/11/06, Alan : Remove il_sim_save global variable (all in sim
-*                  come from import struct now)
-*                  evtspt & pointi of state come from import struct
-*
-* 09/02/07, Alan : Update with oz/opar and restore il_sim_save only for opar
-*
-*/
-int sci_getscicosvars(char *fname, void* pvApiCtx)
-{
-    ///************************************
-    //* variables and constants d?inition
-    //************************************/
-    ///* auxilary variables for dimension and address */
-    //int m1 = 0, n1 = 0;     /* dimension of input character string               */
-    //int *il_str = NULL;   /* address of the description of the input parameter */
-    //int *l_str = NULL;    /* address of the data of the input parameter        */
-    //int l_tmp = 0;     /* temp variables to store address                   */
-    //int *il_tmp = NULL;
-
-    ///* definition of min/max input/output argument */
-    //static int minrhs = 0, maxrhs = 1;
-
-    ///* auxilary variables */
-    //int nv = 0, mv = 0;                /* length of data                                      */
-    //void *ptr = 0;                /* ptr for data comming from import structure          */
-    //int *ptr_int = NULL;             /* ptr to store ptr on int                         */
-    //double *ptr_dd = NULL;           /* ptr to store ptr on double                          */
-    //scicos_block *ptr_scsblk = NULL; /* ptr to store ptr of scicos_block structure          */
-    //outtb_el *ptr_elem = NULL;       /* ptr to store ptr of outtb_el structure              */
-    //int nblk = 0, ng = 0;              /* to store number of blocks and number of zero cross. */
-    //int *xptr = NULL, *zcptr = NULL;        /* to store xptr and zcptr of scicos_blocks            */
-    //double *x = NULL, *xd = NULL, *g = NULL;       /* ptr for x, xd and g for scicos_blocks               */
-    //int *funtyp = NULL;              /* ptr for funtyp */
-
-    //int ierr = 0;       /* error flag                                */
-    //int errc = 0;       /* error flag for ceateblklst                */
-    //int ptr_pos = 0;    /* to store position in scilab string object */
-    //int Topsave = 0;    /* to save the Top position                  */
-
-    //int sz_str = 0;     /* local variabe to store size of string */
-    //int i = 0, j = 0, k = 0;    /* local counter variable                */
-
-    ///* number of entries -please update me-                        */
-    //static int nentries = 69;
-    ///* define accepted entries of getscicosvars -please update me- */
-    //static char *entry[] =
-    //{
-    //    "x"       , "nx"       , "xptr"   , "zcptr"      , "z"        ,
-    //    "nz"      , "zptr"     , "noz"    , "oz"         , "ozsz"     ,
-    //    "oztyp"   , "ozptr"    , "rpar"   , "rpptr"      , "ipar"     ,
-    //    "ipptr"   , "opar"     , "oparsz" , "opartyp"    , "opptr"    ,
-    //    "outtb"   , "inpptr"   , "outptr" , "inplnk"     , "outlnk"   ,
-    //    "subs"    , "tevts"    , "evtspt" , "pointi"     , "iord"     ,
-    //    "oord"    , "zord"     , "funtyp" , "ztyp"       , "cord"     ,
-    //    "ordclk"  , "clkptr"   , "ordptr" , "critev"     , "mod"      ,
-    //    "nmod"    , "iz"       , "nblk"   , "izptr"      , "outtbptr" ,
-    //    "outtbsz" , "outtbtyp" , "nlnk"   , "nsubs"      , "nevts"    ,
-    //    "niord"   , "noord"    , "nzord"  , "funptr"     , "ncord"    ,
-    //    "nordptr" , "iwa"      , "blocks" , "ng"         , "g"        ,
-    //    "t0"      , "tf"       , "Atol"   , "rtol"       , "ttol"     ,
-    //    "deltat"  , "hmax"     , "nelem"  , "outtb_elem"
-    //};
-
-    //char **dyn_char = NULL; /* for allocation of first entry in tlist */
-
-    ///****************************************
-    //* Check number of inputs and outputs Rhs
-    //****************************************/
-    //CheckRhs(minrhs, maxrhs);
-
-    ///* Display usage of getscicosvars function if Rhs==0 */
-    //if (Rhs == 0)
-    //{
-    //    sciprint(_("\ngetscicosvars : utility function to retrieve\n"));
-    //    sciprint(_("                scicos arrays during simulation.\n\n"));
-    //    sciprint(_("Usage : [myvar]=getscicosvars([\"str1\";\"str2\";...]);\n\n"));
-    //    sciprint(_("- myvar : an int32 or double matrix or a Tlist.\n"));
-    //    sciprint(_("- [\"str1\";\"str2\",...] is a string matrix\n"));
-    //    sciprint(_("  that must be informed with the following values :\n"));
-
-    //    /* display allowed entries */
-    //    i = 0;
-    //    for (j = 0; j < nentries; j++)
-    //    {
-    //        if (j == nentries - 1)
-    //        {
-    //            sciprint("\"%s\" ", entry[j]);
-    //        }
-    //        else
-    //        {
-    //            sciprint("\"%s\", ", entry[j]);
-    //        }
-    //        i++;
-    //        if (i == 6)
-    //        {
-    //            sciprint("\n");
-    //            i = 0;
-    //        }
-    //    }
-    //    sciprint("\n");
-    //    return 0;
-    //}
-
-    ///*******************
-    //* Check str (rhs 1)
-    //*******************/
-    //il_str = (int *) GetData(1); /* get ptr of int header of rsh 1 */
-    //if (il_str[0] != sci_strings) /* Check if input argument is a character string matrix */
-    //{
-    //    Scierror(55, _("%s : First argument must be a string.\n"), fname);
-    //    C2F(iop).err = 1;
-    //    return 0;
-    //}
-
-    ///*retrieve dimension of input string matrix*/
-    //m1 = il_str[1]; /* number of row    */
-    //n1 = il_str[2]; /* number of column */
-
-    ///*Create header of Tlist*/
-    //if ((dyn_char = MALLOC((1 + m1 * n1) * sizeof(char *))) == NULL)
-    //{
-    //    Scierror(999, _("%s : No more memory.\n"), fname);
-    //    return 0;
-    //}
-
-    ///* Type of list is scicosvar */
-    //if ((dyn_char[0] = MALLOC((strlen("scicosvar") + 1) * sizeof(char))) == NULL)
-    //{
-    //    FREE(dyn_char);
-    //    Scierror(999, _("%s : No more memory.\n"), fname);
-    //    return 0;
-    //}
-    //else
-    //{
-    //    strcpy(dyn_char[0], "scicosvar");
-    //}
-
-    ///*Check string matrix  */
-    //for (j = 0; j < m1 * n1; j++)
-    //{
-    //    sz_str = il_str[5 + j] - il_str[4 + j]; /* store the length of str */
-    //    /*get current position in the istk*/
-    //    if (j == 0)
-    //    {
-    //        ptr_pos = 5 + m1 * n1;
-    //    }
-    //    else
-    //    {
-    //        ptr_pos += il_str[5 + j - 1] - il_str[4 + j - 1];
-    //    }
-    //    l_str = &il_str[ptr_pos]; /* get ptr of rsh 1 */
-    //    /* codetoascii convertion */
-    //    C2F(cha1).buf[0] = ' ';
-    //    C2F(cvstr)(&sz_str, &l_str[0], &C2F(cha1).buf[0], (i = 1, &i), sz_str);
-    //    C2F(cha1).buf[sz_str] = '\0';
-    //    /* search if string is in accordance with entry*/
-    //    ierr = TRUE;
-    //    for (i = 0; i < nentries; i++)
-    //    {
-    //        if (strcmp(C2F(cha1).buf, entry[i]) == 0)
-    //        {
-    //            /* Store string in header of Tlist */
-    //            if ((dyn_char[j + 1] = MALLOC(sizeof(char) * strlen(entry[i]) + 1)) == NULL)
-    //            {
-    //                FREE(dyn_char);
-    //                Scierror(999, _("%s : No more memory.\n"), fname);
-    //                return 0;
-    //            }
-    //            else
-    //            {
-    //                strcpy(dyn_char[j + 1], entry[i]);
-    //            }
-
-    //            ierr = FALSE;
-    //            break;
-    //        }
-    //    }
-    //    /* if failed then display an error message and exit*/
-    //    if (ierr == TRUE)
-    //    {
-    //        FREE(dyn_char);
-    //        Scierror(999, _("%s : Undefined field in string matrix position : %d.\n"), fname, j + 1);
-    //        return 0;
-    //    }
-    //}
-
-    ///* store dyn_char on stack*/
-    //if (n1 * m1 > 1)
-    //{
-    //    str2sci(dyn_char, 1, n1 * m1 + 1);
-    //}
-
-    ///* return asked array */
-    //for (j = 0; j < m1 * n1; j++)
-    //{
-    //    sz_str = il_str[5 + j] - il_str[4 + j]; /* store the length of str */
-    //    /*get current position in the istk of the string*/
-    //    if (j == 0)
-    //    {
-    //        ptr_pos = 5 + m1 * n1;
-    //    }
-    //    else
-    //    {
-    //        ptr_pos += il_str[5 + j - 1] - il_str[4 + j - 1];
-    //    }
-    //    l_str = &il_str[ptr_pos]; /* get ptr of rsh 1 */
-    //    /* codetoascii convertion */
-    //    C2F(cha1).buf[0] = ' ';
-    //    C2F(cvstr)(&sz_str, &l_str[0], &C2F(cha1).buf[0], (i = 1, &i), sz_str);
-    //    C2F(cha1).buf[sz_str] = '\0';
-
-    //    /*****************************************************************
-    //    * entries that can be retrieve by il_state_save global variable
-    //    *****************************************************************/
-    //    if (strcmp(C2F(cha1).buf, "x") == 0)          /* retrieve continuous state */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_state(), 2);
-    //    }
-    //    else if (strcmp(C2F(cha1).buf, "z") == 0)     /* retrieve discrete state */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_state(), 3);
-    //    }
-    //    else if (strcmp(C2F(cha1).buf, "oz") == 0)    /* retrieve object discrete state */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_state(), 4);
-    //    }
-    //    else if (strcmp(C2F(cha1).buf, "outtb") == 0) /* retrieve outtb */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_state(), 9);
-    //    }
-    //    else if (strcmp(C2F(cha1).buf, "tevts") == 0) /* retrieve tevts */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_state(), 6);
-    //    }
-
-    //    /***************************************************************
-    //    * entries that can be retrieve by il_sim_save global variable
-    //    ***************************************************************/
-    //    if (strcmp(C2F(cha1).buf, "opar") == 0)          /* retrieve object parameters */
-    //    {
-    //        ierr = CopyVarFromlistentry(j + 2, get_il_sim(), 15);
-    //    }
-
-    //    /*************************************************
-    //    * int variables coming from import structure
-    //    *************************************************/
-    //    else if ((strcmp(C2F(cha1).buf, "mod") == 0)      || /* retrieve mode */
-    //             (strcmp(C2F(cha1).buf, "nmod") == 0)     || /* retrieve nmode */
-    //             (strcmp(C2F(cha1).buf, "iz") == 0)       || /* label int code of blocks */
-    //             (strcmp(C2F(cha1).buf, "nblk") == 0)     || /* number of block */
-    //             (strcmp(C2F(cha1).buf, "izptr") == 0)    || /* label int code of blocks ptr*/
-    //             (strcmp(C2F(cha1).buf, "outtbptr") == 0) || /* outtb ptr */
-    //             (strcmp(C2F(cha1).buf, "outtbsz") == 0)  || /* outtb size */
-    //             (strcmp(C2F(cha1).buf, "outtbtyp") == 0) || /* outtb type */
-    //             (strcmp(C2F(cha1).buf, "nlnk") == 0)     || /* number of link */
-    //             (strcmp(C2F(cha1).buf, "nsubs") == 0)    || /* length of nsubs */
-    //             (strcmp(C2F(cha1).buf, "nevts") == 0)    || /* length of evtspt & tevts */
-    //             (strcmp(C2F(cha1).buf, "niord") == 0)    || /* length of iord */
-    //             (strcmp(C2F(cha1).buf, "noord") == 0)    || /* length of oord */
-    //             (strcmp(C2F(cha1).buf, "nzord") == 0)    || /* length of zord */
-    //             (strcmp(C2F(cha1).buf, "funptr") == 0)   || /* retrieve function ptr */
-    //             (strcmp(C2F(cha1).buf, "ncord") == 0)    || /* retrieve ncord */
-    //             (strcmp(C2F(cha1).buf, "nordptr") == 0)  || /* retrieve nordptr */
-    //             (strcmp(C2F(cha1).buf, "iwa") == 0)      || /* retrieve iwa */
-    //             (strcmp(C2F(cha1).buf, "ng") == 0)       || /* retrieve ng */
-    //             (strcmp(C2F(cha1).buf, "nx") == 0)       || /* retrieve nx */
-    //             (strcmp(C2F(cha1).buf, "nz") == 0)       || /* retrieve nz */
-    //             (strcmp(C2F(cha1).buf, "noz") == 0)      || /* retrieve noz */
-    //             (strcmp(C2F(cha1).buf, "ozptr") == 0)    || /* retrieve ozptr */
-    //             (strcmp(C2F(cha1).buf, "ozsz") == 0)     || /* retrieve ozsz */
-    //             (strcmp(C2F(cha1).buf, "oztyp") == 0)    || /* retrieve oztyp */
-    //             (strcmp(C2F(cha1).buf, "nelem") == 0)    || /* retrieve nelem */
-    //             (strcmp(C2F(cha1).buf, "xptr") == 0)     || /* retrieve xptr */
-    //             (strcmp(C2F(cha1).buf, "zcptr") == 0)    || /* retrieve zcptr */
-    //             (strcmp(C2F(cha1).buf, "zptr") == 0)     || /* retrieve zptr */
-    //             (strcmp(C2F(cha1).buf, "rpptr") == 0)    || /* retrieve rpptr */
-    //             (strcmp(C2F(cha1).buf, "ipar") == 0)     || /* retrieve ipar */
-    //             (strcmp(C2F(cha1).buf, "ipptr") == 0)    || /* retrieve ipptr */
-    //             (strcmp(C2F(cha1).buf, "opptr") == 0)    || /* retrieve opptr */
-    //             (strcmp(C2F(cha1).buf, "oparsz") == 0)   || /* retrieve oparsz */
-    //             (strcmp(C2F(cha1).buf, "opartyp") == 0)  || /* retrieve opartyp */
-    //             (strcmp(C2F(cha1).buf, "inpptr") == 0)   || /* retrieve inpptr */
-    //             (strcmp(C2F(cha1).buf, "outptr") == 0)   || /* retrieve outptr */
-    //             (strcmp(C2F(cha1).buf, "inplnk") == 0)   || /* retrieve inplnk */
-    //             (strcmp(C2F(cha1).buf, "outlnk") == 0)   || /* retrieve outlnk */
-    //             (strcmp(C2F(cha1).buf, "subs") == 0)     || /* retrieve subs */
-    //             (strcmp(C2F(cha1).buf, "iord") == 0)     || /* retrieve iord */
-    //             (strcmp(C2F(cha1).buf, "oord") == 0)     || /* retrieve iord */
-    //             (strcmp(C2F(cha1).buf, "zord") == 0)     || /* retrieve iord */
-    //             (strcmp(C2F(cha1).buf, "funtyp") == 0)   || /* retrieve funtyp */
-    //             (strcmp(C2F(cha1).buf, "ztyp") == 0)     || /* retrieve ztyp */
-    //             (strcmp(C2F(cha1).buf, "cord") == 0)     || /* retrieve cord */
-    //             (strcmp(C2F(cha1).buf, "ordclk") == 0)   || /* retrieve ordclk */
-    //             (strcmp(C2F(cha1).buf, "clkcpr") == 0)   || /* retrieve clkcpr */
-    //             (strcmp(C2F(cha1).buf, "ordptr") == 0)   || /* retrieve ordptr */
-    //             (strcmp(C2F(cha1).buf, "critev") == 0)   || /* retrieve critev */
-    //             /* state */
-    //             (strcmp(C2F(cha1).buf, "evtspt") == 0)   || /* retrieve evtspt */
-    //             (strcmp(C2F(cha1).buf, "pointi") == 0)     /* retrieve nelem */
-    //            )
-    //    {
-    //        /* retrieve dims and prt of asked array with getscicosvarsfromimport */
-    //        ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-
-    //        /* check ierr flag */
-    //        if (ierr == TRUE)
-    //        {
-    //            l_tmp = I_INT32; /* define type of int */
-    //            CreateVar(j + 2, MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE, &nv, &mv, &l_tmp); /* Create int32 variable at the top+j+1 pos in the stack */
-    //            il_tmp = (int *) istk(l_tmp);      /* Store value of address of istk(l_tmp) in il_tmp */
-    //            ptr_int = (int *) ptr;             /* cast void* ptr to int* ptr */
-    //            for (i = 0; i < nv * mv; i++)
-    //            {
-    //                il_tmp[i] = ptr_int[i];    /* copy returned array in istk */
-    //            }
-    //        }
-    //    }
-
-    //    /*************************************************
-    //    * double variables coming from import structure
-    //    *************************************************/
-    //    else if ((strcmp(C2F(cha1).buf, "rpar") == 0)   || /* retrieve rpar      */
-    //             (strcmp(C2F(cha1).buf, "g") == 0)      || /* retrieve g      */
-    //             (strcmp(C2F(cha1).buf, "t0") == 0)     || /* retrieve t0     */
-    //             (strcmp(C2F(cha1).buf, "tf") == 0)     || /* retrieve tf     */
-    //             (strcmp(C2F(cha1).buf, "Atol") == 0)   || /* retrieve Atol   */
-    //             (strcmp(C2F(cha1).buf, "rtol") == 0)   || /* retrieve rtol   */
-    //             (strcmp(C2F(cha1).buf, "ttol") == 0)   || /* retrieve ttol   */
-    //             (strcmp(C2F(cha1).buf, "deltat") == 0) || /* retrieve deltat */
-    //             (strcmp(C2F(cha1).buf, "hmax") == 0)     /* retrieve hmax   */
-    //            )
-    //    {
-    //        /* retrieve dims and prt of asked array with getscicosvarsfromimport */
-    //        ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-
-    //        /* check ierr flag */
-    //        if (ierr == TRUE)
-    //        {
-    //            ptr_dd = (double *) ptr;
-    //            CreateVar(j + 2, MATRIX_OF_DOUBLE_DATATYPE, &nv, &mv, &l_tmp); /* Create double variable at the top+j+1 addr. of the stack */
-    //            for (i = 0; i < nv * mv; i++)
-    //            {
-    //                *stk(l_tmp + i) = ptr_dd[i];    /* copy returned array in istk */
-    //            }
-    //        }
-    //    }
-
-    //    /*************************************************
-    //    * scicos_block ptr coming from import structure
-    //    *************************************************/
-    //    else if ((strcmp(C2F(cha1).buf, "blocks") == 0)
-    //            )
-    //    {
-    //        /* retrieve scicos_block prt of asked array with getscicosvarsfromimport */
-    //        ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-
-    //        /* check ierr flag */
-    //        if (ierr == TRUE)
-    //        {
-    //            /* store ptr in ptrscs_blk */
-    //            ptr_scsblk = (scicos_block *) ptr;
-
-    //            /* retrieve nblk by import structure */
-    //            strcpy(C2F(cha1).buf, "nblk");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_int = (int *) ptr; /* cast void* ptr to int* ptr */
-    //            nblk = *ptr_int;
-
-    //            /* retrieve ng by import structure */
-    //            strcpy(C2F(cha1).buf, "ng");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_int = (int *) ptr; /* cast void* ptr to int* ptr */
-    //            ng = *ptr_int;
-
-    //            /*retrieve xptr by import structure*/
-    //            strcpy(C2F(cha1).buf, "xptr");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_int = (int *) ptr;
-    //            xptr = ptr_int;
-
-    //            /*retrieve zcptr by import structure*/
-    //            strcpy(C2F(cha1).buf, "zcptr");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_int = (int *) ptr;
-    //            zcptr = ptr_int;
-
-    //            /*retrieve x and xd by import structure*/
-    //            strcpy(C2F(cha1).buf, "x");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_dd = (double *) ptr;
-    //            x = ptr_dd;
-    //            xd = &x[xptr[nblk] - 1];
-
-    //            /*retrieve g by import structure*/
-    //            strcpy(C2F(cha1).buf, "g");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            ptr_dd = (double *) ptr;
-    //            g = ptr_dd;
-
-    //            /*retrieve funtyp by import structure*/
-    //            strcpy(C2F(cha1).buf, "funtyp");
-    //            ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-    //            funtyp = (int *) ptr;
-
-    //            /* store blklst on stack */
-    //            Topsave = Top;     /* save Top counter */
-    //            Top = Top - Rhs + 1 + j; /* adjust Top counter */
-
-    //            for (k = 0; k < nblk; k++)
-    //            {
-    //                /* for each block, call createblklist */
-
-    //                /* set flag_imp <0 for createblklst */
-    //                i = -1;
-
-    //                /* the following test is done in order to know if block k
-    //                * have been already called with callf in scicos.c
-    //                */
-    //                if (ptr_scsblk[k].nx != 0)
-    //                {
-    //                    if (ptr_scsblk[k].x != &x[xptr[k] - 1])
-    //                    {
-    //                        /*fprintf(stderr,"k=%d,X,xd Non initialise",k);*/
-    //                        /* set flag_imp=k for createblklst <0 */
-    //                        i = k;
-    //                    }
-    //                }
-    //                if (ptr_scsblk[k].ng != 0)
-    //                {
-    //                    if ((ptr_scsblk[k].g != &g[zcptr[k] - 1]) && (ptr_scsblk[k].g != &x[xptr[k] - 1]))
-    //                    {
-    //                        /*fprintf(stderr,"k=%d,g Non initialise",k);*/
-    //                        /* set flag_imp=k for createblklst <0 */
-    //                        i = k;
-    //                    }
-    //                }
-    //                /* call createblklist */
-    //                ierr = createblklist(&ptr_scsblk[k], &errc, i, k + 1);
-
-    //                /* if an error occurs in createblklist */
-    //                if (ierr == FALSE)
-    //                {
-    //                    Top = Topsave;
-    //                    break;
-    //                }
-    //            }
-    //            /* if success, create a list of Typed list scicos_block */
-    //            if (ierr == TRUE)
-    //            {
-    //                C2F(mklist)(&nblk);
-    //                Top = Topsave; /* adjust Top counter */
-    //                i = 1;
-    //                CreateVar(j + 2, LIST_DATATYPE, &nblk, &i, &l_tmp); /* this is done to inform common intersci */
-    //            }
-
-    //        }
-    //    }
-
-    //    /*******************************************
-    //    * outtb_elem coming from import structure
-    //    *******************************************/
-    //    else if ((strcmp(C2F(cha1).buf, "outtb_elem") == 0)) /* retrieve outtb_elem */
-    //    {
-    //        /* retrieve dims and prt of asked array with getscicosvarsfromimport */
-    //        ierr = getscicosvarsfromimport(C2F(cha1).buf, &ptr, &nv, &mv);
-
-    //        /* check ierr flag */
-    //        if (ierr == TRUE)
-    //        {
-    //            l_tmp = I_INT32; /* define type of int */
-    //            CreateVar(j + 2, MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE, &nv, &mv, &l_tmp); /* Create int32 variable at the top+j+1 addr. of the stack */
-    //            il_tmp = (int *) istk(l_tmp);      /* Store value of address of istk(l_tmp) in il_tmp */
-    //            ptr_elem = (outtb_el *) ptr;       /* cast void* ptr to int* ptr */
-    //            for (i = 0; i < nv; i++) /* copy returned array in istk */
-    //            {
-    //                il_tmp[i] = ptr_elem[i].lnk + 1; /* +1 is for the connection with outtb list */
-    //                il_tmp[nv + i] = ptr_elem[i].pos + 1;
-    //            }
-    //        }
-    //    }
-
-    //    /* if return a FALSE value in
-    //    * error flag then display an error message.
-    //    */
-    //    if (ierr != TRUE)
-    //    {
-    //        Scierror(999, _("%s : Error.\n"), fname);
-    //        FREE(dyn_char);
-    //        return 0;
-    //    }
-    //}
-    ///**********************
-    //* Create lsh argument
-    //**********************/
-    ///* create a tlist if number of string in rhs 1 is >1*/
-    //if (j > 1)
-    //{
-    //    Top = Top + j;
-    //    j++;
-    //    C2F(mktlist)(&j);
-    //    Top = Top - 1;
-    //    i = 1;
-    //    CreateVar(2, TYPED_LIST_DATATYPE, &j, &i, &l_tmp); /* this is done to inform common intersci */
-    //}
-
-    ///* put new variable in lsh argument */
-    //LhsVar(1) = 2;
-
-    ///* end */
-    //FREE(dyn_char);
-    //PutLhsVar();
-    return 0;
-}
-/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/scicos/sci_gateway/cpp/sci_getscicosvars.cpp b/scilab/modules/scicos/sci_gateway/cpp/sci_getscicosvars.cpp
new file mode 100644 (file)
index 0000000..94dc2ee
--- /dev/null
@@ -0,0 +1,529 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2015 - Scilab Enterprises - Paul Bignier
+ *
+ *  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.1-en.txt
+ *
+ */
+
+#include <cstring>
+#include <string>
+#include <vector>
+
+#include "gw_scicos.hxx"
+#include "il_state.hxx"
+#include "il_sim.hxx"
+#include "createblklist.hxx"
+
+#include "internal.hxx"
+#include "types.hxx"
+#include "double.hxx"
+#include "int.hxx"
+#include "string.hxx"
+#include "tlist.hxx"
+#include "function.hxx"
+
+extern "C"
+{
+#include "import.h"
+#include "sciprint.h"
+#include "scicos_block4.h"
+#include "charEncoding.h"
+
+#include "Scierror.h"
+#include "localization.h"
+}
+
+/*--------------------------------------------------------------------------*/
+/* getscicosvars interface routine retrieves some information during simulation.
+*
+* [myvar]=getscicosvars(str)
+*
+* rhs 1  : str : a character string matrix with choice,
+*               - 'x' to retrieve continuous state
+*               - 'xptr' to retrieve ptr of continuous state
+*               - 'z' to retrieve discrete state
+*               - 'zptr' to retrieve ptr of discrete state
+*               - 'rpar' to retrieve real parameters
+*               - 'rpptr' to retrieve ptr of real parameters
+*               - 'ipar' to retrieve int parameters
+*               - 'ipptr' to retrieve  ptr of int parameters
+*               - 'outtb' to retrieve output register (list of scilb object)
+*               - 'inpptr' to retrieve number of input ports
+*               - 'outptr' to retrieve number of output ports
+*               - 'inplnk' to retrieve link number of input ports
+*               - 'outlnk' to retrieve link number of output ports
+*               ...... -see below-
+*
+* lhs 1  : myvar : matrix of int32 or double, or list or a Tlist
+*
+* 31/05/06, Alan : Rewritten from original fortran
+* source code intgetscicosvars in coselm.f.
+*
+* 22/06/06, Alan : Allow multiple string in rhs(1).
+*                  Create Tlist for Lhs(1).
+*
+* 23/06/06, Alan : Create blocks list for Lhs(1).
+*
+* 13/11/06, Alan : Remove il_sim_save global variable (all in sim
+*                  come from import struct now)
+*                  evtspt & pointi of state come from import struct
+*
+* 09/02/07, Alan : Update with oz/opar and restore il_sim_save only for opar
+*
+* 08/12/14, Paul : Rewrote to C++.
+*
+*/
+/*--------------------------------------------------------------------------*/
+
+static const std::string funname = "getscicosvars";
+
+types::Function::ReturnValue sci_getscicosvars(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    if (in.size() > 1)
+    {
+        Scierror(77, _("%s: Wrong number of input argument(s): %d or %d expected.\n"), funname.data(), 0, 1);
+        return types::Function::Error;
+    }
+
+    if (_iRetCount > 1)
+    {
+        Scierror(78, _("%s: Wrong number of output argument(s): %d expected.\n"), funname.data(), 1);
+        return types::Function::Error;
+    }
+
+    bool ok;
+    // Define accepted entries of getscicosvars -please update me-
+    const std::vector<const char*> entry
+    {
+        "x"       , "nx"       , "xptr"   , "zcptr"      , "z"        ,
+        "nz"      , "zptr"     , "noz"    , "oz"         , "ozsz"     ,
+        "oztyp"   , "ozptr"    , "rpar"   , "rpptr"      , "ipar"     ,
+        "ipptr"   , "opar"     , "oparsz" , "opartyp"    , "opptr"    ,
+        "outtb"   , "inpptr"   , "outptr" , "inplnk"     , "outlnk"   ,
+        "subs"    , "tevts"    , "evtspt" , "pointi"     , "iord"     ,
+        "oord"    , "zord"     , "funtyp" , "ztyp"       , "cord"     ,
+        "ordclk"  , "clkptr"   , "ordptr" , "critev"     , "mod"      ,
+        "nmod"    , "iz"       , "nblk"   , "izptr"      , "outtbptr" ,
+        "outtbsz" , "outtbtyp" , "nlnk"   , "nsubs"      , "nevts"    ,
+        "niord"   , "noord"    , "nzord"  , "funptr"     , "ncord"    ,
+        "nordptr" , "iwa"      , "blocks" , "ng"         , "g"        ,
+        "t0"      , "tf"       , "Atol"   , "rtol"       , "ttol"     ,
+        "deltat"  , "hmax"     , "nelem"  , "outtb_elem"
+    };
+    // Number of entries
+    const size_t nentries = entry.size();
+
+    // Display usage of getscicosvars function if in.size()==0
+    if (in.size() == 0)
+    {
+        sciprint(_("\ngetscicosvars: utility function to retrieve\n"));
+        sciprint(_("                scicos arrays during simulation.\n\n"));
+        sciprint(_("Usage: [myvar]=getscicosvars([\"str1\";\"str2\";...]);\n\n"));
+        sciprint(_("- myvar: an int32 or double matrix or a Tlist.\n"));
+        sciprint(_("- [\"str1\";\"str2\",...] is a string matrix\n"));
+        sciprint(_("  that must be informed with the following values:\n"));
+
+        // Display allowed entries
+        int i = 0;
+        for (size_t j = 0; j < nentries; ++j)
+        {
+            if (j == nentries - 1)
+            {
+                sciprint("\"%s\" ", entry[j]);
+            }
+            else
+            {
+                sciprint("\"%s\", ", entry[j]);
+            }
+            i++;
+            if (i == 6)
+            {
+                sciprint("\n");
+                i = 0;
+            }
+        }
+        sciprint("\n");
+        return types::Function::OK;
+    }
+
+    /*******************
+    * Check str (rhs 1)
+    *******************/
+    if (!in[0]->isString())
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A string matrix expected.\n"), funname.data(), 1);
+        return types::Function::Error;
+    }
+    types::String* il_str = in[0]->getAs<types::String>();
+
+    // Retrieve dimension of input string matrix
+    const int m1 = il_str->getRows();
+    const int n1 = il_str->getCols();
+
+    // Create header of TList
+    types::String* dyn_char = new types::String(1 + m1 * n1, 1);
+
+    // Type of list is scicosvar
+    const std::string scicosvar("scicosvar");
+    dyn_char->set(0, "scicosvar");
+
+    // Check string matrix
+    for (int j = 0; j < m1 * n1; ++j)
+    {
+        ok = false;
+        for (size_t i = 0; i < nentries; ++i)
+        {
+            char* field = wide_string_to_UTF8(il_str->get(j));
+            if (strcmp(field, entry[i]) == 0)
+            {
+                dyn_char->set(j + 1, entry[i]);
+
+                ok = true;
+                FREE(field);
+                break;
+            }
+            FREE(field);
+        }
+
+        // If failed then display an error message and exit
+        if (!ok)
+        {
+            Scierror(999, _("%s: Undefined field in string matrix position: %d.\n"), funname.data(), j + 1);
+            dyn_char->killMe();
+            return types::Function::Error;
+        }
+    }
+
+    // Preparing the return
+    types::TList* ret = new types::TList();
+    ret->append(dyn_char); // Header for the returned tlist
+
+    types::InternalType* element; // Declare 'element' out of the loop to be able to return it alone in case il_str->getSize()==1
+    for (int j = 0; j < m1 * n1; j++)
+    {
+        char* field = wide_string_to_UTF8(il_str->get(j));
+
+        /*****************************************************************
+        * Entries that can be retrieved by 'il_state_save' global variable
+        *****************************************************************/
+        if (strcmp(field, "x") == 0)          /* Retrieve continuous state */
+        {
+            types::TList* il_state = get_il_state()->getAs<types::TList>();
+            if (il_state->getSize() < 2)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_state->get(1);
+                ok = true;
+            }
+        }
+        else if (strcmp(field, "z") == 0)     /* Retrieve discrete state */
+        {
+            types::TList* il_state = get_il_state()->getAs<types::TList>();
+            if (il_state->getSize() < 3)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_state->get(2);
+                ok = true;
+            }
+        }
+        else if (strcmp(field, "oz") == 0)    /* Retrieve object discrete state */
+        {
+            types::TList* il_state = get_il_state()->getAs<types::TList>();
+            if (il_state->getSize() < 4)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_state->get(3);
+                ok = true;
+            }
+        }
+        else if (strcmp(field, "outtb") == 0) /* Retrieve outtb */
+        {
+            types::TList* il_state = get_il_state()->getAs<types::TList>();
+            if (il_state->getSize() < 9)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_state->get(8);
+                ok = true;
+            }
+        }
+        else if (strcmp(field, "tevts") == 0) /* Retrieve tevts */
+        {
+            types::TList* il_state = get_il_state()->getAs<types::TList>();
+            if (il_state->getSize() < 6)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_state->get(5);
+                ok = true;
+            }
+        }
+
+        /*****************************************************************
+        * Entries that can be retrieved by 'il_sim_save' global variable
+        *****************************************************************/
+        if (strcmp(field, "opar") == 0)       /* retrieve object parameters */
+        {
+            types::TList* il_sim = get_il_sim()->getAs<types::TList>();
+            if (il_sim->getSize() < 15)
+            {
+                ok = false;
+            }
+            else
+            {
+                element = il_sim->get(14);
+                ok = true;
+            }
+        }
+
+        /*************************************************
+        * int variables coming from import structure
+        *************************************************/
+        else if ((strcmp(field, "mod") == 0)      || /* retrieve mode */
+                 (strcmp(field, "nmod") == 0)     || /* retrieve nmode */
+                 (strcmp(field, "iz") == 0)       || /* label int code of blocks */
+                 (strcmp(field, "nblk") == 0)     || /* number of block */
+                 (strcmp(field, "izptr") == 0)    || /* label int code of blocks ptr*/
+                 (strcmp(field, "outtbptr") == 0) || /* outtb ptr */
+                 (strcmp(field, "outtbsz") == 0)  || /* outtb size */
+                 (strcmp(field, "outtbtyp") == 0) || /* outtb type */
+                 (strcmp(field, "nlnk") == 0)     || /* number of link */
+                 (strcmp(field, "nsubs") == 0)    || /* length of nsubs */
+                 (strcmp(field, "nevts") == 0)    || /* length of evtspt & tevts */
+                 (strcmp(field, "niord") == 0)    || /* length of iord */
+                 (strcmp(field, "noord") == 0)    || /* length of oord */
+                 (strcmp(field, "nzord") == 0)    || /* length of zord */
+                 (strcmp(field, "funptr") == 0)   || /* retrieve function ptr */
+                 (strcmp(field, "ncord") == 0)    || /* retrieve ncord */
+                 (strcmp(field, "nordptr") == 0)  || /* retrieve nordptr */
+                 (strcmp(field, "iwa") == 0)      || /* retrieve iwa */
+                 (strcmp(field, "ng") == 0)       || /* retrieve ng */
+                 (strcmp(field, "nx") == 0)       || /* retrieve nx */
+                 (strcmp(field, "nz") == 0)       || /* retrieve nz */
+                 (strcmp(field, "noz") == 0)      || /* retrieve noz */
+                 (strcmp(field, "ozptr") == 0)    || /* retrieve ozptr */
+                 (strcmp(field, "ozsz") == 0)     || /* retrieve ozsz */
+                 (strcmp(field, "oztyp") == 0)    || /* retrieve oztyp */
+                 (strcmp(field, "nelem") == 0)    || /* retrieve nelem */
+                 (strcmp(field, "xptr") == 0)     || /* retrieve xptr */
+                 (strcmp(field, "zcptr") == 0)    || /* retrieve zcptr */
+                 (strcmp(field, "zptr") == 0)     || /* retrieve zptr */
+                 (strcmp(field, "rpptr") == 0)    || /* retrieve rpptr */
+                 (strcmp(field, "ipar") == 0)     || /* retrieve ipar */
+                 (strcmp(field, "ipptr") == 0)    || /* retrieve ipptr */
+                 (strcmp(field, "opptr") == 0)    || /* retrieve opptr */
+                 (strcmp(field, "oparsz") == 0)   || /* retrieve oparsz */
+                 (strcmp(field, "opartyp") == 0)  || /* retrieve opartyp */
+                 (strcmp(field, "inpptr") == 0)   || /* retrieve inpptr */
+                 (strcmp(field, "outptr") == 0)   || /* retrieve outptr */
+                 (strcmp(field, "inplnk") == 0)   || /* retrieve inplnk */
+                 (strcmp(field, "outlnk") == 0)   || /* retrieve outlnk */
+                 (strcmp(field, "subs") == 0)     || /* retrieve subs */
+                 (strcmp(field, "iord") == 0)     || /* retrieve iord */
+                 (strcmp(field, "oord") == 0)     || /* retrieve iord */
+                 (strcmp(field, "zord") == 0)     || /* retrieve iord */
+                 (strcmp(field, "funtyp") == 0)   || /* retrieve funtyp */
+                 (strcmp(field, "ztyp") == 0)     || /* retrieve ztyp */
+                 (strcmp(field, "cord") == 0)     || /* retrieve cord */
+                 (strcmp(field, "ordclk") == 0)   || /* retrieve ordclk */
+                 (strcmp(field, "clkcpr") == 0)   || /* retrieve clkcpr */
+                 (strcmp(field, "ordptr") == 0)   || /* retrieve ordptr */
+                 (strcmp(field, "critev") == 0)   || /* retrieve critev */
+                 /* state */
+                 (strcmp(field, "evtspt") == 0)   || /* retrieve evtspt */
+                 (strcmp(field, "pointi") == 0)      /* retrieve nelem */
+                )
+        {
+            /* Retrieve dims and 'prt' of asked array with getscicosvarsfromimport() */
+            void* ptr = nullptr;
+            int nv, mv;
+            ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+
+            if (ok)
+            {
+                int* data;
+                element = new types::Int32(nv, mv, &data);
+                data = static_cast<int*>(ptr);
+            }
+        }
+
+        /*************************************************
+        * double variables coming from import structure
+        *************************************************/
+        else if ((strcmp(field, "rpar") == 0)   || /* retrieve rpar      */
+                 (strcmp(field, "g") == 0)      || /* retrieve g      */
+                 (strcmp(field, "t0") == 0)     || /* retrieve t0     */
+                 (strcmp(field, "tf") == 0)     || /* retrieve tf     */
+                 (strcmp(field, "Atol") == 0)   || /* retrieve Atol   */
+                 (strcmp(field, "rtol") == 0)   || /* retrieve rtol   */
+                 (strcmp(field, "ttol") == 0)   || /* retrieve ttol   */
+                 (strcmp(field, "deltat") == 0) || /* retrieve deltat */
+                 (strcmp(field, "hmax") == 0)      /* retrieve hmax   */
+                )
+        {
+            /* Retrieve dims and 'prt' of asked array with getscicosvarsfromimport() */
+            void* ptr = nullptr;
+            int nv, mv;
+            ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+
+            if (ok)
+            {
+                double* data;
+                element = new types::Double(nv, mv, &data);
+                data = static_cast<double*>(ptr);
+            }
+        }
+
+        /*************************************************
+        * scicos_block ptr coming from import structure
+        *************************************************/
+        else if (strcmp(field, "blocks") == 0)
+        {
+            /* Retrieve scicos_block 'prt' of asked array with getscicosvarsfromimport() */
+            void* ptr = nullptr;
+            int nv, mv;
+            ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+
+            if (ok)
+            {
+                /* Store ptr in ptrscs_blk */
+                scicos_block* ptr_scsblk = static_cast<scicos_block*>(ptr);
+
+                /* Retrieve 'nblk' by import structure */
+                strcpy(field, "nblk");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                int nblk = ((int*)ptr)[0];
+
+                /* Retrieve 'ng' by import structure */
+                strcpy(field, "ng");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                //int ng = ((int*)ptr)[0];
+
+                /* Retrieve 'xptr' by import structure */
+                strcpy(field, "xptr");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                int* xptr = ((int*)ptr);
+
+                /* Retrieve 'zcptr' by import structure */
+                strcpy(field, "zcptr");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                int* zcptr = ((int*)ptr);
+
+                /* Retrieve 'x' and 'xd' by import structure */
+                strcpy(field, "x");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                double* x = ((double*)ptr);
+                //double* xd = &x[xptr[nblk] - 1];
+
+                /* Retrieve 'g' by import structure */
+                strcpy(field, "g");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                double* g = ((double*)ptr);
+
+                /* Retrieve 'funtyp' by import structure */
+                strcpy(field, "funtyp");
+                ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+                //int* funtyp = ((int*)ptr);
+
+                for (int k = 0; k < nblk; ++k)
+                {
+                    /* For each block, call createblklist() */
+
+                    /* Set 'flag_imp' <0 for createblklst() */
+                    int i = -1;
+
+                    /* The following test is done in order to know if block k
+                    * have been already called with callf in scicos.c
+                    */
+                    if (ptr_scsblk[k].nx != 0)
+                    {
+                        if (ptr_scsblk[k].x != &x[xptr[k] - 1])
+                        {
+                            /*fprintf(stderr,"k=%d,X,xd Non initialise",k);*/
+                            /* Set 'flag_imp'=k for createblklst() <0 */
+                            i = k;
+                        }
+                    }
+                    if (ptr_scsblk[k].ng != 0)
+                    {
+                        if ((ptr_scsblk[k].g != &g[zcptr[k] - 1]) && (ptr_scsblk[k].g != &x[xptr[k] - 1]))
+                        {
+                            /*fprintf(stderr,"k=%d,g Non initialise",k);*/
+                            /* Set 'flag_imp'=k for createblklst() <0 */
+                            i = k;
+                        }
+                    }
+                    /* Call createblklist() */
+                    element = createblklist(&ptr_scsblk[k], i, k + 1);
+                }
+            }
+        }
+
+        /*******************************************
+        * outtb_elem coming from import structure
+        *******************************************/
+        else if ((strcmp(field, "outtb_elem") == 0)) /* retrieve outtb_elem */
+        {
+            /* Retrieve dims and prt of asked array with getscicosvarsfromimport */
+            void* ptr = nullptr;
+            int nv, mv;
+            ok = getscicosvarsfromimport(field, &ptr, &nv, &mv);
+
+            /* Check 'ok' flag */
+            if (ok == true)
+            {
+                int* data;
+                element = new types::Int32(nv, mv, &data);
+                outtb_el* ptr_elem = static_cast<outtb_el*>(ptr);
+                for (int i = 0; i < nv; ++i) /* Copy returned array in 'element' */
+                {
+                    data[i] = ptr_elem[i].lnk + 1; /* +1 is for the connection with outtb list */
+                    data[nv + i] = ptr_elem[i].pos + 1;
+                }
+            }
+        }
+
+        // If failed then display an error message.
+        if (ok == false)
+        {
+            Scierror(999, _("%s: Error with parameter \"%s\".\n"), funname.data(), il_str->get(j));
+            dyn_char->killMe();
+            ret->killMe();
+            return types::Function::Error;
+        }
+
+        FREE(field);
+        ret->append(element);
+    }
+
+    if (il_str->getSize() == 1)
+    {
+        out.push_back(element);
+        dyn_char->killMe();
+        ret->killMe();
+    }
+    else
+    {
+        out.push_back(ret);
+    }
+    return types::Function::OK;
+}
+
index 5818ffc..3e7730e 100644 (file)
@@ -24,7 +24,6 @@
     <gateway type="0" name="sci_tree3" function="sci_tree3"/>
     <gateway type="0" name="sci_tree4" function="sci_tree4"/>
     <gateway type="0" name="sci_diffobjs" function="diffobjs"/>
-    <gateway type="0" name="sci_getscicosvars" function="getscicosvars"/>
     <gateway type="0" name="sci_model2blk" function="model2blk"/>
     <gateway type="0" name="sci_loadScicos" function="loadScicos"/>
     <!-- C++ Gateways -->
@@ -38,6 +37,7 @@
     <gateway type="1" name="sci_duplicate" function="duplicate"/>
     <gateway type="1" name="sci_end_scicosim" function="end_scicosim"/>
     <gateway type="1" name="sci_getblocklabel" function="getblocklabel"/>
+    <gateway type="1" name="sci_getscicosvars" function="getscicosvars"/>
     <gateway type="1" name="sci_haltscicos" function="sci_haltscicos"/>
     <gateway type="1" name="sci_phase_simulation" function="phase_simulation"/>
     <gateway type="1" name="sci_pointer_xproperty" function="pointer_xproperty"/>
index d9ea507..c52f485 100644 (file)
@@ -265,6 +265,7 @@ lib /DEF:"$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_duplicate.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_end_scicosim.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_getblocklabel.cpp" />
+    <ClCompile Include="..\..\..\sci_gateway\cpp\sci_getscicosvars.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_haltscicos.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_scicosim.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_phase_simulation.cpp" />
@@ -278,6 +279,7 @@ lib /DEF:"$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_vec2var.cpp" />
     <ClCompile Include="..\..\..\sci_gateway\c\sci_loadScicos.c" />
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_validvar.cpp" />
+    <ClCompile Include="..\..\cpp\copyvarfromtlist.cpp" />
     <ClCompile Include="..\..\cpp\il_sim.cpp" />
     <ClCompile Include="..\..\cpp\il_state.cpp" />
     <ClCompile Include="..\..\cpp\createblklist.cpp" />
@@ -285,7 +287,6 @@ lib /DEF:"$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
     <ClCompile Include="..\..\cpp\sciblk4.cpp" />
     <ClCompile Include="..\..\cpp\var2vec.cpp" />
     <ClCompile Include="..\..\cpp\vec2var.cpp" />
-    <ClCompile Include="..\copyvarfromlistentry.c" />
     <ClCompile Include="..\ddaskr.c" />
     <ClCompile Include="..\DllmainScicos.c" />
     <ClCompile Include="..\ezxml.c" />
@@ -297,7 +298,6 @@ lib /DEF:"$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
     <ClCompile Include="..\..\..\sci_gateway\c\sci_ftree2.c" />
     <ClCompile Include="..\..\..\sci_gateway\c\sci_ftree3.c" />
     <ClCompile Include="..\..\..\sci_gateway\c\sci_ftree4.c" />
-    <ClCompile Include="..\..\..\sci_gateway\c\sci_getscicosvars.c" />
     <ClCompile Include="..\..\..\sci_gateway\c\sci_sctree.c" />
     <ClCompile Include="..\sciblk2.c" />
     <ClCompile Include="..\scicos.c" />
@@ -311,9 +311,9 @@ lib /DEF:"$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
   <ItemGroup>
     <ClInclude Include="..\..\cpp\createblklist.hxx" />
     <ClInclude Include="..\..\cpp\extractblklist.hxx" />
+    <ClInclude Include="..\..\cpp\copyvarfromtlist.hxx" />
     <ClInclude Include="..\..\cpp\var2vec.hxx" />
     <ClInclude Include="..\..\cpp\vec2var.hxx" />
-    <ClInclude Include="..\copyvarfromlistentry.h" />
     <ClInclude Include="..\..\..\includes\dynlib_scicos.h" />
     <ClInclude Include="..\ddaskr.h" />
     <ClInclude Include="..\ezxml.h" />
index 7ff6699..20e86d1 100644 (file)
@@ -26,9 +26,6 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\copyvarfromlistentry.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\DllmainScicos.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -59,9 +56,6 @@
     <ClCompile Include="..\..\..\sci_gateway\c\sci_ftree4.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\..\sci_gateway\c\sci_getscicosvars.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\..\sci_gateway\c\sci_sctree.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_getblocklabel.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\..\sci_gateway\cpp\sci_getscicosvars.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_haltscicos.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\sci_gateway\cpp\sci_vec2var.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\cpp\copyvarfromtlist.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\cpp\var2vec.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\copyvarfromlistentry.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\..\includes\dynlib_scicos.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\ddaskr.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\cpp\copyvarfromtlist.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\cpp\var2vec.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
diff --git a/scilab/modules/scicos/src/c/copyvarfromlistentry.c b/scilab/modules/scicos/src/c/copyvarfromlistentry.c
deleted file mode 100644 (file)
index ae57e89..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) DIGITEO - 2009 - Allan CORNET
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* See the file ./license.txt
-*/
-/*--------------------------------------------------------------------------*/
-#include "copyvarfromlistentry.h"
-#include "sci_malloc.h"
-#include "stack-c.h"
-/*--------------------------------------------------------------------------*/
-extern int *listentry(int *header, int i); /* mexlib.h */
-/*--------------------------------------------------------------------------*/
-int CopyVarFromlistentry(int lw, int *header, int i)
-{
-    ///* Local variable definition*/
-    //int ret, un = 1;
-    //double *l;
-    //int n;
-
-    ///* Test if we receive a NULL ptr header */
-    //if (header == NULL)
-    //{
-    //    return FALSE;
-    //}
-
-    ///* Get the start address of the i element of the input list*/
-    //if ((l = (double *) listentry(header, i)) == NULL)
-    //{
-    //    return FALSE;
-    //}
-
-    ///* Compute the length of the i element in double word */
-    //n = header[i + 2] - header[i + 1];
-
-    ///* Create empty data of a size n*sizeof(double) at the position lw */
-    //if ((ret = C2F(createdata)(&lw, n * sizeof(double))) == FALSE)
-    //{
-    //    return ret;
-    //}
-
-    ///* Copy the element i to position lw*/
-    //C2F(unsfdcopy)(&n, l, &un, stk(*Lstk(lw + Top - Rhs)), &un);
-    return TRUE;
-}
-/*--------------------------------------------------------------------------*/
-
diff --git a/scilab/modules/scicos/src/c/copyvarfromlistentry.h b/scilab/modules/scicos/src/c/copyvarfromlistentry.h
deleted file mode 100644 (file)
index 0c49570..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) DIGITEO - 2009 - Allan CORNET
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* See the file ./license.txt
-*/
-/*--------------------------------------------------------------------------*/
-#ifndef __COPYVARFROMLISTENTRY_H__
-#define __COPYVARFROMLISTENTRY_H__
-
-/* CopyVarFromlistentry
-*    Copy a Scilab object in a list to the variable position  lw
-*
-* Calling sequence :
-*  int CopyVarFromlistentry(int lw, int *header, int i)
-*
-* Input parameters : lw : integer, the free position
-*                    header : int pointer, a pointer of a list.
-*                    i : integer, give the number of the element to copy
-*
-* Output : FALSE if failed, TRUE else.
-*
-* Examples of use
-*
-* 1 -  put the third element of a list given in position lw=1
-*      to position lw=2 :
-*
-*  int *il_list;
-*  il_list = (int *) Getdata(1);
-*  CopyVarFromlistentry(2, il_list, 3)
-*
-* 2 - put the second element of a list stored in the fourth element
-*     of a list in position lw=1 to position lw=3 :
-*
-*  int *il_list;
-*  il_list = (int *) Getdata(1);
-*  int *il_sublist;
-*  il_sublist = (int *) listentry(il_list,4);
-*  CopyVarFromlistentry(3, il_sublist, 2)
-*/
-int CopyVarFromlistentry(int lw, int *header, int i);
-
-#endif /* __COPYVARFROMLISTENTRY_H__ */
-/*--------------------------------------------------------------------------*/
index c27a700..4916f43 100644 (file)
@@ -261,6 +261,7 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClCompile Include="..\..\sci_gateway\cpp\sci_coserror.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_curblock.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_getblocklabel.cpp" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_getscicosvars.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_haltscicos.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_phase_simulation.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_pointer_xproperty.cpp" />
@@ -280,6 +281,7 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClCompile Include="..\cpp\createblklist.cpp" />
     <ClCompile Include="..\cpp\extractblklist.cpp" />
     <ClCompile Include="..\cpp\sciblk4.cpp" />
+    <ClCompile Include="..\cpp\copyvarfromtlist.cpp" />
     <ClCompile Include="..\cpp\var2vec.cpp" />
     <ClCompile Include="..\cpp\vec2var.cpp" />
     <ClCompile Include="..\cpp\Controller.cpp" />
@@ -300,7 +302,6 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClCompile Include="..\cpp\view_scilab\ScsAdapter.cpp" />
     <ClCompile Include="..\cpp\view_scilab\StateAdapter.cpp" />
     <ClCompile Include="..\cpp\view_scilab\TextAdapter.cpp" />
-    <ClCompile Include="copyvarfromlistentry.c" />
     <ClCompile Include="DllmainScicos.c" />
     <ClCompile Include="ezxml.c" />
     <ClCompile Include="..\..\sci_gateway\c\gw_scicos.c" />
@@ -312,7 +313,6 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClCompile Include="..\..\sci_gateway\c\sci_ftree2.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_ftree3.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_ftree4.c" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_getscicosvars.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_loadScicos.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_sctree.c" />
     <ClCompile Include="sciblk2.c" />
@@ -331,6 +331,7 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClInclude Include="..\..\includes\View.hxx" />
     <ClInclude Include="..\cpp\createblklist.hxx" />
     <ClInclude Include="..\cpp\extractblklist.hxx" />
+    <ClInclude Include="..\cpp\copyvarfromtlist.hxx" />
     <ClInclude Include="..\cpp\il_sim.hxx" />
     <ClInclude Include="..\cpp\il_state.hxx" />
     <ClInclude Include="..\cpp\LoggerView.hxx" />
@@ -354,7 +355,6 @@ lib /DEF:"$(ProjectDir)differential_equations_f_Import.def" /SUBSYSTEM:WINDOWS /
     <ClInclude Include="..\cpp\view_scilab\StateAdapter.hxx" />
     <ClInclude Include="..\cpp\view_scilab\TextAdapter.hxx" />
     <ClInclude Include="..\cpp\view_scilab\ports_management.hxx" />
-    <ClInclude Include="copyvarfromlistentry.h" />
     <ClInclude Include="..\..\includes\dynlib_scicos.h" />
     <ClInclude Include="ezxml.h" />
     <ClInclude Include="..\..\includes\gw_scicos.h" />
index b45bb17..a4101ba 100644 (file)
@@ -41,9 +41,6 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="copyvarfromlistentry.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="DllmainScicos.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -77,9 +74,6 @@
     <ClCompile Include="..\..\sci_gateway\c\sci_ftree4.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_getscicosvars.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\sci_loadScicos.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="scilab5_needed_stubs.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\cpp\copyvarfromtlist.cpp">
+      <Filter>Source Files\MVC</Filter>
+    </ClCompile>
     <ClCompile Include="..\cpp\var2vec.cpp">
       <Filter>Source Files\MVC</Filter>
     </ClCompile>
     <ClCompile Include="..\..\sci_gateway\cpp\sci_getblocklabel.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_getscicosvars.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\cpp\sci_haltscicos.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="copyvarfromlistentry.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\includes\dynlib_scicos.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\cpp\LoggerView.hxx">
       <Filter>Header Files\MVC</Filter>
     </ClInclude>
+    <ClInclude Include="..\cpp\copyvarfromtlist.hxx">
+      <Filter>Header Files\MVC</Filter>
+    </ClInclude>
     <ClInclude Include="..\cpp\var2vec.hxx">
       <Filter>Header Files\MVC</Filter>
     </ClInclude>
index 701fadd..8898464 100644 (file)
@@ -1,2 +1,15 @@
-ierr=execstr("[myvar]=getscicosvars(''blocks'')","errcatch");
-if ierr <> 999 then bugmes();quit;end
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Paul Bignier
+// Copyright (C) ????-2008 - INRIA
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+refMsg = msprintf(_("%s: Undefined field in string matrix position : %d\n"), "getscicosvars", 2);
+assert_checkerror("getscicosvars([""x"" ""fake""])", refMsg);
+assert_checkerror: Assertion failed: expected error message = "getscicosvars: Undefined field in string matrix position : 2" while computed error message = "getscicosvars: Undefined field in string matrix position: 2.".
+at line   120 of function assert_checkerror called by :
+assert_checkerror("getscicosvars([""x"" ""fake""])", refMsg)
+at line    25 of exec file called by :
index 32126e5..eb74f97 100644 (file)
@@ -1,9 +1,15 @@
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Paul Bignier
 // Copyright (C) ????-2008 - INRIA
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
+// <-- CLI SHELL MODE -->
+
+refMsg = msprintf(_("%s: Undefined field in string matrix position : %d\n"), "getscicosvars", 2);
+assert_checkerror("getscicosvars([""x"" ""fake""])", refMsg);
 
-ierr=execstr("[myvar]=getscicosvars(''blocks'')","errcatch"); 
-if ierr <> 999 then pause,end
\ No newline at end of file
+refMsg = msprintf(_("%s: Error with parameter ""%s"".\n"), "getscicosvars", "x");
+assert_checkerror("getscicosvars([""x"" ""blocks""])", refMsg);