Scicos Clean: Delete permutobj function. 82/4582/2
Bruno JOFRET [Mon, 25 Jul 2011 08:59:37 +0000 (10:59 +0200)]
Change-Id: I3c10fb943a5f1ad6ac2b0d7039d0032e4c123bba

scilab/modules/helptools/data/configuration/scilab_primitives.txt
scilab/modules/scicos/Makefile.am
scilab/modules/scicos/Makefile.in
scilab/modules/scicos/includes/gw_scicos.h
scilab/modules/scicos/sci_gateway/c/gw_scicos.c
scilab/modules/scicos/sci_gateway/c/sci_permutobj.c [deleted file]
scilab/modules/scicos/sci_gateway/scicos_gateway.xml
scilab/modules/scicos/src/c/scicos.vcxproj
scilab/modules/scicos/src/c/scicos.vcxproj.filters
scilab/modules/scicos_blocks/includes/scoMisc.h
scilab/modules/scicos_blocks/src/c/scoMisc.c

index 54f3377..3fcbe27 100644 (file)
@@ -79,7 +79,6 @@ sci_gateway/c/sci_getscicosvars.c \
 sci_gateway/c/sci_haltscicos.c \
 sci_gateway/c/sci_loadScicos.c \
 sci_gateway/c/sci_model2blk.c \
-sci_gateway/c/sci_permutobj.c \
 sci_gateway/c/sci_phase_simulation.c \
 sci_gateway/c/sci_pointer_xproperty.c \
 sci_gateway/c/sci_scicos_debug.c \
@@ -132,7 +131,7 @@ libsciscicos_algo_la_CFLAGS = $(libsciscicos_la_CFLAGS)
 
 # For the code check (splint)
 CHECK_SRC= $(SCICOS_C_SOURCES) $(GATEWAY_C_SOURCES)
-INCLUDE_FLAGS = $(libsciscicos_la_CFLAGS) 
+INCLUDE_FLAGS = $(libsciscicos_la_CFLAGS)
 
 libsciscicos_la_LIBADD = libsciscicos-algo.la $(top_builddir)/modules/string/libscistring.la \
 $(top_builddir)/modules/mexlib/libmat.la \
@@ -148,11 +147,11 @@ $(top_builddir)/modules/mexlib/libmex.la \
  \
 $(top_builddir)/libs/MALLOC/libscimalloc.la \
 $(top_builddir)/modules/output_stream/libscioutput_stream.la \
-$(top_builddir)/modules/arnoldi/libsciarnoldi.la 
+$(top_builddir)/modules/arnoldi/libsciarnoldi.la
 
 #### scicos : Conf files ####
 libsciscicos_la_rootdir = $(mydatadir)
-libsciscicos_la_root_DATA =  license.txt 
+libsciscicos_la_root_DATA =  license.txt
 
 
 #### scicos : init scripts ####
index a8192bf..78a8f08 100644 (file)
@@ -201,7 +201,7 @@ am__libsciscicos_la_SOURCES_DIST = src/c/noscicos/noscicos.c \
        sci_gateway/c/sci_getblocklabel.c \
        sci_gateway/c/sci_getscicosvars.c \
        sci_gateway/c/sci_haltscicos.c sci_gateway/c/sci_loadScicos.c \
-       sci_gateway/c/sci_model2blk.c sci_gateway/c/sci_permutobj.c \
+       sci_gateway/c/sci_model2blk.c \
        sci_gateway/c/sci_phase_simulation.c \
        sci_gateway/c/sci_pointer_xproperty.c \
        sci_gateway/c/sci_scicos_debug.c \
@@ -242,7 +242,6 @@ am__libsciscicos_la_SOURCES_DIST = src/c/noscicos/noscicos.c \
 @XCOS_TRUE@    libsciscicos_la-sci_haltscicos.lo \
 @XCOS_TRUE@    libsciscicos_la-sci_loadScicos.lo \
 @XCOS_TRUE@    libsciscicos_la-sci_model2blk.lo \
-@XCOS_TRUE@    libsciscicos_la-sci_permutobj.lo \
 @XCOS_TRUE@    libsciscicos_la-sci_phase_simulation.lo \
 @XCOS_TRUE@    libsciscicos_la-sci_pointer_xproperty.lo \
 @XCOS_TRUE@    libsciscicos_la-sci_scicos_debug.lo \
@@ -881,7 +880,6 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 @XCOS_TRUE@sci_gateway/c/sci_haltscicos.c \
 @XCOS_TRUE@sci_gateway/c/sci_loadScicos.c \
 @XCOS_TRUE@sci_gateway/c/sci_model2blk.c \
