src/cpp/view_scilab/ParamsAdapter.cpp \
src/cpp/view_scilab/ScsAdapter.cpp \
src/cpp/view_scilab/StateAdapter.cpp \
-src/cpp/view_scilab/TextAdapter.cpp
+src/cpp/view_scilab/TextAdapter.cpp \
+src/cpp/sciblk4.cpp \
+src/cpp/createblklist.cpp \
+src/cpp/extractblklist.cpp
SCICOS_C_SOURCES = \
src/c/scicos.c \
src/c/scicos_free.c \
src/c/sciblk2.c \
-src/c/sciblk4.c \
src/c/ezxml.c \
src/c/var2sci.c \
src/c/copyvarfromlistentry.c \
src/c/MlistGetFieldNumber.c \
-src/c/extractblklist.c \
src/c/lsodar.c \
src/c/ddaskr.c
sci_gateway/cpp/sci_sig2data.cpp \
sci_gateway/cpp/sci_validvar.cpp \
sci_gateway/cpp/sci_var2vec.cpp \
-sci_gateway/cpp/sci_vec2var.cpp
+sci_gateway/cpp/sci_vec2var.cpp \
+sci_gateway/cpp/sci_callblk.cpp \
+sci_gateway/cpp/sci_model2blk.cpp
GATEWAY_C_SOURCES = \
sci_gateway/c/gw_scicos.c \
-sci_gateway/c/sci_callblk.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_model2blk.c \
sci_gateway/c/sci_sctree.c
GATEWAY_FORTRAN_SOURCES = \
-I$(top_srcdir)/modules/ast/includes/types/ \
-I$(top_srcdir)/modules/ast/includes/analysis/ \
-I$(top_srcdir)/modules/threads/includes/ \
+ -I$(top_srcdir)/modules/console/includes/ \
+ $(EIGEN_CPPFLAGS) \
$(AM_CPPFLAGS)
else
libsciscicos_algo_la_CPPFLAGS= -I$(top_srcdir)/modules/output_stream/includes/ \
src/cpp/view_scilab/ParamsAdapter.cpp \
src/cpp/view_scilab/ScsAdapter.cpp \
src/cpp/view_scilab/StateAdapter.cpp \
- src/cpp/view_scilab/TextAdapter.cpp \
+ src/cpp/view_scilab/TextAdapter.cpp src/cpp/sciblk4.cpp \
+ src/cpp/createblklist.cpp src/cpp/extractblklist.cpp \
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/sciblk4.c src/c/ezxml.c src/c/var2sci.c \
- src/c/copyvarfromlistentry.c src/c/MlistGetFieldNumber.c \
- src/c/extractblklist.c src/c/lsodar.c src/c/ddaskr.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/cpp/view_scilab/libsciscicos_algo_la-ParamsAdapter.lo \
src/cpp/view_scilab/libsciscicos_algo_la-ScsAdapter.lo \
src/cpp/view_scilab/libsciscicos_algo_la-StateAdapter.lo \
- src/cpp/view_scilab/libsciscicos_algo_la-TextAdapter.lo
+ src/cpp/view_scilab/libsciscicos_algo_la-TextAdapter.lo \
+ src/cpp/libsciscicos_algo_la-sciblk4.lo \
+ src/cpp/libsciscicos_algo_la-createblklist.lo \
+ src/cpp/libsciscicos_algo_la-extractblklist.lo
am__objects_3 = src/c/libsciscicos_algo_la-scilab5_needed_stubs.lo \
src/c/libsciscicos_algo_la-tree.lo \
src/c/libsciscicos_algo_la-scicos_malloc.lo \
src/c/libsciscicos_algo_la-scicos.lo \
src/c/libsciscicos_algo_la-scicos_free.lo \
src/c/libsciscicos_algo_la-sciblk2.lo \
- src/c/libsciscicos_algo_la-sciblk4.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-extractblklist.lo \
src/c/libsciscicos_algo_la-lsodar.lo \
src/c/libsciscicos_algo_la-ddaskr.lo
am__objects_4 = src/fortran/skipvars.lo src/fortran/coselm.lo \
sci_gateway/cpp/sci_sig2data.cpp \
sci_gateway/cpp/sci_validvar.cpp \
sci_gateway/cpp/sci_var2vec.cpp \
- sci_gateway/cpp/sci_vec2var.cpp sci_gateway/c/gw_scicos.c \
- sci_gateway/c/sci_callblk.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_model2blk.c \
- sci_gateway/c/sci_sctree.c sci_gateway/fortran/sci_f_tree2.f \
+ sci_gateway/cpp/sci_vec2var.cpp \
+ sci_gateway/cpp/sci_callblk.cpp \
+ 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 \
sci_gateway/fortran/sci_f_tree4.f
am__objects_5 = \
sci_gateway/cpp/libsciscicos_cli_la-sci_sig2data.lo \
sci_gateway/cpp/libsciscicos_cli_la-sci_validvar.lo \
sci_gateway/cpp/libsciscicos_cli_la-sci_var2vec.lo \
- sci_gateway/cpp/libsciscicos_cli_la-sci_vec2var.lo
+ sci_gateway/cpp/libsciscicos_cli_la-sci_vec2var.lo \
+ sci_gateway/cpp/libsciscicos_cli_la-sci_callblk.lo \
+ sci_gateway/cpp/libsciscicos_cli_la-sci_model2blk.lo
am__objects_6 = sci_gateway/c/libsciscicos_cli_la-gw_scicos.lo \
- sci_gateway/c/libsciscicos_cli_la-sci_callblk.lo \
sci_gateway/c/libsciscicos_cli_la-sci_diffobjs.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_model2blk.lo \
sci_gateway/c/libsciscicos_cli_la-sci_sctree.lo
am__objects_7 = sci_gateway/fortran/sci_f_tree2.lo \
sci_gateway/fortran/sci_f_tree3.lo \
sci_gateway/cpp/sci_sig2data.cpp \
sci_gateway/cpp/sci_validvar.cpp \
sci_gateway/cpp/sci_var2vec.cpp \
- sci_gateway/cpp/sci_vec2var.cpp sci_gateway/c/gw_scicos.c \
- sci_gateway/c/sci_callblk.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_model2blk.c \
- sci_gateway/c/sci_sctree.c sci_gateway/fortran/sci_f_tree2.f \
+ sci_gateway/cpp/sci_vec2var.cpp \
+ sci_gateway/cpp/sci_callblk.cpp \
+ 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 \
sci_gateway/fortran/sci_f_tree4.f
am__objects_8 = sci_gateway/cpp/libsciscicos_la-sci_scicos_debug.lo \
sci_gateway/cpp/libsciscicos_la-sci_sig2data.lo \
sci_gateway/cpp/libsciscicos_la-sci_validvar.lo \
sci_gateway/cpp/libsciscicos_la-sci_var2vec.lo \
- sci_gateway/cpp/libsciscicos_la-sci_vec2var.lo
+ sci_gateway/cpp/libsciscicos_la-sci_vec2var.lo \
+ sci_gateway/cpp/libsciscicos_la-sci_callblk.lo \
+ sci_gateway/cpp/libsciscicos_la-sci_model2blk.lo
am__objects_9 = sci_gateway/c/libsciscicos_la-gw_scicos.lo \
- sci_gateway/c/libsciscicos_la-sci_callblk.lo \
sci_gateway/c/libsciscicos_la-sci_diffobjs.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_model2blk.lo \
sci_gateway/c/libsciscicos_la-sci_sctree.lo
@XCOS_TRUE@am_libsciscicos_la_OBJECTS = $(am__objects_8) \
@XCOS_TRUE@ $(am__objects_9) $(am__objects_7)
src/cpp/view_scilab/ParamsAdapter.cpp \
src/cpp/view_scilab/ScsAdapter.cpp \
src/cpp/view_scilab/StateAdapter.cpp \
-src/cpp/view_scilab/TextAdapter.cpp
+src/cpp/view_scilab/TextAdapter.cpp \
+src/cpp/sciblk4.cpp \
+src/cpp/createblklist.cpp \
+src/cpp/extractblklist.cpp
SCICOS_C_SOURCES = \
src/c/scilab5_needed_stubs.c \
src/c/scicos.c \
src/c/scicos_free.c \
src/c/sciblk2.c \
-src/c/sciblk4.c \
src/c/ezxml.c \
src/c/var2sci.c \
src/c/copyvarfromlistentry.c \
src/c/MlistGetFieldNumber.c \
-src/c/extractblklist.c \
src/c/lsodar.c \
src/c/ddaskr.c
sci_gateway/cpp/sci_sig2data.cpp \
sci_gateway/cpp/sci_validvar.cpp \
sci_gateway/cpp/sci_var2vec.cpp \
-sci_gateway/cpp/sci_vec2var.cpp
+sci_gateway/cpp/sci_vec2var.cpp \
+sci_gateway/cpp/sci_callblk.cpp \
+sci_gateway/cpp/sci_model2blk.cpp
GATEWAY_C_SOURCES = \
sci_gateway/c/gw_scicos.c \
-sci_gateway/c/sci_callblk.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_model2blk.c \
sci_gateway/c/sci_sctree.c
GATEWAY_FORTRAN_SOURCES = \
@XCOS_TRUE@ -I$(top_srcdir)/modules/ast/includes/types/ \
@XCOS_TRUE@ -I$(top_srcdir)/modules/ast/includes/analysis/ \
@XCOS_TRUE@ -I$(top_srcdir)/modules/threads/includes/ \
+@XCOS_TRUE@ -I$(top_srcdir)/modules/console/includes/ \
+@XCOS_TRUE@ $(EIGEN_CPPFLAGS) \
@XCOS_TRUE@ $(AM_CPPFLAGS)
libsciscicos_cli_la_CPPFLAGS = $(libsciscicos_algo_la_CPPFLAGS)
src/cpp/view_scilab/libsciscicos_algo_la-TextAdapter.lo: \
src/cpp/view_scilab/$(am__dirstamp) \
src/cpp/view_scilab/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libsciscicos_algo_la-sciblk4.lo: src/cpp/$(am__dirstamp) \
+ src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libsciscicos_algo_la-createblklist.lo: \
+ src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
+src/cpp/libsciscicos_algo_la-extractblklist.lo: \
+ src/cpp/$(am__dirstamp) src/cpp/$(DEPDIR)/$(am__dirstamp)
src/c/$(am__dirstamp):
@$(MKDIR_P) src/c
@: > src/c/$(am__dirstamp)
src/c/$(DEPDIR)/$(am__dirstamp)
src/c/libsciscicos_algo_la-sciblk2.lo: src/c/$(am__dirstamp) \
src/c/$(DEPDIR)/$(am__dirstamp)
-src/c/libsciscicos_algo_la-sciblk4.lo: src/c/$(am__dirstamp) \
- src/c/$(DEPDIR)/$(am__dirstamp)
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/$(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-extractblklist.lo: src/c/$(am__dirstamp) \
- src/c/$(DEPDIR)/$(am__dirstamp)
src/c/libsciscicos_algo_la-lsodar.lo: src/c/$(am__dirstamp) \
src/c/$(DEPDIR)/$(am__dirstamp)
src/c/libsciscicos_algo_la-ddaskr.lo: src/c/$(am__dirstamp) \
sci_gateway/cpp/libsciscicos_cli_la-sci_vec2var.lo: \
sci_gateway/cpp/$(am__dirstamp) \
sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_cli_la-sci_callblk.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_cli_la-sci_model2blk.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/$(am__dirstamp):
@$(MKDIR_P) sci_gateway/c
@: > sci_gateway/c/$(am__dirstamp)
sci_gateway/c/libsciscicos_cli_la-gw_scicos.lo: \
sci_gateway/c/$(am__dirstamp) \
sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/c/libsciscicos_cli_la-sci_callblk.lo: \
- sci_gateway/c/$(am__dirstamp) \
- sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/libsciscicos_cli_la-sci_diffobjs.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)
-sci_gateway/c/libsciscicos_cli_la-sci_model2blk.lo: \
- sci_gateway/c/$(am__dirstamp) \
- sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/libsciscicos_cli_la-sci_sctree.lo: \
sci_gateway/c/$(am__dirstamp) \
sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
sci_gateway/cpp/libsciscicos_la-sci_vec2var.lo: \
sci_gateway/cpp/$(am__dirstamp) \
sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_la-sci_callblk.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libsciscicos_la-sci_model2blk.lo: \
+ sci_gateway/cpp/$(am__dirstamp) \
+ sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/libsciscicos_la-gw_scicos.lo: \
sci_gateway/c/$(am__dirstamp) \
sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/c/libsciscicos_la-sci_callblk.lo: \
- sci_gateway/c/$(am__dirstamp) \
- sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/libsciscicos_la-sci_diffobjs.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)
-sci_gateway/c/libsciscicos_la-sci_model2blk.lo: \
- sci_gateway/c/$(am__dirstamp) \
- sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
sci_gateway/c/libsciscicos_la-sci_sctree.lo: \
sci_gateway/c/$(am__dirstamp) \
sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-gw_scicos.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_diffobjs.Plo@am__quote@
@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_model2blk.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@
-@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_callblk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_diffobjs.Plo@am__quote@
@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_model2blk.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@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_coserror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_ctree2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_ctree3.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_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@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_pointer_xproperty.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_scicos_debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_var2vec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_vec2var.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_buildouttb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_callblk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_coserror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_ctree2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_ctree3.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_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@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_pointer_xproperty.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_scicos_debug.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-extractblklist.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@
@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-lsodar.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-sciblk2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-scicos.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-scicos_free.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/c/$(DEPDIR)/libsciscicos_algo_la-scicos_malloc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-Model.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-Model_getObjectProperties.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-Model_setObjectProperties.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-createblklist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-il_sim.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-il_state.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-var2vec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciscicos_algo_la-vec2var.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/view_scilab/$(DEPDIR)/libsciscicos_algo_la-Adapters.Plo@am__quote@
@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-sciblk2.lo `test -f 'src/c/sciblk2.c' || echo '$(srcdir)/'`src/c/sciblk2.c
-src/c/libsciscicos_algo_la-sciblk4.lo: src/c/sciblk4.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-sciblk4.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Tpo -c -o src/c/libsciscicos_algo_la-sciblk4.lo `test -f 'src/c/sciblk4.c' || echo '$(srcdir)/'`src/c/sciblk4.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/sciblk4.c' object='src/c/libsciscicos_algo_la-sciblk4.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-sciblk4.lo `test -f 'src/c/sciblk4.c' || echo '$(srcdir)/'`src/c/sciblk4.c
-
src/c/libsciscicos_algo_la-ezxml.lo: src/c/ezxml.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-ezxml.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-ezxml.Tpo -c -o src/c/libsciscicos_algo_la-ezxml.lo `test -f 'src/c/ezxml.c' || echo '$(srcdir)/'`src/c/ezxml.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-ezxml.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-ezxml.Plo
@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-MlistGetFieldNumber.lo `test -f 'src/c/MlistGetFieldNumber.c' || echo '$(srcdir)/'`src/c/MlistGetFieldNumber.c
-src/c/libsciscicos_algo_la-extractblklist.lo: src/c/extractblklist.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-extractblklist.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Tpo -c -o src/c/libsciscicos_algo_la-extractblklist.lo `test -f 'src/c/extractblklist.c' || echo '$(srcdir)/'`src/c/extractblklist.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/c/extractblklist.c' object='src/c/libsciscicos_algo_la-extractblklist.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-extractblklist.lo `test -f 'src/c/extractblklist.c' || echo '$(srcdir)/'`src/c/extractblklist.c
-
src/c/libsciscicos_algo_la-lsodar.lo: src/c/lsodar.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-lsodar.lo -MD -MP -MF src/c/$(DEPDIR)/libsciscicos_algo_la-lsodar.Tpo -c -o src/c/libsciscicos_algo_la-lsodar.lo `test -f 'src/c/lsodar.c' || echo '$(srcdir)/'`src/c/lsodar.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciscicos_algo_la-lsodar.Tpo src/c/$(DEPDIR)/libsciscicos_algo_la-lsodar.Plo
@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-gw_scicos.lo `test -f 'sci_gateway/c/gw_scicos.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scicos.c
-sci_gateway/c/libsciscicos_cli_la-sci_callblk.lo: sci_gateway/c/sci_callblk.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_callblk.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_callblk.lo `test -f 'sci_gateway/c/sci_callblk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_callblk.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/sci_callblk.c' object='sci_gateway/c/libsciscicos_cli_la-sci_callblk.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_callblk.lo `test -f 'sci_gateway/c/sci_callblk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_callblk.c
-
sci_gateway/c/libsciscicos_cli_la-sci_diffobjs.lo: sci_gateway/c/sci_diffobjs.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_diffobjs.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_diffobjs.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_diffobjs.lo `test -f 'sci_gateway/c/sci_diffobjs.c' || echo '$(srcdir)/'`sci_gateway/c/sci_diffobjs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_diffobjs.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_diffobjs.Plo
@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_loadScicos.lo `test -f 'sci_gateway/c/sci_loadScicos.c' || echo '$(srcdir)/'`sci_gateway/c/sci_loadScicos.c
-sci_gateway/c/libsciscicos_cli_la-sci_model2blk.lo: sci_gateway/c/sci_model2blk.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_model2blk.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_model2blk.lo `test -f 'sci_gateway/c/sci_model2blk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_model2blk.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/sci_model2blk.c' object='sci_gateway/c/libsciscicos_cli_la-sci_model2blk.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_model2blk.lo `test -f 'sci_gateway/c/sci_model2blk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_model2blk.c
-
sci_gateway/c/libsciscicos_cli_la-sci_sctree.lo: sci_gateway/c/sci_sctree.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_sctree.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_sctree.Tpo -c -o sci_gateway/c/libsciscicos_cli_la-sci_sctree.lo `test -f 'sci_gateway/c/sci_sctree.c' || echo '$(srcdir)/'`sci_gateway/c/sci_sctree.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_sctree.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_cli_la-sci_sctree.Plo
@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-gw_scicos.lo `test -f 'sci_gateway/c/gw_scicos.c' || echo '$(srcdir)/'`sci_gateway/c/gw_scicos.c
-sci_gateway/c/libsciscicos_la-sci_callblk.lo: sci_gateway/c/sci_callblk.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_callblk.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_callblk.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_callblk.lo `test -f 'sci_gateway/c/sci_callblk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_callblk.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_callblk.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_callblk.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/sci_callblk.c' object='sci_gateway/c/libsciscicos_la-sci_callblk.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_callblk.lo `test -f 'sci_gateway/c/sci_callblk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_callblk.c
-
sci_gateway/c/libsciscicos_la-sci_diffobjs.lo: sci_gateway/c/sci_diffobjs.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_diffobjs.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_diffobjs.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_diffobjs.lo `test -f 'sci_gateway/c/sci_diffobjs.c' || echo '$(srcdir)/'`sci_gateway/c/sci_diffobjs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_diffobjs.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_diffobjs.Plo
@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_loadScicos.lo `test -f 'sci_gateway/c/sci_loadScicos.c' || echo '$(srcdir)/'`sci_gateway/c/sci_loadScicos.c
-sci_gateway/c/libsciscicos_la-sci_model2blk.lo: sci_gateway/c/sci_model2blk.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_model2blk.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_model2blk.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_model2blk.lo `test -f 'sci_gateway/c/sci_model2blk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_model2blk.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_model2blk.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_model2blk.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sci_gateway/c/sci_model2blk.c' object='sci_gateway/c/libsciscicos_la-sci_model2blk.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_model2blk.lo `test -f 'sci_gateway/c/sci_model2blk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_model2blk.c
-
sci_gateway/c/libsciscicos_la-sci_sctree.lo: sci_gateway/c/sci_sctree.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_sctree.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_sctree.Tpo -c -o sci_gateway/c/libsciscicos_la-sci_sctree.lo `test -f 'sci_gateway/c/sci_sctree.c' || echo '$(srcdir)/'`sci_gateway/c/sci_sctree.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_sctree.Tpo sci_gateway/c/$(DEPDIR)/libsciscicos_la-sci_sctree.Plo
@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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/view_scilab/libsciscicos_algo_la-TextAdapter.lo `test -f 'src/cpp/view_scilab/TextAdapter.cpp' || echo '$(srcdir)/'`src/cpp/view_scilab/TextAdapter.cpp
+src/cpp/libsciscicos_algo_la-sciblk4.lo: src/cpp/sciblk4.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciscicos_algo_la-sciblk4.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Tpo -c -o src/cpp/libsciscicos_algo_la-sciblk4.lo `test -f 'src/cpp/sciblk4.cpp' || echo '$(srcdir)/'`src/cpp/sciblk4.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Tpo src/cpp/$(DEPDIR)/libsciscicos_algo_la-sciblk4.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/cpp/sciblk4.cpp' object='src/cpp/libsciscicos_algo_la-sciblk4.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciscicos_algo_la-sciblk4.lo `test -f 'src/cpp/sciblk4.cpp' || echo '$(srcdir)/'`src/cpp/sciblk4.cpp
+
+src/cpp/libsciscicos_algo_la-createblklist.lo: src/cpp/createblklist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciscicos_algo_la-createblklist.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciscicos_algo_la-createblklist.Tpo -c -o src/cpp/libsciscicos_algo_la-createblklist.lo `test -f 'src/cpp/createblklist.cpp' || echo '$(srcdir)/'`src/cpp/createblklist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciscicos_algo_la-createblklist.Tpo src/cpp/$(DEPDIR)/libsciscicos_algo_la-createblklist.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/cpp/createblklist.cpp' object='src/cpp/libsciscicos_algo_la-createblklist.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciscicos_algo_la-createblklist.lo `test -f 'src/cpp/createblklist.cpp' || echo '$(srcdir)/'`src/cpp/createblklist.cpp
+
+src/cpp/libsciscicos_algo_la-extractblklist.lo: src/cpp/extractblklist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/cpp/libsciscicos_algo_la-extractblklist.lo -MD -MP -MF src/cpp/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Tpo -c -o src/cpp/libsciscicos_algo_la-extractblklist.lo `test -f 'src/cpp/extractblklist.cpp' || echo '$(srcdir)/'`src/cpp/extractblklist.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/cpp/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Tpo src/cpp/$(DEPDIR)/libsciscicos_algo_la-extractblklist.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/cpp/extractblklist.cpp' object='src/cpp/libsciscicos_algo_la-extractblklist.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_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/cpp/libsciscicos_algo_la-extractblklist.lo `test -f 'src/cpp/extractblklist.cpp' || echo '$(srcdir)/'`src/cpp/extractblklist.cpp
+
sci_gateway/cpp/libsciscicos_cli_la-sci_scicos_debug.lo: sci_gateway/cpp/sci_scicos_debug.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_scicos_debug.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_scicos_debug.Tpo -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_scicos_debug.lo `test -f 'sci_gateway/cpp/sci_scicos_debug.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scicos_debug.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_scicos_debug.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_scicos_debug.Plo
@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_vec2var.lo `test -f 'sci_gateway/cpp/sci_vec2var.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_vec2var.cpp
+sci_gateway/cpp/libsciscicos_cli_la-sci_callblk.lo: sci_gateway/cpp/sci_callblk.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_callblk.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Tpo -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_callblk.lo `test -f 'sci_gateway/cpp/sci_callblk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_callblk.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_callblk.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_callblk.cpp' object='sci_gateway/cpp/libsciscicos_cli_la-sci_callblk.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_callblk.lo `test -f 'sci_gateway/cpp/sci_callblk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_callblk.cpp
+
+sci_gateway/cpp/libsciscicos_cli_la-sci_model2blk.lo: sci_gateway/cpp/sci_model2blk.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_model2blk.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Tpo -c -o sci_gateway/cpp/libsciscicos_cli_la-sci_model2blk.lo `test -f 'sci_gateway/cpp/sci_model2blk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_model2blk.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_cli_la-sci_model2blk.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_model2blk.cpp' object='sci_gateway/cpp/libsciscicos_cli_la-sci_model2blk.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_model2blk.lo `test -f 'sci_gateway/cpp/sci_model2blk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_model2blk.cpp
+
sci_gateway/cpp/libsciscicos_la-sci_scicos_debug.lo: sci_gateway/cpp/sci_scicos_debug.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_scicos_debug.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_scicos_debug.Tpo -c -o sci_gateway/cpp/libsciscicos_la-sci_scicos_debug.lo `test -f 'sci_gateway/cpp/sci_scicos_debug.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scicos_debug.cpp
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_scicos_debug.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_scicos_debug.Plo
@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_vec2var.lo `test -f 'sci_gateway/cpp/sci_vec2var.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_vec2var.cpp
+sci_gateway/cpp/libsciscicos_la-sci_callblk.lo: sci_gateway/cpp/sci_callblk.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_callblk.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_callblk.Tpo -c -o sci_gateway/cpp/libsciscicos_la-sci_callblk.lo `test -f 'sci_gateway/cpp/sci_callblk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_callblk.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_callblk.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_callblk.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_callblk.cpp' object='sci_gateway/cpp/libsciscicos_la-sci_callblk.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_callblk.lo `test -f 'sci_gateway/cpp/sci_callblk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_callblk.cpp
+
+sci_gateway/cpp/libsciscicos_la-sci_model2blk.lo: sci_gateway/cpp/sci_model2blk.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_model2blk.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_model2blk.Tpo -c -o sci_gateway/cpp/libsciscicos_la-sci_model2blk.lo `test -f 'sci_gateway/cpp/sci_model2blk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_model2blk.cpp
+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_model2blk.Tpo sci_gateway/cpp/$(DEPDIR)/libsciscicos_la-sci_model2blk.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sci_gateway/cpp/sci_model2blk.cpp' object='sci_gateway/cpp/libsciscicos_la-sci_model2blk.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_model2blk.lo `test -f 'sci_gateway/cpp/sci_model2blk.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_model2blk.cpp
+
.f.o:
$(AM_V_F77)$(F77COMPILE) -c -o $@ $<
SCICOS_IMPEXP int sci_getscicosvars(char *fname, void* pvApiCtx);
/* it was in a separate gateway */
-SCICOS_IMPEXP int sci_model2blk(char *fname, void* pvApiCtx);
-SCICOS_IMPEXP int sci_callblk(char *fname, void* pvApiCtx);
-
+//SCICOS_IMPEXP int sci_model2blk(char *fname, void* pvApiCtx);
+//SCICOS_IMPEXP int sci_callblk(char *fname, void* pvApiCtx);
SCICOS_IMPEXP int sci_loadScicos(char *fname, void* pvApiCtx);
/*--------------------------------------------------------------------------*/
CPP_GATEWAY_PROTOTYPE_EXPORT(sci_validvar, SCICOS_IMPEXP);
CPP_GATEWAY_PROTOTYPE_EXPORT(sci_var2vec, SCICOS_IMPEXP);
CPP_GATEWAY_PROTOTYPE_EXPORT(sci_vec2var, SCICOS_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_model2blk, SCICOS_IMPEXP);
+CPP_GATEWAY_PROTOTYPE_EXPORT(sci_callblk, SCICOS_IMPEXP);
#endif /* GW_SCICOS_HXX_ */
end
//real paramaters
- if (funtyp(i,1)==3 | funtyp(i,1)==5 | funtyp(i,1)==10005) then //sciblocks
- if ll.rpar==[] then rpark=[]; else rpark=var2vec(ll.rpar);end
- else
- rpark=ll.rpar(:)
- end
+ rpark=ll.rpar(:)
rpar=[rpar;rpark]
rpptr(i+1)=rpptr(i)+size(rpark,"*")
+++ /dev/null
-/* Scicos
-*
-* Copyright (C) INRIA -
-*
-* 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 <stdio.h>
-#include "gw_scicos.h"
-#include "stack-c.h"
-#include "scicos_block4.h"
-#include "Scierror.h"
-#include "localization.h"
-#include "cvstr.h"
-#include "createblklist.h"
-#include "extractblklist.h"
-#include "scicos.h"
-#include "sci_malloc.h"
-/*--------------------------------------------------------------------------*/
-extern int *listentry(int *header, int i);
-/*--------------------------------------------------------------------------*/
-int sci_callblk(char *fname, void* pvApiCtx)
-{
-#if 0
- /* auxilary variables -dimension and address-
- * for scilab stack variables
- */
- int *il1 = NULL;
- int m1 = 0, n1 = 0;
- int *il2_1 = NULL;
- int m2_1 = 0, n2_1 = 0;
- int *il2 = NULL;
- int m2 = 0, n2 = 0;
- int *il3 = NULL;
- int m3 = 0, n3 = 0;
-
- /* local variable */
- int len_str = 0;
- char *str = NULL;
- int ierr = 0, ret = 0;
- int j = 0;
- int TopSave = 0;
- int l_tmp = 0;
-
- /* length of the scilab list scicos struct */
- int nblklst = 41;
-
- /* variable for callf */
- scicos_flag flag = 0;
- double t = 0.;
-
- scicos_block Block;
- memset(&Block, 0, sizeof(scicos_block));
-
- /* check number of rhs/lhs param */
- CheckRhs(3, 3);
- CheckLhs(1, 1);
-
- /* check rhs 1 (input scilab structure) */
- il1 = (int *) GetData(1);
- m1 = il1[1];
- n1 = il1[2];
- if (il1[0] != 16)
- {
- Scierror(888, _("%s : First argument must be a scicos_block typed list.\n"), fname);
- return 0;
- }
-
- il2_1 = (int *) (listentry(il1, 1));
- m2_1 = il2_1[1];
- n2_1 = il2_1[2];
- if ((il2_1[0] != 10) || ((m2_1 * n2_1) != nblklst))
- {
- Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), fname);
- return 0;
- }
- len_str = il2_1[5] - 1;
- if (len_str != 0)
- {
- if ((str = (char *) MALLOC((len_str + 1) * sizeof(char))) == NULL)
- {
- Scierror(888, _("%s: Memory allocation error.\n"), fname);
- return 0;
- }
- str[len_str] = '\0';
- C2F(cvstr)(&len_str, &il2_1[5 + nblklst], str, (j = 1, &j), len_str);
- ret = strcmp("scicos_block", str);
- FREE(str);
- if (ret != 0)
- {
- Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), fname);
- return 0;
- }
- }
- else
- {
- Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), fname);
- return 0;
- }
-
- /* convert scilab scicos struct to a C scicos struct */
- ret = extractblklist(il1, &Block, &ierr);
-
- /* error table */
- switch (ierr)
- {
- case -39 :
- Scierror(888, _("%s: Memory allocation error.\n"), fname);
- break;
-
- case 98 :
- Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), fname);
- break;
-
- default:
- break;
- }
-
- if (ierr != 0)
- {
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.ozptr);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.insz);
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.outsz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.evout);
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.oparptr);
- FREE(Block.g);
- FREE(Block.jroot);
- if (strlen(Block.label) != 0)
- {
- FREE(Block.label);
- }
- FREE(Block.mode);
- if (strlen(Block.uid) != 0)
- {
- FREE(Block.uid);
- }
- return 0;
- }
-
- /* check rhs 2 (flag) */
- il2 = (int *) GetData(2);
- m2 = il2[1];
- n2 = il2[2];
- if ((il2[0] != 1) || (m2 * n2 != 1))
- {
- Scierror(888, _("%s : Second argument must be scalar.\n"), fname);
- return 0;
- }
- flag = (scicos_flag) * ((double *)(&il2[4]));
-
- /* check rhs 3 (time) */
- il3 = (int *) GetData(3);
- m3 = il3[1];
- n3 = il3[2];
-
- if ((il3[0] != 1) || (m3 * n3 != 1))
- {
- Scierror(888, _("%s : Third argument must be scalar.\n"), fname);
- return 0;
- }
- t = *((double *)(&il3[4]));
-
- /* call block */
- callf(&t, &Block, &flag);
-
- /* build output scilab structure */
- TopSave = Top;
-
- ierr = createblklist(&Block, &ierr, -1, Block.type);
-
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.ozptr);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.insz);
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.outsz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.evout);
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.oparptr);
- FREE(Block.g);
- FREE(Block.jroot);
- if (strlen(Block.label) != 0)
- {
- FREE(Block.label);
- }
- FREE(Block.mode);
- if (Block.uid != NULL && strlen(Block.uid) != 0)
- {
- FREE(Block.uid);
- }
-
- Top = TopSave;
-
- CreateVar(4, TYPED_LIST_DATATYPE, &nblklst, (j = 1, &j), &l_tmp);
- LhsVar(1) = 4;
- PutLhsVar();
-#endif
- return 0;
-}
-/*--------------------------------------------------------------------------*/
#include "import.h"
#include "il_state.h"
#include "il_sim.h"
-#include "createblklist.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)();
+++ /dev/null
-/* Scicos
-*
-* Copyright (C) INRIA -
-*
-* 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 <stdio.h>
-#include <assert.h>
-#include "gw_scicos.h"
-#include "stack-c.h"
-#include "Scierror.h"
-#include "localization.h"
-#include "scicos_block4.h"
-#include "sci_malloc.h"
-#include "cvstr.h"
-#include "sciblk4.h"
-#include "sciblk2.h"
-#include "MlistGetFieldNumber.h"
-#include "createblklist.h"
-#include "scicos.h"
-/*--------------------------------------------------------------------------*/
-extern int *listentry(int *header, int i);
-extern int C2F(funnum) (char *fname);
-extern int C2F(namstr)();
-extern void F2C(sciblk)();
-/*--------------------------------------------------------------------------*/
-extern int ntabsim;
-extern OpTab tabsim[];
-/*--------------------------------------------------------------------------*/
-/* model2blk Build a scicos_block structure from
-* a scicos model
-*
-* [Block] = model2blk(objs.model)
-*
-* rhs 1 : a scicos model Tlist
-* - 1 : model(1) : !model sim in in2 intyp out out2 outtyp
-* evtin evtout state dstate odstate rpar ipar opar
-* blocktype firing dep_ut label nzcross nmode equations !
-* - 2 : model.sim :
-* - 3 : model.in :
-* - 4 : model.in2 :
-* - 5 : model.intyp :
-* - 6 : model.out :
-* - 7 : model.out2 :
-* - 8 : model.outtyp :
-* - 9 : model.evtin :
-* - 10 : model.evtout :
-* - 11 : model.state :
-* - 12 : model.dsate :
-* - 13 : model.odsate :
-* - 14 : model.rpar :
-* - 15 : model.ipar :
-* - 16 : model.opar :
-* - 17 : model.blocktype :
-* - 18 : model.firing :
-* - 19 : model.dep_ut :
-* - 20 : model.label :
-* - 21 : model.nzcross :
-* - 22 : model.nmode :
-* - 23 : model.equations :
-*
-* lhs 1 : a scicos block Tlist
-*
-* initial rev 12/11/07, Alan
-* 05/07/08, Alan : fix for xprop
-* add extra comments
-* check in/out size and type
-*
-*/
-int sci_model2blk(char *fname, void* pvApiCtx)
-{
-#if 0
- int m1 = 0, n1 = 0;
- int *il1 = NULL;
- int n = 0;
- int mh = 0, nh = 0;
- int *ilh = NULL;
- int mh2 = 0, nh2 = 0;
- int *ilh2 = NULL;
- int mh3 = 0, nh3 = 0;
- int *ilh3 = NULL;
- int ierr = 0;
- int TopSave = 0;
- int i = 0, j = 0;
- int l_tmp = 0;
- double type = 0.0;
- int len_str = 0;
- int lfunpt = 0;
- int typfsim = 0;
- int ifun = 0;
- int *il_sim = NULL;
-
- int id[nsiz];
-
- double *ptr_d = NULL;
- char *ptr_c = NULL;
- unsigned char *ptr_uc = NULL;
- short *ptr_s = NULL;
- unsigned short *ptr_us = NULL;
- SCSINT32_COP *ptr_l = NULL;
- SCSUINT32_COP *ptr_ul = NULL;
- int nblklst = 40;
-
- scicos_block Block;
- memset(&Block, 0, sizeof(scicos_block));
-
-
-
- /* check size of rhs/lhs parameters */
- CheckRhs(1, 1);
- CheckLhs(1, 1);
-
- il1 = (int *) GetData(1);
- m1 = il1[1];
- n1 = il1[2];
-
- /* check for a tlist */
- if (il1[0] != sci_mlist)
- {
- Scierror(888, _("%s : First argument must be a Typed list.\n"), fname);
- return 0;
- }
-
- /* check for a type "scicos model" */
- ilh = (int *) (listentry(il1, 1));
- mh = ilh[1];
- nh = ilh[2];
- if ((ilh[mh * nh + 5] != 22) || \
- (ilh[mh * nh + 6] != 24) || \
- (ilh[mh * nh + 7] != 13) || \
- (ilh[mh * nh + 8] != 14) || \
- (ilh[mh * nh + 9] != 21))
- {
- Scierror(888, _("%s : First argument must be a scicos model.\n"), fname);
- return 0;
- }
-
- /* TODO */
- /* 2 : model.sim */
- n = MlistGetFieldNumber(il1, "sim");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- if (ilh[0] == sci_list)
- {
- /* sim is a list */
- ilh2 = (int *) (listentry(ilh, 2));
- Block.type = (int) * ((double *) (&ilh2[4]));
- ilh2 = (int *) (listentry(ilh, 1));
- typfsim = ilh2[0]; /* typfsim the name the comput funct */
- il_sim = ilh2;
- }
- else
- {
- Block.type = 0;
- typfsim = ilh[0];
- il_sim = ilh;
- }
- /* check if typfsim is a scilab function */
- if ((typfsim == sci_u_function) || (typfsim == sci_c_function))
- {
- /* TODO */
- lfunpt = -1;
- }
- /* check if typfsim is a string */
- else if (typfsim == sci_strings)
- {
- len_str = il_sim[5] - 1;
- C2F(cha1).buf[0] = ' ';
- C2F(cvstr)(&len_str, &il_sim[6], &C2F(cha1).buf[0], (j = 1, &j), len_str);
- C2F(cha1).buf[len_str] = '\0';
- /* search fun ptr of the comput func in the scilab func table */
- ifun = C2F(funnum)(C2F(cha1).buf);
- if (ifun > 0)
- {
- lfunpt = ifun;
- }
- else
- {
- C2F(namstr)(id, &il_sim[6], &len_str, (j = 0, &j));
- C2F(com).fin = 0;
- C2F(funs)(id);
- if ((C2F(com).fun == -1) | (C2F(com).fun == -2))
- {
- lfunpt = -*Lstk(C2F(com).fin);
- }
- else
- {
- lfunpt = 0;
- Scierror(888, _("%s : unknown block : %s\n"), fname, C2F(cha1).buf);
- return 0;
- }
- }
- }
- /* else {
- * error
- }*/
- /* comput func is a scilab function */
- if (lfunpt < 0)
- {
- switch (Block.type)
- {
- case 0:
- Block.funpt = F2C(sciblk);
- break;
- case 1:
- Scierror(888, _("%s : type 1 function not allowed for scilab blocks\n"), fname);
- return 0;
- case 2:
- Scierror(888, _("%s : type 2 function not allowed for scilab blocks\n"), fname);
- return 0;
- case 3:
- Block.funpt = (voidg) sciblk2;
- Block.type = 2;
- break;
- case 5:
- Block.funpt = (voidg) sciblk4;
- Block.type = 4;
- break;
- case 99: /* debugging block */
- Block.funpt = (voidg) sciblk4;
- Block.type = 4;
- break;
- case 10005:
- Block.funpt = (voidg) sciblk4;
- Block.type = 10004;
- break;
- default :
- Scierror(888, _("%s : Undefined Function type\n"), fname);
- return 0;
- }
- Block.scsptr = -lfunpt;
- }
- else if (lfunpt <= ntabsim)
- {
- Block.funpt = (voidg) * (tabsim[lfunpt - 1].fonc);
- Block.scsptr = 0;
- }
- else
- {
- lfunpt -= (ntabsim + 1);
- GetDynFunc(lfunpt, &Block.funpt);
- if (Block.funpt == (voidf) 0)
- {
- Scierror(888, _("%s : Function not found\n"), fname);
- return 0;
- }
- Block.scsptr = 0;
- }
-
- /* check input ports */
- /* 3 : model.in */
- n = MlistGetFieldNumber(il1, "in");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nin = mh * nh;
- Block.insz = NULL;
- Block.inptr = NULL;
- if (Block.nin > 0)
- {
- /* check value of in */
- for (i = 0; i < Block.nin; i++)
- {
- if ((*((double *)(&ilh[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Size. in(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh[4]) + i)));
- return 0;
- }
- }
- /* alloc insz */
- if ((Block.insz = (int *) MALLOC(Block.nin * 3 * sizeof(int))) == NULL)
- {
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- /* alloc inptr */
- if ((Block.inptr = (void **) MALLOC(Block.nin * sizeof(void *))) == NULL)
- {
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- /* 4 : model.in2 */
- n = MlistGetFieldNumber(il1, "in2");
- ilh2 = (int *) (listentry(il1, n));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- /* check value of in2 */
- for (i = 0; i < (mh2 * nh2); i++)
- {
- if ((*((double *)(&ilh2[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Size. in2(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh2[4]) + i)));
- FREE(Block.insz);
- FREE(Block.inptr);
- return 0;
- }
- }
- /* 5 : model.intyp */
- n = MlistGetFieldNumber(il1, "intyp");
- ilh3 = (int *) (listentry(il1, n));
- mh3 = ilh3[1];
- nh3 = ilh3[2];
- /* check value of intyp */
- for (i = 0; i < (mh3 * nh3); i++)
- {
- if ((*((double *)(&ilh3[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Type. intyp(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh3[4]) + i)));
- FREE(Block.insz);
- FREE(Block.inptr);
- return 0;
- }
- }
- if (((mh * nh) == (mh2 * nh2)) && (((mh * nh) == (mh3 * nh3))))
- {
- for (i = 0; i < Block.nin; i++)
- {
- Block.insz[i] = (int) * ((double *)(&ilh[4]) + i);
- Block.insz[Block.nin + i] = (int) * ((double *)(&ilh2[4]) + i);
- type = *((double *)(&ilh3[4]) + i);
- if (type == 1)
- {
- Block.insz[2 * Block.nin + i] = 10;
- }
- else if (type == 2)
- {
- Block.insz[2 * Block.nin + i] = 11;
- }
- else if (type == 3)
- {
- Block.insz[2 * Block.nin + i] = 84;
- }
- else if (type == 4)
- {
- Block.insz[2 * Block.nin + i] = 82;
- }
- else if (type == 5)
- {
- Block.insz[2 * Block.nin + i] = 81;
- }
- else if (type == 6)
- {
- Block.insz[2 * Block.nin + i] = 814;
- }
- else if (type == 7)
- {
- Block.insz[2 * Block.nin + i] = 812;
- }
- else if (type == 8)
- {
- Block.insz[2 * Block.nin + i] = 811;
- }
- else
- {
- Block.insz[2 * Block.nin + i] = 10;
- }
- }
- }
- else
- {
- for (i = 0; i < Block.nin; i++)
- {
- Block.insz[i] = (int) * ((double *)(&ilh[4]) + i);
- Block.insz[Block.nin + i] = 1;
- Block.insz[2 * Block.nin + i] = 10;
- }
- }
-
- for (i = 0; i < Block.nin; i++)
- {
- switch (Block.insz[2 * Block.nin + i])
- {
- case 10 :
- if ((Block.inptr[i] = (double *) MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(double))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_d[j] = 0.;
- }
- break;
- case 11 :
- if ((Block.inptr[i] = (double *) \
- MALLOC(2 * Block.insz[i] * Block.insz[Block.nin + i] * sizeof(double))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.inptr[i];
- for (j = 0; j < 2 * Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_d[j] = 0.;
- }
- break;
- case 84 :
- if ((Block.inptr[i] = (SCSINT32_COP *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(SCSINT32_COP))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_l = (SCSINT32_COP *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_l[j] = 0;
- }
- break;
- case 82 :
- if ((Block.inptr[i] = (short *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(short))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_s = (short *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_s[j] = 0;
- }
- break;
- case 81 :
- if ((Block.inptr[i] = (char *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(char))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_c = (char *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_c[j] = 0;
- }
- break;
- case 814 :
- if ((Block.inptr[i] = (SCSUINT32_COP *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(SCSUINT32_COP))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_ul = (SCSUINT32_COP *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_ul[j] = 0;
- }
- break;
- case 812 :
- if ((Block.inptr[i] = (unsigned short *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(unsigned short))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_us = (unsigned short *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_us[j] = 0;
- }
- break;
- case 811 :
- if ((Block.inptr[i] = (unsigned char *) \
- MALLOC(Block.insz[i] * Block.insz[Block.nin + i] * sizeof(unsigned char))) == NULL)
- {
- for (j = 0; j < i; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_uc = (unsigned char *) Block.inptr[i];
- for (j = 0; j < Block.insz[i]*Block.insz[Block.nin + i]; j++)
- {
- ptr_uc[j] = 0;
- }
- break;
- }
- }
- }
-
- /* check output ports */
- /* 6 : model.out */
- n = MlistGetFieldNumber(il1, "out");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nout = mh * nh;
- Block.outsz = NULL;
- Block.outptr = NULL;
- if (Block.nout > 0)
- {
- /* check value of out */
- for (i = 0; i < Block.nout; i++)
- {
- if ((*((double *)(&ilh[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Size. out(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh[4]) + i)));
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- return 0;
- }
- }
- /* alloc outsz */
- if ((Block.outsz = (int *) MALLOC(Block.nout * 3 * sizeof(int))) == NULL)
- {
- Scierror(888, _("%s : Allocation error.\n"), fname);
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- return 0;
- }
- /* alloc outptr */
- if ((Block.outptr = (void **) MALLOC(Block.nout * sizeof(void *))) == NULL)
- {
- FREE(Block.outsz);
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- /* 7 : model.out2 */
- n = MlistGetFieldNumber(il1, "out2");
- ilh2 = (int *) (listentry(il1, n));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- /* check value of out2 */
- for (i = 0; i < (mh2 * nh2); i++)
- {
- if ((*((double *)(&ilh2[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Size. out2(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh2[4]) + i)));
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.insz);
- FREE(Block.inptr);
- FREE(Block.outptr);
- FREE(Block.outsz);
- return 0;
- }
- }
- /* 8 : model.outtyp */
- n = MlistGetFieldNumber(il1, "outtyp");
- ilh3 = (int *) (listentry(il1, n));
- mh3 = ilh3[1];
- nh3 = ilh3[2];
- /* check value of intyp */
- for (i = 0; i < (mh3 * nh3); i++)
- {
- if ((*((double *)(&ilh3[4]) + i)) <= 0.)
- {
- Scierror(888, _("%s : Undetermined Type. outtyp(%d)=%d. Please adjust your model.\n"), \
- fname, i + 1, (int)(*((double *)(&ilh3[4]) + i)));
- FREE(Block.insz);
- FREE(Block.inptr);
- FREE(Block.outptr);
- FREE(Block.outsz);
- return 0;
- }
- }
- if (((mh * nh) == (mh2 * nh2)) && (((mh * nh) == (mh3 * nh3))))
- {
- for (i = 0; i < Block.nout; i++)
- {
- Block.outsz[i] = (int) * ((double *)(&ilh[4]) + i);
- Block.outsz[Block.nout + i] = (int) * ((double *)(&ilh2[4]) + i);
- type = *((double *)(&ilh3[4]) + i);
- if (type == 1)
- {
- Block.outsz[2 * Block.nout + i] = 10;
- }
- else if (type == 2)
- {
- Block.outsz[2 * Block.nout + i] = 11;
- }
- else if (type == 3)
- {
- Block.outsz[2 * Block.nout + i] = 84;
- }
- else if (type == 4)
- {
- Block.outsz[2 * Block.nout + i] = 82;
- }
- else if (type == 5)
- {
- Block.outsz[2 * Block.nout + i] = 81;
- }
- else if (type == 6)
- {
- Block.outsz[2 * Block.nout + i] = 814;
- }
- else if (type == 7)
- {
- Block.outsz[2 * Block.nout + i] = 812;
- }
- else if (type == 8)
- {
- Block.outsz[2 * Block.nout + i] = 811;
- }
- else
- {
- Block.outsz[2 * Block.nout + i] = 10;
- }
- }
- }
- else
- {
- for (i = 0; i < Block.nout; i++)
- {
- Block.outsz[i] = (int) * ((double *)(&ilh[4]) + i);
- Block.outsz[Block.nout + i] = 1;
- Block.outsz[2 * Block.nout + i] = 10;
- }
- }
- for (i = 0; i < Block.nout; i++)
- {
- switch (Block.outsz[2 * Block.nout + i])
- {
- case 10 :
- if ((Block.outptr[i] = (double *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_d[j] = 0.;
- }
- break;
- case 11 :
- if ((Block.outptr[i] = (double *) \
- MALLOC(2 * Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.outptr[i];
- for (j = 0; j < 2 * Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_d[j] = 0.;
- }
- break;
- case 84 :
- if ((Block.outptr[i] = (SCSINT32_COP *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(SCSINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_l = (SCSINT32_COP *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_l[j] = 0;
- }
- break;
- case 82 :
- if ((Block.outptr[i] = (short *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_s = (short *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_s[j] = 0;
- }
- break;
- case 81 :
- if ((Block.outptr[i] = (char *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_c = (char *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_c[j] = 0;
- }
- break;
- case 814 :
- if ((Block.outptr[i] = (SCSUINT32_COP *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(SCSUINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_ul = (SCSUINT32_COP *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_ul[j] = 0;
- }
- break;
- case 812 :
- if ((Block.outptr[i] = (unsigned short *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(unsigned short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_us = (unsigned short *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_us[j] = 0;
- }
- break;
- case 811 :
- if ((Block.outptr[i] = (unsigned char *) \
- MALLOC(Block.outsz[i] * Block.outsz[Block.nout + i] * sizeof(unsigned char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_uc = (unsigned char *) Block.outptr[i];
- for (j = 0; j < Block.outsz[i]*Block.outsz[Block.nout + i]; j++)
- {
- ptr_uc[j] = 0;
- }
- break;
- }
- }
- }
-
- /* event input port */
- /* 9 : model.evtin */
-
- /* event output port */
- /* 10 : model.evtout */
- n = MlistGetFieldNumber(il1, "evtout");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nevout = mh * nh;
- Block.evout = NULL;
- if (Block.nevout > 0)
- {
- if ((Block.evout = (double *) MALLOC(Block.nevout * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- n = MlistGetFieldNumber(il1, "firing");
- ilh2 = (int *) (listentry(il1, n));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- if ((mh * nh) == (mh2 * nh2))
- {
- for (j = 0; j < Block.nevout; j++)
- {
- Block.evout[j] = *((double *)(&ilh2[4]) + j);
- }
- }
- else
- {
- for (j = 0; j < Block.nevout; j++)
- {
- Block.evout[j] = -1.0;
- }
- }
- }
-
- /* continuous state */
- /* 11 : model.state */
- n = MlistGetFieldNumber(il1, "state");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nx = mh * nh;
- Block.x = NULL;
- Block.xprop = NULL;
- Block.xd = NULL;
- Block.res = NULL;
- if (Block.nx > 0)
- {
- /* x */
- if ((Block.x = (double *) MALLOC(Block.nx * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nx; j++)
- {
- Block.x[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* xd */
- if ((Block.xd = (double *) MALLOC(Block.nx * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nx; j++)
- {
- Block.xd[j] = 0.;
- }
- /* xprop */
- if ((Block.xprop = (int *) MALLOC(Block.nx * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nx; j++)
- {
- Block.xprop[j] = 1;
- }
- /* res */
- /*if (blktyp>10000) {*/
- if ((Block.res = (double *) MALLOC(Block.nx * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nx; j++)
- {
- Block.res[j] = 0.;
- }
- /*}*/
- }
-
- /* discrete state */
- /* 12 : model.dstate */
- n = MlistGetFieldNumber(il1, "dstate");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nz = mh * nh;
- Block.z = NULL;
- if (Block.nz > 0)
- {
- if ((Block.z = (double *) MALLOC(Block.nz * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nz; j++)
- {
- Block.z[j] = *((double *)(&ilh[4]) + j);
- }
- }
-
- /* discrete object state */
- /* 13 : model.odstate */
- n = MlistGetFieldNumber(il1, "odstate");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.noz = mh * nh;
- Block.ozsz = NULL;
- Block.oztyp = NULL;
- Block.ozptr = NULL;
- if (Block.noz > 0)
- {
- if ((Block.ozsz = (int *) MALLOC(2 * Block.noz * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- if ((Block.oztyp = (int *) MALLOC(Block.noz * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- if ((Block.ozptr = (void **) MALLOC(Block.noz * sizeof(void *))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (i = 0; i < mh * nh; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block.ozsz[i] = mh2;
- Block.ozsz[Block.noz + i] = nh2;
- if (ilh2[0] == 1)
- {
- if (ilh2[3] == 0)
- {
- Block.oztyp[i] = 10;
- if ((Block.ozptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_d[j] = *((double *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 1)
- {
- Block.oztyp[i] = 11;
- if ((Block.ozptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.ozptr[i];
- for (j = 0; j < 2 * mh2 * nh2; j++)
- {
- ptr_d[j] = *((double *)(&ilh2[4]) + j);
- }
- }
- }
- else if (ilh2[0] == 8)
- {
- if (ilh2[3] == 4)
- {
- Block.oztyp[i] = 84;
- if ((Block.ozptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_l = (SCSINT32_COP *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_l[j] = *((SCSINT32_COP *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 2)
- {
- Block.oztyp[i] = 82;
- if ((Block.ozptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_s = (short *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_s[j] = *((short *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 1)
- {
- Block.oztyp[i] = 81;
- if ((Block.ozptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_c = (char *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_c[j] = *((char *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 14)
- {
- Block.oztyp[i] = 814;
- if ((Block.ozptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_ul = (SCSUINT32_COP *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_ul[j] = *((SCSUINT32_COP *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 12)
- {
- Block.oztyp[i] = 812;
- if ((Block.ozptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_us = (unsigned short *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_us[j] = *((unsigned short *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 11)
- {
- Block.oztyp[i] = 811;
- if ((Block.ozptr[i] = (unsigned char *) MALLOC(mh2 * nh2 * sizeof(unsigned char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_uc = (unsigned char *) Block.ozptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_uc[j] = *((unsigned char *)(&ilh2[4]) + j);
- }
- }
- }
- }
- }
-
- /* real parameters */
- /* 14 : model.rpar */
- n = MlistGetFieldNumber(il1, "rpar");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nrpar = mh * nh;
- Block.rpar = NULL;
- if (Block.nrpar > 0)
- {
- if ((Block.rpar = (double *) MALLOC(Block.nrpar * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- for (j = 0; j < Block.nrpar; j++)
- {
- Block.rpar[j] = *((double *)(&ilh[4]) + j);
- }
- }
-
- /* integer parameters */
- /* 15 : model.ipar */
- n = MlistGetFieldNumber(il1, "ipar");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nipar = mh * nh;
- Block.ipar = NULL;
- if (Block.nipar > 0)
- {
- if ((Block.ipar = (int *) MALLOC(Block.nipar * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nipar; j++)
- {
- Block.ipar[j] = (int) * ((double *)(&ilh[4]) + j);
- }
- }
-
- /* object parameters */
- /* 16 : model.opar */
- n = MlistGetFieldNumber(il1, "opar");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nopar = mh * nh;
- Block.oparsz = NULL;
- Block.opartyp = NULL;
- Block.oparptr = NULL;
- if (Block.nopar > 0)
- {
- if ((Block.oparsz = (int *) MALLOC(2 * Block.nopar * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- if ((Block.opartyp = (int *) MALLOC(Block.nopar * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- if ((Block.oparptr = (void **) MALLOC(Block.nopar * sizeof(void *))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (i = 0; i < mh * nh; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block.oparsz[i] = mh2;
- Block.oparsz[Block.nopar + i] = nh2;
- if (ilh2[0] == 1)
- {
- if (ilh2[3] == 0)
- {
- Block.opartyp[i] = 10;
- if ((Block.oparptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_d = (double *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_d[j] = *((double *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 1)
- {
- Block.opartyp[i] = 11;
- if ((Block.oparptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- ptr_d = (double *) Block.oparptr[i];
- for (j = 0; j < 2 * mh2 * nh2; j++)
- {
- ptr_d[j] = *((double *)(&ilh2[4]) + j);
- }
- }
- }
- else if (ilh2[0] == 8)
- {
- if (ilh2[3] == 4)
- {
- Block.opartyp[i] = 84;
- if ((Block.oparptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_l = (SCSINT32_COP *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_l[j] = *((SCSINT32_COP *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 2)
- {
- Block.opartyp[i] = 82;
- if ((Block.oparptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_s = (short *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_s[j] = *((short *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 1)
- {
- Block.opartyp[i] = 81;
- if ((Block.oparptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_c = (char *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_c[j] = *((char *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 14)
- {
- Block.opartyp[i] = 814;
- if ((Block.oparptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_ul = (SCSUINT32_COP *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_ul[j] = *((SCSUINT32_COP *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 12)
- {
- Block.opartyp[i] = 812;
- if ((Block.oparptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_us = (unsigned short *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_us[j] = *((unsigned short *)(&ilh2[4]) + j);
- }
- }
- else if (ilh2[3] == 11)
- {
- Block.opartyp[i] = 811;
- if ((Block.oparptr[i] = (unsigned char *) MALLOC(mh2 * nh2 * sizeof(unsigned char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- ptr_uc = (unsigned char *) Block.oparptr[i];
- for (j = 0; j < mh2 * nh2; j++)
- {
- ptr_uc[j] = *((unsigned char *)(&ilh2[4]) + j);
- }
- }
- }
- }
- }
-
- /* labels */
- /* 20 : model.label */
- n = MlistGetFieldNumber(il1, "label");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- if (mh * nh != 0)
- {
- len_str = ilh[5] - 1;
- if (len_str < 0)
- {
- len_str = 0;
- }
- }
- else
- {
- len_str = 0;
- }
- if ((Block.label = (char *) MALLOC((len_str + 1) * sizeof(char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- Block.label[len_str] = '\0';
- if (len_str > 0)
- {
- C2F(cvstr)(&len_str, &ilh[6], Block.label, (j = 1, &j), len_str);
- }
-
- /* zero crossing */
- /* 21 : model.nzcross */
- n = MlistGetFieldNumber(il1, "nzcross");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.ng = (int) * ((double *)(&ilh[4]));
- Block.g = NULL;
- Block.jroot = NULL;
- if (Block.ng > 0)
- {
- if ((Block.g = (double *) MALLOC(Block.ng * sizeof(double))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.xprop);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.ng; j++)
- {
- Block.g[j] = 0.;
- }
- if ((Block.jroot = (int *) MALLOC(Block.ng * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.xprop);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- FREE(Block.g);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.ng; j++)
- {
- Block.jroot[j] = 0;
- }
- }
-
- /* mode */
- /* 22 : model.nmode */
- n = MlistGetFieldNumber(il1, "nmode");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.nmode = (int) * ((double *)(&ilh[4]));
- Block.mode = NULL;
- if (Block.nmode > 0)
- {
- if ((Block.mode = (int *) MALLOC(Block.nmode * sizeof(int))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.xprop);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- FREE(Block.g);
- FREE(Block.jroot);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
-
- for (j = 0; j < Block.nmode; j++)
- {
- Block.mode[j] = 0;
- }
- }
-
- /* uids */
- /* 23 : model.uid */
- n = MlistGetFieldNumber(il1, "uid");
- ilh = (int *) (listentry(il1, n));
- mh = ilh[1];
- nh = ilh[2];
- Block.uid = "";
- if (mh * nh != 0)
- {
- len_str = ilh[5] - 1;
- if (len_str != 0)
- {
- if ((Block.uid = (char *) MALLOC((len_str + 1) * sizeof(char))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.xprop);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- FREE(Block.g);
- FREE(Block.jroot);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- Block.uid[len_str] = '\0';
- C2F(cvstr)(&len_str, &ilh[6], Block.uid, (j = 1, &j), len_str);
- }
- }
-
- /* work */
- if ((Block.work = (void **) MALLOC(sizeof(void *))) == NULL)
- {
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.xprop);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- FREE(Block.g);
- FREE(Block.jroot);
- FREE(Block.mode);
- Scierror(888, _("%s : Allocation error.\n"), fname);
- return 0;
- }
- *Block.work = NULL;
-
- TopSave = Top;
-
- ierr = createblklist(&Block, &ierr, -1, Block.type);
-
- for (j = 0; j < Block.nin; j++)
- {
- FREE(Block.inptr[j]);
- }
- FREE(Block.inptr);
- FREE(Block.insz);
- for (j = 0; j < Block.nout; j++)
- {
- FREE(Block.outptr[j]);
- }
- FREE(Block.outptr);
- FREE(Block.outsz);
- FREE(Block.evout);
- FREE(Block.x);
- FREE(Block.xd);
- FREE(Block.res);
- FREE(Block.z);
- FREE(Block.ozsz);
- FREE(Block.oztyp);
- for (j = 0; j < Block.noz; j++)
- {
- FREE(Block.ozptr[j]);
- }
- FREE(Block.rpar);
- FREE(Block.ipar);
- FREE(Block.oparsz);
- FREE(Block.opartyp);
- for (j = 0; j < Block.nopar; j++)
- {
- FREE(Block.oparptr[j]);
- }
- FREE(Block.label);
- FREE(Block.g);
- FREE(Block.jroot);
- FREE(Block.mode);
- Top = TopSave;
-
- CreateVar(2, TYPED_LIST_DATATYPE, &nblklst, (j = 1, &j), &l_tmp);
- LhsVar(1) = 2;
- PutLhsVar();
-#endif
- return 0;
-}
-/*--------------------------------------------------------------------------*/
-
--- /dev/null
+/* Scicos
+*
+* Copyright (C) 2015 - Scilab Enterprises - Antoine ELIAS
+* Copyright (C) INRIA -
+*
+* 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 <string>
+#include <cwchar>
+#include <cstring>
+
+#include "gw_scicos.hxx"
+#include "extractblklist.hxx"
+#include "createblklist.hxx"
+
+#include "internal.hxx"
+#include "function.hxx"
+#include "string.hxx"
+#include "double.hxx"
+#include "int.hxx"
+#include "mlist.hxx"
+#include "context.hxx"
+#include "configvariable.hxx"
+
+extern "C"
+{
+#include "sci_malloc.h"
+#include "scicos.h"
+#include "scicos_block4.h"
+#include "Scierror.h"
+#include "localization.h"
+}
+/*--------------------------------------------------------------------------*/
+static const std::string name = "callblk";
+/*--------------------------------------------------------------------------*/
+static void clearSubBlock(void* sub)
+{
+ if (sub)
+ {
+ FREE(sub);
+ }
+}
+
+static void clearBlock(scicos_block* Block)
+{
+ clearSubBlock(Block->z);
+ clearSubBlock(Block->ozsz);
+ clearSubBlock(Block->oztyp);
+ for (int j = 0; j < Block->noz; j++)
+ {
+ clearSubBlock(Block->ozptr[j]);
+ }
+ clearSubBlock(Block->ozptr);
+ clearSubBlock(Block->x);
+ clearSubBlock(Block->xd);
+ clearSubBlock(Block->xprop);
+ clearSubBlock(Block->res);
+ clearSubBlock(Block->insz);
+ for (int j = 0; j < Block->nin; j++)
+ {
+ clearSubBlock(Block->inptr[j]);
+ }
+ clearSubBlock(Block->inptr);
+ clearSubBlock(Block->outsz);
+ for (int j = 0; j < Block->nout; j++)
+ {
+ clearSubBlock(Block->outptr[j]);
+ }
+ clearSubBlock(Block->outptr);
+ clearSubBlock(Block->evout);
+ clearSubBlock(Block->rpar);
+ clearSubBlock(Block->ipar);
+ clearSubBlock(Block->oparsz);
+ clearSubBlock(Block->opartyp);
+ for (int j = 0; j < Block->nopar; j++)
+ {
+ clearSubBlock(Block->oparptr[j]);
+ }
+ clearSubBlock(Block->oparptr);
+ clearSubBlock(Block->g);
+ clearSubBlock(Block->jroot);
+ if (Block->label)
+ {
+ clearSubBlock(Block->label);
+ }
+ clearSubBlock(Block->mode);
+ if (Block->uid)
+ {
+ clearSubBlock(Block->uid);
+ }
+}
+/*--------------------------------------------------------------------------*/
+types::Function::ReturnValue sci_callblk(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+ types::InternalType* pIT = nullptr;
+ types::TList* tl = nullptr;
+ types::String* s = nullptr;
+ types::Double* d = nullptr;
+
+ /* length of the scilab list scicos struct */
+ const int nblklst = 41;
+
+ scicos_block Block;
+ memset(&Block, 0, sizeof(scicos_block));
+
+ if (in.size() != 3)
+ {
+ Scierror(77, _("%s: Wrong number of input argument: %d expected.\n"), name.data(), 3);
+ return types::Function::Error;
+ }
+
+ if (_iRetCount != 1)
+ {
+ Scierror(78, _("%s: Wrong number of output argument(s): %d expected.\n"), name.data(), 1);
+ return types::Function::Error;
+ }
+
+ pIT = in[0];
+
+ if (pIT->isTList() == false)
+ {
+ Scierror(888, _("%s : First argument must be a scicos_block typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ tl = pIT->getAs<types::TList>();
+ pIT = tl->get(0);
+
+ if (pIT->isString() == false)
+ {
+ Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ s = pIT->getAs<types::String>();
+ if (s->getSize() != nblklst)
+ {
+ Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ if (wcscmp(s->get()[0], L"scicos_block"))
+ {
+ Scierror(888, _("%s : First argument must be a valid scicos_block typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ /* convert scilab scicos struct to a C scicos struct */
+ if (extractblklist(tl, &Block) == false)
+ {
+ clearBlock(&Block);
+ return types::Function::Error;
+ }
+
+ d = in[1]->getAs< types::Double>();
+ if (d->isDouble() == false || d->isScalar() == false)
+ {
+ Scierror(888, _("%s : Second argument must be scalar.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ scicos_flag flag = static_cast<scicos_flag>(static_cast<int>(d->get()[0]));
+
+ d = in[2]->getAs< types::Double>();
+ if (d->isDouble() == false || d->isScalar() == false)
+ {
+ Scierror(888, _("%s : Third argument must be scalar.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ double t = d->get()[0];
+
+ /* call block */
+ callf(&t, &Block, &flag);
+
+
+ out.push_back(createblklist(&Block, -1, Block.type));
+ clearBlock(&Block);
+ return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
--- /dev/null
+/* Scicos
+*
+* Copyright (C) 2015 - Scilab Enterprises - Antoine ELIAS
+* Copyright (C) INRIA -
+*
+* 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 <string>
+#include <cwchar>
+#include <cstring>
+
+#include "gw_scicos.hxx"
+#include "createblklist.hxx"
+
+#include "internal.hxx"
+#include "function.hxx"
+#include "string.hxx"
+#include "double.hxx"
+#include "int.hxx"
+#include "list.hxx"
+#include "mlist.hxx"
+#include "context.hxx"
+#include "configvariable.hxx"
+
+extern "C"
+{
+#include "machine.h" /* F2C */
+#include "scicos_block4.h"
+#include "sci_malloc.h"
+#include "sciblk4.h"
+#include "sciblk2.h"
+#include "MlistGetFieldNumber.h"
+#include "scicos.h"
+#include "charEncoding.h"
+#include "Scierror.h"
+#include "localization.h"
+
+ extern void F2C(sciblk)();
+}
+/*--------------------------------------------------------------------------*/
+//extern int *listentry(int *header, int i);
+//extern int C2F(funnum) (char *fname);
+//extern int C2F(namstr)();
+/*--------------------------------------------------------------------------*/
+//extern int ntabsim;
+//extern OpTab tabsim[];
+/*--------------------------------------------------------------------------*/
+/* model2blk Build a scicos_block structure from
+* a scicos model
+*
+* [Block] = model2blk(objs.model)
+*
+* rhs 1 : a scicos model Tlist
+* - 1 : model(1) : !model sim in in2 intyp out out2 outtyp
+* evtin evtout state dstate odstate rpar ipar opar
+* blocktype firing dep_ut label nzcross nmode equations !
+* - 2 : model.sim :
+* - 3 : model.in :
+* - 4 : model.in2 :
+* - 5 : model.intyp :
+* - 6 : model.out :
+* - 7 : model.out2 :
+* - 8 : model.outtyp :
+* - 9 : model.evtin :
+* - 10 : model.evtout :
+* - 11 : model.state :
+* - 12 : model.dsate :
+* - 13 : model.odsate :
+* - 14 : model.rpar :
+* - 15 : model.ipar :
+* - 16 : model.opar :
+* - 17 : model.blocktype :
+* - 18 : model.firing :
+* - 19 : model.dep_ut :
+* - 20 : model.label :
+* - 21 : model.nzcross :
+* - 22 : model.nmode :
+* - 23 : model.equations :
+*
+* lhs 1 : a scicos block Tlist
+*
+* initial rev 12/11/07, Alan
+* 05/07/08, Alan : fix for xprop
+* add extra comments
+* check in/out size and type
+*
+*/
+static const std::string name = "model2blk";
+
+static void freeSubBlock(void* _ptr)
+{
+ if (_ptr)
+ {
+ FREE(_ptr);
+ }
+}
+
+static void freeBlock(scicos_block* block)
+{
+ for (int i = 0; i < block->nin; ++i)
+ {
+ freeSubBlock(block->inptr[i]);
+ }
+
+ freeSubBlock(block->inptr);
+ freeSubBlock(block->insz);
+
+ for (int i = 0; i < block->nout; ++i)
+ {
+ freeSubBlock(block->outptr[i]);
+ }
+ freeSubBlock(block->outptr);
+ freeSubBlock(block->outsz);
+
+ freeSubBlock(block->evout);
+ freeSubBlock(block->x);
+ freeSubBlock(block->xd);
+ freeSubBlock(block->xprop);
+ freeSubBlock(block->res);
+ freeSubBlock(block->z);
+ freeSubBlock(block->ozsz);
+ freeSubBlock(block->oztyp);
+
+ for (int i = 0; i < block->noz; ++i)
+ {
+ freeSubBlock(block->ozptr[i]);
+ }
+ freeSubBlock(block->ozptr);
+
+ freeSubBlock(block->rpar);
+ freeSubBlock(block->ipar);
+ freeSubBlock(block->oparsz);
+ freeSubBlock(block->opartyp);
+
+ for (int i = 0; i < block->nopar; ++i)
+ {
+ freeSubBlock(block->oparptr[i]);
+ }
+ freeSubBlock(block->oparptr);
+ freeSubBlock(block->g);
+ freeSubBlock(block->label);
+ freeSubBlock(block->jroot);
+ freeSubBlock(block->mode);
+ freeSubBlock(block->uid);
+ freeSubBlock(block->work);
+}
+
+template<typename T>
+bool alloc_and_set(T* t, void** v)
+{
+ const int size = t->getSize();
+ typename T::type* src = t->get();
+ *v = MALLOC(sizeof(typename T::type) * size);
+ if (*v == nullptr)
+ {
+ return false;
+ }
+
+ for (int i = 0; i < size; ++i)
+ {
+ ((typename T::type*)(*v))[i] = src[i];
+ }
+
+ return true;
+}
+
+types::Function::ReturnValue sci_model2blk(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+ types::InternalType* pIT = nullptr;
+ types::InternalType* il_sim = nullptr;
+
+ /* misc */
+ types::Double* d = nullptr;
+ types::List * l = nullptr;
+ types::String * s = nullptr;
+
+ scicos_block Block;
+ memset(&Block, 0, sizeof(scicos_block));
+
+ if (in.size() != 1)
+ {
+ Scierror(77, _("%s: Wrong number of input argument: %d expected.\n"), name.data(), 1);
+ return types::Function::Error;
+ }
+
+ if (_iRetCount != 1)
+ {
+ Scierror(78, _("%s: Wrong number of output argument(s): %d expected.\n"), name.data(), 1);
+ return types::Function::Error;
+ }
+
+ pIT = in[0];
+ /* check for a tlist */
+ if (pIT->isMList() == false)
+ {
+ Scierror(888, _("%s : First argument must be a Typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ types::MList* m = pIT->getAs<types::MList>();
+
+ /* check for a type "scicos model" */
+ if (wcscmp(m->getTypeStr().data(), L"model"))
+ {
+ Scierror(888, _("%s : First argument must be a Typed list.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ char* c = wide_string_to_UTF8(m->getTypeStr().data());
+ std::string blockname(c);
+ FREE(c);
+
+ /* 2 : model.sim */
+ pIT = m->getField(L"sim");
+ if (pIT->isList())
+ {
+ l = pIT->getAs<types::List>();
+ il_sim = l->get(0)->getAs<types::Double>();
+ d = l->get(1)->getAs<types::Double>();
+ Block.type = static_cast<int>(d->get()[0]);
+ }
+ else
+ {
+ Block.type = 0;
+ il_sim = pIT;
+ }
+
+ bool isMacro = false;
+ /* check if typfsim is a scilab function */
+ if (il_sim->isMacro() || il_sim->isMacroFile())
+ {
+ isMacro = true;
+ }
+ else if (il_sim->isString())
+ {
+ types::String* funStr = il_sim->getAs<types::String>();
+ wchar_t* w_str = funStr->get(0);
+ char* c_str = wide_string_to_UTF8(w_str);
+ void* f = funnum2(c_str); // Search associated function number of function name
+ // Block is defined by a C or Fortran function
+ if (f != nullptr)
+ {
+ // C interface from "tabsim" defined in blocks.h
+ Block.funpt = (voidg)f;
+ }
+ // Block is defined by a predefined scilab function
+ else
+ {
+ ConfigVariable::EntryPointStr* pEP = ConfigVariable::getEntryPoint(w_str);
+ if (pEP)
+ {
+ //linked functions
+ Block.funpt = static_cast<voidg>(pEP->functionPtr);
+ }
+ else
+ {
+ types::InternalType* pMacro = symbol::Context::getInstance()->get(symbol::Symbol(w_str));
+ if (pMacro && pMacro->isCallable())
+ {
+ //macros
+ il_sim = pMacro;
+ isMacro = true;
+ }
+ else
+ {
+ Scierror(888, _("%s : unknown block : %s\n"), name.data(), blockname.data());
+ return types::Function::Error;
+ }
+ }
+ }
+ }
+
+ if (isMacro)
+ {
+ switch (Block.type)
+ {
+ case 0:
+ Block.funpt = F2C(sciblk);
+ break;
+ case 1:
+ Scierror(888, _("%s : type 1 function not allowed for scilab blocks\n"), name.data());
+ return types::Function::Error;
+ case 2:
+ Scierror(888, _("%s : type 2 function not allowed for scilab blocks\n"), name.data());
+ return types::Function::Error;
+ case 3:
+ Block.funpt = (voidg)sciblk2;
+ Block.type = 2;
+ break;
+ case 5:
+ Block.funpt = (voidg)sciblk4;
+ Block.type = 4;
+ break;
+ case 99: /* debugging block */
+ Block.funpt = (voidg)sciblk4;
+ Block.type = 4;
+ break;
+ case 10005:
+ Block.funpt = (voidg)sciblk4;
+ Block.type = 10004;
+ break;
+ default:
+ Scierror(888, _("%s : Undefined Function type\n"), name.data());
+ return types::Function::Error;
+ }
+ Block.scsptr = static_cast<void*>(il_sim);
+ }
+
+ /* check input ports */
+ /* 3 : model.in */
+ pIT = m->getField(L"in");
+ d = pIT->getAs<types::Double>();
+ const int sizeIn = d->getSize();
+ Block.nin = d->getSize();
+ Block.insz = nullptr;
+ Block.inptr = nullptr;
+ if (Block.nin > 0)
+ {
+ const double* const vIn = d->get();
+ for (int i = 0; i < sizeIn; ++i)
+ {
+ /* check value of in */
+ if (vIn[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. in(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vIn[i]));
+ return types::Function::Error;
+ }
+ }
+
+ /* alloc insz */
+ if ((Block.insz = (int *)MALLOC(Block.nin * 3 * sizeof(int))) == nullptr)
+ {
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+ /* alloc inptr */
+ if ((Block.inptr = (void **)MALLOC(Block.nin * sizeof(void *))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ /* 4 : model.in2 */
+ pIT = m->getField(L"in2");
+ d = pIT->getAs<types::Double>();
+ const int sizeIn2 = d->getSize();
+ const double* const vIn2 = d->get();
+ for (int i = 0; i < sizeIn2; ++i)
+ {
+ /* check value of in2 */
+ if (vIn2[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. in2(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vIn2[i]));
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+ }
+
+ /* 5 : model.intyp */
+ pIT = m->getField(L"intyp");
+ d = pIT->getAs<types::Double>();
+ const int sizeIntyp = d->getSize();
+ const double* const vIntype = d->get();
+ for (int i = 0; i < sizeIntyp; ++i)
+ {
+ /* check value of intyp */
+ if (vIntype[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. intyp(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vIntype[i]));
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+ }
+
+ if (sizeIn == sizeIn2 && sizeIn == sizeIntyp)
+ {
+ for (int i = 0; i < sizeIn; ++i)
+ {
+ Block.insz[i] = static_cast<int>(vIn[i]);
+ Block.insz[i + sizeIn] = static_cast<int>(vIn2[i]);
+ int val = 0;
+ switch (static_cast<int>(vIntype[i]))
+ {
+ case 1:
+ default:
+ val = 10;
+ break;
+ case 2:
+ val = 11;
+ break;
+ case 3:
+ val = 84;
+ break;
+ case 4:
+ val = 82;
+ break;
+ case 5:
+ val = 81;
+ break;
+ case 6:
+ val = 814;
+ break;
+ case 7:
+ val = 812;
+ break;
+ case 8:
+ val = 811;
+ break;
+ }
+
+ Block.insz[i + sizeIn * 2] = val;
+ }
+ }
+ else
+ {
+ for (int i = 0; i < Block.nin; i++)
+ {
+ Block.insz[i] = static_cast<int>(vIn[i]);
+ Block.insz[i + sizeIn] = 1;
+ Block.insz[i + sizeIn * 2] = 10;
+ }
+ }
+
+ for (int i = 0; i < sizeIn; i++)
+ {
+ int size = Block.insz[i] * Block.insz[Block.nin + i];
+ switch (Block.insz[2 * sizeIn + i])
+ {
+ case 10: //double
+ size *= sizeof(double);
+ break;
+ case 11: //complex
+ size *= 2 * sizeof(double);
+ break;
+ case 84: //int32
+ size *= sizeof(SCSINT32_COP);
+ break;
+ case 82: //int16
+ size *= sizeof(short);
+ break;
+ case 81: //int8
+ size *= sizeof(char);
+ break;
+ case 814: //uint32
+ size *= sizeof(SCSUINT32_COP);
+ break;
+ case 812: //uint16
+ size *= sizeof(unsigned short);
+ break;
+ case 811: //uint8
+ size *= sizeof(unsigned char);
+ break;
+ default:
+ Scierror(888, _("%s : Unknown Data type\n"), name.data());
+ return types::Function::Error;
+ }
+
+ Block.inptr[i] = MALLOC(size);
+ if (Block.inptr == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ memset(Block.inptr, 0x00, size);
+ }
+ }
+
+ /* check output ports */
+ /* 6 : model.out */
+ pIT = m->getField(L"out");
+ d = pIT->getAs<types::Double>();
+ const int sizeOut = d->getSize();
+ Block.nout = d->getSize();
+ Block.outsz = nullptr;
+ Block.outptr = nullptr;
+ if (sizeOut > 0)
+ {
+ const double* const vOut = d->get();
+ for (int i = 0; i < sizeOut; ++i)
+ {
+ /* check value of out */
+ if (vOut[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. out(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vOut[i]));
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+ }
+
+ /* alloc outsz */
+ if ((Block.outsz = (int *)MALLOC(sizeOut * 3 * sizeof(int))) == nullptr)
+ {
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+
+ /* alloc outptr */
+ if ((Block.outptr = (void **)MALLOC(sizeOut * sizeof(void *))) == nullptr)
+ {
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+
+ /* 7 : model.out2 */
+ pIT = m->getField(L"out2");
+ d = pIT->getAs<types::Double>();
+ const int sizeOut2 = d->getSize();
+ const double* const vOut2 = d->get();
+ for (int i = 0; i < sizeOut2; ++i)
+ {
+ /* check value of in2 */
+ if (vOut2[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. out2(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vOut2[i]));
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+ }
+
+ /* 5 : model.intyp */
+ pIT = m->getField(L"intyp");
+ d = pIT->getAs<types::Double>();
+ const int sizeOuttyp = d->getSize();
+ const double* const vOuttype = d->get();
+ for (int i = 0; i < sizeOuttyp; ++i)
+ {
+ /* check value of intyp */
+ if (vOuttype[i] <= 0)
+ {
+ Scierror(888, _("%s : Undetermined Size. outtyp(%d)=%d. Please adjust your model.\n"), \
+ name.data(), i + 1, static_cast<int>(vOuttype[i]));
+ freeBlock(&Block);
+ return types::Function::Error;
+ }
+ }
+
+ if (sizeOut == sizeOut2 && sizeOut == sizeOuttyp)
+ {
+ for (int i = 0; i < sizeOut; ++i)
+ {
+ Block.outsz[i] = static_cast<int>(vOut[i]);
+ Block.outsz[i + sizeOut] = static_cast<int>(vOut2[i]);
+ int val = 0;
+ switch (static_cast<int>(vOuttype[i]))
+ {
+ case 1:
+ default:
+ val = 10;
+ break;
+ case 2:
+ val = 11;
+ break;
+ case 3:
+ val = 84;
+ break;
+ case 4:
+ val = 82;
+ break;
+ case 5:
+ val = 81;
+ break;
+ case 6:
+ val = 814;
+ break;
+ case 7:
+ val = 812;
+ break;
+ case 8:
+ val = 811;
+ break;
+ }
+
+ Block.outsz[i + sizeOut * 2] = val;
+ }
+ }
+ else
+ {
+ for (int i = 0; i < sizeOut; i++)
+ {
+ Block.outsz[i] = static_cast<int>(vOut[i]);
+ Block.outsz[i + sizeOut] = 1;
+ Block.outsz[i + sizeOut * 2] = 10;
+ }
+ }
+
+ for (int i = 0; i < sizeOut; i++)
+ {
+ int size = Block.outsz[i] * Block.outsz[sizeOut + i];
+ switch (Block.outsz[2 * sizeOut + i])
+ {
+ case 10: //double
+ size *= sizeof(double);
+ break;
+ case 11: //complex
+ size *= 2 * sizeof(double);
+ break;
+ case 84: //int32
+ size *= sizeof(SCSINT32_COP);
+ break;
+ case 82: //int16
+ size *= sizeof(short);
+ break;
+ case 81: //int8
+ size *= sizeof(char);
+ break;
+ case 814: //uint32
+ size *= sizeof(SCSUINT32_COP);
+ break;
+ case 812: //uint16
+ size *= sizeof(unsigned short);
+ break;
+ case 811: //uint8
+ size *= sizeof(unsigned char);
+ break;
+ default:
+ Scierror(888, _("%s : Unknown Data type\n"), name.data());
+ return types::Function::Error;
+ }
+
+ Block.outptr[i] = MALLOC(size);
+ if (Block.outptr[i] == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ memset(Block.outptr[i], 0x00, size);
+ }
+ }
+
+ /* event input port */
+ /* 9 : model.evtin */
+
+ /* event output port */
+ /* 10 : model.evtout */
+ pIT = m->getField(L"evtout");
+ d = pIT->getAs<types::Double>();
+ Block.nevout = d->getSize();
+ if (Block.nevout > 0)
+ {
+ if ((Block.evout = (double *)MALLOC(Block.nevout * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ pIT = m->getField(L"firing");
+ types::Double* firing = pIT->getAs<types::Double>();
+ if (Block.nevout == firing->getSize())
+ {
+ const double* const f = firing->get();
+ for (int j = 0; j < Block.nevout; j++)
+ {
+ Block.evout[j] = f[j];
+ }
+ }
+ else
+ {
+ for (int j = 0; j < Block.nevout; j++)
+ {
+ Block.evout[j] = -1;
+ }
+ }
+ }
+
+ /* continuous state */
+ /* 11 : model.state */
+ m->getField(L"state");
+ d = pIT->getAs<types::Double>();
+ Block.nx = d->getSize();
+ Block.x = nullptr;
+ Block.xprop = nullptr;
+ Block.xd = nullptr;
+ Block.res = nullptr;
+ if (Block.nx > 0)
+ {
+ /* x */
+ if ((Block.x = (double *) MALLOC(Block.nx * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const x = d->get();
+ for (int j = 0; j < Block.nx; j++)
+ {
+ Block.x[j] = x[j];
+ }
+
+ /* xd */
+ if ((Block.xd = (double *) MALLOC(Block.nx * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.nx; j++)
+ {
+ Block.xd[j] = 0;
+ }
+
+ /* xprop */
+ if ((Block.xprop = (int *) MALLOC(Block.nx * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.nx; j++)
+ {
+ Block.xprop[j] = 1;
+ }
+
+ /* res */
+ /*if (blktyp>10000) {*/
+ if ((Block.res = (double *)MALLOC(Block.nx * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.nx; j++)
+ {
+ Block.res[j] = 0;
+ }
+ /*}*/
+ }
+
+ /* discrete state */
+ /* 12 : model.dstate */
+ m->getField(L"dstate");
+ d = pIT->getAs<types::Double>();
+ Block.nz = d->getSize();
+ if (Block.nz > 0)
+ {
+ if ((Block.z = (double *)MALLOC(Block.nz * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const z = d->get();
+ for (int j = 0; j < Block.nz; j++)
+ {
+ Block.z[j] = z[j];
+ }
+ }
+
+ /* discrete object state */
+ /* 13 : model.odstate */
+ pIT = m->getField(L"odstate");
+ l = pIT->getAs<types::List>();
+ Block.noz = l->getSize();
+ Block.ozsz = nullptr;
+ Block.oztyp = nullptr;
+ Block.ozptr = nullptr;
+ if (Block.noz > 0)
+ {
+ if ((Block.ozsz = (int *)MALLOC(2 * Block.noz * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ if ((Block.oztyp = (int *)MALLOC(Block.noz * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ if ((Block.ozptr = (void **)MALLOC(Block.noz * sizeof(void *))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+
+ for (int i = 0; i < Block.noz; ++i)
+ {
+ pIT = l->get(i);
+
+ if (pIT->isGenericType())
+ {
+ types::GenericType* pGT = pIT->getAs<types::GenericType>();
+ Block.ozsz[i] = pGT->getRows();
+ Block.ozsz[Block.noz + i] = pGT->getCols();
+ }
+
+ if (pIT->isDouble())
+ {
+ d = pIT->getAs<types::Double>();
+ Block.ozsz[i] = d->getRows();
+ Block.ozsz[Block.noz + i] = d->getCols();
+ const int size = d->getSize();
+ const double* const r = d->get();
+ if (d->isComplex() == false)
+ {
+ Block.oztyp[i] = 10;
+ if ((Block.ozptr[i] = (double *)MALLOC(size * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < size; ++j)
+ {
+ ((double*)Block.ozptr[i])[j] = r[j];
+ }
+ }
+ else
+ {
+ Block.oztyp[i] = 11;
+ if ((Block.ozptr[i] = (double *)MALLOC(2 * size * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const im = d->getImg();
+ for (int j = 0; j < size; ++j)
+ {
+ ((double*)Block.ozptr[i])[j] = r[j];
+ ((double*)Block.ozptr[i])[size + j] = im[j];
+ }
+ }
+ }
+ else if (pIT->isInt())
+ {
+ bool ret = false;
+ switch (pIT->getType())
+ {
+ case types::InternalType::ScilabInt8:
+ Block.oztyp[i] = 81;
+ ret = alloc_and_set(pIT->getAs<types::Int8>(), &Block.ozptr[i]);
+ break;
+ case types::InternalType::ScilabInt16:
+ Block.oztyp[i] = 82;
+ ret = alloc_and_set(pIT->getAs<types::Int16>(), &Block.ozptr[i]);
+ break;
+ case types::InternalType::ScilabInt32:
+ Block.oztyp[i] = 84;
+ ret = alloc_and_set(pIT->getAs<types::Int32>(), &Block.ozptr[i]);
+ break;
+ case types::InternalType::ScilabUInt8:
+ Block.oztyp[i] = 811;
+ ret = alloc_and_set(pIT->getAs<types::UInt8>(), &Block.ozptr[i]);
+ break;
+ case types::InternalType::ScilabUInt16:
+ Block.oztyp[i] = 812;
+ ret = alloc_and_set(pIT->getAs<types::UInt16>(), &Block.ozptr[i]);
+ break;
+ case types::InternalType::ScilabUInt32:
+ Block.oztyp[i] = 814;
+ ret = alloc_and_set(pIT->getAs<types::UInt32>(), &Block.ozptr[i]);
+ break;
+ default :
+ ret = false;
+ break;
+ }
+
+ if (ret == false)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+ }
+ }
+ }
+
+ /* real parameters */
+ /* 14 : model.rpar */
+ pIT = m->getField(L"rpar");
+ d = pIT->getAs<types::Double>();
+ Block.nrpar = d->getSize();
+ Block.rpar = nullptr;
+ if (Block.nrpar > 0)
+ {
+ if ((Block.rpar = (double *)MALLOC(Block.nrpar * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const r = d->get();
+ for (int j = 0; j < Block.nrpar; j++)
+ {
+ Block.rpar[j] = r[j];
+ }
+ }
+
+ /* integer parameters */
+ /* 15 : model.ipar */
+ pIT = m->getField(L"ipar");
+ d = pIT->getAs<types::Double>();
+ Block.nipar = d->getSize();
+ Block.ipar = nullptr;
+ if (Block.nrpar > 0)
+ {
+ if ((Block.ipar = (int *)MALLOC(Block.nrpar * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const r = d->get();
+ for (int j = 0; j < Block.nrpar; j++)
+ {
+ Block.ipar[j] = static_cast<int>(r[j]);
+ }
+ }
+
+ /* object parameters */
+ /* 16 : model.opar */
+ pIT = m->getField(L"opar");
+ l = pIT->getAs<types::List>();
+ Block.nopar = l->getSize();
+ Block.oparsz = nullptr;
+ Block.opartyp = nullptr;
+ Block.oparptr = nullptr;
+
+ if (Block.nopar > 0)
+ {
+ if ((Block.oparsz = (int *)MALLOC(2 * Block.nopar * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ if ((Block.opartyp = (int *)MALLOC(Block.nopar * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ if ((Block.oparptr = (void **)MALLOC(Block.nopar * sizeof(void *))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int i = 0; i < Block.nopar; ++i)
+ {
+ pIT = l->get(i);
+ if (pIT->isDouble())
+ {
+ d = pIT->getAs<types::Double>();
+ const int size = d->getSize();
+ const double* const r = d->get();
+ if (d->isComplex() == false)
+ {
+ Block.opartyp[i] = 10;
+ if ((Block.oparptr[i] = (double *)MALLOC(size * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < size; ++j)
+ {
+ ((double*)Block.oparptr[i])[j] = r[j];
+ }
+ }
+ else
+ {
+ Block.opartyp[i] = 11;
+ if ((Block.oparptr[i] = (double *)MALLOC(2 * size * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ const double* const im = d->getImg();
+ for (int j = 0; j < size; ++j)
+ {
+ ((double*)Block.oparptr[i])[j] = r[j];
+ ((double*)Block.oparptr[i])[size + j] = im[j];
+ }
+ }
+ }
+ else if (pIT->isInt())
+ {
+ bool ret = false;
+ switch (pIT->getType())
+ {
+ case types::InternalType::ScilabInt8:
+ Block.opartyp[i] = 81;
+ ret = alloc_and_set(pIT->getAs<types::Int8>(), &Block.oparptr[i]);
+ break;
+ case types::InternalType::ScilabInt16:
+ Block.opartyp[i] = 82;
+ ret = alloc_and_set(pIT->getAs<types::Int16>(), &Block.oparptr[i]);
+ break;
+ case types::InternalType::ScilabInt32:
+ Block.opartyp[i] = 84;
+ ret = alloc_and_set(pIT->getAs<types::Int32>(), &Block.oparptr[i]);
+ break;
+ case types::InternalType::ScilabUInt8:
+ Block.opartyp[i] = 811;
+ ret = alloc_and_set(pIT->getAs<types::UInt8>(), &Block.oparptr[i]);
+ break;
+ case types::InternalType::ScilabUInt16:
+ Block.opartyp[i] = 812;
+ ret = alloc_and_set(pIT->getAs<types::UInt16>(), &Block.oparptr[i]);
+ break;
+ case types::InternalType::ScilabUInt32:
+ Block.opartyp[i] = 814;
+ ret = alloc_and_set(pIT->getAs<types::UInt32>(), &Block.oparptr[i]);
+ break;
+ default :
+ ret = false;
+ break;
+ }
+
+ if (ret == false)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+ }
+ }
+ }
+
+ /* labels */
+ /* 20 : model.label */
+ pIT = m->getField(L"label");
+ s = pIT->getAs<types::String>();
+ Block.label = wide_string_to_UTF8(s->get()[0]);
+
+ /* zero crossing */
+ /* 21 : model.nzcross */
+ pIT = m->getField(L"nzcross");
+ d = pIT->getAs<types::Double>();
+ Block.ng = static_cast<int>(d->get()[0]);
+ Block.g = nullptr;
+ Block.jroot = nullptr;
+ if (Block.ng > 0)
+ {
+ if ((Block.g = (double *)MALLOC(Block.ng * sizeof(double))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.ng; j++)
+ {
+ Block.g[j] = 0;
+ }
+
+ if ((Block.jroot = (int *)MALLOC(Block.ng * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.ng; j++)
+ {
+ Block.jroot[j] = 0;
+ }
+ }
+
+ /* mode */
+ /* 22 : model.nmode */
+ pIT = m->getField(L"nmode");
+ d = pIT->getAs<types::Double>();
+ Block.nmode = static_cast<int>(d->get()[0]);
+ if (Block.nmode > 0)
+ {
+ if ((Block.mode = (int *)MALLOC(Block.nmode * sizeof(int))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ for (int j = 0; j < Block.nmode; j++)
+ {
+ Block.mode[j] = 0;
+ }
+ }
+
+ /* uids */
+ /* 23 : model.uid */
+ pIT = m->getField(L"uid");
+ s = pIT->getAs<types::String>();
+ Block.uid = wide_string_to_UTF8(s->get()[0]);
+
+ if ((Block.work = (void **)MALLOC(sizeof(void *))) == nullptr)
+ {
+ freeBlock(&Block);
+ Scierror(888, _("%s : Allocation error.\n"), name.data());
+ return types::Function::Error;
+ }
+
+ *Block.work = nullptr;
+
+ out.push_back(createblklist(&Block, -1, Block.type));
+
+ freeBlock(&Block);
+ return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
+
char* c_str = wide_string_to_UTF8(w_str);
void* f = funnum2(c_str); // Search associated function number of function name
// Block is defined by a C or Fortran function
- if (f != NULL)
+ if (f != nullptr)
{
// C interface from "tabsim" defined in blocks.h
lfunpt[i] = f;
<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_callblk" function="callblk"/>
<gateway type="0" name="sci_loadScicos" function="loadScicos"/>
<!-- C++ Gateways -->
<gateway type="1" name="sci_buildouttb" function="buildouttb"/>
<gateway type="1" name="sci_validvar" function="validvar"/>
<gateway type="1" name="sci_var2vec" function="var2vec"/>
<gateway type="1" name="sci_vec2var" function="vec2var"/>
+ <gateway type="1" name="sci_model2blk" function="model2blk"/>
+ <gateway type="1" name="sci_callblk" function="callblk"/>
</module>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_buildouttb.cpp" />
+ <ClCompile Include="..\..\..\sci_gateway\cpp\sci_callblk.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_ctree2.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_ctree3.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_ctree4.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_scicos_debug_count.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_scicos_time.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_set_blockerror.cpp" />
- <ClCompile Include="..\..\..\sci_gateway\cpp\sci_set_xproperty.cpp" />
- <ClCompile Include="..\..\..\sci_gateway\cpp\sci_sig2data.cpp" />
+ <ClCompile Include="..\..\..\sci_gateway\cpp\sci_model2blk.cpp" />
<ClCompile Include="..\..\..\sci_gateway\cpp\sci_var2vec.cpp" />
<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\il_sim.cpp" />
<ClCompile Include="..\..\cpp\il_state.cpp" />
+ <ClCompile Include="..\..\cpp\createblklist.cpp" />
+ <ClCompile Include="..\..\cpp\extractblklist.cpp" />
+ <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="..\extractblklist.c" />
<ClCompile Include="..\ezxml.c" />
<ClCompile Include="..\..\..\sci_gateway\c\gw_scicos.c" />
<ClCompile Include="..\import.c" />
<ClCompile Include="..\MlistGetFieldNumber.c" />
<ClCompile Include="..\lsodar.c" />
- <ClCompile Include="..\..\..\sci_gateway\c\sci_callblk.c" />
<ClCompile Include="..\..\..\sci_gateway\c\sci_diffobjs.c" />
<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_model2blk.c" />
<ClCompile Include="..\..\..\sci_gateway\c\sci_sctree.c" />
<ClCompile Include="..\sciblk2.c" />
- <ClCompile Include="..\sciblk4.c" />
<ClCompile Include="..\scicos.c" />
<ClCompile Include="..\scicos_free.c" />
<ClCompile Include="..\scicos_malloc.c" />
<ClCompile Include="..\var2sci.c" />
</ItemGroup>
<ItemGroup>
+ <ClInclude Include="..\..\cpp\createblklist.hxx" />
+ <ClInclude Include="..\..\cpp\extractblklist.hxx" />
<ClInclude Include="..\..\cpp\var2vec.hxx" />
<ClInclude Include="..\..\cpp\vec2var.hxx" />
<ClInclude Include="..\copyvarfromlistentry.h" />
- <ClInclude Include="..\createblklist.h" />
<ClInclude Include="..\..\..\includes\dynlib_scicos.h" />
<ClInclude Include="..\ddaskr.h" />
- <ClInclude Include="..\extractblklist.h" />
<ClInclude Include="..\ezxml.h" />
<ClInclude Include="..\..\..\includes\gw_scicos.h" />
<ClInclude Include="..\il_sim.h" />
<ClCompile Include="..\DllmainScicos.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\extractblklist.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\ezxml.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\lsodar.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\sci_gateway\c\sci_callblk.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\sci_gateway\c\sci_diffobjs.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_model2blk.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\sci_gateway\c\sci_sctree.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\sciblk2.c">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\sciblk4.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\scicos.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClInclude Include="..\copyvarfromlistentry.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\createblklist.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\..\..\includes\dynlib_scicos.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\extractblklist.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="..\ezxml.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\cpp\vec2var.hxx">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\..\cpp\createblklist.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\cpp\extractblklist.hxx">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Dynamic_link_Import.def">
+++ /dev/null
-/* Scicos
-*
-* Copyright (C) INRIA - Alan LAYEC
-* Copyright (C) 2013 - Scilab Enterprises - Clement DAVID
-*
-* 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 <string.h>
-#include <assert.h>
-#include "machine.h" /* C2F */
-#include "extractblklist.h"
-#include "MlistGetFieldNumber.h"
-#include "cvstr.h"
-#include "sci_malloc.h"
-/*--------------------------------------------------------------------------*/
-extern int *listentry(int *header, int i);
-/*--------------------------------------------------------------------------*/
-int extractblklist(int *il, scicos_block *Block, int *ierr)
-{
-#if 0
- /*
- * error table :
- * ierr = 0 : no errors
- * ierr = -39 : allocation error
- * ierr = 98 : invalid field name
- *
- */
-
- /* variables for scilab stack */
- int *ilh = NULL;
- int mh = 0, nh = 0;
- int *ilh2 = NULL;
- int mh2 = 0, nh2 = 0;
- int len_str = 0;
-
- /* local counter variables */
- int n = 0;
- int i = 0, j = 0;
-
- *ierr = 0;
-
- /* 2 - nevprt */
- n = MlistGetFieldNumber(il, "nevprt");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nevprt = (int) * ((double *)(&ilh[4]));
-
- /* 3 - funpt */
- n = MlistGetFieldNumber(il, "funpt");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- // pointer value is stored on double values, restoring as a copy will take
- // care of alignement issues and pointer size issues.
- memcpy(&Block->funpt, &ilh[4], sizeof(voidg));
-
- /* 4 - type */
- n = MlistGetFieldNumber(il, "type");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->type = (int) * ((double *)(&ilh[4]));
-
- /* 5 - scsptr */
- n = MlistGetFieldNumber(il, "scsptr");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->scsptr = (int) * ((double *)(&ilh[4]));
-
- /* 6 - nz */
- n = MlistGetFieldNumber(il, "nz");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nz = (int) * ((double *)(&ilh[4]));
-
- /* 7 - z */
- n = MlistGetFieldNumber(il, "z");
- if (n == -1)
- {
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->z = NULL;
- assert(Block->nz == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->z = (double *) MALLOC(Block->nz * sizeof(double))) == NULL)
- {
- *ierr = -39;
- return 0;
- }
- for (j = 0; j < Block->nz; j++)
- {
- Block->z[j] = *((double *)(&ilh[4]) + j);
- }
- }
-
- /* 8 - noz */
- n = MlistGetFieldNumber(il, "noz");
- if (n == -1)
- {
- FREE(Block->z);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->noz = (int) * ((double *)(&ilh[4]));
-
- /* 9 - ozsz */
- n = MlistGetFieldNumber(il, "ozsz");
- if (n == -1)
- {
- FREE(Block->z);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->ozsz = NULL;
- assert(2 * Block->noz == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->ozsz = (int *) MALLOC(2 * Block->noz * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < 2 * Block->noz; j++)
- {
- Block->ozsz[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 10 - oztyp */
- n = MlistGetFieldNumber(il, "oztyp");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->oztyp = NULL;
- assert(Block->noz == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->oztyp = (int *) MALLOC(Block->noz * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- *ierr = -39;
- return 0;
- }
- }
- for (j = 0; j < Block->noz; j++)
- {
- Block->oztyp[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 11 - oz */
- n = MlistGetFieldNumber(il, "oz");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->ozptr = NULL;
- assert(Block->noz == mh);
- if (Block->noz > 0)
- {
- if ((Block->ozptr = (void **) MALLOC(Block->noz * sizeof(void *))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- *ierr = -39;
- return 0;
- }
-
- for (i = 0; i < Block->noz; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block->ozptr[i] = NULL;
- assert(mh2 * nh2 >= 0);
- switch (Block->oztyp[i])
- {
- case 10 :
- if ((Block->ozptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->ozptr[i], \
- (double *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(double));
- break;
-
- case 11 :
- if ((Block->ozptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->ozptr[i], \
- (double *)(&ilh2[4]), \
- 2 * mh2 * nh2 * sizeof(double));
- break;
-
- case 84 :
- if ((Block->ozptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSINT32_COP *)Block->ozptr[i], \
- (SCSINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSINT32_COP));
- break;
-
- case 82 :
- if ((Block->ozptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((short *)Block->ozptr[i], \
- (short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(short));
- break;
-
- case 81 :
- if ((Block->ozptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((char *)Block->ozptr[i], \
- (char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(char));
- break;
-
- case 814 :
- if ((Block->ozptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSUINT32_COP *)Block->ozptr[i], \
- (SCSUINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSUINT32_COP));
- break;
-
- case 812 :
- if ((Block->ozptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned short *)Block->ozptr[i], \
- (unsigned short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned short));
- break;
-
- case 811 :
- if ((Block->ozptr[i] = (unsigned char *) MALLOC(mh2 * nh2 * sizeof(unsigned char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->ozptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned char *)Block->ozptr[i], \
- (unsigned char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned char));
- break;
- }
- }
- }
-
- /* 12 - nx */
- n = MlistGetFieldNumber(il, "nx");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nx = (int) * ((double *)(&ilh[4]));
-
- /* 13 - x */
- n = MlistGetFieldNumber(il, "x");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->x = NULL;
- assert(Block->nx == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->x = (double *) MALLOC(Block->nx * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- *ierr = -39;
- return 0;
- }
- }
- for (j = 0; j < (mh * nh); j++)
- {
- Block->x[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* 14 - xd */
- n = MlistGetFieldNumber(il, "xd");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->xd = NULL;
- assert(Block->nx == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->xd = (double *) MALLOC(Block->nx * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- *ierr = -39;
- return 0;
- }
- }
- for (j = 0; j < (mh * nh); j++)
- {
- Block->xd[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* 15 - res */
- n = MlistGetFieldNumber(il, "res");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->res = NULL;
- assert(Block->nx == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->res = (double *) MALLOC(Block->nx * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < (mh * nh); j++)
- {
- Block->res[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* 16 - nin */
- n = MlistGetFieldNumber(il, "nin");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nin = (int) * ((double *)(&ilh[4]));
-
- /* 17 - insz */
- n = MlistGetFieldNumber(il, "insz");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->insz = NULL;
- assert(3 * Block->nin == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->insz = (int *) MALLOC(3 * Block->nin * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- *ierr = -39;
- return 0;
- }
- }
- for (j = 0; j < 3 * Block->nin; j++)
- {
- Block->insz[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 18 - inptr */
- n = MlistGetFieldNumber(il, "inptr");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->inptr = NULL;
- assert(Block->nin == mh);
- assert(mh >= 0);
- if (Block->nin > 0)
- {
- if ((Block->inptr = (void **) MALLOC(Block->nin * sizeof(void *))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- *ierr = -39;
- return 0;
- }
- for (i = 0; i < Block->nin; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block->inptr[i] = NULL;
- assert(mh2 * nh2 >= 0);
- switch (Block->insz[2 * Block->nin + i])
- {
- case 10 :
- if ((Block->inptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->inptr[i], \
- (double *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(double));
- break;
-
- case 11 :
- if ((Block->inptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->inptr[i], \
- (double *)(&ilh2[4]), \
- 2 * mh2 * nh2 * sizeof(double));
- break;
-
- case 84 :
- if ((Block->inptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSINT32_COP *)Block->inptr[i], \
- (SCSINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSINT32_COP));
- break;
-
- case 82 :
- if ((Block->inptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((short *)Block->inptr[i], \
- (short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(short));
- break;
-
- case 81 :
- if ((Block->inptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((char *)Block->inptr[i], \
- (char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(char));
- break;
-
- case 814 :
- if ((Block->inptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSUINT32_COP *)Block->inptr[i], \
- (SCSUINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSUINT32_COP));
- break;
-
- case 812 :
- if ((Block->inptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned short *)Block->inptr[i], \
- (unsigned short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned short));
- break;
-
- case 811 :
- if ((Block->inptr[i] = (unsigned char *) MALLOC(mh2 * nh2 * sizeof(unsigned char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->inptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned char *)Block->inptr[i], \
- (unsigned char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned char));
- break;
- }
- }
- }
-
- /* 19 - nout */
- n = MlistGetFieldNumber(il, "nout");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nout = (int) * ((double *)(&ilh[4]));
-
- /* 20 - outsz */
- n = MlistGetFieldNumber(il, "outsz");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- *ierr = 98;
- return 0;
- }
-
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->outsz = NULL;
- assert(3 * Block->nout == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->outsz = (int *) MALLOC(3 * Block->nout * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < 3 * Block->nout; j++)
- {
- Block->outsz[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 21 - outptr */
- n = MlistGetFieldNumber(il, "outptr");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->outptr = NULL;
- assert(Block->nout == mh);
- assert(mh >= 0);
- if (Block->nout > 0)
- {
- if ((Block->outptr = (void **) MALLOC(Block->nout * sizeof(void *))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- *ierr = -39;
- return 0;
- }
- for (i = 0; i < Block->nout; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block->outptr[i] = NULL;
- assert(mh2 * nh2 >= 0);
- switch (Block->outsz[2 * Block->nout + i])
- {
- case 10 :
- if ((Block->outptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->outptr[i], \
- (double *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(double));
- break;
-
- case 11 :
- if ((Block->outptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->outptr[i], \
- (double *)(&ilh2[4]), \
- 2 * mh2 * nh2 * sizeof(double));
- break;
-
- case 84 :
- if ((Block->outptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSINT32_COP *)Block->outptr[i], \
- (SCSINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSINT32_COP));
- break;
-
- case 82 :
- if ((Block->outptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((short *)Block->outptr[i], \
- (short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(short));
- break;
-
- case 81 :
- if ((Block->outptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((char *)Block->outptr[i], \
- (char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(char));
- break;
-
- case 814 :
- if ((Block->outptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSUINT32_COP *)Block->outptr[i], \
- (SCSUINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSUINT32_COP));
- break;
-
- case 812 :
- if ((Block->outptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned short *)Block->outptr[i], \
- (unsigned short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned short));
- break;
-
- case 811 :
- if ((Block->outptr[i] = (unsigned char *) MALLOC(mh2 * nh2 * sizeof(unsigned char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < i; j++)
- {
- FREE(Block->outptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned char *)Block->outptr[i], \
- (unsigned char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned char));
- break;
- }
- }
- }
-
- /* 22 - nevout */
- n = MlistGetFieldNumber(il, "nevout");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nevout = (int) * ((double *)(&ilh[4]));
-
- /* 23 - evout */
- n = MlistGetFieldNumber(il, "evout");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->evout = NULL;
- assert(Block->nevout == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->evout = (double *) MALLOC(Block->nevout * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < (mh * nh); j++)
- {
- Block->evout[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* 24 - nrpar */
- n = MlistGetFieldNumber(il, "nrpar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nrpar = (int) * ((double *)(&ilh[4]));
-
- /* 25 - rpar */
- n = MlistGetFieldNumber(il, "rpar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->rpar = NULL;
- assert(Block->nrpar == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->rpar = (double *) MALLOC(Block->nrpar * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < (mh * nh); j++)
- {
- Block->rpar[j] = *((double *)(&ilh[4]) + j);
- }
-
- /* 26 - nipar */
- n = MlistGetFieldNumber(il, "nipar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nipar = (int) * ((double *)(&ilh[4]));
-
- /* 27 - ipar */
- n = MlistGetFieldNumber(il, "ipar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->ipar = NULL;
- assert(Block->nipar == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->ipar = (int *) MALLOC(Block->nipar * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- *ierr = -39;
- return 0;
- }
- }
- for (j = 0; j < (mh * nh); j++)
- {
- Block->ipar[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 28 - nopar */
- n = MlistGetFieldNumber(il, "nopar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->nopar = (int) * ((double *)(&ilh[4]));
-
- /* 29 - oparsz */
- n = MlistGetFieldNumber(il, "oparsz");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->oparsz = NULL;
- assert(2 * Block->nopar == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->oparsz = (int *) MALLOC(2 * Block->nopar * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < 2 * Block->nopar; j++)
- {
- Block->oparsz[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 30 - opartyp */
- n = MlistGetFieldNumber(il, "opartyp");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->opartyp = NULL;
- assert(Block->nopar == mh * nh);
- assert(mh * nh >= 0);
- if (mh * nh > 0)
- {
- if ((Block->opartyp = (int *) MALLOC(Block->nopar * sizeof(int))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- *ierr = -39;
- return 0;
- }
- }
-
- for (j = 0; j < Block->nopar; j++)
- {
- Block->opartyp[j] = (int) * ((double *)(&ilh[4]) + j);
- }
-
- /* 31 - opar */
- n = MlistGetFieldNumber(il, "opar");
- if (n == -1)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- *ierr = 98;
- return 0;
- }
- ilh = (int *) (listentry(il, n));
- mh = ilh[1];
- nh = ilh[2];
- Block->oparptr = NULL;
- assert(Block->nopar == mh);
- assert(mh >= 0);
- if (Block->nopar > 0)
- {
- if ((Block->oparptr = (void **) MALLOC(Block->nopar * sizeof(void *))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- *ierr = -39;
- return 0;
- }
-
- for (i = 0; i < Block->nopar; i++)
- {
- ilh2 = (int *) (listentry(ilh, i + 1));
- mh2 = ilh2[1];
- nh2 = ilh2[2];
- Block->oparptr[i] = NULL;
- assert(mh2 * nh2 >= 0);
- switch (Block->opartyp[i])
- {
- case 10 :
- if ((Block->oparptr[i] = (double *) MALLOC(mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->oparptr[i], \
- (double *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(double));
- break;
-
- case 11 :
- if ((Block->oparptr[i] = (double *) MALLOC(2 * mh2 * nh2 * sizeof(double))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((double *)Block->oparptr[i], \
- (double *)(&ilh2[4]), \
- 2 * mh2 * nh2 * sizeof(double));
- break;
-
- case 84 :
- if ((Block->oparptr[i] = (SCSINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSINT32_COP *)Block->oparptr[i], \
- (SCSINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSINT32_COP));
- break;
-
- case 82 :
- if ((Block->oparptr[i] = (short *) MALLOC(mh2 * nh2 * sizeof(short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((short *)Block->oparptr[i], \
- (short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(short));
- break;
-
- case 81 :
- if ((Block->oparptr[i] = (char *) MALLOC(mh2 * nh2 * sizeof(char))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((char *)Block->oparptr[i], \
- (char *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(char));
- break;
-
- case 814 :
- if ((Block->oparptr[i] = (SCSUINT32_COP *) MALLOC(mh2 * nh2 * sizeof(SCSUINT32_COP))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((SCSUINT32_COP *)Block->oparptr[i], \
- (SCSUINT32_COP *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(SCSUINT32_COP));
- break;
-
- case 812 :
- if ((Block->oparptr[i] = (unsigned short *) MALLOC(mh2 * nh2 * sizeof(unsigned short))) == NULL)
- {
- FREE(Block->z);
- FREE(Block->ozsz);
- FREE(Block->oztyp);
- for (j = 0; j < Block->noz; j++)
- {
- FREE(Block->ozptr[j]);
- }
- FREE(Block->ozptr);
- FREE(Block->x);
- FREE(Block->xd);
- FREE(Block->res);
- FREE(Block->insz);
- for (j = 0; j < Block->nin; j++)
- {
- FREE(Block->inptr[j]);
- }
- FREE(Block->inptr);
- FREE(Block->outsz);
- for (j = 0; j < Block->nout; j++)
- {
- FREE(Block->outptr[j]);
- }
- FREE(Block->outptr);
- FREE(Block->evout);
- FREE(Block->rpar);
- FREE(Block->ipar);
- FREE(Block->oparsz);
- FREE(Block->opartyp);
- for (j = 0; j < i; j++)
- {
- FREE(Block->oparptr[j]);
- }
- *ierr = -39;
- return 0;
- }
- memcpy((unsigned short *)Block->oparptr[i], \
- (unsigned short *)(&ilh2[4]), \
- mh2 * nh2 * sizeof(unsigned short));
- break;
-
- case 811 :
- &n