summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsci_gateway/cpp/libscilab_octave.sobin27944 -> 32008 bytes
-rw-r--r--src/fun.cpp6
-rw-r--r--src/fun.obin4565488 -> 4836152 bytes
-rwxr-xr-xsrc/libfun.sobin2855912 -> 2973816 bytes
-rwxr-xr-xsrc/testfunbin40960 -> 41304 bytes
-rw-r--r--thirdparty/linux/include/fun.h41
-rwxr-xr-xthirdparty/linux/lib/x64/libfun.sobin2855912 -> 2973816 bytes
7 files changed, 32 insertions, 15 deletions
diff --git a/sci_gateway/cpp/libscilab_octave.so b/sci_gateway/cpp/libscilab_octave.so
index a3f2512..eb7abf5 100755
--- a/sci_gateway/cpp/libscilab_octave.so
+++ b/sci_gateway/cpp/libscilab_octave.so
Binary files differ
diff --git a/src/fun.cpp b/src/fun.cpp
index 3f72da8..9017584 100644
--- a/src/fun.cpp
+++ b/src/fun.cpp
@@ -98,17 +98,19 @@ extern "C"
char *c = (char *)inp[l].in_data_real;
//std::cout << "String is: " << c << '\n';
- if (l == 0)
+ if (l == 0){
strcpy(str_fun, c);
+ str_count++;
+ }
else if (l == 1)
{
strcpy(str_pkg, c);
pkg = 1;
+ str_count++;
}
else
in(l - str_count) = c;
- str_count++;
//std::cout << "String is: " << c << '\n';
}
else if (inp[l].type == TYPE_STRUCT){
diff --git a/src/fun.o b/src/fun.o
index 03270cf..372f7ee 100644
--- a/src/fun.o
+++ b/src/fun.o
Binary files differ
diff --git a/src/libfun.so b/src/libfun.so
index 6c97c22..6dd4f31 100755
--- a/src/libfun.so
+++ b/src/libfun.so
Binary files differ
diff --git a/src/testfun b/src/testfun
index 500b639..a31b907 100755
--- a/src/testfun
+++ b/src/testfun
Binary files differ
diff --git a/thirdparty/linux/include/fun.h b/thirdparty/linux/include/fun.h
index e5e1fff..7336957 100644
--- a/thirdparty/linux/include/fun.h
+++ b/thirdparty/linux/include/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);
}
diff --git a/thirdparty/linux/lib/x64/libfun.so b/thirdparty/linux/lib/x64/libfun.so
index 6c97c22..6dd4f31 100755
--- a/thirdparty/linux/lib/x64/libfun.so
+++ b/thirdparty/linux/lib/x64/libfun.so
Binary files differ