Scicos blocks: remove blocks without simulation function 13/3213/6
Clément DAVID [Fri, 18 Feb 2011 08:59:46 +0000 (09:59 +0100)]
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

53 files changed:
scilab/modules/scicos/macros/scicos_scicos/CC4.sci
scilab/modules/scicos/src/c/scicos.vcproj
scilab/modules/scicos_blocks/Makefile.am
scilab/modules/scicos_blocks/Makefile.in
scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5 [new file with mode: 0644]
scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5 [deleted file]
scilab/modules/scicos_blocks/includes/affich.h [deleted file]
scilab/modules/scicos_blocks/includes/blocks.h.vc
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci [deleted file]
scilab/modules/scicos_blocks/macros/Sinks/AFFICH_f.sci [deleted file]
scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci [deleted file]
scilab/modules/scicos_blocks/macros/Sources/RFILE.sci [deleted file]
scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci [deleted file]
scilab/modules/scicos_blocks/src/c/affich.c [deleted file]
scilab/modules/scicos_blocks/src/c/readf4.c [deleted file]
scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj
scilab/modules/scicos_blocks/src/c/writef4.c [deleted file]
scilab/modules/scicos_blocks/src/fortran/affich.f [deleted file]
scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f.vfproj
scilab/modules/scicos_blocks/src/fortran/scicos_blocks_f2c.vcproj
scilab/modules/scicos_blocks/src/scripts/generateblocksheader.sce
scilab/modules/xcos/Makefile.am
scilab/modules/xcos/Makefile.in
scilab/modules/xcos/etc/palettes.xml
scilab/modules/xcos/help/en_US/palettes/Implicit_pal/AA_Implicit_pal.xml
scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_c.xml [moved from scilab/modules/xcos/help/en_US/palettes/Implicit_pal/CONSTRAINT_f.xml with 84% similarity]
scilab/modules/xcos/help/images/AFFICH_f_gui.gif [deleted file]
scilab/modules/xcos/help/images/CONSTRAINT_c_gui.gif [moved from scilab/modules/xcos/help/images/CONSTRAINT_f_gui.gif with 100% similarity]
scilab/modules/xcos/help/images/REGISTER_f_gui.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_gui.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img3_fr.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img4_fr.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img5_fr.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img6_fr.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img7_fr.gif [deleted file]
scilab/modules/xcos/help/images/RFILE_img8_fr.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_gui.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img2_eng.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img2_fr.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img3_eng.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img3_fr.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img4_eng.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img4_fr.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img5_fr.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img6_eng.gif [deleted file]
scilab/modules/xcos/help/images/WFILE_img7_fr.gif [deleted file]
scilab/modules/xcos/images/gui/AFFICH_f_gui.gif [deleted file]
scilab/modules/xcos/images/gui/CONSTRAINT_c_gui.gif [moved from scilab/modules/xcos/images/gui/CONSTRAINT_f_gui.gif with 100% similarity]
scilab/modules/xcos/images/gui/REGISTER_f_gui.gif [deleted file]
scilab/modules/xcos/images/gui/RFILE_gui.gif [deleted file]
scilab/modules/xcos/images/palettes/CONSTRAINT_c.png [moved from scilab/modules/xcos/images/palettes/CONSTRAINT_f.png with 100% similarity]
scilab/modules/xcos/macros/loadXcosLibs.sci
scilab/modules/xcos/tests/unit_tests/blocks_link.tst [new file with mode: 0644]

index c2334c8..a6871b4 100644 (file)
@@ -25,7 +25,7 @@ cancel=%f
 
 if tt==[] then
 
