move deff in functions modules
Allan CORNET [Tue, 12 May 2009 13:19:30 +0000 (15:19 +0200)]
24 files changed:
scilab/CHANGES_5.2.X
scilab/modules/core/includes/recursionFunction.h
scilab/modules/core/src/c/recursionFunction.c
scilab/modules/core/src/fortran/command.f
scilab/modules/functions/Makefile.am
scilab/modules/functions/help/en_US/deff.xml [moved from scilab/modules/io/help/en_US/deff.xml with 100% similarity]
scilab/modules/functions/includes/gw_functions.h
scilab/modules/functions/sci_gateway/c/gw_functions.c
scilab/modules/functions/sci_gateway/c/sci_deff.c [moved from scilab/modules/io/sci_gateway/c/sci_deff.c with 83% similarity]
scilab/modules/functions/sci_gateway/fortran/intdeff.f [moved from scilab/modules/io/sci_gateway/fortran/intdeff.f with 100% similarity]
scilab/modules/functions/sci_gateway/functions_gateway.xml
scilab/modules/functions/src/c/LibScilab_Import.def
scilab/modules/functions/src/c/functions.vcproj
scilab/modules/functions/src/fortran/LibScilab_Import.def
scilab/modules/functions/src/fortran/functions_f.vfproj
scilab/modules/functions/src/fortran/functions_f2c.vcproj
scilab/modules/io/Makefile.am
scilab/modules/io/includes/gw_io.h
scilab/modules/io/sci_gateway/c/gw_io.c
scilab/modules/io/sci_gateway/io_gateway.xml
scilab/modules/io/src/c/io.vcproj
scilab/modules/io/src/c/io_f_Import.def
scilab/modules/io/src/fortran/io_f.vfproj
scilab/modules/io/src/fortran/io_f2c.vcproj

index 1b34b24..6a3714d 100644 (file)
@@ -28,7 +28,7 @@ Source reorganisation:
 
 * disp moved in output_stream module.
 
-* lib,comp moved in functions module.
+* lib,comp,deff moved in functions module.
 
 * oldsave, oldload functions (only used with macros of scilab 2.4) are removed
   Replaces oldsave, oldload by save and load in your code.
index ff6824e..4653019 100644 (file)
@@ -37,7 +37,6 @@ typedef enum {
 } recursion_function_called;
 
 #define GW_IO_ID 5
-#define GW_CORE_ID 13
 #define GW_USER_ID 14
 #define GW_USER2_ID 24
 #define GW_FUNCTIONS_ID 31
index d6cabf5..6ee83fb 100644 (file)
@@ -60,8 +60,7 @@ int getRecursionGatewayToCall(void)
                        break;
                case RECURSION_CALL_DEFF:
                        /* see deff (intdeff.f) */
-                       /* call comp by fun & fin */
-                       gw = GW_IO_ID; /* gw_io */
+                       gw = GW_FUNCTIONS_ID; /* gw_functions */
                        break;
                case RECURSION_CALL_DISP:
                        /* see disp (intdisp.f) */
index b2ec536..8121b15 100644 (file)
@@ -495,8 +495,8 @@ c     . add an third argument to deff, to notify that it is called by function
          rhs=3
          lhs=1
 c         *call* deff
-         fun=5
-         fin=10
+         fun=31
+         fin=3
          go to 999
       endif
 
index b84b623..34567ca 100644 (file)
@@ -9,10 +9,12 @@ FUNCTIONS__FORTRAN_SOURCES =
 
 GATEWAY_C_SOURCES = sci_gateway/c/gw_functions.c \
 sci_gateway/c/sci_lib.c \
-sci_gateway/c/sci_comp.c
+sci_gateway/c/sci_comp.c \
+sci_gateway/c/sci_deff.c \
 
 GATEWAY_FORTRAN_SOURCES =  sci_gateway/fortran/intlib.f \
-sci_gateway/fortran/sci_comp.f
+sci_gateway/fortran/sci_comp.f \
+sci_gateway/fortran/intdeff.f
 
 
 libscifunctions_la_CFLAGS=             -I$(srcdir)/includes/ \
index ae3b1aa..a2f450d 100644 (file)
@@ -21,6 +21,7 @@ int gw_functions(void);
 /*--------------------------------------------------------------------------*/
 int C2F(sci_lib)(char *fname,unsigned long fname_len);
 int C2F(sci_comp)(char *fname,unsigned long fname_len);
+int C2F(sci_deff)(char *fname,unsigned long fname_len);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_FUNCTIONS_H__ */
 /*--------------------------------------------------------------------------*/
