summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordetailer-asus2021-05-10 16:38:05 +0530
committerdetailer-asus2021-05-10 16:38:05 +0530
commitbf2b3beb7018689ade9e360e0960a8139fb8b863 (patch)
tree5dd9bc9f68f604f3e9aa5ffb675761a210ea91c3
parent9823e5d01e95094cb72d15cd44716a5a57e1dec7 (diff)
downloadfossee-scilab-octave-toolbox-bf2b3beb7018689ade9e360e0960a8139fb8b863.tar.gz
fossee-scilab-octave-toolbox-bf2b3beb7018689ade9e360e0960a8139fb8b863.tar.bz2
fossee-scilab-octave-toolbox-bf2b3beb7018689ade9e360e0960a8139fb8b863.zip
added FUNCSTRUCT to store structure I/O
-rw-r--r--src/fun.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/fun.h b/src/fun.h
index e5e1fff..7336957 100644
--- a/src/fun.h
+++ b/src/fun.h
@@ -15,35 +15,50 @@
extern "C"
{
- typedef enum
- {
+ typedef enum {
TYPE_DOUBLE,
+ TYPE_COMPLEX,
TYPE_STRING,
+ TYPE_STRUCT,
}FUNCTYPE;
- typedef struct
- {
+ typedef struct {
+ FUNCTYPE type; // type of value in struct's field
+ void* key; // key of struct field
+ int rows; // rows dimension of struct field's value
+ int cols; // cols dimension of struct fields' value
+ void* dataReal; // Real data if struct field's value is real
+ void* dataImg; // Img data if struct field's value is complex
+ void* str; // string data if struct field's value is string
+ } FUNCSTRUCT;
+
+ typedef struct {
FUNCTYPE type;
int n_in_rows;
int n_in_cols;
+ int n_in_struct_len; // ip struct length
int n_out_rows;
int n_out_cols;
+ int n_out_struct_len; // op struct length
int is_in_cmplx;
int is_out_cmplx;
+ int is_out_struct;
void* in_data_real;
void* in_data_img;
void* out_data_real;
void* out_data_img;
- }FUNCARGS;
-
+ FUNCSTRUCT* in_struct;
+ FUNCSTRUCT* out_struct;
+ } FUNCARGS;
+
typedef struct {
- int n_in_arguments; // number of input arguments
- int n_out_arguments; // number of output arguments
- int n_out_user; // number of output arguments
- char *err; // Name
- //char *package; //Name of octave package to be loaded
- FUNCARGS *argument;
-} FUNCCALL;
+ int n_in_arguments; // number of input arguments
+ int n_out_arguments; // number of output arguments
+ int n_out_user; // number of output arguments
+ char *err; // Name
+ //char *package; //Name of octave package to be loaded
+ FUNCARGS *argument;
+ } FUNCCALL;
int fun(FUNCARGS *arr, FUNCCALL *call);
}