-  textmp=['#include <scicos/scicos_block4.h>';
+  textmp=['#include ""scicos_block4.h""';
           ''
           'void '+funam+'(scicos_block *block,int flag)';
          ];
index c660fb9..ea32403 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath=".\slider.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\tree.c"
                                >
                        </File>
index 47f1c73..7bccafd 100644 (file)
@@ -341,7 +341,6 @@ src/c/scoSetProperty.c \
 src/c/scoMisc.c \
 src/c/scoMemoryScope.c\
 src/c/scoWindowScope.c \
-src/c/affich.c \
 src/c/scicos_evalhermite.c \
 src/c/scicos_indexfinder.c
 
@@ -353,7 +352,6 @@ GIWS_WRAPPERS = \
 src/jni/Blocks.giws.xml
 
 SCICOS_BLOCKS_FORTRAN_SOURCES = \
-src/fortran/affich.f \
 src/fortran/csslti.f \
 src/fortran/cstblk.f \
 src/fortran/delay.f \
@@ -587,7 +585,7 @@ blocks/CMATVIEW.h5 \
 blocks/CMSCOPE.h5 \
 blocks/CONST_m.h5 \
 blocks/ConstantVoltage.h5 \
-blocks/CONSTRAINT_f.h5 \
+blocks/CONSTRAINT_c.h5 \
 blocks/CONVERT.h5 \
 blocks/COSBLK_f.h5 \
 blocks/Counter.h5 \
index f46cfb4..718a253 100644 (file)
@@ -243,9 +243,9 @@ am__libsciscicos_blocks_la_SOURCES_DIST = src/c/absblk.c \
        src/c/tanh_blk.c src/c/tcslti4.c src/c/tcsltj4.c \
        src/c/time_delay.c src/c/tows_c.c src/c/variable_delay.c \
        src/c/whileiterator.c src/c/writeau.c src/c/writec.c \
-       src/c/zcross2.c src/fortran/affich.f src/fortran/csslti.f \
-       src/fortran/cstblk.f src/fortran/delay.f src/fortran/delayv.f \
-       src/fortran/demux.f src/fortran/diffblk.f src/fortran/dlradp.f \
+       src/c/zcross2.c src/fortran/csslti.f src/fortran/cstblk.f \
+       src/fortran/delay.f src/fortran/delayv.f src/fortran/demux.f \
+       src/fortran/diffblk.f src/fortran/dlradp.f \
        src/fortran/dollar.f src/fortran/dsslti.f \
        src/fortran/eselect.f src/fortran/evtdly.f \
        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 \
        src/fortran/tcsltj.f src/fortran/timblk.f src/fortran/trash.f \
        src/fortran/writef.f src/fortran/zcross.f \
        src/c/scoGetProperty.c src/c/scoSetProperty.c src/c/scoMisc.c \
-       src/c/scoMemoryScope.c src/c/scoWindowScope.c src/c/affich.c \
+       src/c/scoMemoryScope.c src/c/scoWindowScope.c \
        src/c/scicos_evalhermite.c src/c/scicos_indexfinder.c \
        src/jni/GiwsException.cpp src/jni/AfficheBlock.cpp \
        src/cpp/affich2.cpp
@@ -580,24 +580,23 @@ am__libsciscicos_blocks_la_SOURCES_DIST = src/c/absblk.c \
 @XCOS_TRUE@    libsciscicos_blocks_la-writeau.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-writec.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-zcross2.lo
-@XCOS_TRUE@am__objects_2 = affich.lo csslti.lo cstblk.lo delay.lo \
-@XCOS_TRUE@    delayv.lo demux.lo diffblk.lo dlradp.lo dollar.lo \
-@XCOS_TRUE@    dsslti.lo eselect.lo evtdly.lo expblk.lo forblk.lo \
-@XCOS_TRUE@    fsv.lo gensin.lo gensqr.lo hltblk.lo ifthel.lo \
-@XCOS_TRUE@    integr.lo intplt.lo intpol.lo intrp2.lo intrpl.lo \
-@XCOS_TRUE@    invblk.lo iocopy.lo logblk.lo lookup.lo lsplit.lo \
-@XCOS_TRUE@    lusat.lo maxblk.lo memo.lo mfclck.lo minblk.lo \
-@XCOS_TRUE@    mux.lo pload.lo powblk.lo qzcel.lo qzflr.lo \
-@XCOS_TRUE@    qzrnd.lo qztrn.lo readf.lo rndblk.lo samphold.lo \
-@XCOS_TRUE@    sawtth.lo sciblk.lo selblk.lo sinblk.lo sqrblk.lo \
-@XCOS_TRUE@    sum2.lo sum3.lo tanblk.lo tcslti.lo tcsltj.lo \
-@XCOS_TRUE@    timblk.lo trash.lo writef.lo zcross.lo
+@XCOS_TRUE@am__objects_2 = csslti.lo cstblk.lo delay.lo delayv.lo \
+@XCOS_TRUE@    demux.lo diffblk.lo dlradp.lo dollar.lo dsslti.lo \
+@XCOS_TRUE@    eselect.lo evtdly.lo expblk.lo forblk.lo fsv.lo \
+@XCOS_TRUE@    gensin.lo gensqr.lo hltblk.lo ifthel.lo integr.lo \
+@XCOS_TRUE@    intplt.lo intpol.lo intrp2.lo intrpl.lo invblk.lo \
+@XCOS_TRUE@    iocopy.lo logblk.lo lookup.lo lsplit.lo lusat.lo \
+@XCOS_TRUE@    maxblk.lo memo.lo mfclck.lo minblk.lo mux.lo \
+@XCOS_TRUE@    pload.lo powblk.lo qzcel.lo qzflr.lo qzrnd.lo \
+@XCOS_TRUE@    qztrn.lo readf.lo rndblk.lo samphold.lo sawtth.lo \
+@XCOS_TRUE@    sciblk.lo selblk.lo sinblk.lo sqrblk.lo sum2.lo \
+@XCOS_TRUE@    sum3.lo tanblk.lo tcslti.lo tcsltj.lo timblk.lo \
+@XCOS_TRUE@    trash.lo writef.lo zcross.lo
 @XCOS_TRUE@am__objects_3 = libsciscicos_blocks_la-scoGetProperty.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scoSetProperty.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scoMisc.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scoMemoryScope.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scoWindowScope.lo \
-@XCOS_TRUE@    libsciscicos_blocks_la-affich.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scicos_evalhermite.lo \
 @XCOS_TRUE@    libsciscicos_blocks_la-scicos_indexfinder.lo
 @XCOS_TRUE@am__objects_4 = libsciscicos_blocks_la-GiwsException.lo \
@@ -1294,7 +1293,6 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 @XCOS_TRUE@src/c/scoMisc.c \
 @XCOS_TRUE@src/c/scoMemoryScope.c\
 @XCOS_TRUE@src/c/scoWindowScope.c \
-@XCOS_TRUE@src/c/affich.c \
 @XCOS_TRUE@src/c/scicos_evalhermite.c \
 @XCOS_TRUE@src/c/scicos_indexfinder.c
 
@@ -1306,7 +1304,6 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 @XCOS_TRUE@src/jni/Blocks.giws.xml
 
 @XCOS_TRUE@SCICOS_BLOCKS_FORTRAN_SOURCES = \
-@XCOS_TRUE@src/fortran/affich.f \
 @XCOS_TRUE@src/fortran/csslti.f \
 @XCOS_TRUE@src/fortran/cstblk.f \
 @XCOS_TRUE@src/fortran/delay.f \
@@ -1499,7 +1496,7 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 @XCOS_TRUE@blocks/CMSCOPE.h5 \
 @XCOS_TRUE@blocks/CONST_m.h5 \
 @XCOS_TRUE@blocks/ConstantVoltage.h5 \
-@XCOS_TRUE@blocks/CONSTRAINT_f.h5 \
+@XCOS_TRUE@blocks/CONSTRAINT_c.h5 \
 @XCOS_TRUE@blocks/CONVERT.h5 \
 @XCOS_TRUE@blocks/COSBLK_f.h5 \
 @XCOS_TRUE@blocks/Counter.h5 \
@@ -1767,7 +1764,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-absolute_value.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acos_blk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-acosh_blk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-affich.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-affich2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_blocks_la-andlog.Plo@am__quote@
 @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
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(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
 
-libsciscicos_blocks_la-affich.lo: src/c/affich.c
-@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
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libsciscicos_blocks_la-affich.Tpo $(DEPDIR)/libsciscicos_blocks_la-affich.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/affich.c' object='libsciscicos_blocks_la-affich.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(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
-
 libsciscicos_blocks_la-scicos_evalhermite.lo: src/c/scicos_evalhermite.c
 @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
 @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
 .f.lo:
        $(LTF77COMPILE) -c -o $@ $<
 
-affich.lo: src/fortran/affich.f
-       $(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
-
 csslti.lo: src/fortran/csslti.f
        $(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
 
diff --git a/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5 b/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5
new file mode 100644 (file)
index 0000000..0907678
Binary files /dev/null and b/scilab/modules/scicos_blocks/blocks/CONSTRAINT_c.h5 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 (file)
index 01f854c..0000000
Binary files a/scilab/modules/scicos_blocks/blocks/CONSTRAINT_f.h5 and /dev/null differ
diff --git a/scilab/modules/scicos_blocks/includes/affich.h b/scilab/modules/scicos_blocks/includes/affich.h
deleted file mode 100644 (file)
index 0b106ce..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
-* Copyright (C) 2008 - INRIA - Simone Mannori
-* 
-* This file must be used under the terms of the CeCILL.
-* This source file is licensed as described in the file COPYING, which
-* you should have received as part of this distribution.  The terms
-* are also available at    
-* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-*
-*/
-
-#ifndef _AFFICH_H_
-#define _AFFICH_H_
-
-#include "dynlib_scicos_blocks.h"
-#include "machine.h" /* C2F */
-
-/**
-* Update of one element of the text object used by Affich2 block.
-*/
-SCICOS_BLOCKS_IMPEXP void C2F(settxtel)(int * numRow, 
-                                  int * numCol,
-                                  double * winNum,
-                                  double * textIndex,
-                                  char * value,
-                                  int valueLength);
-
-/**
-* Printing of the text object element used by Affich2 routine
-*/
-SCICOS_BLOCKS_IMPEXP void C2F(affup2)( double * winNum, 
-                                double * textIndex);
-/**
-* Printing of the text object element used by affich.f routine
-*/
-
-SCICOS_BLOCKS_IMPEXP void C2F(affichup)( double * textIndex,
-                    double * winNum,
-                    char * value,
-                    int valueLength);
-#endif
-
index e7027a8..a6e7a1b 100644 (file)
@@ -2,7 +2,7 @@
 /*  Scicos
 *
 *  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-*  Copyright (C) DIGITEO - 2010
+*  Copyright (C) DIGITEO - 2010-2011
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -86,7 +86,6 @@ SCICOS_BLOCKS_IMPEXP void C2F(delayv)(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void C2F(delay)(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void C2F(cstblk)(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void C2F(csslti)(ARGS_scicos);
-SCICOS_BLOCKS_IMPEXP void C2F(affich)(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void zcross2(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void writec(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void writeau(ARGS_scicos);
@@ -400,10 +399,10 @@ SCICOS_BLOCKS_IMPEXP void absolute_value(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void absblk(ARGS_scicos);
 SCICOS_BLOCKS_IMPEXP void affich2(ARGS_scicos);
 
-#define SIZE_TAB_BLOCK_LIST 371
-int ntabsim = SIZE_TAB_BLOCK_LIST ;
+#define SIZE_TAB_BLOCK_LIST 370
+int ntabsim = SIZE_TAB_BLOCK_LIST;
 
-OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={
+OpTab tabsim[SIZE_TAB_BLOCK_LIST] = {
 {"zcross",(ScicosF) C2F(zcross)},
 {"writef",(ScicosF) C2F(writef)},
 {"trash",(ScicosF) C2F(trash)},
@@ -461,7 +460,6 @@ OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={
 {"delay",(ScicosF) C2F(delay)},
 {"cstblk",(ScicosF) C2F(cstblk)},
 {"csslti",(ScicosF) C2F(csslti)},
-{"affich",(ScicosF) C2F(affich)},
 {"zcross2",(ScicosF) zcross2},
 {"writec",(ScicosF) writec},
 {"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 (file)
index 8e123e7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-//  Scicos
-//
-//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [x,y,typ]=CONSTRAINT_f(job,arg1,arg2)
-x=[];y=[];typ=[]
-select job
-case 'plot' then
-  standard_draw(arg1)
-case 'getinputs' then
-  [x,y,typ]=standard_inputs(arg1)
-case 'getoutputs' then
-  [x,y,typ]=standard_outputs(arg1)
-case 'getorigin' then
-  [x,y]=standard_origin(arg1)
-case 'set' then
-  x=arg1
-  graphics=arg1.graphics;exprs=graphics.exprs
-  model=arg1.model;
-  while %t do
-    [ok,num,exprs]=scicos_getvalue('Set Constraint block parameters',..
-       'Set number of constraints',list('vec',1),exprs)
-    if ~ok then break,end
-    if num<=0 then
-      message('number of constraints must be > 0 ')
-    else
-      [model,graphics,ok]=check_io(model,graphics,num,num,[],[])
-      if ok then
-       graphics.exprs=exprs
-       model.state=zeros(4*num,1)
-       model.out=num
-       model.in=num
-//     model.rpar=[num]
-       x.graphics=graphics;x.model=model
-       break
-      end
-    end
-  end
-  
-  
- case 'define' then
-  x0=[0;0;0;0]
-  model=scicos_model()
-  model.sim=list('constraint',10001)
-  model.in=1
-  model.out=1
-  model.state=x0
-  model.blocktype='c'
-  model.dep_ut=[%f %t]
-  exprs='1'
-  gr_i=['xstringb(orig(1),orig(2),''=0    ?'',sz(1),sz(2),''fill'');']
-  x=standard_define([2 2],model,exprs,gr_i)
-end
-endfunction
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 (file)
index 40643f4..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-//  Scicos
-//
-//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [x,y,typ] = AFFICH_f(job,arg1,arg2)
-//** 22 Aug 2006: looking for a nasty "font" bugs 
-//** 
-//** 07 Aug 2008: this function has been update for Scilab 5.0 by
-//**              Simone Mannori and Jean-Baptiste Silvy
-
-x=[]; y=[]; typ=[] ; 
-
-select job
-
-case "plot" then
-  ipar = arg1.model.ipar; 
-  standard_draw(arg1);
-
-case "getinputs" then
-  [x,y,typ] = standard_inputs(arg1)
-
-case "getoutputs" then
-  x=[]; y=[]; typ=[];
-
-case "getorigin" then
-  [x,y] = standard_origin(arg1); 
-
-case "set" then
-  x = arg1;
-  graphics = arg1.graphics;
-  exprs = graphics.exprs
-  model = arg1.model;
-  //** if size(exprs,'*')==5 then exprs(6)='0';end //compatibility
-  //** if size(exprs,'*')==4 then exprs(4)=' ';exprs(5)=' ';end //compatibility
-  
-  //** if size(model.dstate,'*')<>6 then model.dstate=[0;-1;0;0;1;1];end //compatibility
-  
-  model.dstate = [0;-1;0;0;1;1;0] ; //** set the initial value of "z" and the associated "nz"
-
-  while %t do
-    [ok,font,fontsize,colr,nt,nd,herit,exprs] = scicos_getvalue(..
-       'Set  parameters',..
-       ["Font number";
-        "Font size";
-        "Color";
-        "Total number of digits";
-        "Number of rational part digits";
-        "Block inherits (1) or not (0)"],..
-        list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
-    
-    if ~ok then break,end //user cancel modification
-    
-    //** ------------------------ Error checking ----------------------------------
-    mess = [] ; //** no message
-
-    if font<=0 then
-      mess = [mess;'Font number must be positive';' ']
-      ok = %f ; 
-    end
-    
-    if fontsize<=0 then
-      mess = [mess;'Font size must be positive';' ']
-      ok = %f ;
-    end
-    
-    if nt<=3 then
-      mess = [mess;'Total number of digits must be greater than 3';' ']
-      ok = %f ; 
-    end
-    
-    if nd<0 then
-      mess = [mess;"Number of rational part digits must be "
-                  "greater or equal 0";' ']
-      ok = %f
-    end
-    
-    if ~ok then
-      message(['Some specified values are inconsistent:';
-       ' ';mess]);
-    end
-          
-    if ~or(herit==[0 1]) then
-      mess = [mess;"Accept inherited values are 0 and 1";' ']
-      ok = %f
-    end
-    
-    if ~ok then
-      message(['Some specified values are inconsistent:';
-              ' ';mess])
-    end
-    //**---------------------------------------------------------------------
-    
-    //** Positive case ->
-    if ok then
-      [model,graphics,ok] = check_io(model,graphics,1,[],ones(1-herit,1),[])
-    end
-    
-    if ok then
-      model.ipar  = [font;fontsize;colr;nt;nd];
-      model.evtin = ones(1-herit,1)
-      graphics.exprs = exprs;
-      x.graphics = graphics;
-      x.model = model ;
-      break
-    end
-    
-  end
-
-case "define" then
-  font = 1     ; //** 1 
-  fontsize = 1 ; //** 1
-  colr = 1 ;
-  nt = 9   ;
-  nd = 2   ;
-  exprs = [ string(font);
-            string(fontsize);
-            string(colr);
-            string(nt);
-            string(nd);
-           string(0) ]
-           
-  model = scicos_model(); 
-  model.sim = "affich" ; 
-  model.in = 1 ;
-  model.evtin  = 1 ;
-  model.dstate = [0;-1;0;0;1;1;0]; ; //** set the initial value of "z" and the associated "nz"
-  model.ipar   = [font; fontsize; colr; 1000; nt; nd]
-  model.blocktype = 'c' ;
-  model.firing = []     ;
-  model.dep_ut = [%t %f]
-  model.label = '' ;
-  
-  gr_i=['xset(''font'',ipar(1),ipar(2))';
-       'str='' ''+part(''0'',ones(1,ipar(5)-ipar(6)-2))+''.''+part(''0'',ones(1,ipar(6)))'
-       'rr=xstringl(orig(1),orig(2),str)'
-        'xstring(orig(1)+max(0,(sz(1)-rr(3))/2),orig(2)+max(0,(sz(2)-rr(4))/2),str)']; 
-       
-  x = standard_define([3 2],model,exprs,gr_i); 
-
-end
-
-endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci b/scilab/modules/scicos_blocks/macros/Sinks/WFILE.sci
deleted file mode 100644 (file)
index 3848fb0..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-//  Scicos
-//
-//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [x,y,typ]=WFILE(job,arg1,arg2)
-x=[];y=[];typ=[]
-select job
-case 'plot' then
-  standard_draw(arg1)
-case 'getinputs' then
-  [x,y,typ]=standard_inputs(arg1)
-case 'getoutputs' then
-  x=[];y=[];typ=[];
-case 'getorigin' then
-  [x,y]=standard_origin(arg1)
-case 'set' then
-  x=arg1;
-  graphics=arg1.graphics;exprs=graphics.exprs
-  model=arg1.model;
-  dstate=model.dstate
-  lunit=dstate(2)
-  fname=exprs(2)
-  frmt=exprs(3)
-  while %t do
-    [ok,in,fname1,frmt1,N,exprs]=scicos_getvalue(..
-       'Set WFILE block parameters',..
-       ['Input size';
-       'Output file name';
-       'Output Format';
-       'Buffer size'],..
-        list('vec',1,'str',1,'str',1,'vec',1),exprs)
-    if ~ok then break,end //user cancel modification
-    in=int(in)
-    nin=in
-
-    fname1=stripblanks(fname1)
-    frmt1=stripblanks(frmt1)
-    mess=[]
-    if lunit>0&min(length(frmt),1)<>min(length(frmt1),1) then
-      mess=[mess;'You cannot swich from formatted to unformatted';
-                'or  from unformatted to formatted when running';' ']
-    end
-    if lunit>0&fname1<>fname then
-      mess=[mess;'You cannot modify Output file name when running';' ']
-      ok=%f
-    end
-    if N<2 then
-      mess=[mess;'Buffer size must be at least 2';' ']
-      ok=%f
-    end
-    if in<=0 then
-      mess=[mess;'Block must have at least one input';' ']
-      ok=%f
-    end
-    if ~ok then
-      message(['Some specified values are inconsistent:';
-                ' ';mess])
-    end
-
-    if ok then
-      ipar=[length(fname1);length(frmt1);0;N;str2code(fname1);str2code(frmt1)]
-      if prod(size(dstate))<>(nin+1)*N+2 then
-       dstate=[-1;lunit;zeros((nin+1)*N,1)]
-      end
-      model.in=nin
-      model.dstate=dstate;model.ipar=ipar
-      model.dep_ut=[%t %f] //compatibility
-      graphics.exprs=exprs;
-      x.graphics=graphics;x.model=model
-      break
-    end
-  end
-case 'define' then
-  in=1;nin=sum(in)
-  frmt='(7(e10.3,1x))'
-  fname='foo'
-  lunit=0
-  N=2;
-
-  model=scicos_model()
-  model.sim=list('writef4',4)
-  model.in=in
-  model.evtin=1
-  model.dstate=[-1;lunit;zeros((nin+1)*N,1)]
-  model.ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt)]
-  model.blocktype='d'
-  model.dep_ut=[%t %f]
-  
-  exprs=[sci2exp(in);
-       fname;
-       frmt;
-       string(N)]
-  gr_i=['txt=[''write to'';''output file''];';
-    'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
-  x=standard_define([3 2],model,exprs,gr_i)
-end
-endfunction
diff --git a/scilab/modules/scicos_blocks/macros/Sources/RFILE.sci b/scilab/modules/scicos_blocks/macros/Sources/RFILE.sci
deleted file mode 100644 (file)
index eb9324b..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-//  Scicos
-//
-//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [x,y,typ]=RFILE(job,arg1,arg2)
-x=[];y=[];typ=[]
-select job
-case 'plot' then
-  standard_draw(arg1)
-case 'getinputs' then
-  [x,y,typ]=standard_inputs(arg1)
-case 'getoutputs' then
-  [x,y,typ]=standard_outputs(arg1)
-case 'getorigin' then
-  [x,y]=standard_origin(arg1)
-case 'set' then
-  x=arg1;
-  graphics=arg1.graphics;exprs=graphics.exprs
-  model=arg1.model;
-  dstate=model.dstate
-  ipar=model.ipar
-  ievt=ipar(3);N=ipar(4);
-  imask=5+ipar(1)+ipar(2)
-  tmask=ipar(imask)
-  lunit=dstate(3)
-  fname=exprs(3)
-  frmt=exprs(4)
-  //for backward compatibility
-  if size(exprs,'*')>5 then exprs(6)=[],end
-  while %t do
-    [ok,tmask1,outmask,fname1,frmt1,N,exprs]=scicos_getvalue(..
-       ['Set RFILE block parameters';
-        'Read is done on';
-        '  -  a binary file if no format given';
-        '  -  a formatted file if a  format (fortran type) is given'],..
-       ['Time record selection';
-        'Outputs record selection';
-        'Input file name';
-        'Input Format';
-        'Buffer size'],..
-        list('vec',-1,'vec',-1,'str',1,'str',1,'vec',1),..
-        exprs)
-    if ~ok then break,end //user cancel modification
-    fname1=stripblanks(fname1)
-    frmt1=stripblanks(frmt1)
-    //out=int(out)
-    //nout=out
-    nout = size(outmask,'*')
-    if prod(size(tmask1))>1 then
-      message('Time record selection must be a scalar or an empty matrix')
-    elseif lunit>0&min(length(frmt),1)<>min(length(frmt1),1) then
-      message(['You cannot swich from formatted to unformatted';
-                'or  from unformatted to formatted when running';' '])
-    elseif lunit>0&fname1<>fname then
-      message('You cannot modify Output file name when running')
-    elseif lunit>0&size(tmask1)<>size(tmask) then
-      message('You cannot modify time management when running')
-    elseif N<2 then
-      message('Buffer size must be at least 2')
-    elseif nout==0 then
-      message('You must read at least one record')
-    elseif min(outmask)<=0 then
-      message('Records must be > 0.')
-    else
-      if tmask1==[] then ievt=0;cout=[];tmask1=0;else ievt=1,cout=1;end
-      [model,graphics,ok]=check_io(model,graphics,[],nout,1,cout)
-      if ok then
-       if ievt==0 then
-         model.firing=[]
-       else
-         model.firing=0
-       end
-       ipar=[length(fname1);
-           length(frmt1);
-           ievt;
-           N;
-           str2code(fname1);
-           str2code(frmt1);
-           tmask1
-           outmask(:)]
-       if prod(size(dstate))<>(nout+ievt)*N+3 then
-         dstate=[-1;-1;lunit;zeros((nout+ievt)*N,1)]
-       end
-       model.dstate=dstate;model.ipar=ipar
-       graphics.exprs=exprs;
-       x.graphics=graphics;x.model=model
-       break
-      end
-    end
-  end
-case 'define' then
-  out=1;nout=sum(out)
-  frmt='(7(e10.3,1x))'
-  fname='foo'
-  lunit=0
-  N=2;
-  rpar=[]
-  tmask=0
-  outmask=1
-  ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt);
-      tmask;outmask]
-  dstate=[1;1;lunit;zeros((nout)*N,1)]
-  model=scicos_model()
-  model.sim=list('readf4',4)
-  model.out=nout
-  model.evtin=1
-  model.dstate=dstate
-  model.ipar=[length(fname);length(frmt);0;N;str2code(fname);str2code(frmt);
-             tmask;outmask]
-  model.blocktype='d'
-  model.dep_ut=[%f %f]
-  
-  exprs=[sci2exp([]);
-       sci2exp(outmask);
-       fname;
-       frmt;
-       string(N);
-       sci2exp(out)]
-  gr_i=['txt=[''read from'';''input file''];';
-    'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
-  x=standard_define([3 2],model,exprs,gr_i)
-end
-endfunction
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 (file)
index 36c2cb5..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-//  Scicos
-//
-//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// See the file ../license.txt
-//
-
-function [x,y,typ] = SLIDER_f(job,arg1,arg2)
-//
-x=[];y=[];typ=[]
-select job
-case 'plot' then
-  ipar=arg1.model.ipar
-  dpar=arg1.model.rpar
-  standard_draw(arg1)
-case 'getinputs' then
-    [x,y,typ]=standard_inputs(arg1)
-case 'getoutputs' then
-  x=[];y=[];typ=[];
-case 'getorigin' then
-  [x,y]=standard_origin(arg1)
-case 'set' then
-  x=arg1;
-  graphics=arg1.graphics;exprs=graphics.exprs
-  model=arg1.model;
-  while %t do
-    [ok,min_r,max_r,sl_type,color,herit,exprs]=scicos_getvalue(..
-       'Set  parameters',..
-       ['Min range';
-        'Max range';
-        'Type';
-        'Color';
-        'Block inherits (1) or not (0)'],..
-        list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
-    if ~ok then break,end //user cancel modification
-    mess=[]
-    if max_r <= min_r then
-      mess=[mess;'min range < max range ';' ']
-      ok=%f
-    end
-    if ~ok then
-      message(['Some specified values are inconsistent:';
-       ' ';mess]);
-    end
-    if ~or(herit==[0 1]) then
-      mess=[mess;'Accept inherited values are 0 and 1';' ']
-      ok=%f
-    end
-     if ~ok then
-      message(['Some specified values are inconsistent:';
-         ' ';mess])
-    end
-    if ok then
-      [model,graphics,ok]=check_io(model,graphics,1,[],ones(1-herit,1),[])
-    end
-    if ok then
-      ipar=[sl_type;color;xget('window')];
-      dpar=[min_r;max_r];
-      model.ipar=ipar;
-      model.rpar=dpar;
-      model.evtin=ones(1-herit,1)
-      graphics.exprs=exprs;
-      x.graphics=graphics;x.model=model
-      break
-    end
-  end
-case 'define' then
-  min_r= 0
-  max_r= 1
-  color= 1
-  sl_type = 1
-
-  model=scicos_model()
-  model.sim='slider'
-  model.in=1
-  model.evtin=1
-  model.dstate=[0;-1;1;2;3;4]
-  model.rpar=[min_r;max_r]
-  model.ipar=[sl_type;color;0]
-  model.blocktype='d'
-  model.dep_ut=[%t %f]
-  exprs=[string(min_r);
-        string(max_r);
-        string(sl_type);
-        string(color);
-        string(0)]
-
-  gr_i=' '
-  x=standard_define([3 1],model,exprs,gr_i)
-end
-endfunction
diff --git a/scilab/modules/scicos_blocks/src/c/affich.c b/scilab/modules/scicos_blocks/src/c/affich.c
deleted file mode 100644 (file)
index afa656c..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-* Copyright (C) 2008 - INRIA - Jean-Baptiste Silvy
-* Copyright (C) 2008 - INRIA - Simone Mannori
-* 
-* This file must be used under the terms of the CeCILL.
-* This source file is licensed as described in the file COPYING, which
-* you should have received as part of this distribution.  The terms
-* are also available at    
-* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-*
-*/
-/*--------------------------------------------------------------------------*/ 
-#include <stdio.h>
-#include "GetProperty.h"
-#include "SetProperty.h"
-#include "ObjectSelection.h"
-#include "HandleManagement.h"
-#include "CurrentObjectsManagement.h"
-#include "DrawingBridge.h"
-#include "StringMatrix.h"
-#include "affich.h"
-#include "WindowList.h"
-/*--------------------------------------------------------------------------*/ 
-/** Index of the text object within the block (ie compound) */
-#define TEXT_INDEX_IN_BLOCK 1
-
-/*---------------------------------------------------------------------------------*/
-/**
-* Retrieve the text object the affich routine use.
-* @param winNum index of the figure in which the text lies in.
-* @param compoundIndex index within the children of the current subwin of the
-*                      parent compound of the text.
-*/
-static sciPointObj * getAffichTextObject(int winNum, int compoundIndex);
-/*---------------------------------------------------------------------------------*/
-static sciPointObj * getAffichTextObject(int winNum, int compoundIndex)
-{
-       sciPointObj * parentFigure = getFigureFromIndex(winNum);
-       sciPointObj * parentSubwin = sciGetFirstTypedSelectedSon(parentFigure, SCI_SUBWIN);
-       sciPointObj * parentCompound = sciGetIndexedSon(parentSubwin, compoundIndex);
-
-       return sciGetIndexedSon(parentCompound, TEXT_INDEX_IN_BLOCK);
-}
-
-
-
-/*---------------------------------------------------------------------------------*/
-void C2F(settxtel)( int * numRow, 
-                                  int * numCol,
-                                  double * winNum,
-                                  double * textIndex,
-                                  char * value,
-                                  int valueLength)
-{
-       int nbRow,nbCol;
-       /* First step, retreive text handle */
-       /* For now we got the index of the block coupound within the axes children */
-       /* Get the text handle */
-       /* NB it should be better to test the correctness of the handle only once! */
-       sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
-       if (pText==(sciPointObj *)NULL) return;
-       if (sciGetEntityType (pText)== SCI_TEXT) {
-               sciGetTextSize(pText, &nbRow, &nbCol );
-               if (nbRow>=*numRow && nbCol>=*numCol) {
-                       StringMatrix * mat = sciGetText(pText);
-                       /* Set matrix element */
-                       copyStrMatElement(mat, (*numRow) - 1, (*numCol) - 1, value);
-               }
-       }
-}
-/*---------------------------------------------------------------------------------*/
-void C2F(affup2)( double * winNum, 
-                                double * textIndex)
-{
-       /* First step, retreive text handle */
-       /* For now we got the index of the block compound within the axes children */
-       /* Get the text handle */
-       sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
-
-       /* StringMatrix * mat = sciGetText(pText); */
-       if (pText==(sciPointObj *)NULL) return;
-       /* Second step draw the object */
-       sciDrawObj(pText);
-}
-/*---------------------------------------------------------------------------------*/
-
-void C2F(affichup)( double * textIndex,
-                                  double * winNum,
-                                  char * value,
-                                  int valueLength)
-{
-       /* First step, retreive text handle */
-       /* For now we got the index of the block coupound within the axes children */
-       sciPointObj * pText = getAffichTextObject((int) *winNum, ((int) *textIndex) - 1);
-       if (pText==(sciPointObj *)NULL) return;
-       if (sciGetEntityType (pText)== SCI_TEXT) 
-       {
-               /* Second step update text data */
-               sciSetText(pText, &value, 1, 1);
-               sciDrawObj(pText);
-       }
-}
-/*---------------------------------------------------------------------------------*/
-
diff --git a/scilab/modules/scicos_blocks/src/c/readf4.c b/scilab/modules/scicos_blocks/src/c/readf4.c
deleted file mode 100644 (file)
index bccfbff..0000000
+++ /dev/null
@@ -1,420 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-* See the file ./license.txt
-*/
-#include "scicos_block.h"
-#include <math.h>
-
-/* Common Block Declarations */
-int bfrdr();
-struct {
-    double stk[2];
-} stack_;
-
-#define stack_1 stack_
-
-struct {
-    int bot, top, idstk[60000] /* was [6][10000] */, lstk[10000], 
-           leps, bbot, bot0, infstk[10000], gbot, gtop, isiz;
-} vstk_;
-
-#define vstk_1 vstk_
-
-struct {
-    int ids[24576]     /* was [6][4096] */, pstk[4096], rstk[4096], pt, niv, 
-           macr, paus, icall, krec;
-} recu_;
-
-#define recu_1 recu_
-
-struct {
-    int ddt, err, lct[8], lin[65536], lpt[6], hio, rio, wio, rte, wte;
-} iop_;
-
-#define iop_1 iop_
-
-struct {
-    int err1, err2, errct, toperr, errpt, ieee, catch__;
-} errgst_;
-
-#define errgst_1 errgst_
-
-struct {
-    int sym, syn[6], char1, fin, fun, lhs, rhs, ran[2], comp[3];
-} com_;
-
-#define com_1 com_
-
-struct {
-    char alfa[63], alfb[63], buf[4096];
-} cha1_;
-
-#define cha1_1 cha1_
-
-struct {
-    int wmac, lcntr, nmacs, macnms[600]        /* was [6][100] */, lgptrs[
-           101], bptlg[1000];
-} dbg_;
-
-#define dbg_1 dbg_
-
-struct {
-    int lbot, ie, is, ipal, nbarg, ladr[1024];
-} adre_;
-
-#define adre_1 adre_
-
-struct {
-    int nbvars, iwhere[1024], nbrows[1024], nbcols[1024], itflag[1024], 
-           ntypes[1024], lad[1024], ladc[1024], lhsvar[1024];
-} intersci_;
-
-typedef struct
-{      long int cierr;
-       long int ciunit;
-       long int ciend;
-       char *cifmt;
-       long int cirec;
-} cilist;
-
-#define intersci_1 intersci_
-
-typedef char *address;
-
-typedef struct { double r, i; } doublecomplex;
-
-
-#ifndef max
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#endif
-
-/* Table of constant values */
-
-static int c__1 = 1;
-static int c__3 = 3;
-static int c__2 = 2;
-
-int readf4(scicos_block *block,int flag)
-{
-
-  int nz=block->nz;
-  double* z__=block->z;
-  double* y=block->outptr[0];  
-  int* ny=block->outsz;
-  int* ipar=block->ipar;
-  double *tvec=block->evout;
-  double t=get_scicos_time();
-
-  /* System generated locals */
-  address a__1[3], a__2[2];
-  int i__1, i__2[3], i__3[2];
-  char ch__1[4118], ch__2[4115];
-  
-  /* Builtin functions */
-  int s_cat();
-  
-  /* Local variables */
-  static int mode[2], lfil, kmax;
-#define cstk ((char *)&stack_1)
-  static int ierr;
-#define istk ((int *)&stack_1)
-  static int ievt, lfmt;
-#define sstk ((float *)&stack_1)
-#define zstk ((doublecomplex *)&stack_1)
-  static int k, n;
-  extern int dcopy_();
-  static int lunit;
-  extern int cvstr_();
-  static int io, no;
-  extern int basout_(), clunit_();
-  
-  /*     Copyright INRIA
-
-     Scicos block simulator
-     write read from a binary or formatted file
-     include 'stack.h'
-     ipar(1) = lfil : file name length
-     ipar(2) = lfmt : format length (0) if binary file
-     ipar(3) = ievt  : 1 if each data have a an associated time
-     ipar(4) = N : buffer length
-     ipar(5:4+lfil) = character codes for file name
-     ipar(5+lfil:4+lfil+lfmt) = character codes for format if any
-     ipar(5+lfil+lfmt:5+lfil+lfmt+ny+ievt) = reading mask */
-  
-
-  /* Parameter adjustments */
-  --y;
-  --ipar;
-  --tvec;
-  --z__;
-  
-  
-  /* Function Body */
-  if (flag == 1) {
-    /*     discrete state */
-    n = ipar[4];
-    k = (int) z__[1];
-    ievt = ipar[3];
-    kmax = (int) z__[2];
-    lunit = (int) z__[3];
-    if (k + 1 > kmax && kmax == n) {
-      /*     output */
-      dcopy_(ny, &z__[n * ievt + 3 + k], &n, &y[1], &c__1);
-      /*     .     read a new buffer */
-      no = (nz - 3) / n;
-      bfrdr(&lunit, &ipar[1], &z__[4], &no, &kmax, &ierr);
-      if (ierr != 0) {
-       goto L110;
-      }
-      z__[1] = 1.;
-      z__[2] = (double) kmax;
-    } else if (k < kmax) {
-      /*     output */
-      dcopy_(ny, &z__[n * ievt + 3 + k], &n, &y[1], &c__1);
-      z__[1] += 1.;
-    } else if (k+1> kmax) {
-      dcopy_(ny, &z__[n * ievt + 3 + kmax], &n, &y[1], &c__1);
-    }
-  } else if (flag == 3) {
-    n = ipar[4];
-    k = (int) z__[1];
-    kmax = (int) z__[2];
-    if (k > kmax && kmax < n) {
-      tvec[1] = t - 1.;
-    } else {
-      tvec[1] = z__[k + 3];
-    }
-  } else if (flag == 4) {
-    /*     file opening */
-    lfil = ipar[1];
-    ievt = ipar[3];
-    n = ipar[4];
-    cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
-    lfmt = ipar[2];
-    lunit = 0;
-    if (lfmt > 0) {
-      mode[0] = 1;
-      mode[1] = 0;
-      clunit_(&lunit, cha1_1.buf, mode, lfil);
-      if (iop_1.err > 0) {
-       goto L100;
-      }
-    } else {
-      mode[0] = 101;
-      mode[1] = 0;
-      clunit_(&lunit, cha1_1.buf, mode, lfil);
-      if (iop_1.err > 0) {
-       goto L100;
-      }
-    }
-    z__[3] = (double) lunit;
-    /*     buffer initialisation */
-    no = (nz - 3) / n;
-    bfrdr(&lunit, &ipar[1], &z__[4], &no, &kmax, &ierr);
-    if (ierr != 0) {
-      goto L110;
-    }
-    z__[1] = 1.;
-    z__[2] = (double) kmax;
-  } else if (flag == 5) {
-    lfil = ipar[1];
-    n = ipar[4];
-    k = (int) z__[1];
-    lunit = (int) z__[3];
-    if (lunit == 0) {
-      return 0;
-    }
-    i__1 = -lunit;
-    clunit_(&i__1, cha1_1.buf, mode, lfil);
-    if (iop_1.err > 0) {
-      goto L100;
-    }
-    z__[3] = 0.;
-  }
-  return 0;
- L100:
-  iop_1.err = 0;
-  lfil = ipar[1];
-  /* Writing concatenation */
-  i__2[0] = 5, a__1[0] = "File ";
-  i__2[1] = lfil, a__1[1] = cha1_1.buf;
-  i__2[2] = 17, a__1[2] = " Cannot be opened";
-  s_cat(ch__1, a__1, i__2, &c__3, (short)4118);
-  basout_(&io, &iop_1.wte, ch__1, lfil + 22);
-  flag = -1;
-  return 0;
- L110:
-  lfil = ipar[1];
-  cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
-  i__1 = -lunit;
-  clunit_(&i__1, cha1_1.buf, mode, lfil);
-  /* Writing concatenation */
-  i__3[0] = 19, a__2[0] = "Read error on file ";
-  i__3[1] = lfil, a__2[1] = cha1_1.buf;
-  s_cat(ch__2, a__2, i__3, &c__2, (short)4115);
-  basout_(&io, &iop_1.wte, ch__2, lfil + 19);
-  flag = -1;
-  return 0;
-} /* readf */
-
-#undef zstk
-#undef sstk
-#undef istk
-#undef cstk
-
-
-int bfrdr(lunit, ipar, z__, no, kmax, ierr)
-     int *lunit, *ipar;
-     double *z__;
-     int *no, *kmax, *ierr;
-{
-  /* System generated locals */
-  int i__1, i__2, i__3;
-  cilist ci__1;
-  
-  /* Builtin functions */
-  int s_rsue(), do_uio(), e_rsue(), s_rsfe(), do_fio(), e_rsfe();
-  
-  /* Local variables */
-#define cstk ((char *)&stack_1)
-  static int lfmt;
-#define istk ((int *)&stack_1)
-  static int ievt;
-#define sstk ((float *)&stack_1)
-#define zstk ((doublecomplex *)&stack_1)
-  static int i__, j, n, imask;
-  extern /* Subroutine */ int cvstr_();
-  static int mm;
-  static double tmp[100];
-  
-  /* Fortran I/O blocks */
-  static cilist io___26 = { 1, 0, 1, 0, 0 }; 
-  
-  
-  /* *------------------------------------------------------------------ */
-
-  /* Parameter adjustments */
-  --z__;
-  --ipar;
-  
-  /* Function Body */
-  ievt = ipar[3];
-  n = ipar[4];
-  /*      no=(nz-3)/N */
-  /*     maximum number of value to read */
-  imask = ipar[1] + 5 + ipar[2];
-  if (ievt == 0) {
-    ++imask;
-  }
-  mm = 0;
-  i__1 = *no - 1;
-  for (i__ = 0; i__ <= i__1; ++i__) {
-    /* Computing MAX */
-    i__2 = mm, i__3 = ipar[imask + i__];
-    mm = max(i__2,i__3);
-    /* L10: */
-  }
-  
-  lfmt = ipar[2];
-  *kmax = 0;
-  if (lfmt == 0) {
-    /*     unformatted read */
-    i__1 = n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-      io___26.ciunit = *lunit;
-      i__2 = s_rsue(&io___26);
-      if (i__2 != 0) {
-       goto L100001;
-      }
-      i__3 = mm;
-      for (j = 1; j <= i__3; ++j) {
-       i__2 = do_uio(&c__1, (char *)&tmp[j - 1], (short)sizeof(
-                                                                double));
-       if (i__2 != 0) {
-         goto L100001;
-       }
-      }
-      i__2 = e_rsue();
-    L100001:
-      if (i__2 < 0) {
-       goto L20;
-      }
-      if (i__2 > 0) {
-       goto L100;
-      }
-      i__2 = *no - 1;
-      for (j = 0; j <= i__2; ++j) {
-       z__[j * n + i__] = tmp[ipar[imask + j] - 1];
-       /* L11: */
-      }
-      ++(*kmax);
-      /* L12: */
-    }
-  } else {
-    /*     formatted read */
-    cvstr_(&ipar[2], &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)4096);
-    i__1 = n;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-      ci__1.cierr = 1;
-      ci__1.ciend = 1;
-      ci__1.ciunit = *lunit;
-      ci__1.cifmt = cha1_1.buf;
-      i__2 = s_rsfe(&ci__1);
-      if (i__2 != 0) {
-       goto L100002;
-      }
-      i__3 = mm;
-      for (j = 1; j <= i__3; ++j) {
-       i__2 = do_fio(&c__1, (char *)&tmp[j - 1], (short)sizeof(
-                                                                double));
-       if (i__2 != 0) {
-         goto L100002;
-       }
-      }
-      i__2 = e_rsfe();
-    L100002:
-      if (i__2 < 0) {
-       goto L20;
-      }
-      if (i__2 > 0) {
-       goto L100;
-      }
-      i__2 = *no - 1;
-      for (j = 0; j <= i__2; ++j) {
-       z__[j * n + i__] = tmp[ipar[imask + j] - 1];
-       /* L13: */
-      }
-      ++(*kmax);
-      /* L14: */
-    }
-  }
- L20:
-  *ierr = 0;
-  return 0;
- L100:
-  *ierr = 1;
-  return 0;
-} /* bfrdr */
-
-#undef zstk
-#undef sstk
-#undef istk
-#undef cstk
-
-
index d562bc6..1f213a1 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <VisualStudioProject
        ProjectType="Visual C++"
        Version="9,00"
@@ -36,6 +36,9 @@
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
                                Name="VCMIDLTool"
                                TargetEnvironment="3"
                        />
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
                                Name="VCMIDLTool"
                        />
                        <Tool
                                Name="VCXMLDataGeneratorTool"
                        />
                        <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
                                Name="VCMIDLTool"
                                TargetEnvironment="3"
                        />
                                >
                        </File>
                        <File
-                               RelativePath=".\affich.c"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\cpp\affich2.cpp"
                                >
                        </File>
                        Filter="h;hpp;hxx;hm;inl"
                        >
                        <File
-                               RelativePath="..\..\includes\affich.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\jni\AfficheBlock.hxx"
                                >
                        </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 (file)
index dd9213a..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-* See the file ./license.txt
-*/
-#include "scicos_block.h"
-#include <math.h>
-
-
-/* Common Block Declarations */
-
-struct {
-    double stk[2];
-} stack_;
-
-#define stack_1 stack_
-
-struct {
-    int bot, top, idstk[60000] /* was [6][10000] */, lstk[10000], 
-           leps, bbot, bot0, infstk[10000], gbot, gtop, isiz;
-} vstk_;
-
-#define vstk_1 vstk_
-
-struct {
-    int ids[24576]     /* was [6][4096] */, pstk[4096], rstk[4096], pt, niv, 
-           macr, paus, icall, krec;
-} recu_;
-
-#define recu_1 recu_
-
-struct {
-    int ddt, err, lct[8], lin[65536], lpt[6], hio, rio, wio, rte, wte;
-} iop_;
-
-#define iop_1 iop_
-
-struct {
-    int err1, err2, errct, toperr, errpt, ieee, catch__;
-} errgst_;
-
-#define errgst_1 errgst_
-
-struct {
-    int sym, syn[6], char1, fin, fun, lhs, rhs, ran[2], comp[3];
-} com_;
-
-#define com_1 com_
-
-struct {
-    char alfa[63], alfb[63], buf[4096];
-} cha1_;
-
-#define cha1_1 cha1_
-
-struct {
-    int wmac, lcntr, nmacs, macnms[600]        /* was [6][100] */, lgptrs[
-           101], bptlg[1000];
-} dbg_;
-
-#define dbg_1 dbg_
-
-struct {
-    int lbot, ie, is, ipal, nbarg, ladr[1024];
-} adre_;
-
-#define adre_1 adre_
-
-struct {
-    int nbvars, iwhere[1024], nbrows[1024], nbcols[1024], itflag[1024], 
-           ntypes[1024], lad[1024], ladc[1024], lhsvar[1024];
-} intersci_;
-
-#define intersci_1 intersci_
-
-typedef struct
-{      long int cierr;
-       long int ciunit;
-       long int ciend;
-       char *cifmt;
-       long int cirec;
-} cilist;
-
-typedef char *address;
-
-typedef struct { double r, i; } doublecomplex;
-
-/* Table of constant values */
-
-static int c__1 = 1;
-static double c_b12 = 0.;
-static int c__3 = 3;
-
-int writef4(scicos_block *block,int flag)
-{
-  double* z__=block->z;
-  double* u=block->inptr[0];  
-  int* nu=block->insz;
-  int* ipar=block->ipar;
-  int nevprt=block->nevprt;
-  double t=get_scicos_time();
-
-  /* System generated locals */
-  address a__1[3];
-  int i__1, i__2, i__3, i__4[3];
-  char ch__1[4118];
-  cilist ci__1;
-  
-  /* Builtin functions */
-  int s_wsfe(), do_fio(), e_wsfe(), s_wsue(), do_uio(), e_wsue();
-  int s_cat();
-  
-  /* Local variables */
-  static int mode[2], lfil;
-  extern int dset_();
-  static int lfmt;
-#define cstk ((char *)&stack_1)
-#define istk ((int *)&stack_1)
-#define sstk ((real *)&stack_1)
-#define zstk ((doublecomplex *)&stack_1)
-  static int i__, j, k, n, lunit;
-  extern int cvstr_();
-  static int io;
-  extern int basout_(), clunit_();
-  
-  /* Fortran I/O blocks */
-  static cilist io___10 = { 1, 0, 0, 0, 0 };
-  static cilist io___14 = { 0, 0, 0, 0, 0 };
-  
-  
-  /*     Copyright INRIA */
-  /*     Scicos block simulator */
-  /*     write input to a binary or formatted file */
-  /*     ipar(1) = lfil : file name length */
-  /*     ipar(2) = lfmt : format length (0) if binary file */
-  /*     ipar(3)          unused */
-  /*     ipar(4) = N : buffer length */
-  /*     ipar(5:4+lfil) = character codes for file name */
-  /*     ipar(5+lfil:4+lfil+lfmt) = character codes for format if any */
-  
-  /* Copyright INRIA */
-  /* *------------------------------------------------------------------ */
-  /* vsiz  size of internal scilab stack */
-  
-  /* bsiz  size of internal chain buf */
-  
-  /* isizt  maximum number of scilab variables global and local */
-  /* isiz maximum number of scilab local variables */
-  /* psiz  defines recursion size */
-  /* lsiz  dim. of vector containing the command line */
-  /* nlgh  length of variable names */
-  /* csiz  used for character coding */
-  /* intersiz used in interfaces */
-  /* *------------------------------------------------------------------- */
-  /* c (DLL Digital Visual Fortran) */
-  /* DEC$ IF DEFINED (FORDLL) */
-  /* DEC$ ATTRIBUTES DLLIMPORT:: /stack/, /vstk/, /recu/, /iop/ */
-  /* DEC$ ATTRIBUTES DLLIMPORT:: /errgst/, /com/, /adre/ */
-  /* DEC$ ATTRIBUTES DLLIMPORT:: /intersci/ ,/cha1/ */
-  /* DEC$ ENDIF */
-  /*     --------------------------------------------------------------- */
-  
-  /* *------------------------------------------------------------------ */
-  
-  /* Parameter adjustments */
-  --u;
-  --ipar;
-  --z__;
-  
-  /* Function Body */
-  n = ipar[4];
-  k = (int) z__[1];
-  lunit = (int) z__[2];
-  
-  if (flag == 2 && nevprt > 0) {
-    /*     add new point to the buffer */
-    ++k;
-    z__[k + 2] = t;
-    i__1 = *nu;
-    for (i__ = 1; i__ <= i__1; ++i__) {
-      z__[n + 2 + (i__ - 1) * n + k] = u[i__];
-      /* L1: */
-    }
-    z__[1] = (double) k;
-    if (k < n) {
-      return 0;
-    }
-    /*     write on the file */
-    if (ipar[2] > 0) {
-      /*     .     formatted write */
-      cvstr_(&ipar[2], &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)
-            4096);
-      i__1 = k;
-      for (j = 1; j <= i__1; ++j) {
-       ci__1.cierr = 1;
-       ci__1.ciunit = lunit;
-       ci__1.cifmt = cha1_1.buf;
-       i__2 = s_wsfe(&ci__1);
-       if (i__2 != 0) {
-         goto L100;
-       }
-       i__3 = *nu;
-       for (i__ = 0; i__ <= i__3; ++i__) {
-         i__2 = do_fio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + 
-                                           j], (short)sizeof(double));
-         if (i__2 != 0) {
-           goto L100;
-         }
-       }
-       i__2 = e_wsfe();
-       if (i__2 != 0) {
-         goto L100;
-       }
-       /* L10: */
-      }
-    } else {
-      /*     .     unformatted write */
-      i__1 = k;
-      for (j = 1; j <= i__1; ++j) {
-       io___10.ciunit = lunit;
-       i__2 = s_wsue(&io___10);
-       if (i__2 != 0) {
-         goto L100;
-       }
-       i__3 = *nu;
-       for (i__ = 0; i__ <= i__3; ++i__) {
-         i__2 = do_uio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + 
-                                           j], (short)sizeof(double));
-         if (i__2 != 0) {
-           goto L100;
-         }
-       }
-       i__2 = e_wsue();
-       if (i__2 != 0) {
-         goto L100;
-       }
-       /* L11: */
-      }
-    }
-    z__[1] = 0.;
-  } else if (flag == 4) {
-    /*     file opening */
-    lfil = ipar[1];
-    cvstr_(&lfil, &ipar[5], cha1_1.buf, &c__1, (short)4096);
-    lfmt = ipar[2];
-    lunit = 0;
-    if (lfmt > 0) {
-      mode[0] = 3;
-      mode[1] = 0;
-      clunit_(&lunit, cha1_1.buf, mode, lfil);
-      if (iop_1.err > 0) {
-       goto L100;
-      }
-    } else {
-      mode[0] = 103;
-      mode[1] = 0;
-      clunit_(&lunit, cha1_1.buf, mode, lfil);
-      if (iop_1.err > 0) {
-       goto L100;
-      }
-    }
-    z__[1] = 0.;
-    z__[2] = (double) lunit;
-    z__[3] = t;
-    i__1 = *nu * n;
-    dset_(&i__1, &c_b12, &z__[4], &c__1);
-  } else if (flag == 5) {
-    if (lunit == 0) {
-      return 0;
-    }
-    if (k >= 1) {
-      /*     write on the file */
-      lfmt = ipar[2];
-      if (lfmt > 0) {
-       /*     .        formatted write */
-       cvstr_(&lfmt, &ipar[ipar[1] + 5], cha1_1.buf, &c__1, (short)
-              4096);
-       i__1 = k;
-       for (j = 1; j <= i__1; ++j) {
-         ci__1.cierr = 0;
-         ci__1.ciunit = lunit;
-         ci__1.cifmt = cha1_1.buf;
-         s_wsfe(&ci__1);
-         i__2 = *nu;
-         for (i__ = 0; i__ <= i__2; ++i__) {
-           do_fio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + j],
-                  (short)sizeof(double));
-         }
-         e_wsfe();
-         /* L20: */
-       }
-      } else {
-       /*     .        unformatted write */
-       i__1 = k;
-       for (j = 1; j <= i__1; ++j) {
-         io___14.ciunit = lunit;
-         s_wsue(&io___14);
-         i__2 = *nu;
-         for (i__ = 0; i__ <= i__2; ++i__) {
-           do_uio(&c__1, (char *)&z__[n + 2 + (i__ - 1) * n + j],
-                  (short)sizeof(double));
-         }
-         e_wsue();
-         /* L21: */
-       }
-      }
-    }
-    lfil = ipar[1];
-    i__1 = -lunit;
-    clunit_(&i__1, cha1_1.buf, mode, lfil);
-    if (iop_1.err > 0) {
-      goto L100;
-    }
-    z__[2] = 0.;
-  }
-  return 0;
- L100:
-  iop_1.err = 0;
-  /* Writing concatenation */
-  i__4[0] = 5, a__1[0] = "File ";
-  i__4[1] = lfil, a__1[1] = cha1_1.buf;
-  i__4[2] = 17, a__1[2] = " Cannot be opened";
-  s_cat(ch__1, a__1, i__4, &c__3, (short)4118);
-  basout_(&io, &iop_1.wte, ch__1, lfil + 22);
-  iflag = -1;
-  return 0;
-} /* writef_ */
-
-#undef zstk
-#undef sstk
-#undef istk
-#undef cstk
-
-
diff --git a/scilab/modules/scicos_blocks/src/fortran/affich.f b/scilab/modules/scicos_blocks/src/fortran/affich.f
deleted file mode 100644 (file)
index 6f26f8c..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-c     Scicos 
-c 
-c     Copyright (C) INRIA - METALAU Project <scicos@inria.fr> 
-c 
-c     This program is free software; you can redistribute it and/or modify 
-c     it under the terms of the GNU General Public License as published by 
-c     the Free Software Foundation; either version 2 of the License, or 
-c     (at your option) any later version. 
-c 
-c     This program is distributed in the hope that it will be useful, 
-c     but WITHOUT ANY WARRANTY; without even the implied warranty of 
-c     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-c     GNU General Public License for more details. 
-c 
-c     You should have received a copy of the GNU General Public License 
-c     along with this program; if not, write to the Free Software 
-c     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
-c 
-c     See the file ./license.txt 
-c 
-      subroutine affich(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
-     &     rpar,nrpar,ipar,nipar,u,nu,y,ny)
-
-c     Scicos block simulator
-c     Displays the value of the input in a graphic window
-c
-c     ipar(1) = font
-c     ipar(2) = fontsize
-c     ipar(3) = color
-c     ipar(4) = win
-c     ipar(5) = nt : total number of output digits
-c     ipar(6) = nd number of rationnal part digits
-
-c
-c     z(1)=value
-c     z(2)=window
-c     z(3)=x
-c     z(4)=y
-c     z(5)=width
-c     z(6)=height
-c     z(7)=text_handle
-
-      double precision t,xd(*),x(*),z(*),tvec(*),rpar(*),u(*),y(*)
-      integer flag,nevprt,nx,nz,ntvec,nrpar,ipar(*)
-      integer nipar,nu,ny
-
-
-      integer wid
-
-      double precision sciround,ur
-
-
-c     
-c     ------------------- State Update -----------------------------     
-      if(flag.eq.2) then
-c     state evolution
-         ur=10.0d0**ipar(6)
-         ur=sciround(u(1)*ur)/ur
-
-         if (ur.eq.z(1)) return
-
-         wid=z(2)
-
-         if(wid.lt.0) return
-
-         call setblockwin(int(z(2)),cur)
-
-         z(1)=ur
-         
-         call affdraw(ipar(5),z(1), z(2), z(7))
-
-c     ----------------- Initialization -----------------------------
-      elseif(flag.eq.4) then
-c     init
-c     .  initial value = 0         
-         z(1)=0.0d0 
-
-c     .  get geometry of the block
-         call getgeom(z(2))
-      
-         
-c     . Check that the winId is valid.
-         if(z(2).lt.0.0d0) return
-         
-c     ---------------------------------------------------------------    
-
-      endif
-      end
-c     ---------------------------------------------------------------
-
-      subroutine setblockwin(win,cur)
-      integer win,cur
-      return
-      end
-
-c     -------- Build the string and draw it inside the box  --------
-      subroutine affdraw(form, val, winnum, textind)
-      integer textind 
-      integer form(2)
-      double precision winnum
-      double precision val
-      character*40 fmt,value
-
-c     --------- Compute the string to display ---------------
-      write(fmt,'(''(f'',i3,''.'',i3,'')'')') form(1),form(2)
-      value=' '
-      write(value,fmt) val
-c     .Add the "0" at the end of the string (C standard string)
-      ln=lnblnk(value)
-      value(ln+1:ln+1)=char(0)
-       
-       call affichup(textind, winnum, value)
-       
-      return
-      end
-
-
-c -------------------------------------------------------------------------------------
-
-      subroutine getgeom(g)
-      include "stack.h"
-      double precision g(*)
-      integer ret
-      integer sadr,iadr
-      iadr(l) = l + l - 1
-      sadr(l)=(l/2)+1
-      ret=scistring(rhs+1, 'getgeom',1,0)
-      il=iadr(lstk(top+1))
-      l=sadr(il+4)
-c     . 6 : number of element to retrieve
-      call dcopy(6,stk(l),1,g,1)
-c      top=top-1
-      return
-      end
index d3b1ee0..4a0c9e9 100644 (file)
@@ -105,7 +105,6 @@ lib /DEF:&quot;$(InputDir)Scicos_blocks_Import.def&quot; /SUBSYSTEM:WINDOWS /MAC
                <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
                <File RelativePath=".\scicos_blocks_f.rc"/></Filter>
                <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