index 8ec39d4..1d3c8d3 100644 (file)
@@ -20,7 +20,8 @@
 static gw_generic_table Tab[]=
 {
        {C2F(sci_lib),"lib"},
-       {C2F(sci_comp),"comp"}
+       {C2F(sci_comp),"comp"},
+       {C2F(sci_deff),"deff"}
 };
 /*--------------------------------------------------------------------------*/
 int gw_functions(void)
@@ -37,6 +38,18 @@ int gw_functions(void)
                        /* We call "comp" */
                        Fin = 2;
                }
+               else
+               {
+                       switch ( getRecursionFunctionToCall() )
+                       {
+                               case RECURSION_CALL_DEFF:
+                                       #define deff_fname "deff"
+                                       C2F(sci_deff)(deff_fname,strlen(deff_fname));
+                                       return 0;
+                               default:
+                                       return 0;
+                       }
+               }
        }
        
        callFunctionFromGateway(Tab);
@@ -10,7 +10,9 @@
  *
  */
 
-#include "gw_io.h"
+#include "gw_functions.h"
+/*--------------------------------------------------------------------------*/
+extern int C2F(intdeff)();
 /*--------------------------------------------------------------------------*/
 int C2F(sci_deff)(char *fname,unsigned long fname_len)
 {
index 4a85378..c149114 100644 (file)
@@ -32,4 +32,5 @@
 <GATEWAY name="functions">
 <PRIMITIVE gatewayId="31" primitiveId="1" primitiveName="lib" />
 <PRIMITIVE gatewayId="31" primitiveId="2" primitiveName="comp" />
+<PRIMITIVE gatewayId="31" primitiveId="3" primitiveName="deff" />
 </GATEWAY>
index b3dc40c..8bc3668 100644 (file)
@@ -7,4 +7,5 @@ com_
 callFunctionFromGateway
 getRecursionGatewayToCall
 isRecursionCallToFunction
+getRecursionFunctionToCall
 ;
index 1d84fdb..3509097 100644 (file)
                                >
                        </File>
                        <File
+                               RelativePath="..\..\sci_gateway\c\sci_deff.c"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\..\sci_gateway\c\sci_lib.c"
                                >
                        </File>
index 289983a..f8ef9db 100644 (file)
@@ -20,7 +20,9 @@ ref2val_
 checkrhs_
 checklhs_
 getscalar_
-
+getfun_
+cremat_
 ; elementary_functions
 isort_
-iset_
\ No newline at end of file
+iset_
+unsfdcopy_
\ No newline at end of file
index 43a8b12..544f740 100644 (file)
@@ -80,6 +80,7 @@ lib /DEF:&quot;$(InputDir)string_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X6
                <Filter Name="Header Files" Filter="fi;fd"/>
                <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
                <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+               <File RelativePath="..\..\sci_gateway\fortran\intdeff.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\intlib.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_comp.f"/></Filter>
                <File RelativePath="..\..\..\..\bin\blasplus.lib"/>
index a3293a6..4cd66fb 100644 (file)
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
+                               RelativePath="..\..\sci_gateway\fortran\intdeff.c"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\..\sci_gateway\fortran\intlib.c"
                                >
                        </File>
                        Name="Fortran files"
                        >
                        <File
+                               RelativePath="..\..\sci_gateway\fortran\intdeff.f"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\..\sci_gateway\fortran\intlib.f"
                                >
                        </File>
index bd76ff0..c2637fc 100644 (file)
@@ -16,7 +16,6 @@ src/fortran/writebuf.f
 
 GATEWAY_C_SOURCES = sci_gateway/c/sci_execstr.c \
 sci_gateway/c/sci_read4b.c \
-sci_gateway/c/sci_deff.c \
 sci_gateway/c/sci_getio.c \
 sci_gateway/c/sci_readb.c \
 sci_gateway/c/sci_host.c \
@@ -49,7 +48,6 @@ sci_gateway/fortran/intrat.f \
 sci_gateway/fortran/intwritb.f \
 sci_gateway/fortran/intwrite.f \
 sci_gateway/fortran/intread4b.f \
-sci_gateway/fortran/intdeff.f \
 sci_gateway/fortran/intread.f \
 sci_gateway/fortran/intexecstr.f \
 sci_gateway/fortran/intreadb.f \
index d9ac9cf..cc2c2b9 100644 (file)
@@ -20,11 +20,9 @@ int gw_io(void);
 int C2F(sci_read)(char *fname,unsigned long fname_len);
 int C2F(sci_getf)(char *fname,unsigned long fname_len);
 int C2F(sci_exec)(char *fname,unsigned long fname_len);
-
 int C2F(sci_diary)(char *fname,unsigned long fname_len);
 int C2F(sci_oldsave)(char *fname,unsigned long fname_len);
 int C2F(sci_write)(char *fname,unsigned long fname_len);
-int C2F(sci_deff)(char *fname,unsigned long fname_len);
 int C2F(sci_rat)(char *fname,unsigned long fname_len);
 int C2F(sci_file)(char *fname,unsigned long fname_len);
 int C2F(sci_host)(char *fname,unsigned long fname_len);
@@ -48,7 +46,6 @@ int C2F(intexec) (char *fname,unsigned long fname_len);
 int C2F(intgetf)(void);
 int C2F(intsave)(void);
 int C2F(intdiary)(void);
-int C2F(intdeff)(void);
 int C2F(intfile)(void);
 int C2F(intmgetl)(void);
 int C2F(intrat)(void);
@@ -58,7 +55,6 @@ int C2F(intreadb)(void);
 int C2F(intwrite)(void);
 int C2F(intwrite4b)(void);
 int C2F(intwritb)(void);
-
 int sci_export_to_hdf5(char *fname,unsigned long fname_len);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_IO_H__ */
index 6b2c8dd..9e06b26 100644 (file)
@@ -26,7 +26,7 @@ static gw_generic_table Tab[]=
 {C2F(sci_mgetl),"mgetl"},
 {C2F(sci_write),"write"},
 {C2F(sci_rat),"rat"},
-{C2F(sci_deff),"deff"},
+{sci_export_to_hdf5,"export_to_hdf5"},
 {C2F(sci_file),"file"},
 {C2F(sci_host),"host"},
 {C2F(sci_unix),"unix"},
@@ -38,8 +38,7 @@ static gw_generic_table Tab[]=
 {C2F(sci_read4b),"read4b"},
 {C2F(sci_write4b),"write4b"},
 {C2F(sci_save),"save"},
-{C2F(sci_load),"load"},
-{sci_export_to_hdf5,"export_to_hdf5"}
+{C2F(sci_load),"load"}
 };
 /*--------------------------------------------------------------------------*/
 int gw_io(void)