-@XCOS_TRUE@sci_gateway/c/sci_permutobj.c \
 @XCOS_TRUE@sci_gateway/c/sci_phase_simulation.c \
 @XCOS_TRUE@sci_gateway/c/sci_pointer_xproperty.c \
 @XCOS_TRUE@sci_gateway/c/sci_scicos_debug.c \
@@ -937,7 +935,7 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 
 # For the code check (splint)
 @XCOS_TRUE@CHECK_SRC = $(SCICOS_C_SOURCES) $(GATEWAY_C_SOURCES)
-@XCOS_TRUE@INCLUDE_FLAGS = $(libsciscicos_la_CFLAGS) 
+@XCOS_TRUE@INCLUDE_FLAGS = $(libsciscicos_la_CFLAGS)
 @XCOS_TRUE@libsciscicos_la_LIBADD = libsciscicos-algo.la $(top_builddir)/modules/string/libscistring.la \
 @XCOS_TRUE@$(top_builddir)/modules/mexlib/libmat.la \
 @XCOS_TRUE@$(top_builddir)/modules/mexlib/libmx.la \
@@ -952,12 +950,12 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 @XCOS_TRUE@ \
 @XCOS_TRUE@$(top_builddir)/libs/MALLOC/libscimalloc.la \
 @XCOS_TRUE@$(top_builddir)/modules/output_stream/libscioutput_stream.la \
-@XCOS_TRUE@$(top_builddir)/modules/arnoldi/libsciarnoldi.la 
+@XCOS_TRUE@$(top_builddir)/modules/arnoldi/libsciarnoldi.la
 
 
 #### scicos : Conf files ####
 @XCOS_TRUE@libsciscicos_la_rootdir = $(mydatadir)
-@XCOS_TRUE@libsciscicos_la_root_DATA = license.txt 
+@XCOS_TRUE@libsciscicos_la_root_DATA = license.txt
 
 #### scicos : init scripts ####
 @XCOS_FALSE@libsciscicos_la_etcdir = $(mydatadir)/etc
@@ -1224,7 +1222,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_haltscicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_loadScicos.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_model2blk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_permutobj.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_phase_simulation.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_pointer_xproperty.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscicos_la-sci_scicos_debug.Plo@am__quote@
@@ -1548,13 +1545,6 @@ libsciscicos_la-sci_model2blk.lo: sci_gateway/c/sci_model2blk.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_la_CFLAGS) $(CFLAGS) -c -o libsciscicos_la-sci_model2blk.lo `test -f 'sci_gateway/c/sci_model2blk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_model2blk.c
 
-libsciscicos_la-sci_permutobj.lo: sci_gateway/c/sci_permutobj.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_la_CFLAGS) $(CFLAGS) -MT libsciscicos_la-sci_permutobj.lo -MD -MP -MF $(DEPDIR)/libsciscicos_la-sci_permutobj.Tpo -c -o libsciscicos_la-sci_permutobj.lo `test -f 'sci_gateway/c/sci_permutobj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_permutobj.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libsciscicos_la-sci_permutobj.Tpo $(DEPDIR)/libsciscicos_la-sci_permutobj.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_permutobj.c' object='libsciscicos_la-sci_permutobj.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_la_CFLAGS) $(CFLAGS) -c -o libsciscicos_la-sci_permutobj.lo `test -f 'sci_gateway/c/sci_permutobj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_permutobj.c
-
 libsciscicos_la-sci_phase_simulation.lo: sci_gateway/c/sci_phase_simulation.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscicos_la_CFLAGS) $(CFLAGS) -MT libsciscicos_la-sci_phase_simulation.lo -MD -MP -MF $(DEPDIR)/libsciscicos_la-sci_phase_simulation.Tpo -c -o libsciscicos_la-sci_phase_simulation.lo `test -f 'sci_gateway/c/sci_phase_simulation.c' || echo '$(srcdir)/'`sci_gateway/c/sci_phase_simulation.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libsciscicos_la-sci_phase_simulation.Tpo $(DEPDIR)/libsciscicos_la-sci_phase_simulation.Plo