-               <File RelativePath=".\affich.f"/>
                <File RelativePath=".\csslti.f"/>
                <File RelativePath=".\cstblk.f"/>
                <File RelativePath=".\delay.f"/>
index 3035097..f7b7fc1 100644 (file)
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
-                               RelativePath=".\affich.c"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\csslti.c"
                                >
                        </File>
                        Name="Fortran files"
                        >
                        <File
-                               RelativePath=".\affich.f"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\csslti.f"
                                >
                        </File>
index 8a178b8..6f19f7e 100644 (file)
 
 cd SCI/modules/scicos_blocks/src/c;
 
-BLOCK_C_SOURCES = gsort(ls('*.c'));
-
-NON_BLOCK_C_SOURCES = ['scoGetProperty.c',
-'scoSetProperty.c',
-'scoMisc.c',
-'scoMemoryScope.c',
-'scoWindowScope.c',
-'affich.c',
-'DllmainScicos_blocks.c',
-'readf4.c',
-'writef4.c',
-'scicos_evalhermite.c',
-'scicos_indexfinder.c'];
+BLOCK_C_SOURCES = gsort(ls("*.c"));
+
+NON_BLOCK_C_SOURCES = ["scoGetProperty.c",
+"scoSetProperty.c",
+"scoMisc.c",
+"scoMemoryScope.c",
+"scoWindowScope.c",
+"DllmainScicos_blocks.c",
+"scicos_evalhermite.c",
+"scicos_indexfinder.c"];
 
 BLOCK_C_SOURCES(grep(BLOCK_C_SOURCES,NON_BLOCK_C_SOURCES)) = [];