index 93257d6..afce936 100644 (file)
@@ -44,7 +44,7 @@
 <PRIMITIVE gatewayId="5" primitiveId="7" primitiveName="mgetl" />
 <PRIMITIVE gatewayId="5" primitiveId="8" primitiveName="write" />
 <PRIMITIVE gatewayId="5" primitiveId="9" primitiveName="rat" />
-<PRIMITIVE gatewayId="5" primitiveId="10" primitiveName="deff" />
+<PRIMITIVE gatewayId="5" primitiveId="10" primitiveName="export_to_hdf5" />
 <PRIMITIVE gatewayId="5" primitiveId="11" primitiveName="file" />
 <PRIMITIVE gatewayId="5" primitiveId="12" primitiveName="host" />
 <PRIMITIVE gatewayId="5" primitiveId="13" primitiveName="unix" />
@@ -57,5 +57,5 @@
 <PRIMITIVE gatewayId="5" primitiveId="20" primitiveName="write4b" />
 <PRIMITIVE gatewayId="5" primitiveId="21" primitiveName="save" />
 <PRIMITIVE gatewayId="5" primitiveId="22" primitiveName="load" />
-<PRIMITIVE gatewayId="5" primitiveId="23" primitiveName="export_to_hdf5" />
+
 </GATEWAY>
\ No newline at end of file
index 7587962..f14a503 100644 (file)
                                >
                        </File>
                        <File
-                               RelativePath="..\..\sci_gateway\c\sci_deff.c"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\..\sci_gateway\c\sci_diary.c"
                                >
                        </File>
index 9a1da5f..6e786e6 100644 (file)
@@ -10,7 +10,6 @@ intsave_
 intgetf_
 intexecstr_
 intexec_
-intdeff_
 intfile_
 intmgetl_
 intrat_
index e4047a4..c4bb0a5 100644 (file)
@@ -76,7 +76,6 @@ lib /DEF:&quot;$(InputDir)output_stream_f_Import.def&quot; /SUBSYSTEM:WINDOWS /M
                <Filter Name="Header Files" Filter="fi;fd"/>
                <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
                <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
-               <File RelativePath="..\..\sci_gateway\fortran\intdeff.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\intexec.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\intexecstr.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\intfile.f"/>
index 527daef..06ba955 100644 (file)
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
-                               RelativePath="..\..\sci_gateway\fortran\intdeff.c"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\..\sci_gateway\fortran\intexec.c"
                                >
                        </File>
                        Name="Fortran files"
                        >
                        <File
-                               RelativePath="..\..\sci_gateway\fortran\intdeff.f"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\..\sci_gateway\fortran\intexec.f"
                                >
                        </File>