1 /*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) INRIA
4 *
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 *
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
13 *
14 */
15
16 #include "GetFunctionByName.h"
17 #include "dynlib_signal_processing.h"
18 #include "machine.h"
19 /***********************************
20 * corr ( dgetx dgety )
21 ***********************************/
22
23 #define ARGS_dgetx double *,int*,int*
24 typedef void (*dgetxf)(ARGS_dgetx);
25
26 #define ARGS_dgety double *,int*,int*
27 typedef void (*dgetyf)(ARGS_dgety);
28
29
30 /**************** dgetx ***************/
31 extern void C2F(corexx)(ARGS_dgetx);
32 SIGNAL_PROCESSING_IMPEXP void C2F(dgetx)(ARGS_dgetx);
33 SIGNAL_PROCESSING_IMPEXP void C2F(setdgetx)(char *name, int *rep);
34
35 FTAB FTab_dgetx[] =
36 {
37 {"corexx", (voidf) C2F(corexx)},
38 {(char *) 0, (voidf) 0}
39 };
40
41 /**************** dgety ***************/
42 extern void C2F(corexy)(ARGS_dgety);
43 SIGNAL_PROCESSING_IMPEXP void C2F(dgety)(ARGS_dgety);
44 SIGNAL_PROCESSING_IMPEXP void C2F(setdgety)(char *name, int *rep);
45
46 FTAB FTab_dgety[] =
47 {
48 {"corexy", (voidf) C2F(corexy)},
49 {(char *) 0, (voidf) 0}
50 };
51
52 /***********************************
53 * Search Table for corr
54 * corr uses two externals : dgetx and dgety
55 ***********************************/
56
57 /** the current function fixed by setdgetx **/
58
59
60 static dgetxf dgetxfonc ;
61
62 /** function call **/
63
C2F(dgetx)64 void C2F(dgetx)(double *x, int *incr, int *istart)
65 {
66 (*dgetxfonc)(x, incr, istart);
67 }
68
69 /** fixes the function associated to name **/
70
C2F(setdgetx)71 void C2F(setdgetx)(char *name, int *rep)
72 {
73 dgetxfonc = (dgetxf) GetFunctionByName(name, rep, FTab_dgetx);
74 }
75
76
77 /** the current function fixed by setdgety **/
78
79 static dgetyf dgetyfonc ;
80
C2F(dgety)81 void C2F(dgety)(double *y, int *incr, int *istart)
82 {
83 (*dgetyfonc)(y, incr, istart);
84 }
85
86
87 /** fixes the function associated to name **/
88
C2F(setdgety)89 void C2F(setdgety)(char *name, int *rep)
90 {
91 dgetyfonc = (dgetyf) GetFunctionByName(name, rep, FTab_dgety);
92 }
93
94