-BLOCKS_C = strsubst(BLOCK_C_SOURCES,'.c','');
+BLOCKS_C = strsubst(BLOCK_C_SOURCES,".c","");
 
 cd SCI/modules/scicos_blocks/src/fortran;
 
-BLOCK_FORTRAN_SOURCES = gsort(ls('*.f'));
-BLOCKS_FORTRAN = strsubst(BLOCK_FORTRAN_SOURCES,'.f','');
+BLOCK_FORTRAN_SOURCES = gsort(ls("*.f"));
+BLOCKS_FORTRAN = strsubst(BLOCK_FORTRAN_SOURCES,".f","");
 
 cd SCI/modules/scicos_blocks/src/cpp;
 
-BLOCK_CPP_SOURCES = gsort(ls('*.cpp'));
-BLOCKS_CPP = strsubst(BLOCK_CPP_SOURCES,'.cpp','');
+BLOCK_CPP_SOURCES = gsort(ls("*.cpp"));
+BLOCKS_CPP = strsubst(BLOCK_CPP_SOURCES,".cpp","");
 
 BLOCKS_H = [
-'';
-'/*  Scicos';
-'*';
-'*  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>';
-'*  Copyright (C) DIGITEO - 2010';
-'*';
-'* This program is free software; you can redistribute it and/or modify';
-'* it under the terms of the GNU General Public License as published by';
-'* the Free Software Foundation; either version 2 of the License, or';
-'* (at your option) any later version.';
-'*';
-'* This program is distributed in the hope that it will be useful,';
-'* but WITHOUT ANY WARRANTY; without even the implied warranty of';
-'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the';
-'* GNU General Public License for more details.';
-'*';
-'* You should have received a copy of the GNU General Public License';
-'* along with this program; if not, write to the Free Software';
-'* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.';
-'*';
-'* See the file ./license.txt';
-'*/';
-'#ifndef __SCICOS_BLOCKS_H__';
-'#define __SCICOS_BLOCKS_H__';
-'';
-'#include ""machine.h""';
-'#include ""dynlib_scicos_blocks.h""';
-'#include ""scicos.h""';
-'';
-'/******* Please do not edit *************/';
-''];
+"";
+"/*  Scicos";
+"*";
+"*  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>";
+"*  Copyright (C) DIGITEO - 2010-2011";
+"*";
+"* This program is free software; you can redistribute it and/or modify";
+"* it under the terms of the GNU General Public License as published by";
+"* the Free Software Foundation; either version 2 of the License, or";
+"* (at your option) any later version.";
+"*";
+"* This program is distributed in the hope that it will be useful,";
+"* but WITHOUT ANY WARRANTY; without even the implied warranty of";
+"* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the";
+"* GNU General Public License for more details.";
+"*";
+"* You should have received a copy of the GNU General Public License";
+"* along with this program; if not, write to the Free Software";
+"* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.";
+"*";
+"* See the file ./license.txt";
+"*/";
+"#ifndef __SCICOS_BLOCKS_H__";
+"#define __SCICOS_BLOCKS_H__";
+"";
+"#include ""machine.h""";
+"#include ""dynlib_scicos_blocks.h""";
+"#include ""scicos.h""";
+"";
+"/******* Please do not edit *************/";
+""];
 
 BLOCKS_H = [BLOCKS_H;
-'SCICOS_BLOCKS_IMPEXP void C2F(' + BLOCKS_FORTRAN + ')(ARGS_scicos);' ;
-'SCICOS_BLOCKS_IMPEXP void ' + BLOCKS_C + '(ARGS_scicos);' ;
-'SCICOS_BLOCKS_IMPEXP void ' + BLOCKS_CPP + '(ARGS_scicos);' ;
-''];
+"SCICOS_BLOCKS_IMPEXP void C2F(" + BLOCKS_FORTRAN + ")(ARGS_scicos);" ;
+"SCICOS_BLOCKS_IMPEXP void " + BLOCKS_C + "(ARGS_scicos);" ;
+"SCICOS_BLOCKS_IMPEXP void " + BLOCKS_CPP + "(ARGS_scicos);" ;
+""];
+
+SIZE_BLOCKS_C = size(BLOCKS_C,"*") + 1;
+SIZE_BLOCKS_FORTRAN = size(BLOCKS_FORTRAN,"*") + 1;
 