index 8ccd258..7517422 100644 (file)
@@ -58,7 +58,6 @@ SCICOS_IMPEXP int sci_scicosim(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_getscicosvars(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_curblockc(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_buildouttb(char *fname,unsigned long fname_len);
-SCICOS_IMPEXP int sci_permutobj(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_end_scicosim(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_haltscicos(char *fname,unsigned long fname_len);
 SCICOS_IMPEXP int sci_coserror(char *fname, unsigned long fname_len);
index c4b1028..049655e 100644 (file)
@@ -30,7 +30,7 @@
 
 
 /*--------------------------------------------------------------------------*/
-static gw_generic_table Tab[] = 
+static gw_generic_table Tab[] =
 {
        {sci_var2vec,"var2vec"},
        {sci_vec2var,"vec2var"},
@@ -56,7 +56,6 @@ static gw_generic_table Tab[] =
        {sci_getscicosvars,"getscicosvars"},
        {sci_curblockc,"curblockc"},
        {sci_buildouttb,"buildouttb"},
-       {sci_permutobj,"permutobj"},
        {sci_end_scicosim,"end_scicosim"},
        {sci_coserror, "coserror"},
        {sci_haltscicos, "sci_haltscicos"},
diff --git a/scilab/modules/scicos/sci_gateway/c/sci_permutobj.c b/scilab/modules/scicos/sci_gateway/c/sci_permutobj.c
deleted file mode 100644 (file)
index 532960b..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*  Scicos
-*
-*  Copyright (C) INRIA - Allan CORNET
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-* See the file ./license.txt
-*/
-
-/*--------------------------------------------------------------------------*/
-#include "gw_scicos.h"
-#include "stack-c.h"
-#include "HandleManagement.h" /* sciGetPointerFromHandle */
-#include "Scierror.h"
-#include "scoMisc.h"
-#include "localization.h"
-/*--------------------------------------------------------------------------*/
-/* permutobj : concurrent version
-* of swap_handles for scicos editor.
-*
-* Copyright INRIA
-* A. Layec/S. Mannori - 13/12/06
-*/
-
-
-/* intpermutobj_c
-*
-* -->permutobj(hdl1,hdl2);
-*
-* exchange graphicals objects
-* of two children handles
-*
-* hdl1,hdl2 : valid children handles
-*             in valid parent handle(s)
-*
-* no outputs
-*
-* Alan-02/12/06, initial rev.
-*/
-int sci_permutobj(char *fname,unsigned long fname_len)
-{
-       /*local variables declaration*/
-       unsigned long hdl_1, hdl_2;
-       sciPointObj *pobj_1 = NULL, *pparent_1 = NULL;
-       sciPointObj *pobj_2 = NULL, * pparent_2 = NULL;
-       static int m1 = 0, n1 = 0, l1 = 0;
-       static int m2 = 0, n2 = 0, l2 = 0;
-
-       /*check number of rhs parameters*/
-       CheckRhs(2,2);
-
-       /*get/check rhs 1*/
-       GetRhsVar(1, GRAPHICAL_HANDLE_DATATYPE,&m1,&n1,&l1);
-       if ( m1!=1 || n1!=1 ) 
-       {
-               Scierror(999,_("%s : Bad size for Rhs(1).\n"),fname);
-               return 0; 
-       }
-       hdl_1 = (unsigned long)*hstk(l1);
-       pobj_1 = sciGetPointerFromHandle(hdl_1);
-       if (pobj_1 == NULL) 
-       {
-               Scierror(999,_("%s :the handle is not or no more valid.\n"),fname);
-               return 0; 
-       }
-       pparent_1 = sciGetParentSubwin(pobj_1);
-
-       /*get/check rhs 2*/
-       GetRhsVar(2, GRAPHICAL_HANDLE_DATATYPE,&m2,&n2,&l2);
-       if (m2!=1 || n2!=1) 
-       {
-               Scierror(999,_("%s : Bad size for Rhs(2).\n"),fname);
-               return 0; 
-       }
-       hdl_2 = (unsigned long)*hstk(l2);
-       pobj_2 = sciGetPointerFromHandle(hdl_2);
-       if (pobj_2 == NULL) 
-       {
-               Scierror(999,_("%s :the handle is not or no more valid.\n"),fname);
-               return 0; 
-       }
-       pparent_2 = sciGetParentSubwin(pobj_2);
-
-       /*call permutobj*/
-       permutobj(pobj_1,pparent_1,pobj_2,pparent_2);
-
-       C2F(putlhsvar)();
-       /* end */
-       return 0;
-}
-/*--------------------------------------------------------------------------*/ 
index e9e7b5b..447786f 100644 (file)
 <PRIMITIVE gatewayId="45" primitiveId="22" primitiveName="getscicosvars" />
 <PRIMITIVE gatewayId="45" primitiveId="23" primitiveName="curblockc" />
 <PRIMITIVE gatewayId="45" primitiveId="24" primitiveName="buildouttb" />
-<PRIMITIVE gatewayId="45" primitiveId="25" primitiveName="permutobj" />
-<PRIMITIVE gatewayId="45" primitiveId="26" primitiveName="end_scicosim" />
-<PRIMITIVE gatewayId="45" primitiveId="27" primitiveName="coserror" />
-<PRIMITIVE gatewayId="45" primitiveId="28" primitiveName="sci_haltscicos" />
-  <!-- =================== -->  
-<PRIMITIVE gatewayId="45" primitiveId="29" primitiveName="data2sig" />
-<PRIMITIVE gatewayId="45" primitiveId="30" primitiveName="sig2data" />
-<PRIMITIVE gatewayId="45" primitiveId="31" primitiveName="model2blk" />
-<PRIMITIVE gatewayId="45" primitiveId="32" primitiveName="callblk" />
+<PRIMITIVE gatewayId="45" primitiveId="25" primitiveName="end_scicosim" />
+<PRIMITIVE gatewayId="45" primitiveId="26" primitiveName="coserror" />
+<PRIMITIVE gatewayId="45" primitiveId="27" primitiveName="sci_haltscicos" />
   <!-- =================== -->
-<PRIMITIVE gatewayId="45" primitiveId="33" primitiveName="loadScicos" />
+<PRIMITIVE gatewayId="45" primitiveId="28" primitiveName="data2sig" />
+<PRIMITIVE gatewayId="45" primitiveId="29" primitiveName="sig2data" />
+<PRIMITIVE gatewayId="45" primitiveId="30" primitiveName="model2blk" />
+<PRIMITIVE gatewayId="45" primitiveId="31" primitiveName="callblk" />
+  <!-- =================== -->
+<PRIMITIVE gatewayId="45" primitiveId="32" primitiveName="loadScicos" />
 </GATEWAY>
index 384958f..9d0c99f 100644 (file)
@@ -324,7 +324,6 @@ lib /DEF:"$(ProjectDir)Localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
     <ClCompile Include="..\..\sci_gateway\c\sci_getscicosvars.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_haltscicos.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_model2blk.c" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_permutobj.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_phase_simulation.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_pointer_xproperty.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_scicos_debug.c" />
index 22ee907..662975d 100644 (file)
     <ClCompile Include="..\..\sci_gateway\c\sci_model2blk.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_permutobj.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\sci_phase_simulation.c">
       <Filter>Source Files</Filter>
     </ClCompile>
index 7df547a..f7d79fe 100755 (executable)
@@ -23,7 +23,7 @@
 \author Benoit Bayol
 \version 1.0
 \date September 2006 - January 2007
-\brief Header File of the scoMisc.c file 
+\brief Header File of the scoMisc.c file
 */
 
 #ifndef __SCO_MISC_H__
@@ -39,8 +39,4 @@
 */
 SCICOS_BLOCKS_IMPEXP void scoScopeError(ScopeMemory * pScopeMemory, int code_error);
 
-/**
-*/
-SCICOS_BLOCKS_IMPEXP int permutobj(sciPointObj *pobj_1, sciPointObj *pparent_1,
-                         sciPointObj *pobj_2, sciPointObj *pparent_2);
 #endif
index f940178..07c366d 100755 (executable)
@@ -18,7 +18,7 @@
 *
 * See the file ./license.txt
 */
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 /**
    \file scoMisc.c
    \author Benoit Bayol
@@ -26,7 +26,7 @@
    \date September 2006 - January 2007
    \brief Source Code for Misc function (not only for the sco lib)
 */
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 #include "scoBase.h"
 #include "scoMisc.h"
 #include "scoGetProperty.h"
@@ -36,7 +36,7 @@
 #include "scicos.h"
 #include "scicos_block4.h"
 #include "localization.h"
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 void scoScopeError(ScopeMemory * pScopeMemory, int code_error)
 {
 
@@ -65,25 +65,4 @@ void scoScopeError(ScopeMemory * pScopeMemory, int code_error)
 
        set_block_error(-16);
 }
-
-/*--------------------------------------------------------------------------*/ 
-/* permut pobj_1/pobj_2 ptrs coming from
-* pparent_1/pparent_2 hdl(s)
-*/
-int permutobj(sciPointObj *pobj_1, sciPointObj *pparent_1,
-                         sciPointObj *pobj_2, sciPointObj *pparent_2)
-{
-       sciSons *OneSon, *OneSon2;
-
-       OneSon=(sciGetRelationship (pparent_1)->psons);
-       while (OneSon->pointobj!=pobj_1)
-               OneSon=(sciSons *)OneSon->pnext;
-       OneSon2=(sciGetRelationship (pparent_2)->psons);
-       while (OneSon2->pointobj!=pobj_2)
-               OneSon2=(sciSons *)OneSon2->pnext;
-       OneSon->pointobj=pobj_2;
-       OneSon2->pointobj=pobj_1;
-
-       return 0;
-}
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/