summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2011-02-18 09:59:46 +0100
committerBruno JOFRET <bruno.jofret@scilab.org>2011-05-06 10:11:09 +0200
commit6d00b119d811819bfa621e0c0a8cefc584f2d29d (patch)
tree3ed459d4c4bb92f9724ba3d6d768f5e68eeb7677
parent520e575daf165ee5aee09c754c72e9f8879ed580 (diff)
downloadscilab-6d00b119d811819bfa621e0c0a8cefc584f2d29d.zip
scilab-6d00b119d811819bfa621e0c0a8cefc584f2d29d.tar.gz
Scicos blocks: remove blocks without simulation function
remove SLIDER.sci as the simulation function has been removed a long time ago. remove CONSTRAINT_f.sci as the simulation function has been removed a long time ago. Update CC4 to generate a well-formed source code Add a unit test to check for this issue Change-Id: Ieab4687bb25984c4957996b6a44c57e3d0350c10
-rw-r--r--scilab/modules/scicos/macros/scicos_scicos/CC4.sci2
-rw-r--r--scilab/modules/scicos/src/c/scicos.vcproj4
-rw-r--r--scilab/modules/scicos_blocks/Makefile.am4
-rw-r--r--scilab/modules/scicos_blocks/Makefile.in48
-rw-r--r--scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5bin0 -> 50688 bytes
-rw-r--r--scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5bin50096 -> 0 bytes
-rw-r--r--scilab/modules/scicos_blocks/includes/affich.h44
-rw-r--r--scilab/modules/scicos_blocks/includes/blocks.h.vc10
-rw-r--r--scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci71
-rw-r--r--scilab/modules/scicos_blocks/macros/Sinks/AFFICH_f.sci159
-rw-r--r--scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci114
-rw-r--r--scilab/modules/scicos_blocks/macros/Sources/RFILE.sci140
-rw-r--r--scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci106
-rw-r--r--scilab/modules/scicos_blocks/src/c/affich.c105
-rw-r--r--scilab/modules/scicos_blocks/src/c/readf4.c420
-rw-r--r--scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj22
-rw-r--r--scilab/modules/scicos_blocks/src/c/writef4.c349
-rw-r--r--scilab/modules/scicos_blocks/src/fortran/affich.f135
-rw-r--r--scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj1
-rw-r--r--scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj8
-rw-r--r--scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce137
-rw-r--r--scilab/modules/xcos/Makefile.am2
-rw-r--r--scilab/modules/xcos/Makefile.in2
-rw-r--r--scilab/modules/xcos/etc/palettes.xml6
-rw-r--r--scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml46
-rw-r--r--scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_c.xml (renamed from scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_f.xml)42
-rw-r--r--scilab/modules/xcos/help/images/AFFICH_f_gui.gifbin2555 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/CONSTRAINT_c_gui.gif (renamed from scilab/modules/xcos/help/images/CONSTRAINT_f_gui.gif)bin1363 -> 1363 bytes
-rw-r--r--scilab/modules/xcos/help/images/REGISTER_f_gui.gifbin1509 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_gui.gifbin2648 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img3_fr.gifbin122 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img4_fr.gifbin204 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img5_fr.gifbin388 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img6_fr.gifbin279 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img7_fr.gifbin214 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/RFILE_img8_fr.gifbin361 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_gui.gifbin1942 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img2_eng.gifbin460 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img2_fr.gifbin460 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img3_eng.gifbin124 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img3_fr.gifbin124 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img4_eng.gifbin180 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img4_fr.gifbin180 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img5_fr.gifbin204 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img6_eng.gifbin361 -> 0 bytes
-rw-r--r--scilab/modules/xcos/help/images/WFILE_img7_fr.gifbin361 -> 0 bytes
-rw-r--r--scilab/modules/xcos/images/gui/AFFICH_f_gui.gifbin2555 -> 0 bytes
-rw-r--r--scilab/modules/xcos/images/gui/CONSTRAINT_c_gui.gif (renamed from scilab/modules/xcos/images/gui/CONSTRAINT_f_gui.gif)bin1363 -> 1363 bytes
-rw-r--r--scilab/modules/xcos/images/gui/REGISTER_f_gui.gifbin1509 -> 0 bytes
-rw-r--r--scilab/modules/xcos/images/gui/RFILE_gui.gifbin2648 -> 0 bytes
-rw-r--r--scilab/modules/xcos/images/palettes/CONSTRAINT_c.png (renamed from scilab/modules/xcos/images/palettes/CONSTRAINT_f.png)bin987 -> 987 bytes
-rw-r--r--scilab/modules/xcos/macros/loadXcosLibs.sci30
-rw-r--r--scilab/modules/xcos/tests/unit_tests/blocks_link.tst204
53 files changed, 378 insertions, 1833 deletions
diff --git a/scilab/modules/scicos/macros/scicos_scicos/CC4.sci b/scilab/modules/scicos/macros/scicos_scicos/CC4.sci
index c2334c8..a6871b4 100644
--- a/scilab/modules/scicos/macros/scicos_scicos/CC4.sci
+++ b/scilab/modules/scicos/macros/scicos_scicos/CC4.sci
@@ -25,7 +25,7 @@ cancel=%f
25 25
26if tt==[] then 26if tt==[] then
27 27
28 textmp=['#include <scicos/scicos_block4.h>'; 28 textmp=['#include ""scicos_block4.h""';
29 '' 29 ''
30 'void '+funam+'(scicos_block *block,int flag)'; 30 'void '+funam+'(scicos_block *block,int flag)';
31 ]; 31 ];
diff --git a/scilab/modules/scicos/src/c/scicos.vcproj b/scilab/modules/scicos/src/c/scicos.vcproj
index c660fb9..ea32403 100644
--- a/scilab/modules/scicos/src/c/scicos.vcproj
+++ b/scilab/modules/scicos/src/c/scicos.vcproj
@@ -574,10 +574,6 @@
574 > 574 >
575 </File> 575 </File>
576 <File 576 <File
577 RelativePath=".\slider.c"
578 >
579 </File>
580 <File
581 RelativePath=".\tree.c" 577 RelativePath=".\tree.c"
582 > 578 >
583 </File> 579 </File>
diff --git a/scilab/modules/scicos_blocks/Makefile.am b/scilab/modules/scicos_blocks/Makefile.am
index 47f1c73..7bccafd 100644
--- a/scilab/modules/scicos_blocks/Makefile.am
+++ b/scilab/modules/scicos_blocks/Makefile.am
@@ -341,7 +341,6 @@ src/c/scoSetProperty.c \
341src/c/scoMisc.c \ 341src/c/scoMisc.c \
342src/c/scoMemoryScope.c\ 342src/c/scoMemoryScope.c\
343src/c/scoWindowScope.c \ 343src/c/scoWindowScope.c \
344src/c/affich.c \
345src/c/scicos_evalhermite.c \ 344src/c/scicos_evalhermite.c \
346src/c/scicos_indexfinder.c 345src/c/scicos_indexfinder.c
347 346
@@ -353,7 +352,6 @@ GIWS_WRAPPERS = \
353src/jni/Blocks.giws.xml 352src/jni/Blocks.giws.xml
354 353
355SCICOS_BLOCKS_FORTRAN_SOURCES = \ 354SCICOS_BLOCKS_FORTRAN_SOURCES = \
356src/fortran/affich.f \
357src/fortran/csslti.f \ 355src/fortran/csslti.f \
358src/fortran/cstblk.f \ 356src/fortran/cstblk.f \
359src/fortran/delay.f \ 357src/fortran/delay.f \
@@ -587,7 +585,7 @@ blocks/CMATVIEW.h5 \
587blocks/CMSCOPE.h5 \ 585blocks/CMSCOPE.h5 \
588blocks/CONST_m.h5 \ 586blocks/CONST_m.h5 \
589blocks/ConstantVoltage.h5 \ 587blocks/ConstantVoltage.h5 \
590blocks/CONSTRAINT_f.h5 \ 588blocks/CONSTRAINT_c.h5 \
591blocks/CONVERT.h5 \ 589blocks/CONVERT.h5 \
592blocks/COSBLK_f.h5 \ 590blocks/COSBLK_f.h5 \
593blocks/Counter.h5 \ 591blocks/Counter.h5 \
diff --git a/scilab/modules/scicos_blocks/Makefile.in b/scilab/modules/scicos_blocks/Makefile.in
index f46cfb4..718a253 100644
--- a/scilab/modules/scicos_blocks/Makefile.in
+++ b/scilab/modules/scicos_blocks/Makefile.in
@@ -243,9 +243,9 @@ am__libsciscicos_blocks_la_SOURCES_DIST = src/c/absblk.c \
243 src/c/tanh_blk.c src/c/tcslti4.c src/c/tcsltj4.c \ 243 src/c/tanh_blk.c src/c/tcslti4.c src/c/tcsltj4.c \
244 src/c/time_delay.c src/c/tows_c.c src/c/variable_delay.c \ 244 src/c/time_delay.c src/c/tows_c.c src/c/variable_delay.c \
245 src/c/whileiterator.c src/c/writeau.c src/c/writec.c \ 245 src/c/whileiterator.c src/c/writeau.c src/c/writec.c \
246 src/c/zcross2.c src/fortran/affich.f src/fortran/csslti.f \ 246 src/c/zcross2.c src/fortran/csslti.f src/fortran/cstblk.f \
247 src/fortran/cstblk.f src/fortran/delay.f src/fortran/delayv.f \ 247 src/fortran/delay.f src/fortran/delayv.f src/fortran/demux.f \
248 src/fortran/demux.f src/fortran/diffblk.f src/fortran/dlradp.f \ 248 src/fortran/diffblk.f src/fortran/dlradp.f \
249 src/fortran/dollar.f src/fortran/dsslti.f \ 249 src/fortran/dollar.f src/fortran/dsslti.f \
250 src/fortran/eselect.f src/fortran/evtdly.f \ 250 src/fortran/eselect.f src/fortran/evtdly.f \
251 src/fortran/expblk.f src/fortran/forblk.f src/fortran/fsv.f \ 251 src/fortran/expblk.f src/fortran/forblk.f src/fortran/fsv.f \
@@ -265,7 +265,7 @@ am__libsciscicos_blocks_la_SOURCES_DIST = src/c/absblk.c \
265 src/fortran/tcsltj.f src/fortran/timblk.f src/fortran/trash.f \ 265 src/fortran/tcsltj.f src/fortran/timblk.f src/fortran/trash.f \
266 src/fortran/writef.f src/fortran/zcross.f \ 266 src/fortran/writef.f src/fortran/zcross.f \
267 src/c/scoGetProperty.c src/c/scoSetProperty.c src/c/scoMisc.c \ 267 src/c/scoGetProperty.c src/c/scoSetProperty.c src/c/scoMisc.c \
268 src/c/scoMemoryScope.c src/c/scoWindowScope.c src/c/affich.c \ 268 src/c/scoMemoryScope.c src/c/scoWindowScope.c \
269 src/c/scicos_evalhermite.c src/c/scicos_indexfinder.c \ 269 src/c/scicos_evalhermite.c src/c/scicos_indexfinder.c \
270 src/jni/GiwsException.cpp src/jni/AfficheBlock.cpp \ 270 src/jni/GiwsException.cpp src/jni/AfficheBlock.cpp \
271 src/cpp/affich2.cpp 271 src/cpp/affich2.cpp
@@ -580,24 +580,23 @@ am__libsciscicos_blocks_la_SOURCES_DIST = src/c/absblk.c \
580@XCOS_TRUE@ libsciscicos_blocks_la-writeau.lo \ 580@XCOS_TRUE@ libsciscicos_blocks_la-writeau.lo \
581@XCOS_TRUE@ libsciscicos_blocks_la-writec.lo \ 581@XCOS_TRUE@ libsciscicos_blocks_la-writec.lo \
582@XCOS_TRUE@ libsciscicos_blocks_la-zcross2.lo 582@XCOS_TRUE@ libsciscicos_blocks_la-zcross2.lo
583@XCOS_TRUE@am__objects_2 = affich.lo csslti.lo cstblk.lo delay.lo \ 583@XCOS_TRUE@am__objects_2 = csslti.lo cstblk.lo delay.lo delayv.lo \
584@XCOS_TRUE@ delayv.lo demux.lo diffblk.lo dlradp.lo dollar.lo \ 584@XCOS_TRUE@ demux.lo diffblk.lo dlradp.lo dollar.lo dsslti.lo \
585@XCOS_TRUE@ dsslti.lo eselect.lo evtdly.lo expblk.lo forblk.lo \ 585@XCOS_TRUE@ eselect.lo evtdly.lo expblk.lo forblk.lo fsv.lo \
586@XCOS_TRUE@ fsv.lo gensin.lo gensqr.lo hltblk.lo ifthel.lo \ 586@XCOS_TRUE@ gensin.lo gensqr.lo hltblk.lo ifthel.lo integr.lo \
587@XCOS_TRUE@ integr.lo intplt.lo intpol.lo intrp2.lo intrpl.lo \ 587@XCOS_TRUE@ intplt.lo intpol.lo intrp2.lo intrpl.lo invblk.lo \
588@XCOS_TRUE@ invblk.lo iocopy.lo logblk.lo lookup.lo lsplit.lo \ 588@XCOS_TRUE@ iocopy.lo logblk.lo lookup.lo lsplit.lo lusat.lo \
589@XCOS_TRUE@ lusat.lo maxblk.lo memo.lo mfclck.lo minblk.lo \ 589@XCOS_TRUE@ maxblk.lo memo.lo mfclck.lo minblk.lo mux.lo \
590@XCOS_TRUE@ mux.lo pload.lo powblk.lo qzcel.lo qzflr.lo \ 590@XCOS_TRUE@ pload.lo powblk.lo qzcel.lo qzflr.lo qzrnd.lo \
591@XCOS_TRUE@ qzrnd.lo qztrn.lo readf.lo rndblk.lo samphold.lo \ 591@XCOS_TRUE@ qztrn.lo readf.lo rndblk.lo samphold.lo sawtth.lo \
592@XCOS_TRUE@ sawtth.lo sciblk.lo selblk.lo sinblk.lo sqrblk.lo \ 592@XCOS_TRUE@ sciblk.lo selblk.lo sinblk.lo sqrblk.lo sum2.lo \
593@XCOS_TRUE@ sum2.lo sum3.lo tanblk.lo tcslti.lo tcsltj.lo \ 593@XCOS_TRUE@ sum3.lo tanblk.lo tcslti.lo tcsltj.lo timblk.lo \
594@XCOS_TRUE@ timblk.lo trash.lo writef.lo zcross.lo 594@XCOS_TRUE@ trash.lo writef.lo zcross.lo
595@XCOS_TRUE@am__objects_3 = libsciscicos_blocks_la-scoGetProperty.lo \ 595@XCOS_TRUE@am__objects_3 = libsciscicos_blocks_la-scoGetProperty.lo \
596@XCOS_TRUE@ libsciscicos_blocks_la-scoSetProperty.lo \ 596@XCOS_TRUE@ libsciscicos_blocks_la-scoSetProperty.lo \
597@XCOS_TRUE@ libsciscicos_blocks_la-scoMisc.lo \ 597@XCOS_TRUE@ libsciscicos_blocks_la-scoMisc.lo \
598@XCOS_TRUE@ libsciscicos_blocks_la-scoMemoryScope.lo \ 598@XCOS_TRUE@ libsciscicos_blocks_la-scoMemoryScope.lo \
599@XCOS_TRUE@ libsciscicos_blocks_la-scoWindowScope.lo \ 599@XCOS_TRUE@ libsciscicos_blocks_la-scoWindowScope.lo \
600@XCOS_TRUE@ libsciscicos_blocks_la-affich.lo \
601@XCOS_TRUE@ libsciscicos_blocks_la-scicos_evalhermite.lo \ 600@XCOS_TRUE@ libsciscicos_blocks_la-scicos_evalhermite.lo \
602@XCOS_TRUE@ libsciscicos_blocks_la-scicos_indexfinder.lo 601@XCOS_TRUE@ libsciscicos_blocks_la-scicos_indexfinder.lo
603@XCOS_TRUE@am__objects_4 = libsciscicos_blocks_la-GiwsException.lo \ 602@XCOS_TRUE@am__objects_4 = libsciscicos_blocks_la-GiwsException.lo \
@@ -1294,7 +1293,6 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
1294@XCOS_TRUE@src/c/scoMisc.c \ 1293@XCOS_TRUE@src/c/scoMisc.c \
1295@XCOS_TRUE@src/c/scoMemoryScope.c\ 1294@XCOS_TRUE@src/c/scoMemoryScope.c\
1296@XCOS_TRUE@src/c/scoWindowScope.c \ 1295@XCOS_TRUE@src/c/scoWindowScope.c \
1297@XCOS_TRUE@src/c/affich.c \
1298@XCOS_TRUE@src/c/scicos_evalhermite.c \ 1296@XCOS_TRUE@src/c/scicos_evalhermite.c \
1299@XCOS_TRUE@src/c/scicos_indexfinder.c 1297@XCOS_TRUE@src/c/scicos_indexfinder.c
1300 1298
@@ -1306,7 +1304,6 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
1306@XCOS_TRUE@src/jni/Blocks.giws.xml 1304@XCOS_TRUE@src/jni/Blocks.giws.xml
1307 1305
1308@XCOS_TRUE@SCICOS_BLOCKS_FORTRAN_SOURCES = \ 1306@XCOS_TRUE@SCICOS_BLOCKS_FORTRAN_SOURCES = \
1309@XCOS_TRUE@src/fortran/affich.f \
1310@XCOS_TRUE@src/fortran/csslti.f \ 1307@XCOS_TRUE@src/fortran/csslti.f \
1311@XCOS_TRUE@src/fortran/cstblk.f \ 1308@XCOS_TRUE@src/fortran/cstblk.f \
1312@XCOS_TRUE@src/fortran/delay.f \ 1309@XCOS_TRUE@src/fortran/delay.f \
@@ -1499,7 +1496,7 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
1499@XCOS_TRUE@blocks/CMSCOPE.h5 \ 1496@XCOS_TRUE@blocks/CMSCOPE.h5 \
1500@XCOS_TRUE@blocks/CONST_m.h5 \ 1497@XCOS_TRUE@blocks/CONST_m.h5 \
1501@XCOS_TRUE@blocks/ConstantVoltage.h5 \ 1498@XCOS_TRUE@blocks/ConstantVoltage.h5 \
1502@XCOS_TRUE@blocks/CONSTRAINT_f.h5 \ 1499@XCOS_TRUE@blocks/CONSTRAINT_c.h5 \
1503@XCOS_TRUE@blocks/CONVERT.h5 \ 1500@XCOS_TRUE@blocks/CONVERT.h5 \
1504@XCOS_TRUE@blocks/COSBLK_f.h5 \ 1501@XCOS_TRUE@blocks/COSBLK_f.h5 \
1505@XCOS_TRUE@blocks/Counter.h5 \ 1502@XCOS_TRUE@blocks/Counter.h5 \
@@ -1767,7 +1764,6 @@ distclean-compile:
1767@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-absolute_value.Plo@am__quote@ 1764@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-absolute_value.Plo@am__quote@
1768@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acos_blk.Plo@am__quote@ 1765@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acos_blk.Plo@am__quote@
1769@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acosh_blk.Plo@am__quote@ 1766@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acosh_blk.Plo@am__quote@
1770@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-affich.Plo@am__quote@
1771@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-affich2.Plo@am__quote@ 1767@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-affich2.Plo@am__quote@
1772@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-andlog.Plo@am__quote@ 1768@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-andlog.Plo@am__quote@
1773@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-asin_blk.Plo@am__quote@ 1769@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-asin_blk.Plo@am__quote@
@@ -4317,13 +4313,6 @@ libsciscicos_blocks_la-scoWindowScope.lo: src/c/scoWindowScope.c
4317@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 4313@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
4318@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -c -o libsciscicos_blocks_la-scoWindowScope.lo `test -f 'src/c/scoWindowScope.c' || echo '$(srcdir)/'`src/c/scoWindowScope.c 4314@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -c -o libsciscicos_blocks_la-scoWindowScope.lo `test -f 'src/c/scoWindowScope.c' || echo '$(srcdir)/'`src/c/scoWindowScope.c
4319 4315
4320libsciscicos_blocks_la-affich.lo: src/c/affich.c
4321@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -MT libsciscicos_blocks_la-affich.lo -MD -MP -MF $(DEPDIR)/libsciscicos_blocks_la-affich.Tpo -c -o libsciscicos_blocks_la-affich.lo `test -f 'src/c/affich.c' || echo '$(srcdir)/'`src/c/affich.c
4322@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciscicos_blocks_la-affich.Tpo $(DEPDIR)/libsciscicos_blocks_la-affich.Plo
4323@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/c/affich.c' object='libsciscicos_blocks_la-affich.lo' libtool=yes @AMDEPBACKSLASH@
4324@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
4325@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -c -o libsciscicos_blocks_la-affich.lo `test -f 'src/c/affich.c' || echo '$(srcdir)/'`src/c/affich.c
4326
4327libsciscicos_blocks_la-scicos_evalhermite.lo: src/c/scicos_evalhermite.c 4316libsciscicos_blocks_la-scicos_evalhermite.lo: src/c/scicos_evalhermite.c
4328@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -MT libsciscicos_blocks_la-scicos_evalhermite.lo -MD -MP -MF $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Tpo -c -o libsciscicos_blocks_la-scicos_evalhermite.lo `test -f 'src/c/scicos_evalhermite.c' || echo '$(srcdir)/'`src/c/scicos_evalhermite.c 4317@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscicos_blocks_la_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_blocks_la_CFLAGS) $(CFLAGS) -MT libsciscicos_blocks_la-scicos_evalhermite.lo -MD -MP -MF $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Tpo -c -o libsciscicos_blocks_la-scicos_evalhermite.lo `test -f 'src/c/scicos_evalhermite.c' || echo '$(srcdir)/'`src/c/scicos_evalhermite.c
4329@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Tpo $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Plo 4318@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Tpo $(DEPDIR)/libsciscicos_blocks_la-scicos_evalhermite.Plo
@@ -4389,9 +4378,6 @@ libsciscicos_blocks_la-affich2.lo: src/cpp/affich2.cpp
4389.f.lo: 4378.f.lo:
4390 $(LTF77COMPILE) -c -o $@ $< 4379 $(LTF77COMPILE) -c -o $@ $<
4391 4380
4392affich.lo: src/fortran/affich.f
4393 $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o affich.lo `test -f 'src/fortran/affich.f' || echo '$(srcdir)/'`src/fortran/affich.f
4394
4395csslti.lo: src/fortran/csslti.f 4381csslti.lo: src/fortran/csslti.f
4396 $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o csslti.lo `test -f 'src/fortran/csslti.f' || echo '$(srcdir)/'`src/fortran/csslti.f 4382 $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o csslti.lo `test -f 'src/fortran/csslti.f' || echo '$(srcdir)/'`src/fortran/csslti.f
4397 4383
diff --git a/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5 b/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5
new file mode 100644
index 0000000..0907678
--- /dev/null
+++ b/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5
Binary files differ
diff --git a/scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5 b/scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5
deleted file mode 100644
index 01f854c..0000000
--- a/scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/scicos_blocks/includes/affich.h b/scilab/modules/scicos_blocks/includes/affich.h
deleted file mode 100644
index 0b106ce..0000000
--- a/scilab/modules/scicos_blocks/includes/affich.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
4* Copyright (C) 2008 - INRIA - Simone Mannori
5*
6* This file must be used under the terms of the CeCILL.
7* This source file is licensed as described in the file COPYING, which
8* you should have received as part of this distribution. The terms
9* are also available at
10* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11*
12*/
13
14#ifndef _AFFICH_H_
15#define _AFFICH_H_
16
17#include "dynlib_scicos_blocks.h"
18#include "machine.h" /* C2F */
19
20/**
21* Update of one element of the text object used by Affich2 block.
22*/
23SCICOS_BLOCKS_IMPEXP void C2F(settxtel)(int * numRow,
24 int * numCol,
25 double * winNum,
26 double * textIndex,
27 char * value,
28 int valueLength);
29
30/**
31* Printing of the text object element used by Affich2 routine
32*/
33SCICOS_BLOCKS_IMPEXP void C2F(affup2)( double * winNum,
34 double * textIndex);
35/**
36* Printing of the text object element used by affich.f routine
37*/
38
39SCICOS_BLOCKS_IMPEXP void C2F(affichup)( double * textIndex,
40 double * winNum,
41 char * value,
42 int valueLength);
43#endif
44
diff --git a/scilab/modules/scicos_blocks/includes/blocks.h.vc b/scilab/modules/scicos_blocks/includes/blocks.h.vc
index e7027a8..a6e7a1b 100644
--- a/scilab/modules/scicos_blocks/includes/blocks.h.vc
+++ b/scilab/modules/scicos_blocks/includes/blocks.h.vc
@@ -2,7 +2,7 @@
2/* Scicos 2/* Scicos
3* 3*
4* Copyright (C) INRIA - METALAU Project <scicos@inria.fr> 4* Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
5* Copyright (C) DIGITEO - 2010 5* Copyright (C) DIGITEO - 2010-2011
6* 6*
7* This program is free software; you can redistribute it and/or modify 7* This program is free software; you can redistribute it and/or modify
8* it under the terms of the GNU General Public License as published by 8* it under the terms of the GNU General Public License as published by
@@ -86,7 +86,6 @@ SCICOS_BLOCKS_IMPEXP void C2F(delayv)(ARGS_scicos);
86SCICOS_BLOCKS_IMPEXP void C2F(delay)(ARGS_scicos); 86SCICOS_BLOCKS_IMPEXP void C2F(delay)(ARGS_scicos);
87SCICOS_BLOCKS_IMPEXP void C2F(cstblk)(ARGS_scicos); 87SCICOS_BLOCKS_IMPEXP void C2F(cstblk)(ARGS_scicos);
88SCICOS_BLOCKS_IMPEXP void C2F(csslti)(ARGS_scicos); 88SCICOS_BLOCKS_IMPEXP void C2F(csslti)(ARGS_scicos);
89SCICOS_BLOCKS_IMPEXP void C2F(affich)(ARGS_scicos);
90SCICOS_BLOCKS_IMPEXP void zcross2(ARGS_scicos); 89SCICOS_BLOCKS_IMPEXP void zcross2(ARGS_scicos);
91SCICOS_BLOCKS_IMPEXP void writec(ARGS_scicos); 90SCICOS_BLOCKS_IMPEXP void writec(ARGS_scicos);
92SCICOS_BLOCKS_IMPEXP void writeau(ARGS_scicos); 91SCICOS_BLOCKS_IMPEXP void writeau(ARGS_scicos);
@@ -400,10 +399,10 @@ SCICOS_BLOCKS_IMPEXP void absolute_value(ARGS_scicos);
400SCICOS_BLOCKS_IMPEXP void absblk(ARGS_scicos); 399SCICOS_BLOCKS_IMPEXP void absblk(ARGS_scicos);
401SCICOS_BLOCKS_IMPEXP void affich2(ARGS_scicos); 400SCICOS_BLOCKS_IMPEXP void affich2(ARGS_scicos);
402 401
403#define SIZE_TAB_BLOCK_LIST 371 402#define SIZE_TAB_BLOCK_LIST 370
404int ntabsim = SIZE_TAB_BLOCK_LIST ; 403int ntabsim = SIZE_TAB_BLOCK_LIST;
405 404
406OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={ 405OpTab tabsim[SIZE_TAB_BLOCK_LIST] = {
407{"zcross",(ScicosF) C2F(zcross)}, 406{"zcross",(ScicosF) C2F(zcross)},
408{"writef",(ScicosF) C2F(writef)}, 407{"writef",(ScicosF) C2F(writef)},
409{"trash",(ScicosF) C2F(trash)}, 408{"trash",(ScicosF) C2F(trash)},
@@ -461,7 +460,6 @@ OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={
461{"delay",(ScicosF) C2F(delay)}, 460{"delay",(ScicosF) C2F(delay)},
462{"cstblk",(ScicosF) C2F(cstblk)}, 461{"cstblk",(ScicosF) C2F(cstblk)},
463{"csslti",(ScicosF) C2F(csslti)}, 462{"csslti",(ScicosF) C2F(csslti)},
464{"affich",(ScicosF) C2F(affich)},
465{"zcross2",(ScicosF) zcross2}, 463{"zcross2",(ScicosF) zcross2},
466{"writec",(ScicosF) writec}, 464{"writec",(ScicosF) writec},
467{"writeau",(ScicosF) writeau}, 465{"writeau",(ScicosF) writeau},
diff --git a/scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci b/scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci
deleted file mode 100644
index 8e123e7..0000000
--- a/scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci
+++ /dev/null
@@ -1,71 +0,0 @@
1// Scicos
2//
3// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18//
19// See the file ../license.txt
20//
21
22function [x,y,typ]=CONSTRAINT_f(job,arg1,arg2)
23x=[];y=[];typ=[]
24select job
25case 'plot' then
26 standard_draw(arg1)
27case 'getinputs' then
28 [x,y,typ]=standard_inputs(arg1)
29case 'getoutputs' then
30 [x,y,typ]=standard_outputs(arg1)
31case 'getorigin' then
32 [x,y]=standard_origin(arg1)
33case 'set' then
34 x=arg1
35 graphics=arg1.graphics;exprs=graphics.exprs
36 model=arg1.model;
37 while %t do
38 [ok,num,exprs]=scicos_getvalue('Set Constraint block parameters',..
39 'Set number of constraints',list('vec',1),exprs)
40 if ~ok then break,end
41 if num<=0 then
42 message('number of constraints must be > 0 ')
43 else
44 [model,graphics,ok]=check_io(model,graphics,num,num,[],[])
45 if ok then
46 graphics.exprs=exprs
47 model.state=zeros(4*num,1)
48 model.out=num
49 model.in=num
50// model.rpar=[num]
51 x.graphics=graphics;x.model=model
52 break
53 end
54 end
55 end
56
57
58 case 'define' then
59 x0=[0;0;0;0]
60 model=scicos_model()
61 model.sim=list('constraint',10001)
62 model.in=1
63 model.out=1
64 model.state=x0
65 model.blocktype='c'
66 model.dep_ut=[%f %t]
67 exprs='1'
68 gr_i=['xstringb(orig(1),orig(2),''=0 ?'',sz(1),sz(2),''fill'');']
69 x=standard_define([2 2],model,exprs,gr_i)
70end
71endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sinks/AFFICH_f.sci b/scilab/modules/scicos_blocks/macros/Sinks/AFFICH_f.sci
deleted file mode 100644
index 40643f4..0000000
--- a/scilab/modules/scicos_blocks/macros/Sinks/AFFICH_f.sci
+++ /dev/null
@@ -1,159 +0,0 @@
1// Scicos
2//
3// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18//
19// See the file ../license.txt
20//
21
22function [x,y,typ] = AFFICH_f(job,arg1,arg2)
23//** 22 Aug 2006: looking for a nasty "font" bugs
24//**
25//** 07 Aug 2008: this function has been update for Scilab 5.0 by
26//** Simone Mannori and Jean-Baptiste Silvy
27
28x=[]; y=[]; typ=[] ;
29
30select job
31
32case "plot" then
33 ipar = arg1.model.ipar;
34 standard_draw(arg1);
35
36case "getinputs" then
37 [x,y,typ] = standard_inputs(arg1)
38
39case "getoutputs" then
40 x=[]; y=[]; typ=[];
41
42case "getorigin" then
43 [x,y] = standard_origin(arg1);
44
45case "set" then
46 x = arg1;
47 graphics = arg1.graphics;
48 exprs = graphics.exprs
49 model = arg1.model;
50 //** if size(exprs,'*')==5 then exprs(6)='0';end //compatibility
51 //** if size(exprs,'*')==4 then exprs(4)=' ';exprs(5)=' ';end //compatibility
52
53 //** if size(model.dstate,'*')<>6 then model.dstate=[0;-1;0;0;1;1];end //compatibility
54
55 model.dstate = [0;-1;0;0;1;1;0] ; //** set the initial value of "z" and the associated "nz"
56
57 while %t do
58 [ok,font,fontsize,colr,nt,nd,herit,exprs] = scicos_getvalue(..
59 'Set parameters',..
60 ["Font number";
61 "Font size";
62 "Color";
63 "Total number of digits";
64 "Number of rational part digits";
65 "Block inherits (1) or not (0)"],..
66 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
67
68 if ~ok then break,end //user cancel modification
69
70 //** ------------------------ Error checking ----------------------------------
71 mess = [] ; //** no message
72
73 if font<=0 then
74 mess = [mess;'Font number must be positive';' ']
75 ok = %f ;
76 end
77
78 if fontsize<=0 then
79 mess = [mess;'Font size must be positive';' ']
80 ok = %f ;
81 end
82
83 if nt<=3 then
84 mess = [mess;'Total number of digits must be greater than 3';' ']
85 ok = %f ;
86 end
87
88 if nd<0 then
89 mess = [mess;"Number of rational part digits must be "
90 "greater or equal 0";' ']
91 ok = %f
92 end
93
94 if ~ok then
95 message(['Some specified values are inconsistent:';
96 ' ';mess]);
97 end
98
99 if ~or(herit==[0 1]) then
100 mess = [mess;"Accept inherited values are 0 and 1";' ']
101 ok = %f
102 end
103
104 if ~ok then
105 message(['Some specified values are inconsistent:';
106 ' ';mess])
107 end
108 //**---------------------------------------------------------------------
109
110 //** Positive case ->
111 if ok then
112 [model,graphics,ok] = check_io(model,graphics,1,[],ones(1-herit,1),[])
113 end
114
115 if ok then
116 model.ipar = [font;fontsize;colr;nt;nd];
117 model.evtin = ones(1-herit,1)
118 graphics.exprs = exprs;
119 x.graphics = graphics;
120 x.model = model ;
121 break
122 end
123
124 end
125
126case "define" then
127 font = 1 ; //** 1
128 fontsize = 1 ; //** 1
129 colr = 1 ;
130 nt = 9 ;
131 nd = 2 ;
132 exprs = [ string(font);
133 string(fontsize);
134 string(colr);
135 string(nt);
136 string(nd);
137 string(0) ]
138
139 model = scicos_model();
140 model.sim = "affich" ;
141 model.in = 1 ;
142 model.evtin = 1 ;
143 model.dstate = [0;-1;0;0;1;1;0]; ; //** set the initial value of "z" and the associated "nz"
144 model.ipar = [font; fontsize; colr; 1000; nt; nd]
145 model.blocktype = 'c' ;
146 model.firing = [] ;
147 model.dep_ut = [%t %f]
148 model.label = '' ;
149
150 gr_i=['xset(''font'',ipar(1),ipar(2))';
151 'str='' ''+part(''0'',ones(1,ipar(5)-ipar(6)-2))+''.''+part(''0'',ones(1,ipar(6)))'
152 'rr=xstringl(orig(1),orig(2),str)'
153 'xstring(orig(1)+max(0,(sz(1)-rr(3))/2),orig(2)+max(0,(sz(2)-rr(4))/2),str)'];
154
155 x = standard_define([3 2],model,exprs,gr_i);
156
157end
158
159endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci b/scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci
deleted file mode 100644
index 3848fb0..0000000
--- a/scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci
+++ /dev/null
@@ -1,114 +0,0 @@
1// Scicos
2//
3// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18//
19// See the file ../license.txt
20//
21
22function [x,y,typ]=WFILE(job,arg1,arg2)
23x=[];y=[];typ=[]
24select job
25case 'plot' then
26 standard_draw(arg1)
27case 'getinputs' then
28 [x,y,typ]=standard_inputs(arg1)
29case 'getoutputs' then
30 x=[];y=[];typ=[];
31case 'getorigin' then
32 [x,y]=standard_origin(arg1)
33case 'set' then
34 x=arg1;
35 graphics=arg1.graphics;exprs=graphics.exprs
36 model=arg1.model;
37 dstate=model.dstate
38 lunit=dstate(2)
39 fname=exprs(2)
40 frmt=exprs(3)
41 while %t do
42 [ok,in,fname1,frmt1,N,exprs]=scicos_getvalue(..
43 'Set WFILE block parameters',..
44 ['Input size';
45 'Output file name';
46 'Output Format';
47 'Buffer size'],..
48 list('vec',1,'str',1,'str',1,'vec',1),exprs)
49 if ~ok then break,end //user cancel modification
50 in=int(in)
51 nin=in
52
53 fname1=stripblanks(fname1)
54 frmt1=stripblanks(frmt1)
55 mess=[]
56 if lunit>0&min(length(frmt),1)<>min(length(frmt1),1) then
57 mess=[mess;'You cannot swich from formatted to unformatted';
58 'or from unformatted to formatted when running';' ']
59 end
60 if lunit>0&fname1<>fname then
61 mess=[mess;'You cannot modify Output file name when running';' ']
62 ok=%f
63 end
64 if N<2 then
65 mess=[mess;'Buffer size must be at least 2';' ']
66 ok=%f
67 end
68 if in<=0 then
69 mess=[mess;'Block must have at least one input';' ']
70 ok=%f
71 end
72 if ~ok then
73 message(['Some specified values are inconsistent:';
74 ' ';mess])
75 end
76
77 if ok then
78 ipar=[length(fname1);length(frmt1);0;N;str2code(fname1);str2code(frmt1)]
79 if prod(size(dstate))<>(nin+1)*N+2 then
80 dstate=[-1;lunit;zeros((nin+1)*N,1)]
81 end
82 model.in=nin
83 model.dstate=dstate;model.ipar=ipar
84 model.dep_ut=[%t %f] //compatibility
85 graphics.exprs=exprs;
86 x.graphics=graphics;x.model=model
87 break
88 end
89 end
90case 'define' then
91 in=1;nin=sum(in)
92 frmt='(7(e10.3,1x))'
93 fname='foo'
94 lunit=0
95 N=2;
96
97 model=scicos_model()
98 model.sim=list('writef4',4)
99 model.in=in
100 model.evtin=1
101 model.dstate=[-1;lunit;zeros((nin+1)*N,1)]
102 model.ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt)]
103 model.blocktype='d'
104 model.dep_ut=[%t %f]
105
106 exprs=[sci2exp(in);
107 fname;
108 frmt;
109 string(N)]
110 gr_i=['txt=[''write to'';''output file''];';
111 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
112 x=standard_define([3 2],model,exprs,gr_i)
113end
114endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sources/RFILE.sci b/scilab/modules/scicos_blocks/macros/Sources/RFILE.sci
deleted file mode 100644
index eb9324b..0000000
--- a/scilab/modules/scicos_blocks/macros/Sources/RFILE.sci
+++ /dev/null
@@ -1,140 +0,0 @@
1// Scicos
2//
3// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18//
19// See the file ../license.txt
20//
21
22function [x,y,typ]=RFILE(job,arg1,arg2)
23x=[];y=[];typ=[]
24select job
25case 'plot' then
26 standard_draw(arg1)
27case 'getinputs' then
28 [x,y,typ]=standard_inputs(arg1)
29case 'getoutputs' then
30 [x,y,typ]=standard_outputs(arg1)
31case 'getorigin' then
32 [x,y]=standard_origin(arg1)
33case 'set' then
34 x=arg1;
35 graphics=arg1.graphics;exprs=graphics.exprs
36 model=arg1.model;
37 dstate=model.dstate
38 ipar=model.ipar
39 ievt=ipar(3);N=ipar(4);
40 imask=5+ipar(1)+ipar(2)
41 tmask=ipar(imask)
42 lunit=dstate(3)
43 fname=exprs(3)
44 frmt=exprs(4)
45 //for backward compatibility
46 if size(exprs,'*')>5 then exprs(6)=[],end
47 while %t do
48 [ok,tmask1,outmask,fname1,frmt1,N,exprs]=scicos_getvalue(..
49 ['Set RFILE block parameters';
50 'Read is done on';
51 ' - a binary file if no format given';
52 ' - a formatted file if a format (fortran type) is given'],..
53 ['Time record selection';
54 'Outputs record selection';
55 'Input file name';
56 'Input Format';
57 'Buffer size'],..
58 list('vec',-1,'vec',-1,'str',1,'str',1,'vec',1),..
59 exprs)
60 if ~ok then break,end //user cancel modification
61 fname1=stripblanks(fname1)
62 frmt1=stripblanks(frmt1)
63 //out=int(out)
64 //nout=out
65 nout = size(outmask,'*')
66 if prod(size(tmask1))>1 then
67 message('Time record selection must be a scalar or an empty matrix')
68 elseif lunit>0&min(length(frmt),1)<>min(length(frmt1),1) then
69 message(['You cannot swich from formatted to unformatted';
70 'or from unformatted to formatted when running';' '])
71 elseif lunit>0&fname1<>fname then
72 message('You cannot modify Output file name when running')
73 elseif lunit>0&size(tmask1)<>size(tmask) then
74 message('You cannot modify time management when running')
75 elseif N<2 then
76 message('Buffer size must be at least 2')
77 elseif nout==0 then
78 message('You must read at least one record')
79 elseif min(outmask)<=0 then
80 message('Records must be > 0.')
81 else
82 if tmask1==[] then ievt=0;cout=[];tmask1=0;else ievt=1,cout=1;end
83 [model,graphics,ok]=check_io(model,graphics,[],nout,1,cout)
84 if ok then
85 if ievt==0 then
86 model.firing=[]
87 else
88 model.firing=0
89 end
90 ipar=[length(fname1);
91 length(frmt1);
92 ievt;
93 N;
94 str2code(fname1);
95 str2code(frmt1);
96 tmask1
97 outmask(:)]
98 if prod(size(dstate))<>(nout+ievt)*N+3 then
99 dstate=[-1;-1;lunit;zeros((nout+ievt)*N,1)]
100 end
101 model.dstate=dstate;model.ipar=ipar
102 graphics.exprs=exprs;
103 x.graphics=graphics;x.model=model
104 break
105 end
106 end
107 end
108case 'define' then
109 out=1;nout=sum(out)
110 frmt='(7(e10.3,1x))'
111 fname='foo'
112 lunit=0
113 N=2;
114 rpar=[]
115 tmask=0
116 outmask=1
117 ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt);
118 tmask;outmask]
119 dstate=[1;1;lunit;zeros((nout)*N,1)]
120 model=scicos_model()
121 model.sim=list('readf4',4)
122 model.out=nout
123 model.evtin=1
124 model.dstate=dstate
125 model.ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt);
126 tmask;outmask]
127 model.blocktype='d'
128 model.dep_ut=[%f %f]
129
130 exprs=[sci2exp([]);
131 sci2exp(outmask);
132 fname;
133 frmt;
134 string(N);
135 sci2exp(out)]
136 gr_i=['txt=[''read from'';''input file''];';
137 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
138 x=standard_define([3 2],model,exprs,gr_i)
139end
140endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci b/scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci
deleted file mode 100644
index 36c2cb5..0000000
--- a/scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci
+++ /dev/null
@@ -1,106 +0,0 @@
1// Scicos
2//
3// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18//
19// See the file ../license.txt
20//
21
22function [x,y,typ] = SLIDER_f(job,arg1,arg2)
23//
24x=[];y=[];typ=[]
25select job
26case 'plot' then
27 ipar=arg1.model.ipar
28 dpar=arg1.model.rpar
29 standard_draw(arg1)
30case 'getinputs' then
31 [x,y,typ]=standard_inputs(arg1)
32case 'getoutputs' then
33 x=[];y=[];typ=[];
34case 'getorigin' then
35 [x,y]=standard_origin(arg1)
36case 'set' then
37 x=arg1;
38 graphics=arg1.graphics;exprs=graphics.exprs
39 model=arg1.model;
40 while %t do
41 [ok,min_r,max_r,sl_type,color,herit,exprs]=scicos_getvalue(..
42 'Set parameters',..
43 ['Min range';
44 'Max range';
45 'Type';
46 'Color';
47 'Block inherits (1) or not (0)'],..
48 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
49 if ~ok then break,end //user cancel modification
50 mess=[]
51 if max_r <= min_r then
52 mess=[mess;'min range < max range ';' ']
53 ok=%f
54 end
55 if ~ok then
56 message(['Some specified values are inconsistent:';
57 ' ';mess]);
58 end
59 if ~or(herit==[0 1]) then
60 mess=[mess;'Accept inherited values are 0 and 1';' ']
61 ok=%f
62 end
63 if ~ok then
64 message(['Some specified values are inconsistent:';
65 ' ';mess])
66 end
67 if ok then
68 [model,graphics,ok]=check_io(model,graphics,1,[],ones(1-herit,1),[])
69 end
70 if ok then
71 ipar=[sl_type;color;xget('window')];
72 dpar=[min_r;max_r];
73 model.ipar=ipar;
74 model.rpar=dpar;
75 model.evtin=ones(1-herit,1)
76 graphics.exprs=exprs;
77 x.graphics=graphics;x.model=model
78 break
79 end
80 end
81case 'define' then
82 min_r= 0
83 max_r= 1
84 color= 1
85 sl_type = 1
86
87 model=scicos_model()
88 model.sim='slider'
89 model.in=1
90 model.evtin=1
91 model.dstate=[0;-1;1;2;3;4]
92 model.rpar=[min_r;max_r]
93 model.ipar=[sl_type;color;0]
94 model.blocktype='d'
95 model.dep_ut=[%t %f]
96
97 exprs=[string(min_r);
98 string(max_r);
99 string(sl_type);
100 string(color);
101 string(0)]
102
103 gr_i=' '
104 x=standard_define([3 1],model,exprs,gr_i)
105end
106endfunction
diff --git a/scilab/modules/scicos_blocks/src/c/affich.c b/scilab/modules/scicos_blocks/src/c/affich.c
deleted file mode 100644
index afa656c..0000000
--- a/scilab/modules/scicos_blocks/src/c/affich.c
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3* Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
4* Copyright (C) 2008 - INRIA - Simone Mannori
5*
6* This file must be used under the terms of the CeCILL.
7* This source file is licensed as described in the file COPYING, which
8* you should have received as part of this distribution. The terms
9* are also available at
10* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11*
12*/
13/*--------------------------------------------------------------------------*/
14#include <stdio.h>
15#include "GetProperty.h"
16#include "SetProperty.h"
17#include "ObjectSelection.h"
18#include "HandleManagement.h"
19#include "CurrentObjectsManagement.h"
20#include "DrawingBridge.h"
21#include "StringMatrix.h"
22#include "affich.h"
23#include "WindowList.h"
24/*--------------------------------------------------------------------------*/
25/** Index of the text object within the block (ie compound) */
26#define TEXT_INDEX_IN_BLOCK 1
27
28/*---------------------------------------------------------------------------------*/
29/**
30* Retrieve the text object the affich routine use.
31* @param winNum index of the figure in which the text lies in.
32* @param compoundIndex index within the children of the current subwin of the
33* parent compound of the text.
34*/
35static sciPointObj * getAffichTextObject(int winNum, int compoundIndex);
36/*---------------------------------------------------------------------------------*/
37static sciPointObj * getAffichTextObject(int winNum, int compoundIndex)
38{
39 sciPointObj * parentFigure = getFigureFromIndex(winNum);
40 sciPointObj * parentSubwin = sciGetFirstTypedSelectedSon(parentFigure, SCI_SUBWIN);
41 sciPointObj * parentCompound = sciGetIndexedSon(parentSubwin, compoundIndex);
42
43 return sciGetIndexedSon(parentCompound, TEXT_INDEX_IN_BLOCK);
44}
45
46
47
48/*---------------------------------------------------------------------------------*/
49void C2F(settxtel)( int * numRow,
50 int * numCol,
51 double * winNum,
52 double * textIndex,
53 char * value,
54 int valueLength)
55{
56 int nbRow,nbCol;
57 /* First step, retreive text handle */
58 /* For now we got the index of the block coupound within the axes children */
59 /* Get the text handle */
60 /* NB it should be better to test the correctness of the handle only once! */
61 sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
62 if (pText==(sciPointObj *)NULL) return;
63 if (sciGetEntityType (pText)== SCI_TEXT) {
64 sciGetTextSize(pText, &nbRow, &nbCol );
65 if (nbRow>=*numRow && nbCol>=*numCol) {
66 StringMatrix * mat = sciGetText(pText);
67 /* Set matrix element */
68 copyStrMatElement(mat, (*numRow) - 1, (*numCol) - 1, value);
69 }
70 }
71}
72/*---------------------------------------------------------------------------------*/
73void C2F(affup2)( double * winNum,
74 double * textIndex)
75{
76 /* First step, retreive text handle */
77 /* For now we got the index of the block compound within the axes children */
78 /* Get the text handle */
79 sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
80
81 /* StringMatrix * mat = sciGetText(pText); */
82 if (pText==(sciPointObj *)NULL) return;
83 /* Second step draw the object */
84 sciDrawObj(pText);
85}
86/*---------------------------------------------------------------------------------*/
87
88void C2F(affichup)( double * textIndex,
89 double * winNum,
90 char * value,
91 int valueLength)
92{
93 /* First step, retreive text handle */
94 /* For now we got the index of the block coupound within the axes children */
95 sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
96 if (pText==(sciPointObj *)NULL) return;
97 if (sciGetEntityType (pText)== SCI_TEXT)
98 {
99 /* Second step update text data */
100 sciSetText(pText, &value, 1, 1);
101 sciDrawObj(pText);
102 }
103}
104/*---------------------------------------------------------------------------------*/
105
diff --git a/scilab/modules/scicos_blocks/src/c/readf4.c b/scilab/modules/scicos_blocks/src/c/readf4.c
deleted file mode 100644
index bccfbff..0000000
--- a/scilab/modules/scicos_blocks/src/c/readf4.c
+++ /dev/null
@@ -1,420 +0,0 @@
1/* Scicos
2*
3* Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4*
5* This program is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation; either version 2 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program; if not, write to the Free Software
17* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*
19* See the file ./license.txt
20*/
21#include "scicos_block.h"
22#include <math.h>
23
24/* Common Block Declarations */
25int bfrdr();
26struct {
27 double stk[2];
28} stack_;
29
30#define stack_1 stack_
31
32struct {
33 int bot, top, idstk[60000] /* was [6][10000] */, lstk[10000],
34 leps, bbot, bot0, infstk[10000], gbot, gtop, isiz;
35} vstk_;
36
37#define vstk_1 vstk_
38
39struct {
40 int ids[24576] /* was [6][4096] */, pstk[4096], rstk[4096], pt, niv,
41 macr, paus, icall, krec;
42} recu_;
43
44#define recu_1 recu_
45
46struct {
47 int ddt, err, lct[8], lin[65536], lpt[6], hio, rio, wio, rte, wte;
48} iop_;
49
50#define iop_1 iop_
51
52struct {
53 int err1, err2, errct, toperr, errpt, ieee, catch__;
54} errgst_;
55
56#define errgst_1 errgst_
57
58struct {
59 int sym, syn[6], char1, fin, fun, lhs, rhs, ran[2], comp[3];
60} com_;
61
62#define com_1 com_
63
64struct {
65 char alfa[63], alfb[63], buf[4096];
66} cha1_;
67
68#define cha1_1 cha1_
69
70struct {
71 int wmac, lcntr, nmacs, macnms[600] /* was [6][100] */, lgptrs[
72 101], bptlg[1000];
73} dbg_;
74
75#define dbg_1 dbg_
76
77struct {
78 int lbot, ie, is, ipal, nbarg, ladr[1024];
79} adre_;
80
81#define adre_1 adre_
82
83struct {
84 int nbvars, iwhere[1024], nbrows[1024], nbcols[1024], itflag[1024],
85 ntypes[1024], lad[1024], ladc[1024], lhsvar[1024];
86} intersci_;
87
88typedef struct
89{ long int cierr;
90 long int ciunit;
91 long int ciend;
92 char *cifmt;
93 long int cirec;
94} cilist;
95
96#define intersci_1 intersci_
97
98typedef char *address;
99
100typedef struct { double r, i; } doublecomplex;
101
102
103#ifndef max
104#define max(a,b) ((a) >= (b) ? (a) : (b))
105#endif
106
107/* Table of constant values */
108
109static int c__1 = 1;
110static int c__3 = 3;
111static int c__2 = 2;
112
113int readf4(scicos_block *block,int flag)
114{
115
116 int nz=block->nz;
117 double* z__=block->z;
118 double* y=block->outptr[0];
119 int* ny=block->outsz;
120 int* ipar=block->ipar;
121 double *tvec=block->evout;
122 double t=get_scicos_time();
123
124 /* System generated locals */
125 address a__1[3], a__2[2];
126 int i__1, i__2[3], i__3[2];
127 char ch__1[4118], ch__2[4115];
128
129 /* Builtin functions */
130 int s_cat();
131
132 /* Local variables */
133 static int mode[2], lfil, kmax;
134#define cstk ((char *)&stack_1)
135 static int ierr;
136#define istk ((int *)&stack_1)
137 static int ievt, lfmt;
138#define sstk ((float *)&stack_1)
139#define zstk ((doublecomplex *)&stack_1)
140 static int k, n;
141 extern int dcopy_();
142 static int lunit;
143 extern int cvstr_();
144 static int io, no;
145 extern int basout_(), clunit_();
146
147 /* Copyright INRIA
148
149 Scicos block simulator
150 write read from a binary or formatted file
151 include 'stack.h'
152 ipar(1) = lfil : file name length
153 ipar(2) = lfmt : format length (0) if binary file
154 ipar(3) = ievt : 1 if each data have a an associated time
155 ipar(4) = N : buffer length
156 ipar(5:4+lfil) = character codes for file name
157 ipar(5+lfil:4+lfil+lfmt) = character codes for format if any
158 ipar(5+lfil+lfmt:5+lfil+lfmt+ny+ievt) = reading mask */
159
160
161 /* Parameter adjustments */
162 --y;
163 --ipar;
164 --tvec;
165 --z__;
166
167
168 /* Function Body */
169 if (flag == 1) {
170 /* discrete state */
171 n = ipar[4];
172 k = (int) z__[1];
173 ievt = ipar[3];
174 kmax = (int) z__[2];
175 lunit = (int) z__[3];
176 if (k + 1 > kmax && kmax == n) {
177 /* output */
178 dcopy_(ny, &z__[n * ievt + 3 + k], &n, &y[1], &c__1);
179 /* . read a new buffer */
180 no = (nz - 3) / n;
181 bfrdr(&lunit, &ipar[1], &z__[4], &no, &kmax, &ierr);
182 if (ierr != 0) {
183 goto L110;
184 }
185 z__[1] = 1.;
186 z__[2] = (double) kmax;
187 } else if (k < kmax) {
188 /* output */
189 dcopy_(ny, &z__[n * ievt + 3 + k], &n, &y[1], &c__1);
190 z__[1] += 1.;
191 } else if (k+1> kmax) {
192 dcopy_(ny, &z__[n * ievt + 3 + kmax], &n, &y[1], &c__1);
193 }
194 } else if (flag == 3) {
195 n = ipar[4];
196 k = (int) z__[1];
197 kmax = (int) z__[2];
198 if (k > kmax && kmax < n) {
199 tvec[1] = t - 1.;
200 } else {
201 tvec[1] = z__[k + 3];
202 }
203 } else if (flag == 4) {
204 /* file opening */
205 lfil = ipar[1];
206 ievt = ipar[3];
207 n = ipar[4];
208 cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
209 lfmt = ipar[2];
210 lunit = 0;
211 if (lfmt > 0) {
212 mode[0] = 1;
213 mode[1] = 0;
214 clunit_(&lunit, cha1_1.buf, mode, lfil);
215 if (iop_1.err > 0) {
216 goto L100;
217 }
218 } else {
219 mode[0] = 101;
220 mode[1] = 0;
221 clunit_(&lunit, cha1_1.buf, mode, lfil);
222 if (iop_1.err > 0) {
223 goto L100;
224 }
225 }
226 z__[3] = (double) lunit;
227 /* buffer initialisation */
228 no = (nz - 3) / n;
229 bfrdr(&lunit, &ipar[1], &z__[4], &no, &kmax, &ierr);
230 if (ierr != 0) {
231 goto L110;
232 }
233 z__[1] = 1.;
234 z__[2] = (double) kmax;
235 } else if (flag == 5) {
236 lfil = ipar[1];
237 n = ipar[4];
238 k = (int) z__[1];
239 lunit = (int) z__[3];
240 if (lunit == 0) {
241 return 0;
242 }
243 i__1 = -lunit;
244 clunit_(&i__1, cha1_1.buf, mode, lfil);
245 if (iop_1.err > 0) {
246 goto L100;
247 }
248 z__[3] = 0.;
249 }
250 return 0;
251 L100:
252 iop_1.err = 0;
253 lfil = ipar[1];
254 /* Writing concatenation */
255 i__2[0] = 5, a__1[0] = "File ";
256 i__2[1] = lfil, a__1[1] = cha1_1.buf;
257 i__2[2] = 17, a__1[2] = " Cannot be opened";
258 s_cat(ch__1, a__1, i__2, &c__3, (short)4118);
259 basout_(&io, &iop_1.wte, ch__1, lfil + 22);
260 flag = -1;
261 return 0;
262 L110:
263 lfil = ipar[1];
264 cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
265 i__1 = -lunit;
266 clunit_(&i__1, cha1_1.buf, mode, lfil);
267 /* Writing concatenation */
268 i__3[0] = 19, a__2[0] = "Read error on file ";
269 i__3[1] = lfil, a__2[1] = cha1_1.buf;
270 s_cat(ch__2, a__2, i__3, &c__2, (short)4115);
271 basout_(&io, &iop_1.wte, ch__2, lfil + 19);
272 flag = -1;
273 return 0;
274} /* readf */
275
276#undef zstk
277#undef sstk
278#undef istk
279#undef cstk
280
281
282int bfrdr(lunit, ipar, z__, no, kmax, ierr)
283 int *lunit, *ipar;
284 double *z__;
285 int *no, *kmax, *ierr;
286{
287 /* System generated locals */
288 int i__1, i__2, i__3;
289 cilist ci__1;
290
291 /* Builtin functions */
292 int s_rsue(), do_uio(), e_rsue(), s_rsfe(), do_fio(), e_rsfe();
293
294 /* Local variables */
295#define cstk ((char *)&stack_1)
296 static int lfmt;
297#define istk ((int *)&stack_1)
298 static int ievt;
299#define sstk ((float *)&stack_1)
300#define zstk ((doublecomplex *)&stack_1)
301 static int i__, j, n, imask;
302 extern /* Subroutine */ int cvstr_();
303 static int mm;
304 static double tmp[100];
305
306 /* Fortran I/O blocks */
307 static cilist io___26 = { 1, 0, 1, 0, 0 };
308
309
310 /* *------------------------------------------------------------------ */
311
312 /* Parameter adjustments */
313 --z__;
314 --ipar;
315
316 /* Function Body */
317 ievt = ipar[3];
318 n = ipar[4];
319 /* no=(nz-3)/N */
320 /* maximum number of value to read */
321 imask = ipar[1] + 5 + ipar[2];
322 if (ievt == 0) {
323 ++imask;
324 }
325 mm = 0;
326 i__1 = *no - 1;
327 for (i__ = 0; i__ <= i__1; ++i__) {
328 /* Computing MAX */
329 i__2 = mm, i__3 = ipar[imask + i__];
330 mm = max(i__2,i__3);
331 /* L10: */
332 }
333
334 lfmt = ipar[2];
335 *kmax = 0;
336 if (lfmt == 0) {
337 /* unformatted read */
338 i__1 = n;
339 for (i__ = 1; i__ <= i__1; ++i__) {
340 io___26.ciunit = *lunit;
341 i__2 = s_rsue(&io___26);
342 if (i__2 != 0) {
343 goto L100001;
344 }
345 i__3 = mm;
346 for (j = 1; j <= i__3; ++j) {
347 i__2 = do_uio(&c__1, (char *)&tmp[j - 1], (short)sizeof(
348 double));
349 if (i__2 != 0) {
350 goto L100001;
351 }
352 }
353 i__2 = e_rsue();
354 L100001:
355 if (i__2 < 0) {
356 goto L20;
357 }
358 if (i__2 > 0) {
359 goto L100;
360 }
361 i__2 = *no - 1;
362 for (j = 0; j <= i__2; ++j) {
363 z__[j * n + i__] = tmp[ipar[imask + j] - 1];
364 /* L11: */
365 }
366 ++(*kmax);
367 /* L12: */
368 }
369 } else {
370 /* formatted read */
371 cvstr_(&ipar[2], &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)4096);
372 i__1 = n;
373 for (i__ = 1; i__ <= i__1; ++i__) {
374 ci__1.cierr = 1;
375 ci__1.ciend = 1;
376 ci__1.ciunit = *lunit;
377 ci__1.cifmt = cha1_1.buf;
378 i__2 = s_rsfe(&ci__1);
379 if (i__2 != 0) {
380 goto L100002;
381 }
382 i__3 = mm;
383 for (j = 1; j <= i__3; ++j) {
384 i__2 = do_fio(&c__1, (char *)&tmp[j - 1], (short)sizeof(
385 double));
386 if (i__2 != 0) {
387 goto L100002;
388 }
389 }
390 i__2 = e_rsfe();
391 L100002:
392 if (i__2 < 0) {
393 goto L20;
394 }
395 if (i__2 > 0) {
396 goto L100;
397 }
398 i__2 = *no - 1;
399 for (j = 0; j <= i__2; ++j) {
400 z__[j * n + i__] = tmp[ipar[imask + j] - 1];
401 /* L13: */
402 }
403 ++(*kmax);
404 /* L14: */
405 }
406 }
407 L20:
408 *ierr = 0;
409 return 0;
410 L100:
411 *ierr = 1;
412 return 0;
413} /* bfrdr */
414
415#undef zstk
416#undef sstk
417#undef istk
418#undef cstk
419
420
diff --git a/scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj b/scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj
index d562bc6..1f213a1 100644
--- a/scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj
+++ b/scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj
@@ -1,4 +1,4 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<VisualStudioProject 2<VisualStudioProject
3 ProjectType="Visual C++" 3 ProjectType="Visual C++"
4 Version="9,00" 4 Version="9,00"
@@ -36,6 +36,9 @@
36 Name="VCXMLDataGeneratorTool" 36 Name="VCXMLDataGeneratorTool"
37 /> 37 />
38 <Tool 38 <Tool
39 Name="VCWebServiceProxyGeneratorTool"
40 />
41 <Tool
39 Name="VCMIDLTool" 42 Name="VCMIDLTool"
40 /> 43 />
41 <Tool 44 <Tool
@@ -116,6 +119,9 @@
116 Name="VCXMLDataGeneratorTool" 119 Name="VCXMLDataGeneratorTool"
117 /> 120 />
118 <Tool 121 <Tool
122 Name="VCWebServiceProxyGeneratorTool"
123 />
124 <Tool
119 Name="VCMIDLTool" 125 Name="VCMIDLTool"
120 TargetEnvironment="3" 126 TargetEnvironment="3"
121 /> 127 />
@@ -197,6 +203,9 @@
197 Name="VCXMLDataGeneratorTool" 203 Name="VCXMLDataGeneratorTool"
198 /> 204 />
199 <Tool 205 <Tool
206 Name="VCWebServiceProxyGeneratorTool"
207 />
208 <Tool
200 Name="VCMIDLTool" 209 Name="VCMIDLTool"
201 /> 210 />
202 <Tool 211 <Tool
@@ -282,6 +291,9 @@
282 Name="VCXMLDataGeneratorTool" 291 Name="VCXMLDataGeneratorTool"
283 /> 292 />
284 <Tool 293 <Tool
294 Name="VCWebServiceProxyGeneratorTool"
295 />
296 <Tool
285 Name="VCMIDLTool" 297 Name="VCMIDLTool"
286 TargetEnvironment="3" 298 TargetEnvironment="3"
287 /> 299 />
@@ -374,10 +386,6 @@
374 > 386 >
375 </File> 387 </File>
376 <File 388 <File
377 RelativePath=".\affich.c"
378 >
379 </File>
380 <File
381 RelativePath="..\cpp\affich2.cpp" 389 RelativePath="..\cpp\affich2.cpp"
382 > 390 >
383 </File> 391 </File>
@@ -1655,10 +1663,6 @@
1655 Filter="h;hpp;hxx;hm;inl" 1663 Filter="h;hpp;hxx;hm;inl"
1656 > 1664 >
1657 <File 1665 <File
1658 RelativePath="..\..\includes\affich.h"
1659 >
1660 </File>
1661 <File
1662 RelativePath="..\jni\AfficheBlock.hxx" 1666 RelativePath="..\jni\AfficheBlock.hxx"
1663 > 1667 >
1664 </File> 1668 </File>
diff --git a/scilab/modules/scicos_blocks/src/c/writef4.c b/scilab/modules/scicos_blocks/src/c/writef4.c
deleted file mode 100644
index dd9213a..0000000
--- a/scilab/modules/scicos_blocks/src/c/writef4.c
+++ /dev/null
@@ -1,349 +0,0 @@
1/* Scicos
2*
3* Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4*
5* This program is free software; you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation; either version 2 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program; if not, write to the Free Software
17* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*
19* See the file ./license.txt
20*/
21#include "scicos_block.h"
22#include <math.h>
23
24
25/* Common Block Declarations */
26
27struct {
28 double stk[2];
29} stack_;
30
31#define stack_1 stack_
32
33struct {
34 int bot, top, idstk[60000] /* was [6][10000] */, lstk[10000],
35 leps, bbot, bot0, infstk[10000], gbot, gtop, isiz;
36} vstk_;
37
38#define vstk_1 vstk_
39
40struct {
41 int ids[24576] /* was [6][4096] */, pstk[4096], rstk[4096], pt, niv,
42 macr, paus, icall, krec;
43} recu_;
44
45#define recu_1 recu_
46
47struct {
48 int ddt, err, lct[8], lin[65536], lpt[6], hio, rio, wio, rte, wte;
49} iop_;
50
51#define iop_1 iop_
52
53struct {
54 int err1, err2, errct, toperr, errpt, ieee, catch__;
55} errgst_;
56
57#define errgst_1 errgst_
58
59struct {
60 int sym, syn[6], char1, fin, fun, lhs, rhs, ran[2], comp[3];
61} com_;
62
63#define com_1 com_
64
65struct {
66 char alfa[63], alfb[63], buf[4096];
67} cha1_;
68
69#define cha1_1 cha1_
70
71struct {
72 int wmac, lcntr, nmacs, macnms[600] /* was [6][100] */, lgptrs[
73 101], bptlg[1000];
74} dbg_;
75
76#define dbg_1 dbg_
77
78struct {
79 int lbot, ie, is, ipal, nbarg, ladr[1024];
80} adre_;
81
82#define adre_1 adre_
83
84struct {
85 int nbvars, iwhere[1024], nbrows[1024], nbcols[1024], itflag[1024],
86 ntypes[1024], lad[1024], ladc[1024], lhsvar[1024];
87} intersci_;
88
89#define intersci_1 intersci_
90
91typedef struct
92{ long int cierr;
93 long int ciunit;
94 long int ciend;
95 char *cifmt;
96 long int cirec;
97} cilist;
98
99typedef char *address;
100
101typedef struct { double r, i; } doublecomplex;
102
103/* Table of constant values */
104
105static int c__1 = 1;
106static double c_b12 = 0.;
107static int c__3 = 3;
108
109int writef4(scicos_block *block,int flag)
110{
111 double* z__=block->z;
112 double* u=block->inptr[0];
113 int* nu=block->insz;
114 int* ipar=block->ipar;
115 int nevprt=block->nevprt;
116 double t=get_scicos_time();
117
118 /* System generated locals */
119 address a__1[3];
120 int i__1, i__2, i__3, i__4[3];
121 char ch__1[4118];
122 cilist ci__1;
123
124 /* Builtin functions */
125 int s_wsfe(), do_fio(), e_wsfe(), s_wsue(), do_uio(), e_wsue();
126 int s_cat();
127
128 /* Local variables */
129 static int mode[2], lfil;
130 extern int dset_();
131 static int lfmt;
132#define cstk ((char *)&stack_1)
133#define istk ((int *)&stack_1)
134#define sstk ((real *)&stack_1)
135#define zstk ((doublecomplex *)&stack_1)
136 static int i__, j, k, n, lunit;
137 extern int cvstr_();
138 static int io;
139 extern int basout_(), clunit_();
140
141 /* Fortran I/O blocks */
142 static cilist io___10 = { 1, 0, 0, 0, 0 };
143 static cilist io___14 = { 0, 0, 0, 0, 0 };
144
145
146 /* Copyright INRIA */
147 /* Scicos block simulator */
148 /* write input to a binary or formatted file */
149 /* ipar(1) = lfil : file name length */
150 /* ipar(2) = lfmt : format length (0) if binary file */
151 /* ipar(3) unused */
152 /* ipar(4) = N : buffer length */
153 /* ipar(5:4+lfil) = character codes for file name */
154 /* ipar(5+lfil:4+lfil+lfmt) = character codes for format if any */
155
156 /* Copyright INRIA */
157 /* *------------------------------------------------------------------ */
158 /* vsiz size of internal scilab stack */
159
160 /* bsiz size of internal chain buf */
161
162 /* isizt maximum number of scilab variables global and local */
163 /* isiz maximum number of scilab local variables */
164 /* psiz defines recursion size */
165 /* lsiz dim. of vector containing the command line */
166 /* nlgh length of variable names */
167 /* csiz used for character coding */
168 /* intersiz used in interfaces */
169 /* *------------------------------------------------------------------- */
170 /* c (DLL Digital Visual Fortran) */
171 /* DEC$ IF DEFINED (FORDLL) */
172 /* DEC$ ATTRIBUTES DLLIMPORT:: /stack/, /vstk/, /recu/, /iop/ */
173 /* DEC$ ATTRIBUTES DLLIMPORT:: /errgst/, /com/, /adre/ */
174 /* DEC$ ATTRIBUTES DLLIMPORT:: /intersci/ ,/cha1/ */
175 /* DEC$ ENDIF */
176 /* --------------------------------------------------------------- */
177
178 /* *------------------------------------------------------------------ */
179
180 /* Parameter adjustments */
181 --u;
182 --ipar;
183 --z__;
184
185 /* Function Body */
186 n = ipar[4];
187 k = (int) z__[1];
188 lunit = (int) z__[2];
189
190 if (flag == 2 && nevprt > 0) {
191 /* add new point to the buffer */
192 ++k;
193 z__[k + 2] = t;
194 i__1 = *nu;
195 for (i__ = 1; i__ <= i__1; ++i__) {
196 z__[n + 2 + (i__ - 1) * n + k] = u[i__];
197 /* L1: */
198 }
199 z__[1] = (double) k;
200 if (k < n) {
201 return 0;
202 }
203 /* write on the file */
204 if (ipar[2] > 0) {
205 /* . formatted write */
206 cvstr_(&ipar[2], &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)
207 4096);
208 i__1 = k;
209 for (j = 1; j <= i__1; ++j) {
210 ci__1.cierr = 1;
211 ci__1.ciunit = lunit;
212 ci__1.cifmt = cha1_1.buf;
213 i__2 = s_wsfe(&ci__1);
214 if (i__2 != 0) {
215 goto L100;
216 }
217 i__3 = *nu;
218 for (i__ = 0; i__ <= i__3; ++i__) {
219 i__2 = do_fio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n +
220 j], (short)sizeof(double));
221 if (i__2 != 0) {
222 goto L100;
223 }
224 }
225 i__2 = e_wsfe();
226 if (i__2 != 0) {
227 goto L100;
228 }
229 /* L10: */
230 }
231 } else {
232 /* . unformatted write */
233 i__1 = k;
234 for (j = 1; j <= i__1; ++j) {
235 io___10.ciunit = lunit;
236 i__2 = s_wsue(&io___10);
237 if (i__2 != 0) {
238 goto L100;
239 }
240 i__3 = *nu;
241 for (i__ = 0; i__ <= i__3; ++i__) {
242 i__2 = do_uio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n +
243 j], (short)sizeof(double));
244 if (i__2 != 0) {
245 goto L100;
246 }
247 }
248 i__2 = e_wsue();
249 if (i__2 != 0) {
250 goto L100;
251 }
252 /* L11: */
253 }
254 }
255 z__[1] = 0.;
256 } else if (flag == 4) {
257 /* file opening */
258 lfil = ipar[1];
259 cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
260 lfmt = ipar[2];
261 lunit = 0;
262 if (lfmt > 0) {
263 mode[0] = 3;
264 mode[1] = 0;
265 clunit_(&lunit, cha1_1.buf, mode, lfil);
266 if (iop_1.err > 0) {
267 goto L100;
268 }
269 } else {
270 mode[0] = 103;
271 mode[1] = 0;
272 clunit_(&lunit, cha1_1.buf, mode, lfil);
273 if (iop_1.err > 0) {
274 goto L100;
275 }
276 }
277 z__[1] = 0.;
278 z__[2] = (double) lunit;
279 z__[3] = t;
280 i__1 = *nu * n;
281 dset_(&i__1, &c_b12, &z__[4], &c__1);
282 } else if (flag == 5) {
283 if (lunit == 0) {
284 return 0;
285 }
286 if (k >= 1) {
287 /* write on the file */
288 lfmt = ipar[2];
289 if (lfmt > 0) {
290 /* . formatted write */
291 cvstr_(&lfmt, &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)
292 4096);
293 i__1 = k;
294 for (j = 1; j <= i__1; ++j) {
295 ci__1.cierr = 0;
296 ci__1.ciunit = lunit;
297 ci__1.cifmt = cha1_1.buf;
298 s_wsfe(&ci__1);
299 i__2 = *nu;
300 for (i__ = 0; i__ <= i__2; ++i__) {
301 do_fio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + j],
302 (short)sizeof(double));
303 }
304 e_wsfe();
305 /* L20: */
306 }
307 } else {
308 /* . unformatted write */
309 i__1 = k;
310 for (j = 1; j <= i__1; ++j) {
311 io___14.ciunit = lunit;
312 s_wsue(&io___14);
313 i__2 = *nu;
314 for (i__ = 0; i__ <= i__2; ++i__) {
315 do_uio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + j],
316 (short)sizeof(double));
317 }
318 e_wsue();
319 /* L21: */
320 }
321 }
322 }
323 lfil = ipar[1];
324 i__1 = -lunit;
325 clunit_(&i__1, cha1_1.buf, mode, lfil);
326 if (iop_1.err > 0) {
327 goto L100;
328 }
329 z__[2] = 0.;
330 }
331 return 0;
332 L100:
333 iop_1.err = 0;
334 /* Writing concatenation */
335 i__4[0] = 5, a__1[0] = "File ";
336 i__4[1] = lfil, a__1[1] = cha1_1.buf;
337 i__4[2] = 17, a__1[2] = " Cannot be opened";
338 s_cat(ch__1, a__1, i__4, &c__3, (short)4118);
339 basout_(&io, &iop_1.wte, ch__1, lfil + 22);
340 iflag = -1;
341 return 0;
342} /* writef_ */
343
344#undef zstk
345#undef sstk
346#undef istk
347#undef cstk
348
349
diff --git a/scilab/modules/scicos_blocks/src/fortran/affich.f b/scilab/modules/scicos_blocks/src/fortran/affich.f
deleted file mode 100644
index 6f26f8c..0000000
--- a/scilab/modules/scicos_blocks/src/fortran/affich.f
+++ /dev/null
@@ -1,135 +0,0 @@
1c Scicos
2c
3c Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
4c
5c This program is free software; you can redistribute it and/or modify
6c it under the terms of the GNU General Public License as published by
7c the Free Software Foundation; either version 2 of the License, or
8c (at your option) any later version.
9c
10c This program is distributed in the hope that it will be useful,
11c but WITHOUT ANY WARRANTY; without even the implied warranty of
12c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13c GNU General Public License for more details.
14c
15c You should have received a copy of the GNU General Public License
16c along with this program; if not, write to the Free Software
17c Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18c
19c See the file ./license.txt
20c
21 subroutine affich(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
22 & rpar,nrpar,ipar,nipar,u,nu,y,ny)
23
24c Scicos block simulator
25c Displays the value of the input in a graphic window
26c
27c ipar(1) = font
28c ipar(2) = fontsize
29c ipar(3) = color
30c ipar(4) = win
31c ipar(5) = nt : total number of output digits
32c ipar(6) = nd number of rationnal part digits
33
34c
35c z(1)=value
36c z(2)=window
37c z(3)=x
38c z(4)=y
39c z(5)=width
40c z(6)=height
41c z(7)=text_handle
42
43 double precision t,xd(*),x(*),z(*),tvec(*),rpar(*),u(*),y(*)
44 integer flag,nevprt,nx,nz,ntvec,nrpar,ipar(*)
45 integer nipar,nu,ny
46
47
48 integer wid
49
50 double precision sciround,ur
51
52
53c
54c ------------------- State Update -----------------------------
55 if(flag.eq.2) then
56c state evolution
57 ur=10.0d0**ipar(6)
58 ur=sciround(u(1)*ur)/ur
59
60 if (ur.eq.z(1)) return
61
62 wid=z(2)
63
64 if(wid.lt.0) return
65
66 call setblockwin(int(z(2)),cur)
67
68 z(1)=ur
69
70 call affdraw(ipar(5),z(1), z(2), z(7))
71
72c ----------------- Initialization -----------------------------
73 elseif(flag.eq.4) then
74c init
75c . initial value = 0
76 z(1)=0.0d0
77
78c . get geometry of the block
79 call getgeom(z(2))
80
81
82c . Check that the winId is valid.
83 if(z(2).lt.0.0d0) return
84
85c ---------------------------------------------------------------
86
87 endif
88 end
89c ---------------------------------------------------------------
90
91 subroutine setblockwin(win,cur)
92 integer win,cur
93 return
94 end
95
96c -------- Build the string and draw it inside the box --------
97 subroutine affdraw(form, val, winnum, textind)
98 integer textind
99 integer form(2)
100 double precision winnum
101 double precision val
102 character*40 fmt,value
103
104c --------- Compute the string to display ---------------
105 write(fmt,'(''(f'',i3,''.'',i3,'')'')') form(1),form(2)
106 value=' '
107 write(value,fmt) val
108c .Add the "0" at the end of the string (C standard string)
109 ln=lnblnk(value)
110 value(ln+1:ln+1)=char(0)
111
112 call affichup(textind, winnum, value)
113
114 return
115
116 end
117
118
119c -------------------------------------------------------------------------------------
120
121 subroutine getgeom(g)
122 include "stack.h"
123 double precision g(*)
124 integer ret
125 integer sadr,iadr
126 iadr(l) = l + l - 1
127 sadr(l)=(l/2)+1
128 ret=scistring(rhs+1, 'getgeom',1,0)
129 il=iadr(lstk(top+1))
130 l=sadr(il+4)
131c . 6 : number of element to retrieve
132 call dcopy(6,stk(l),1,g,1)
133c top=top-1
134 return
135 end
diff --git a/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj b/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj
index d3b1ee0..4a0c9e9 100644
--- a/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj
+++ b/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj
@@ -105,7 +105,6 @@ lib /DEF:&quot;$(InputDir)Scicos_blocks_Import.def&quot; /SUBSYSTEM:WINDOWS /MAC
105 <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> 105 <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
106 <File RelativePath=".\scicos_blocks_f.rc"/></Filter> 106 <File RelativePath=".\scicos_blocks_f.rc"/></Filter>
107 <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl"> 107 <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
108 <File RelativePath=".\affich.f"/>
109 <File RelativePath=".\csslti.f"/> 108 <File RelativePath=".\csslti.f"/>
110 <File RelativePath=".\cstblk.f"/> 109 <File RelativePath=".\cstblk.f"/>
111 <File RelativePath=".\delay.f"/> 110 <File RelativePath=".\delay.f"/>
diff --git a/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj b/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj
index 3035097..f7b7fc1 100644
--- a/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj
+++ b/scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj
@@ -398,10 +398,6 @@
398 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" 398 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
399 > 399 >
400 <File 400 <File
401 RelativePath=".\affich.c"
402 >
403 </File>
404 <File
405 RelativePath=".\csslti.c" 401 RelativePath=".\csslti.c"
406 > 402 >
407 </File> 403 </File>
@@ -646,10 +642,6 @@
646 Name="Fortran files" 642 Name="Fortran files"
647 > 643 >
648 <File 644 <File
649 RelativePath=".\affich.f"
650 >
651 </File>
652 <File
653 RelativePath=".\csslti.f" 645 RelativePath=".\csslti.f"
654 > 646 >
655 </File> 647 </File>
diff --git a/scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce b/scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce
index 8a178b8..6f19f7e 100644
--- a/scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce
+++ b/scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce
@@ -21,88 +21,89 @@
21 21
22cd SCI/modules/scicos_blocks/src/c; 22cd SCI/modules/scicos_blocks/src/c;
23 23
24BLOCK_C_SOURCES = gsort(ls('*.c')); 24BLOCK_C_SOURCES = gsort(ls("*.c"));
25 25
26NON_BLOCK_C_SOURCES = ['scoGetProperty.c', 26NON_BLOCK_C_SOURCES = ["scoGetProperty.c",
27'scoSetProperty.c', 27"scoSetProperty.c",
28'scoMisc.c', 28"scoMisc.c",
29'scoMemoryScope.c', 29"scoMemoryScope.c",
30'scoWindowScope.c', 30"scoWindowScope.c",
31'affich.c', 31"DllmainScicos_blocks.c",
32'DllmainScicos_blocks.c', 32"scicos_evalhermite.c",
33'readf4.c', 33"scicos_indexfinder.c"];
34'writef4.c',
35'scicos_evalhermite.c',
36'scicos_indexfinder.c'];
37 34
38BLOCK_C_SOURCES(grep(BLOCK_C_SOURCES,NON_BLOCK_C_SOURCES)) = []; 35BLOCK_C_SOURCES(grep(BLOCK_C_SOURCES,NON_BLOCK_C_SOURCES)) = [];
39BLOCKS_C = strsubst(BLOCK_C_SOURCES,'.c',''); 36BLOCKS_C = strsubst(BLOCK_C_SOURCES,".c","");
40 37
41cd SCI/modules/scicos_blocks/src/fortran; 38cd SCI/modules/scicos_blocks/src/fortran;
42 39
43BLOCK_FORTRAN_SOURCES = gsort(ls('*.f')); 40BLOCK_FORTRAN_SOURCES = gsort(ls("*.f"));
44BLOCKS_FORTRAN = strsubst(BLOCK_FORTRAN_SOURCES,'.f',''); 41BLOCKS_FORTRAN = strsubst(BLOCK_FORTRAN_SOURCES,".f","");
45 42
46cd SCI/modules/scicos_blocks/src/cpp; 43cd SCI/modules/scicos_blocks/src/cpp;
47 44
48BLOCK_CPP_SOURCES = gsort(ls('*.cpp')); 45BLOCK_CPP_SOURCES = gsort(ls("*.cpp"));
49BLOCKS_CPP = strsubst(BLOCK_CPP_SOURCES,'.cpp',''); 46BLOCKS_CPP = strsubst(BLOCK_CPP_SOURCES,".cpp","");
50 47
51BLOCKS_H = [ 48BLOCKS_H = [
52''; 49"";
53'/* Scicos'; 50"/* Scicos";
54'*'; 51"*";
55'* Copyright (C) INRIA - METALAU Project <scicos@inria.fr>'; 52"* Copyright (C) INRIA - METALAU Project <scicos@inria.fr>";
56'* Copyright (C) DIGITEO - 2010'; 53"* Copyright (C) DIGITEO - 2010-2011";
57'*'; 54"*";
58'* This program is free software; you can redistribute it and/or modify'; 55"* This program is free software; you can redistribute it and/or modify";
59'* it under the terms of the GNU General Public License as published by'; 56"* it under the terms of the GNU General Public License as published by";
60'* the Free Software Foundation; either version 2 of the License, or'; 57"* the Free Software Foundation; either version 2 of the License, or";
61'* (at your option) any later version.'; 58"* (at your option) any later version.";
62'*'; 59"*";
63'* This program is distributed in the hope that it will be useful,'; 60"* This program is distributed in the hope that it will be useful,";
64'* but WITHOUT ANY WARRANTY; without even the implied warranty of'; 61"* but WITHOUT ANY WARRANTY; without even the implied warranty of";
65'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the'; 62"* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the";
66'* GNU General Public License for more details.'; 63"* GNU General Public License for more details.";
67'*'; 64"*";
68'* You should have received a copy of the GNU General Public License'; 65"* You should have received a copy of the GNU General Public License";
69'* along with this program; if not, write to the Free Software'; 66"* along with this program; if not, write to the Free Software";
70'* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.'; 67"* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.";
71'*'; 68"*";
72'* See the file ./license.txt'; 69"* See the file ./license.txt";
73'*/'; 70"*/";
74'#ifndef __SCICOS_BLOCKS_H__'; 71"#ifndef __SCICOS_BLOCKS_H__";
75'#define __SCICOS_BLOCKS_H__'; 72"#define __SCICOS_BLOCKS_H__";
76''; 73"";
77'#include ""machine.h""'; 74"#include ""machine.h""";
78'#include ""dynlib_scicos_blocks.h""'; 75"#include ""dynlib_scicos_blocks.h""";
79'#include ""scicos.h""'; 76"#include ""scicos.h""";
80''; 77"";
81'/******* Please do not edit *************/'; 78"/******* Please do not edit *************/";
82'']; 79""];
83 80
84BLOCKS_H = [BLOCKS_H; 81BLOCKS_H = [BLOCKS_H;
85'SCICOS_BLOCKS_IMPEXP void C2F(' + BLOCKS_FORTRAN + ')(ARGS_scicos);' ; 82"SCICOS_BLOCKS_IMPEXP void C2F(" + BLOCKS_FORTRAN + ")(ARGS_scicos);" ;
86'SCICOS_BLOCKS_IMPEXP void ' + BLOCKS_C + '(ARGS_scicos);' ; 83"SCICOS_BLOCKS_IMPEXP void " + BLOCKS_C + "(ARGS_scicos);" ;
87'SCICOS_BLOCKS_IMPEXP void ' + BLOCKS_CPP + '(ARGS_scicos);' ; 84"SCICOS_BLOCKS_IMPEXP void " + BLOCKS_CPP + "(ARGS_scicos);" ;
88'']; 85""];
86
87SIZE_BLOCKS_C = size(BLOCKS_C,"*") + 1;
88SIZE_BLOCKS_FORTRAN = size(BLOCKS_FORTRAN,"*") + 1;
89 89
90SIZE_TAB_BLOCK_LIST = size(BLOCKS_C,'*') + size(BLOCKS_FORTRAN,'*') + 1; 90SIZE_TAB_BLOCK_LIST = SIZE_BLOCKS_C + SIZE_BLOCKS_FORTRAN;
91 91
92BLOCKS_H = [BLOCKS_H; 92BLOCKS_H = [BLOCKS_H;
93'#define SIZE_TAB_BLOCK_LIST ' + string(SIZE_TAB_BLOCK_LIST); 93"#define SIZE_TAB_BLOCK_LIST " + string(SIZE_TAB_BLOCK_LIST);
94'int ntabsim = SIZE_TAB_BLOCK_LIST ;' 94"int ntabsim = SIZE_TAB_BLOCK_LIST;"
95''; 95"";
96'OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={']; 96"OpTab tabsim[SIZE_TAB_BLOCK_LIST] = {"];
97 97
98BLOCKS_H = [BLOCKS_H; 98BLOCKS_H = [BLOCKS_H;
99'{""' + BLOCKS_FORTRAN + '"",(ScicosF) C2F(' + BLOCKS_FORTRAN + ')},' ; 99"{""" + BLOCKS_FORTRAN + """,(ScicosF) C2F(" + BLOCKS_FORTRAN + ")}," ;
100'{""' + BLOCKS_C + '"",(ScicosF) ' + BLOCKS_C + '},' ; 100"{""" + BLOCKS_C + """,(ScicosF) " + BLOCKS_C + "}," ;
101'{""' + BLOCKS_CPP + '"",(ScicosF) ' + BLOCKS_CPP + '},' ; 101"{""" + BLOCKS_CPP + """,(ScicosF) " + BLOCKS_CPP + "}," ;
102'{(char *) 0, (ScicosF) 0}};' ; 102"{(char *) 0, (ScicosF) 0}};" ;
103'#endif' ; 103"#endif" ;
104'/****************************************/' ; 104"/****************************************/" ;
105'']; 105""];
106 106
107mputl(BLOCKS_H, SCI + '/modules/scicos_blocks/includes/blocks.h.vc'); 107
108mputl(BLOCKS_H, SCI + '/modules/scicos_blocks/includes/blocks.h'); 108mputl(BLOCKS_H, SCI + "/modules/scicos_blocks/includes/blocks.h.vc");
109mputl(BLOCKS_H, SCI + "/modules/scicos_blocks/includes/blocks.h");
diff --git a/scilab/modules/xcos/Makefile.am b/scilab/modules/xcos/Makefile.am
index 95ba961..538a791 100644
--- a/scilab/modules/xcos/Makefile.am
+++ b/scilab/modules/xcos/Makefile.am
@@ -225,7 +225,7 @@ images/palettes/CMATVIEW.png \
225images/palettes/CMSCOPE.png \ 225images/palettes/CMSCOPE.png \
226images/palettes/ConstantVoltage.png \ 226images/palettes/ConstantVoltage.png \
227images/palettes/CONST_m.png \ 227images/palettes/CONST_m.png \
228images/palettes/CONSTRAINT_f.png \ 228images/palettes/CONSTRAINT_c.png \
229images/palettes/CONVERT.png \ 229images/palettes/CONVERT.png \
230images/palettes/COSBLK_f.png \ 230images/palettes/COSBLK_f.png \
231images/palettes/Counter.png \ 231images/palettes/Counter.png \
diff --git a/scilab/modules/xcos/Makefile.in b/scilab/modules/xcos/Makefile.in
index 6f7d9ac..fa505ac 100644
--- a/scilab/modules/xcos/Makefile.in
+++ b/scilab/modules/xcos/Makefile.in
@@ -633,7 +633,7 @@ images/palettes/CMATVIEW.png \
633images/palettes/CMSCOPE.png \ 633images/palettes/CMSCOPE.png \
634images/palettes/ConstantVoltage.png \ 634images/palettes/ConstantVoltage.png \
635images/palettes/CONST_m.png \ 635images/palettes/CONST_m.png \
636images/palettes/CONSTRAINT_f.png \ 636images/palettes/CONSTRAINT_c.png \
637images/palettes/CONVERT.png \ 637images/palettes/CONVERT.png \
638images/palettes/COSBLK_f.png \ 638images/palettes/COSBLK_f.png \
639images/palettes/Counter.png \ 639images/palettes/Counter.png \
diff --git a/scilab/modules/xcos/etc/palettes.xml b/scilab/modules/xcos/etc/palettes.xml
index 0026f1f..60c038e 100644
--- a/scilab/modules/xcos/etc/palettes.xml
+++ b/scilab/modules/xcos/etc/palettes.xml
@@ -770,9 +770,9 @@
770 </block> 770 </block>
771 </node> 771 </node>
772 <node xsi:type="PreLoaded" enable="true" name="Implicit"> 772 <node xsi:type="PreLoaded" enable="true" name="Implicit">
773 <block name="CONSTRAINT_f"> 773 <block name="CONSTRAINT_c">
774 <data variable="SCI" path="/modules/scicos_blocks/blocks/CONSTRAINT_f.h5"/> 774 <data variable="SCI" path="/modules/scicos_blocks/blocks/CONSTRAINT_c.h5"/>
775 <icon variable="SCI" path="/modules/xcos/images/palettes/CONSTRAINT_f.png"/> 775 <icon variable="SCI" path="/modules/xcos/images/palettes/CONSTRAINT_c.png"/>
776 </block> 776 </block>
777 <block name="DIFF_f"> 777 <block name="DIFF_f">
778 <data variable="SCI" path="/modules/scicos_blocks/blocks/DIFF_f.h5"/> 778 <data variable="SCI" path="/modules/scicos_blocks/blocks/DIFF_f.h5"/>
diff --git a/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml b/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml
index 18e39f2..6d428b2 100644
--- a/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml
+++ b/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml
@@ -21,69 +21,53 @@
21 * 21 *
22 * See the file ./license.txt 22 * See the file ./license.txt
23 --> 23 -->
24<refentry version="5.0-subset Scilab" xml:id="Implicit_pal" 24<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="Implicit_pal">
25 xmlns="http://docbook.org/ns/docbook"
26 xmlns:xlink="http://www.w3.org/1999/xlink"
27 xmlns:svg="http://www.w3.org/2000/svg"
28 xmlns:ns4="http://www.w3.org/1999/xhtml"
29 xmlns:mml="http://www.w3.org/1998/Math/MathML"
30 xmlns:db="http://docbook.org/ns/docbook">
31 <refnamediv> 25 <refnamediv>
32 <refname>Implicit_pal</refname> 26 <refname>Implicit_pal</refname>
33
34 <refpurpose>Implicit palette</refpurpose> 27 <refpurpose>Implicit palette</refpurpose>
35 </refnamediv> 28 </refnamediv>
36
37 <refsection> 29 <refsection>
38 <title>Block Screenshot</title> 30 <title>Block Screenshot</title>
39
40 <para> 31 <para>
41 <inlinemediaobject> 32 <inlinemediaobject>
42 <imageobject> 33 <imageobject>
43 <imagedata linkend="CONSTRAINT_f" fileref="../../../../../../modules/xcos/images/palettes/CONSTRAINT_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/> 34 <imagedata linkend="CONSTRAINT_c" fileref="../../../../../../modules/xcos/images/palettes/CONSTRAINT_c.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
44 </imageobject> 35 </imageobject>
45 </inlinemediaobject> 36 </inlinemediaobject>
46 <inlinemediaobject> 37 <inlinemediaobject>
47 <imageobject> 38 <imageobject>
48 <imagedata linkend="DIFF_f" fileref="../../../../../../modules/xcos/images/palettes/DIFF_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/> 39 <imagedata linkend="DIFF_f" fileref="../../../../../../modules/xcos/images/palettes/DIFF_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
49 </imageobject> 40 </imageobject>
50 </inlinemediaobject> 41 </inlinemediaobject>
51 </para> 42 </para>
52 </refsection> 43 </refsection>
53
54 <refsection id="Module_Implicit_pal"> 44 <refsection id="Module_Implicit_pal">
55 <title>Module</title> 45 <title>Module</title>
56
57 <itemizedlist> 46 <itemizedlist>
58 <listitem> 47 <listitem>
59 <para><link linkend="xcos">xcos</link></para> 48 <para>
49 <link linkend="xcos">xcos</link>
50 </para>
60 </listitem> 51 </listitem>
61 </itemizedlist> 52 </itemizedlist>
62 </refsection> 53 </refsection>
63
64 <refsection id="Description_Implicit_pal"> 54 <refsection id="Description_Implicit_pal">
65 <title>Description</title> 55 <title>Description</title>
66
67 <para>In the Implicit palette, you can find blocks used to model implicit systems.</para> 56 <para>In the Implicit palette, you can find blocks used to model implicit systems.</para>
68 </refsection> 57 </refsection>
69
70 <refsection id="Blocks_Implicit_pal"> 58 <refsection id="Blocks_Implicit_pal">
71 <title>Blocks</title> 59 <title>Blocks</title>
72
73 <itemizedlist> 60 <itemizedlist>
74 <listitem> 61 <listitem>
75 <para> 62 <para>
76 <link linkend="CONSTRAINT_f">CONSTRAINT_f - Constraint</link> 63 <link linkend="CONSTRAINT_c">CONSTRAINT_c - Constraint</link>
77 </para> 64 </para>
78 </listitem> 65 </listitem>
79
80 <listitem> 66 <listitem>
81 <para> 67 <para>
82 <link linkend="DIFF_f">DIFF_f - Sum</link> 68 <link linkend="DIFF_f">DIFF_f - Sum</link>
83 </para> 69 </para>
84 </listitem> 70 </listitem>
85
86
87 </itemizedlist> 71 </itemizedlist>
88 </refsection> 72 </refsection>
89</refentry> 73</refentry>
diff --git a/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_f.xml b/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_c.xml
index 25d2c6c..ca34bc5 100644
--- a/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_f.xml
+++ b/scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_c.xml
@@ -21,9 +21,9 @@
21 * 21 *
22 * See the file ./license.txt 22 * See the file ./license.txt
23 --> 23 -->
24<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="CONSTRAINT_f"> 24<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="CONSTRAINT_c">
25 <refnamediv> 25 <refnamediv>
26 <refname>CONSTRAINT_f</refname> 26 <refname>CONSTRAINT_c</refname>
27 <refpurpose>Constraint</refpurpose> 27 <refpurpose>Constraint</refpurpose>
28 </refnamediv> 28 </refnamediv>
29 <refsection> 29 <refsection>
@@ -31,61 +31,61 @@
31 <para> 31 <para>
32 <inlinemediaobject> 32 <inlinemediaobject>
33 <imageobject> 33 <imageobject>
34 <imagedata fileref="../../../../images/palettes/CONSTRAINT_f.png" align="center" valign="middle"/> 34 <imagedata fileref="../../../../images/palettes/CONSTRAINT_c.png" align="center" valign="middle"/>
35 </imageobject> 35 </imageobject>
36 </inlinemediaobject> 36 </inlinemediaobject>
37 </para> 37 </para>
38 </refsection> 38 </refsection>
39 <refsection id="Contents_CONSTRAINT_f"> 39 <refsection id="Contents_CONSTRAINT_c">
40 <title>Contents</title> 40 <title>Contents</title>
41 <itemizedlist> 41 <itemizedlist>
42 <listitem> 42 <listitem>
43 <para> 43 <para>
44 <link linkend="CONSTRAINT_f">Constraint</link> 44 <link linkend="CONSTRAINT_c">Constraint</link>
45 </para> 45 </para>
46 </listitem> 46 </listitem>
47 <listitem> 47 <listitem>
48 <itemizedlist> 48 <itemizedlist>
49 <listitem> 49 <listitem>
50 <para> 50 <para>
51 <xref linkend="Palette_CONSTRAINT_f">Palette</xref> 51 <xref linkend="Palette_CONSTRAINT_c">Palette</xref>
52 </para> 52 </para>
53 </listitem> 53 </listitem>
54 <listitem> 54 <listitem>
55 <para> 55 <para>
56 <xref linkend="Description_CONSTRAINT_f">Description</xref> 56 <xref linkend="Description_CONSTRAINT_c">Description</xref>
57 </para> 57 </para>
58 </listitem> 58 </listitem>
59 <listitem> 59 <listitem>
60 <para> 60 <para>
61 <xref linkend="Dialogbox_CONSTRAINT_f">Dialog box</xref> 61 <xref linkend="Dialogbox_CONSTRAINT_c">Dialog box</xref>
62 </para> 62 </para>
63 </listitem> 63 </listitem>
64 <listitem> 64 <listitem>
65 <para> 65 <para>
66 <xref linkend="Defaultproperties_CONSTRAINT_f">Default properties</xref> 66 <xref linkend="Defaultproperties_CONSTRAINT_c">Default properties</xref>
67 </para> 67 </para>
68 </listitem> 68 </listitem>
69 <listitem> 69 <listitem>
70 <para> 70 <para>
71 <xref linkend="Interfacingfunction_CONSTRAINT_f">Interfacing function</xref> 71 <xref linkend="Interfacingfunction_CONSTRAINT_c">Interfacing function</xref>
72 </para> 72 </para>
73 </listitem> 73 </listitem>
74 <listitem> 74 <listitem>
75 <para> 75 <para>
76 <xref linkend="Computationalfunction_CONSTRAINT_f">Computational function</xref> 76 <xref linkend="Computationalfunction_CONSTRAINT_c">Computational function</xref>
77 </para> 77 </para>
78 </listitem> 78 </listitem>
79 <listitem> 79 <listitem>
80 <para> 80 <para>
81 <xref linkend="Authors_CONSTRAINT_f">Authors</xref> 81 <xref linkend="Authors_CONSTRAINT_c">Authors</xref>
82 </para> 82 </para>
83 </listitem> 83 </listitem>
84 </itemizedlist> 84 </itemizedlist>
85 </listitem> 85 </listitem>
86 </itemizedlist> 86 </itemizedlist>
87 </refsection> 87 </refsection>
88 <refsection id="Palette_CONSTRAINT_f"> 88 <refsection id="Palette_CONSTRAINT_c">
89 <title>Palette</title> 89 <title>Palette</title>
90 <itemizedlist> 90 <itemizedlist>
91 <listitem> 91 <listitem>
@@ -95,19 +95,19 @@
95 </listitem> 95 </listitem>
96 </itemizedlist> 96 </itemizedlist>
97 </refsection> 97 </refsection>
98 <refsection id="Description_CONSTRAINT_f"> 98 <refsection id="Description_CONSTRAINT_c">
99 <title>Description</title> 99 <title>Description</title>
100 <para> 100 <para>
101Defines implicit algebraic relations. 101Defines implicit algebraic relations.
102 102
103</para> 103</para>
104 </refsection> 104 </refsection>
105 <refsection id="Dialogbox_CONSTRAINT_f"> 105 <refsection id="Dialogbox_CONSTRAINT_c">
106 <title>Dialog box</title> 106 <title>Dialog box</title>
107 <para> 107 <para>
108 <inlinemediaobject> 108 <inlinemediaobject>
109 <imageobject> 109 <imageobject>
110 <imagedata fileref="../../../../images/gui/CONSTRAINT_f_gui.gif" align="center" valign="middle"/> 110 <imagedata fileref="../../../../images/gui/CONSTRAINT_c_gui.gif" align="center" valign="middle"/>
111 </imageobject> 111 </imageobject>
112 </inlinemediaobject> 112 </inlinemediaobject>
113 </para> 113 </para>
@@ -124,7 +124,7 @@ Defines implicit algebraic relations.
124 </listitem> 124 </listitem>
125 </itemizedlist> 125 </itemizedlist>
126 </refsection> 126 </refsection>
127 <refsection id="Defaultproperties_CONSTRAINT_f"> 127 <refsection id="Defaultproperties_CONSTRAINT_c">
128 <title>Default properties</title> 128 <title>Default properties</title>
129 <itemizedlist> 129 <itemizedlist>
130 <listitem> 130 <listitem>
@@ -178,15 +178,15 @@ Defines implicit algebraic relations.
178 </listitem> 178 </listitem>
179 </itemizedlist> 179 </itemizedlist>
180 </refsection> 180 </refsection>
181 <refsection id="Interfacingfunction_CONSTRAINT_f"> 181 <refsection id="Interfacingfunction_CONSTRAINT_c">
182 <title>Interfacing function</title> 182 <title>Interfacing function</title>
183 <itemizedlist> 183 <itemizedlist>
184 <listitem> 184 <listitem>
185 <para> SCI/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci</para> 185 <para> SCI/modules/scicos_blocks/macros/Misc/CONSTRAINT_c.sci</para>
186 </listitem> 186 </listitem>
187 </itemizedlist> 187 </itemizedlist>
188 </refsection> 188 </refsection>
189 <refsection id="Computationalfunction_CONSTRAINT_f"> 189 <refsection id="Computationalfunction_CONSTRAINT_c">
190 <title>Computational function</title> 190 <title>Computational function</title>
191 <itemizedlist> 191 <itemizedlist>
192 <listitem> 192 <listitem>
@@ -194,7 +194,7 @@ Defines implicit algebraic relations.
194 </listitem> 194 </listitem>
195 </itemizedlist> 195 </itemizedlist>
196 </refsection> 196 </refsection>
197 <refsection id="Authors_CONSTRAINT_f"> 197 <refsection id="Authors_CONSTRAINT_c">
198 <title>Authors</title> 198 <title>Authors</title>
199 <para><emphasis role="bold">Ramine Nikoukhah</emphasis> - INRIA</para> 199 <para><emphasis role="bold">Ramine Nikoukhah</emphasis> - INRIA</para>
200 </refsection> 200 </refsection>
diff --git a/scilab/modules/xcos/help/images/AFFICH_f_gui.gif b/scilab/modules/xcos/help/images/AFFICH_f_gui.gif
deleted file mode 100644
index 82becc0..0000000
--- a/scilab/modules/xcos/help/images/AFFICH_f_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/CONSTRAINT_f_gui.gif b/scilab/modules/xcos/help/images/CONSTRAINT_c_gui.gif
index 3b2a249..3b2a249 100644
--- a/scilab/modules/xcos/help/images/CONSTRAINT_f_gui.gif
+++ b/scilab/modules/xcos/help/images/CONSTRAINT_c_gui.gif
Binary files differ
diff --git a/scilab/modules/xcos/help/images/REGISTER_f_gui.gif b/scilab/modules/xcos/help/images/REGISTER_f_gui.gif
deleted file mode 100644
index 073bd99..0000000
--- a/scilab/modules/xcos/help/images/REGISTER_f_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_gui.gif b/scilab/modules/xcos/help/images/RFILE_gui.gif
deleted file mode 100644
index d0e8f1b..0000000
--- a/scilab/modules/xcos/help/images/RFILE_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img3_fr.gif b/scilab/modules/xcos/help/images/RFILE_img3_fr.gif
deleted file mode 100644
index c4b58fe..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img3_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img4_fr.gif b/scilab/modules/xcos/help/images/RFILE_img4_fr.gif
deleted file mode 100644
index fad3428..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img4_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img5_fr.gif b/scilab/modules/xcos/help/images/RFILE_img5_fr.gif
deleted file mode 100644
index a30b055..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img5_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img6_fr.gif b/scilab/modules/xcos/help/images/RFILE_img6_fr.gif
deleted file mode 100644
index 2724a35..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img6_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img7_fr.gif b/scilab/modules/xcos/help/images/RFILE_img7_fr.gif
deleted file mode 100644
index fc8403c..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img7_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/RFILE_img8_fr.gif b/scilab/modules/xcos/help/images/RFILE_img8_fr.gif
deleted file mode 100644
index 36bf856..0000000
--- a/scilab/modules/xcos/help/images/RFILE_img8_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_gui.gif b/scilab/modules/xcos/help/images/WFILE_gui.gif
deleted file mode 100644
index 8373a7c..0000000
--- a/scilab/modules/xcos/help/images/WFILE_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img2_eng.gif b/scilab/modules/xcos/help/images/WFILE_img2_eng.gif
deleted file mode 100644
index ee1a13f..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img2_eng.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img2_fr.gif b/scilab/modules/xcos/help/images/WFILE_img2_fr.gif
deleted file mode 100644
index ee1a13f..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img2_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img3_eng.gif b/scilab/modules/xcos/help/images/WFILE_img3_eng.gif
deleted file mode 100644
index c85e785..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img3_eng.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img3_fr.gif b/scilab/modules/xcos/help/images/WFILE_img3_fr.gif
deleted file mode 100644
index c85e785..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img3_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img4_eng.gif b/scilab/modules/xcos/help/images/WFILE_img4_eng.gif
deleted file mode 100644
index c5c2ef3..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img4_eng.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img4_fr.gif b/scilab/modules/xcos/help/images/WFILE_img4_fr.gif
deleted file mode 100644
index c5c2ef3..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img4_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img5_fr.gif b/scilab/modules/xcos/help/images/WFILE_img5_fr.gif
deleted file mode 100644
index fad3428..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img5_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img6_eng.gif b/scilab/modules/xcos/help/images/WFILE_img6_eng.gif
deleted file mode 100644
index 36bf856..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img6_eng.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/help/images/WFILE_img7_fr.gif b/scilab/modules/xcos/help/images/WFILE_img7_fr.gif
deleted file mode 100644
index 36bf856..0000000
--- a/scilab/modules/xcos/help/images/WFILE_img7_fr.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/images/gui/AFFICH_f_gui.gif b/scilab/modules/xcos/images/gui/AFFICH_f_gui.gif
deleted file mode 100644
index 82becc0..0000000
--- a/scilab/modules/xcos/images/gui/AFFICH_f_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/images/gui/CONSTRAINT_f_gui.gif b/scilab/modules/xcos/images/gui/CONSTRAINT_c_gui.gif
index 3b2a249..3b2a249 100644
--- a/scilab/modules/xcos/images/gui/CONSTRAINT_f_gui.gif
+++ b/scilab/modules/xcos/images/gui/CONSTRAINT_c_gui.gif
Binary files differ
diff --git a/scilab/modules/xcos/images/gui/REGISTER_f_gui.gif b/scilab/modules/xcos/images/gui/REGISTER_f_gui.gif
deleted file mode 100644
index 073bd99..0000000
--- a/scilab/modules/xcos/images/gui/REGISTER_f_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/images/gui/RFILE_gui.gif b/scilab/modules/xcos/images/gui/RFILE_gui.gif
deleted file mode 100644
index d0e8f1b..0000000
--- a/scilab/modules/xcos/images/gui/RFILE_gui.gif
+++ /dev/null
Binary files differ
diff --git a/scilab/modules/xcos/images/palettes/CONSTRAINT_f.png b/scilab/modules/xcos/images/palettes/CONSTRAINT_c.png
index 480b0e3..480b0e3 100644
--- a/scilab/modules/xcos/images/palettes/CONSTRAINT_f.png
+++ b/scilab/modules/xcos/images/palettes/CONSTRAINT_c.png
Binary files differ
diff --git a/scilab/modules/xcos/macros/loadXcosLibs.sci b/scilab/modules/xcos/macros/loadXcosLibs.sci
index 7737ca8..ed2948f 100644
--- a/scilab/modules/xcos/macros/loadXcosLibs.sci
+++ b/scilab/modules/xcos/macros/loadXcosLibs.sci
@@ -57,8 +57,34 @@ function loadXcosLibs()
57 listlibsname(listlibsname == 'IntegerOp') = 'Integerop'; 57 listlibsname(listlibsname == 'IntegerOp') = 'Integerop';
58 58
59 if listlibsname <> [] then 59 if listlibsname <> [] then
60 execline = '[' + strcat(listlibsname + 'lib',', ') + '] = resume(' + strcat(listlibsname + 'lib',', ')+ ');' 60 resumedLibs = listlibsname + 'lib';
61 execstr(execline); 61 else
62 resumedLibs = string([]);
62 end 63 end
63 64
65 // Compatibility interface functions
66 function [x,y,typ]=COMPAT_BLOCK(job,arg1,arg2)
67 // Throw an error on block access
68 x=[];y=[];typ=[]
69 if ~exists("arg1") then
70 arg1 = mlist(['Block', "gui"], "COMPAT_BLOCK");
71 end
72 error(msprintf(gettext("%s: the block ""%s"" is no more available, please update the diagram with a compatible one."), "loadXcosLibs", arg1.gui));
73 endfunction
74
75 // removed blocks
76 removed = [
77"AFFICH_f"
78"RFILE"
79"WFILE"];
80 prot = funcprot();
81 funcprot(0);
82 execstr(strcat(removed + "=COMPAT_BLOCK; "));
83 funcprot(prot);
84
85 resumedBlocks = removed';
86
87 // put all resumed symbols into the parent scope
88 execstr("[" + strcat([resumedLibs resumedBlocks], ", ") + "] = resume(" + strcat([resumedLibs resumedBlocks], ", ") + ");");
64endfunction 89endfunction
90
diff --git a/scilab/modules/xcos/tests/unit_tests/blocks_link.tst b/scilab/modules/xcos/tests/unit_tests/blocks_link.tst
new file mode 100644
index 0000000..99ba4fa
--- /dev/null
+++ b/scilab/modules/xcos/tests/unit_tests/blocks_link.tst
@@ -0,0 +1,204 @@
1// ============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Clément DAVID
4//
5// This file is distributed under the same license as the Scilab package.
6// ============================================================================
7//
8// <-- ENGLISH IMPOSED -->
9//
10// <-- Short Description -->
11// Check that the simulation function should exists.
12
13loadXcosLibs(); loadScicos();
14
15defaultlibs = ["Branching",
16 "Linear",
17 "Misc",
18 "Sources",
19 "Events",
20 "Integerop",
21 "Matrixop",
22 "Nonlinear",
23 "Sinks",
24 "Threshold"];
25
26defaultlibs = defaultlibs + "lib";
27notTested = ["SUPER_f", "TEXT_f", "PAL_f", .. // Specific blocks
28 "SLIDER_f", .. // Deprecated blocks
29 "MPBLOCK", "fortran_block", .. // blocks with code generation
30 "CBLOCK", "scifunc_block", "scifunc_block_m"];
31
32invalidFunctions = unique(gsort(["csuper", "clkfrom", "clkgoto", "delay"]));
33
34funcprot(0);
35ilib_verbose(0);
36
37// Stubbing the x_mdialog method
38// checking it's arguments size only
39function [result]=x_mdialog(title, labelsv, labelsh, default_inputs_vector)
40 [lhs, rhs] = argn();
41 if rhs == 3 then
42 default_inputs_vector = labelsh;
43 result = x_dialog(labelsv, default_inputs_vector);
44 elseif rhs == 4 then
45 vSize = size(labelsv, '*');
46 hSize = size(labelsh, '*');
47 if size(default_inputs_vector) <> [vSize, hSize] then
48 mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
49 result = default_inputs_vector;
50 else
51 mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
52endfunction
53
54// Stubbing the x_dialog method
55// checking it's arguments size only
56function [result]=x_dialog(labels, default_inputs_vector)
57 if(or(size(labels) <> size(default_inputs_vector))) then
58 mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
59 result = default_inputs_vector;
60endfunction
61
62// Stubbing the dialog method
63// checking nothing
64function [result]=x_dialog(labels,default_inputs_vector)
65 result = default_inputs_vector;
66endfunction
67
68// Stubbing the edit_curv method
69function [xx, yy, ok, gc] = edit_curv(xx, yy, axis, args, gc)
70 ok = %T;
71 if ~exists("gc", 'l') then
72 rect=[0 0 1 1];
73 axisdata=[2 10 2 10];
74 gc = list(rect, axisdata);
75 end
76endfunction
77
78// Stubbing the messagebox method
79function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
80 btn=1;
81endfunction
82
83// Stubbing global scicos flags
84needcompile = 0;
85alreadyran = %f;
86%scicos_context = struct();
87
88BLOCKS = string([]);
89AUTO_SIM = string([]);
90FUNCTIONS = string([]);
91FUNCTIONS_TYPES = [];
92
93// If the following block simulation function does not exists then fail the
94// test.
95for i = 1:size(defaultlibs,"*")
96 [macros, path] = libraryinfo(defaultlibs(i));
97 for j = 1:size(macros,"*")
98 interfunction = macros(j);
99
100 // Not tested blocks (Xcos customs)
101 if or(interfunction == notTested) then
102 continue;
103 end
104
105 // Check for signature
106 vars=macrovar(evstr(interfunction));
107 if or([size(vars(1)) <> [3 1] , size(vars(2)) <> [3 1]]) then
108 mprintf("%s is not a valid block descriptor.\n", interfunction);
109 continue;
110 end
111
112 // New Scilab instance
113 cmd = "scs_m=" + interfunction + "(""define"", [], []);";
114 if execstr(cmd, "errcatch")<>0 then
115 mprintf("%s\n",cmd); pause, end
116 cmd = "scs_m=" + interfunction + "(""set"", scs_m, []);";
117 if execstr(cmd, "errcatch")<>0 then
118 mprintf("%s\n",cmd); pause, end
119
120 // append the simulation
121 sim = scs_m.model.sim;
122 sim_type = [];
123 if typeof(sim) == "string" then
124 sim_type = 0;
125 AUTO_SIM = [AUTO_SIM ; scs_m.gui];
126 elseif typeof(sim) == "list" then
127 sim_type = sim(2);
128 sim = sim(1);
129 else
130 mprintf("%s has an invalid simulation type.\n", interfunction);
131 continue;
132 end
133
134 BLOCKS = [BLOCKS ; scs_m.gui];
135 FUNCTIONS = [FUNCTIONS ; sim];
136 FUNCTIONS_TYPES = [FUNCTIONS_TYPES ; sim_type];
137 end
138end
139clear sim sim_type cmd vars interfunction macros path defaultlibs;
140
141// sort per function type unique functions
142[FUNCTIONS, k] = unique(FUNCTIONS);
143FUNCTIONS_TYPES = FUNCTIONS_TYPES(k);
144BLOCKS = BLOCKS(k);
145[FUNCTIONS_TYPES, k] = gsort(FUNCTIONS_TYPES);
146FUNCTIONS = FUNCTIONS(k);
147BLOCKS = BLOCKS(k);
148clear k;
149
150// remove invalid functions
151ka = grep(FUNCTIONS, invalidFunctions);
152FUNCTIONS(ka) = [];
153FUNCTIONS_TYPES(ka) = [];
154BLOCKS(ka) = [];
155
156// compilation dependant blocks
157if or(FUNCTIONS(find(FUNCTIONS_TYPES < 0)) <> ["ifthel";"eselect"]) then pause, end
158
159// function implementations
160sci_kind = [5 99];
161f_kind = [1 3 1001 10001];
162c_kind = [0 2 4 10004];
163
164// checking scilab blocks
165ka = dsearch(FUNCTIONS_TYPES, sci_kind, 'd') <> 0;
166funs = FUNCTIONS(ka);
167for i=1:size(funs, '*');
168 if type(evstr(funs(i))) <> 13 then pause, end
169end
170
171// checking fortran blocks
172ka = dsearch(FUNCTIONS_TYPES, f_kind, 'd') <> 0;
173funs = FUNCTIONS(ka);
174try
175 link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs, "f");
176catch
177 try
178 for i=1:size(funs, '*')
179 l = link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs(i), "f");
180 ulink(l);
181 end
182 catch
183 disp("Unable to F link : " + funs(i));
184 end
185end
186
187// checking C blocks
188ka = dsearch(FUNCTIONS_TYPES, c_kind, 'd') <> 0;
189funs = FUNCTIONS(ka);
190try
191 link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs, "c");
192catch
193 try
194 for i=1:size(funs, '*')
195 l = link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs(i), "c");
196 ulink(l);
197 end
198 catch
199 disp("Unable to C link : " + funs(i));
200 end
201end
202
203clear funs ka;
204