-SIZE_TAB_BLOCK_LIST = size(BLOCKS_C,'*') + size(BLOCKS_FORTRAN,'*') + 1;
+SIZE_TAB_BLOCK_LIST = SIZE_BLOCKS_C + SIZE_BLOCKS_FORTRAN;
 
 BLOCKS_H = [BLOCKS_H;
-'#define SIZE_TAB_BLOCK_LIST ' + string(SIZE_TAB_BLOCK_LIST);
-'int ntabsim = SIZE_TAB_BLOCK_LIST ;'
-'';
-'OpTab tabsim[SIZE_TAB_BLOCK_LIST] ={'];
+"#define SIZE_TAB_BLOCK_LIST " + string(SIZE_TAB_BLOCK_LIST);
+"int ntabsim = SIZE_TAB_BLOCK_LIST;"
+"";
+"OpTab tabsim[SIZE_TAB_BLOCK_LIST] = {"];
 
 BLOCKS_H = [BLOCKS_H;
-'{""' + BLOCKS_FORTRAN + '"",(ScicosF) C2F(' + BLOCKS_FORTRAN + ')},' ;
-'{""' + BLOCKS_C + '"",(ScicosF) ' + BLOCKS_C + '},' ;
-'{""' + BLOCKS_CPP + '"",(ScicosF) ' + BLOCKS_CPP + '},' ;
-'{(char *) 0, (ScicosF) 0}};' ;
-'#endif' ;
-'/****************************************/' ;
-''];
-
-mputl(BLOCKS_H, SCI + '/modules/scicos_blocks/includes/blocks.h.vc');
-mputl(BLOCKS_H, SCI + '/modules/scicos_blocks/includes/blocks.h');
+"{""" + BLOCKS_FORTRAN + """,(ScicosF) C2F(" + BLOCKS_FORTRAN + ")}," ;
+"{""" + BLOCKS_C + """,(ScicosF) " + BLOCKS_C + "}," ;
+"{""" + BLOCKS_CPP + """,(ScicosF) " + BLOCKS_CPP + "}," ;
+"{(char *) 0, (ScicosF) 0}};" ;
+"#endif" ;
+"/****************************************/" ;
+""];
+
+
+mputl(BLOCKS_H, SCI + "/modules/scicos_blocks/includes/blocks.h.vc");
+mputl(BLOCKS_H, SCI + "/modules/scicos_blocks/includes/blocks.h");
index 95ba961..538a791 100644 (file)
@@ -225,7 +225,7 @@ images/palettes/CMATVIEW.png \
 images/palettes/CMSCOPE.png \
 images/palettes/ConstantVoltage.png \
 images/palettes/CONST_m.png \
-images/palettes/CONSTRAINT_f.png \
+images/palettes/CONSTRAINT_c.png \
 images/palettes/CONVERT.png \
 images/palettes/COSBLK_f.png \
 images/palettes/Counter.png \
index 6f7d9ac..fa505ac 100644 (file)
@@ -633,7 +633,7 @@ images/palettes/CMATVIEW.png \
 images/palettes/CMSCOPE.png \
 images/palettes/ConstantVoltage.png \
 images/palettes/CONST_m.png \
-images/palettes/CONSTRAINT_f.png \
+images/palettes/CONSTRAINT_c.png \
 images/palettes/CONVERT.png \
 images/palettes/COSBLK_f.png \
 images/palettes/Counter.png \
index 0026f1f..60c038e 100644 (file)
             </block>
         </node>
         <node xsi:type="PreLoaded" enable="true" name="Implicit">
-            <block name="CONSTRAINT_f">
-                <data variable="SCI" path="/modules/scicos_blocks/blocks/CONSTRAINT_f.h5"/>
-                <icon variable="SCI" path="/modules/xcos/images/palettes/CONSTRAINT_f.png"/>
+            <block name="CONSTRAINT_c">
+                <data variable="SCI" path="/modules/scicos_blocks/blocks/CONSTRAINT_c.h5"/>
+                <icon variable="SCI" path="/modules/xcos/images/palettes/CONSTRAINT_c.png"/>
             </block>
             <block name="DIFF_f">
                 <data variable="SCI" path="/modules/scicos_blocks/blocks/DIFF_f.h5"/>
index 18e39f2..6d428b2 100644 (file)
  * 
  * See the file ./license.txt
  -->
-<refentry version="5.0-subset Scilab" xml:id="Implicit_pal"
-          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">
+<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">
   <refnamediv>
     <refname>Implicit_pal</refname>
-
     <refpurpose>Implicit palette</refpurpose>
   </refnamediv>
-
   <refsection>
     <title>Block Screenshot</title>
-
     <para>
-    <inlinemediaobject>
-      <imageobject>
-        <imagedata linkend="CONSTRAINT_f" fileref="../../../../../../modules/xcos/images/palettes/CONSTRAINT_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
-      </imageobject>
-    </inlinemediaobject>
-    <inlinemediaobject>
-      <imageobject>
-        <imagedata linkend="DIFF_f" fileref="../../../../../../modules/xcos/images/palettes/DIFF_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
-      </imageobject>
-    </inlinemediaobject>
+      <inlinemediaobject>
+        <imageobject>
+          <imagedata linkend="CONSTRAINT_c" fileref="../../../../../../modules/xcos/images/palettes/CONSTRAINT_c.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
+        </imageobject>
+      </inlinemediaobject>
+      <inlinemediaobject>
+        <imageobject>
+          <imagedata linkend="DIFF_f" fileref="../../../../../../modules/xcos/images/palettes/DIFF_f.png" width="100" depth="100" scalefit="0" align="center" valign="middle"/>
+        </imageobject>
+      </inlinemediaobject>
     </para>
   </refsection>
-
   <refsection id="Module_Implicit_pal">
     <title>Module</title>
-
     <itemizedlist>
       <listitem>
-         <para><link linkend="xcos">xcos</link></para>
+        <para>
+          <link linkend="xcos">xcos</link>
+        </para>
       </listitem>
     </itemizedlist>
   </refsection>
-
   <refsection id="Description_Implicit_pal">
     <title>Description</title>
-
     <para>In the Implicit palette, you can find blocks used to model implicit systems.</para>
   </refsection>
-
   <refsection id="Blocks_Implicit_pal">
     <title>Blocks</title>
-
     <itemizedlist>
       <listitem>
         <para>
-          <link linkend="CONSTRAINT_f">CONSTRAINT_f - Constraint</link>
+          <link linkend="CONSTRAINT_c">CONSTRAINT_c - Constraint</link>
         </para>
       </listitem>
-
       <listitem>
         <para>
           <link linkend="DIFF_f">DIFF_f - Sum</link>
         </para>
       </listitem>
-
-      
     </itemizedlist>
   </refsection>
 </refentry>
@@ -21,9 +21,9 @@
  * 
  * See the file ./license.txt
  -->
-<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">
+<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">
   <refnamediv>
-    <refname>CONSTRAINT_f</refname>
+    <refname>CONSTRAINT_c</refname>
     <refpurpose>Constraint</refpurpose>
   </refnamediv>
   <refsection>
     <para>
       <inlinemediaobject>
         <imageobject>
-          <imagedata fileref="../../../../images/palettes/CONSTRAINT_f.png" align="center" valign="middle"/>
+          <imagedata fileref="../../../../images/palettes/CONSTRAINT_c.png" align="center" valign="middle"/>
         </imageobject>
       </inlinemediaobject>
     </para>
   </refsection>
-  <refsection id="Contents_CONSTRAINT_f">
+  <refsection id="Contents_CONSTRAINT_c">
     <title>Contents</title>
     <itemizedlist>
       <listitem>
         <para>
-          <link linkend="CONSTRAINT_f">Constraint</link>
+          <link linkend="CONSTRAINT_c">Constraint</link>
         </para>
       </listitem>
       <listitem>
         <itemizedlist>
           <listitem>
             <para>
-              <xref linkend="Palette_CONSTRAINT_f">Palette</xref>
+              <xref linkend="Palette_CONSTRAINT_c">Palette</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Description_CONSTRAINT_f">Description</xref>
+              <xref linkend="Description_CONSTRAINT_c">Description</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Dialogbox_CONSTRAINT_f">Dialog box</xref>
+              <xref linkend="Dialogbox_CONSTRAINT_c">Dialog box</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Defaultproperties_CONSTRAINT_f">Default properties</xref>
+              <xref linkend="Defaultproperties_CONSTRAINT_c">Default properties</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Interfacingfunction_CONSTRAINT_f">Interfacing function</xref>
+              <xref linkend="Interfacingfunction_CONSTRAINT_c">Interfacing function</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Computationalfunction_CONSTRAINT_f">Computational function</xref>
+              <xref linkend="Computationalfunction_CONSTRAINT_c">Computational function</xref>
             </para>
           </listitem>
           <listitem>
             <para>
-              <xref linkend="Authors_CONSTRAINT_f">Authors</xref>
+              <xref linkend="Authors_CONSTRAINT_c">Authors</xref>
             </para>
           </listitem>
         </itemizedlist>
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Palette_CONSTRAINT_f">
+  <refsection id="Palette_CONSTRAINT_c">
     <title>Palette</title>
     <itemizedlist>
       <listitem>
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Description_CONSTRAINT_f">
+  <refsection id="Description_CONSTRAINT_c">
     <title>Description</title>
     <para>
 Defines implicit algebraic relations.
 
 </para>
   </refsection>
-  <refsection id="Dialogbox_CONSTRAINT_f">
+  <refsection id="Dialogbox_CONSTRAINT_c">
     <title>Dialog box</title>
     <para>
       <inlinemediaobject>
         <imageobject>
-          <imagedata fileref="../../../../images/gui/CONSTRAINT_f_gui.gif" align="center" valign="middle"/>
+          <imagedata fileref="../../../../images/gui/CONSTRAINT_c_gui.gif" align="center" valign="middle"/>
         </imageobject>
       </inlinemediaobject>
     </para>
@@ -124,7 +124,7 @@ Defines implicit algebraic relations.
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Defaultproperties_CONSTRAINT_f">
+  <refsection id="Defaultproperties_CONSTRAINT_c">
     <title>Default properties</title>
     <itemizedlist>
       <listitem>
@@ -178,15 +178,15 @@ Defines implicit algebraic relations.
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Interfacingfunction_CONSTRAINT_f">
+  <refsection id="Interfacingfunction_CONSTRAINT_c">
     <title>Interfacing function</title>
     <itemizedlist>
       <listitem>
-        <para> SCI/modules/scicos_blocks/macros/Misc/CONSTRAINT_f.sci</para>
+        <para> SCI/modules/scicos_blocks/macros/Misc/CONSTRAINT_c.sci</para>
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Computationalfunction_CONSTRAINT_f">
+  <refsection id="Computationalfunction_CONSTRAINT_c">
     <title>Computational function</title>
     <itemizedlist>
       <listitem>
@@ -194,7 +194,7 @@ Defines implicit algebraic relations.
       </listitem>
     </itemizedlist>
   </refsection>
-  <refsection id="Authors_CONSTRAINT_f">
+  <refsection id="Authors_CONSTRAINT_c">
     <title>Authors</title>
     <para><emphasis role="bold">Ramine Nikoukhah</emphasis> - INRIA</para>
   </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 (file)
index 82becc0..0000000
Binary files a/scilab/modules/xcos/help/images/AFFICH_f_gui.gif and /dev/null 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 (file)
index 073bd99..0000000
Binary files a/scilab/modules/xcos/help/images/REGISTER_f_gui.gif and /dev/null 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 (file)
index d0e8f1b..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_gui.gif and /dev/null 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 (file)
index c4b58fe..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img3_fr.gif and /dev/null 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 (file)
index fad3428..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img4_fr.gif and /dev/null 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 (file)
index a30b055..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img5_fr.gif and /dev/null 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 (file)
index 2724a35..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img6_fr.gif and /dev/null 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 (file)
index fc8403c..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img7_fr.gif and /dev/null 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 (file)
index 36bf856..0000000
Binary files a/scilab/modules/xcos/help/images/RFILE_img8_fr.gif and /dev/null 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 (file)
index 8373a7c..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_gui.gif and /dev/null 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 (file)
index ee1a13f..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img2_eng.gif and /dev/null 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 (file)
index ee1a13f..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img2_fr.gif and /dev/null 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 (file)
index c85e785..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img3_eng.gif and /dev/null 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 (file)
index c85e785..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img3_fr.gif and /dev/null 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 (file)
index c5c2ef3..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img4_eng.gif and /dev/null 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 (file)
index c5c2ef3..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img4_fr.gif and /dev/null 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 (file)
index fad3428..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img5_fr.gif and /dev/null 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 (file)
index 36bf856..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img6_eng.gif and /dev/null 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 (file)
index 36bf856..0000000
Binary files a/scilab/modules/xcos/help/images/WFILE_img7_fr.gif and /dev/null 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 (file)
index 82becc0..0000000
Binary files a/scilab/modules/xcos/images/gui/AFFICH_f_gui.gif and /dev/null 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 (file)
index 073bd99..0000000
Binary files a/scilab/modules/xcos/images/gui/REGISTER_f_gui.gif and /dev/null 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 (file)
index d0e8f1b..0000000
Binary files a/scilab/modules/xcos/images/gui/RFILE_gui.gif and /dev/null differ
index 7737ca8..ed2948f 100644 (file)
@@ -57,8 +57,34 @@ function loadXcosLibs()
   listlibsname(listlibsname == 'IntegerOp') = 'Integerop';
   
   if listlibsname <> [] then
-    execline = '[' + strcat(listlibsname + 'lib',', ') + '] = resume(' + strcat(listlibsname + 'lib',', ')+ ');'
-    execstr(execline);
+    resumedLibs = listlibsname + 'lib';
+  else
+    resumedLibs = string([]);
   end
 
+  // Compatibility interface functions
+  function [x,y,typ]=COMPAT_BLOCK(job,arg1,arg2)
+  // Throw an error on block access
+      x=[];y=[];typ=[]
+      if ~exists("arg1") then
+          arg1 = mlist(['Block', "gui"], "COMPAT_BLOCK");
+      end
+      error(msprintf(gettext("%s: the block ""%s"" is no more available, please update the diagram with a compatible one."), "loadXcosLibs", arg1.gui));
+  endfunction
+
+  // removed blocks
+  removed = [
+"AFFICH_f"
+"RFILE"
+"WFILE"];
+  prot = funcprot();
+  funcprot(0);
+  execstr(strcat(removed + "=COMPAT_BLOCK; "));
+  funcprot(prot);
+  
+  resumedBlocks = removed';
+
+  // put all resumed symbols into the parent scope
+  execstr("[" + strcat([resumedLibs resumedBlocks], ", ") + "] = resume(" + strcat([resumedLibs resumedBlocks], ", ") + ");");
 endfunction
+
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 (file)
index 0000000..99ba4fa
--- /dev/null
@@ -0,0 +1,204 @@
+// ============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Clément DAVID
+//
+//  This file is distributed under the same license as the Scilab package.
+// ============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- Short Description -->
+// Check that the simulation function should exists.
+
+loadXcosLibs(); loadScicos();
+
+defaultlibs = ["Branching",
+               "Linear",
+               "Misc",
+               "Sources",
+               "Events",
+               "Integerop",
+               "Matrixop",
+               "Nonlinear",
+               "Sinks",
+               "Threshold"];
+
+defaultlibs  = defaultlibs + "lib";
+notTested = ["SUPER_f", "TEXT_f", "PAL_f", ..     // Specific blocks
+             "SLIDER_f", ..                       // Deprecated blocks
+             "MPBLOCK", "fortran_block", ..       // blocks with code generation
+             "CBLOCK", "scifunc_block", "scifunc_block_m"];
+
+invalidFunctions = unique(gsort(["csuper", "clkfrom", "clkgoto", "delay"]));
+
+funcprot(0);
+ilib_verbose(0);
+
+// Stubbing the x_mdialog method
+// checking it's arguments size only
+function [result]=x_mdialog(title, labelsv, labelsh, default_inputs_vector)
+    [lhs, rhs] = argn();
+    if rhs == 3 then
+        default_inputs_vector = labelsh;
+        result = x_dialog(labelsv, default_inputs_vector);
+    elseif rhs == 4 then
+        vSize = size(labelsv, '*');
+        hSize = size(labelsh, '*');
+        if size(default_inputs_vector) <> [vSize, hSize] then
+            mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
+        result = default_inputs_vector;
+    else
+        mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
+endfunction
+
+// Stubbing the x_dialog method
+// checking it's arguments size only
+function [result]=x_dialog(labels, default_inputs_vector)
+    if(or(size(labels) <> size(default_inputs_vector))) then
+        mprintf("%s\nError: dialog wrong size.", cmd); pause, end;
+    result = default_inputs_vector;
+endfunction
+
+// Stubbing the dialog method
+// checking nothing
+function [result]=x_dialog(labels,default_inputs_vector)
+    result = default_inputs_vector;
+endfunction
+
+// Stubbing the edit_curv method
+function [xx, yy, ok, gc] = edit_curv(xx, yy,  axis, args, gc)
+    ok = %T;
+    if ~exists("gc", 'l') then
+        rect=[0 0 1 1];
+        axisdata=[2 10 2 10];
+        gc = list(rect, axisdata);
+    end
+endfunction
+
+// Stubbing the messagebox method
+function [btn] = messagebox(msg, msgboxtitle, msgboxicon, buttons, ismodal)
+    btn=1;
+endfunction
+
+// Stubbing global scicos flags
+needcompile = 0;
+alreadyran = %f;
+%scicos_context = struct();
+
+BLOCKS = string([]);
+AUTO_SIM = string([]);
+FUNCTIONS = string([]);
+FUNCTIONS_TYPES = [];
+
+// If the following block simulation function does not exists then fail the
+// test.
+for i = 1:size(defaultlibs,"*")
+    [macros, path] = libraryinfo(defaultlibs(i));
+    for j = 1:size(macros,"*")
+        interfunction = macros(j);
+
+        // Not tested blocks (Xcos customs)
+        if or(interfunction == notTested) then
+          continue;
+        end
+
+        // Check for signature
+        vars=macrovar(evstr(interfunction));
+        if or([size(vars(1)) <> [3 1] , size(vars(2)) <> [3 1]]) then
+          mprintf("%s is not a valid block descriptor.\n", interfunction);
+          continue;
+        end
+
+        // New Scilab instance
+        cmd = "scs_m=" + interfunction + "(""define"", [], []);";
+        if execstr(cmd, "errcatch")<>0 then
+            mprintf("%s\n",cmd); pause, end
+        cmd = "scs_m=" + interfunction + "(""set"", scs_m, []);";
+        if execstr(cmd, "errcatch")<>0 then
+            mprintf("%s\n",cmd); pause, end
+
+        // append the simulation
+        sim = scs_m.model.sim;
+        sim_type = [];
+        if typeof(sim) == "string" then
+            sim_type = 0;
+            AUTO_SIM = [AUTO_SIM ; scs_m.gui];
+        elseif typeof(sim) == "list" then
+            sim_type = sim(2);
+            sim = sim(1);
+        else
+            mprintf("%s has an invalid simulation type.\n", interfunction);
+            continue;
+        end
+
+        BLOCKS = [BLOCKS ; scs_m.gui];
+        FUNCTIONS = [FUNCTIONS ; sim];
+        FUNCTIONS_TYPES = [FUNCTIONS_TYPES ; sim_type];
+    end
+end
+clear sim sim_type cmd vars interfunction macros path defaultlibs;
+
+// sort per function type unique functions
+[FUNCTIONS, k] = unique(FUNCTIONS);
+FUNCTIONS_TYPES = FUNCTIONS_TYPES(k);
+BLOCKS = BLOCKS(k);
+[FUNCTIONS_TYPES, k] = gsort(FUNCTIONS_TYPES);
+FUNCTIONS = FUNCTIONS(k);
+BLOCKS = BLOCKS(k);
+clear k;
+
+// remove invalid functions
+ka = grep(FUNCTIONS, invalidFunctions);
+FUNCTIONS(ka) = [];
+FUNCTIONS_TYPES(ka) = [];
+BLOCKS(ka) = [];
+
+// compilation dependant blocks
+if or(FUNCTIONS(find(FUNCTIONS_TYPES < 0)) <> ["ifthel";"eselect"]) then pause, end
+
+// function implementations
+sci_kind = [5 99];
+f_kind = [1 3 1001 10001];
+c_kind = [0 2 4 10004];
+
+// checking scilab blocks
+ka = dsearch(FUNCTIONS_TYPES, sci_kind, 'd') <> 0;
+funs = FUNCTIONS(ka);
+for i=1:size(funs, '*');
+    if type(evstr(funs(i))) <> 13 then pause, end
+end
+
+// checking fortran blocks
+ka = dsearch(FUNCTIONS_TYPES, f_kind, 'd') <> 0;
+funs = FUNCTIONS(ka);
+try
+    link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs, "f");
+catch
+    try
+        for i=1:size(funs, '*')
+            l = link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs(i), "f");
+            ulink(l);
+        end
+    catch
+        disp("Unable to F link : " + funs(i));
+    end
+end
+
+// checking C blocks
+ka = dsearch(FUNCTIONS_TYPES, c_kind, 'd') <> 0;
+funs = FUNCTIONS(ka);
+try
+    link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs, "c");
+catch
+    try
+        for i=1:size(funs, '*')
+            l = link("/home/davidcl/work/branches/5.3/scilab/modules/scicos_blocks/.libs/libsciscicos_blocks.so", funs(i), "c");
+            ulink(l);
+        end
+    catch
+        disp("Unable to C link : " + funs(i));
+    end
+end
+
+clear funs ka;
+