summaryrefslogtreecommitdiffstats
path: root/scilab/modules/symbolic/sci_gateway
diff options
context:
space:
mode:
authorAllan Cornet <allan.cornet@scilab.org>2007-07-03 14:26:06 +0000
committerAllan Cornet <allan.cornet@scilab.org>2007-07-03 14:26:06 +0000
commit434765cacba78f0c3a5b1a4e027962b0ccbef4cc (patch)
treedd7bc66f110d77864fd11571c2700e5759823070 /scilab/modules/symbolic/sci_gateway
parente222c458d431fffce6c3e42b633157bc83170265 (diff)
downloadscilab-434765cacba78f0c3a5b1a4e027962b0ccbef4cc.zip
scilab-434765cacba78f0c3a5b1a4e027962b0ccbef4cc.tar.gz
gateways calls callFunctionFromGateway (factorized code)
Diffstat (limited to 'scilab/modules/symbolic/sci_gateway')
-rw-r--r--scilab/modules/symbolic/sci_gateway/c/gw_symbolic.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/scilab/modules/symbolic/sci_gateway/c/gw_symbolic.c b/scilab/modules/symbolic/sci_gateway/c/gw_symbolic.c
index 31e68bc..e9041d7 100644
--- a/scilab/modules/symbolic/sci_gateway/c/gw_symbolic.c
+++ b/scilab/modules/symbolic/sci_gateway/c/gw_symbolic.c
@@ -3,21 +3,11 @@
3/* Allan CORNET */ 3/* Allan CORNET */
4/*-----------------------------------------------------------------------------------*/ 4/*-----------------------------------------------------------------------------------*/
5#include <string.h> 5#include <string.h>
6#ifdef _MSC_VER
7#include <Windows.h>
8#include "ExceptionMessage.h"
9#endif
10#include "gw_symbolic.h" 6#include "gw_symbolic.h"
11#include "stack-c.h" 7#include "stack-c.h"
8#include "callFunctionFromGateway.h"
12/*-----------------------------------------------------------------------------------*/ 9/*-----------------------------------------------------------------------------------*/
13typedef int (*Symbolic_Interf) __PARAMS((char *fname,unsigned long l)); 10static gw_generic_table Tab[]=
14typedef struct table_struct
15{
16 Symbolic_Interf f; /** function **/
17 char *name; /** its name **/
18} SymbolicTable;
19/*-----------------------------------------------------------------------------------*/
20static SymbolicTable Tab[]=
21{ 11{
22{C2F(sci_addf),"addf"}, 12{C2F(sci_addf),"addf"},
23{C2F(sci_subf),"subf"}, 13{C2F(sci_subf),"subf"},
@@ -33,22 +23,7 @@ int C2F(gw_symbolic)()
33 Scierror(39,"incorrect number of arguments.\r\n"); 23 Scierror(39,"incorrect number of arguments.\r\n");
34 return 0; 24 return 0;
35 } 25 }
36#ifdef _MSC_VER 26 callFunctionFromGateway(Tab);
37 #ifndef _DEBUG
38 _try
39 {
40 (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
41 }
42 _except (EXCEPTION_EXECUTE_HANDLER)
43 {
44 ExceptionMessage(GetExceptionCode(),Tab[Fin-1].name);
45 }
46 #else
47 (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
48 #endif
49#else
50 (*(Tab[Fin-1].f)) (Tab[Fin-1].name,(unsigned long)strlen(Tab[Fin-1].name));
51#endif
52 return 0; 27 return 0;
53} 28}
54/*-----------------------------------------------------------------------------------*/ 29/*-----------------------------------------------------------------------------------*/