summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsci_gateway/cpp/libscilab_octave.sobin32008 -> 32008 bytes
-rw-r--r--sci_gateway/cpp/sci_octave.cpp3
-rw-r--r--src/fun.cpp9
-rw-r--r--src/fun.h1
-rw-r--r--src/fun.obin4836152 -> 4850888 bytes
-rwxr-xr-xsrc/libfun.sobin2973816 -> 2978856 bytes
-rwxr-xr-xsrc/testfunbin41304 -> 41320 bytes
-rw-r--r--thirdparty/linux/include/fun.h1
-rwxr-xr-xthirdparty/linux/lib/x64/libfun.sobin2973816 -> 2978856 bytes
9 files changed, 14 insertions, 0 deletions
diff --git a/sci_gateway/cpp/libscilab_octave.so b/sci_gateway/cpp/libscilab_octave.so
index eb7abf5..221c3c8 100755
--- a/sci_gateway/cpp/libscilab_octave.so
+++ b/sci_gateway/cpp/libscilab_octave.so
Binary files differ
diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp
index 1a23000..1ccda51 100644
--- a/sci_gateway/cpp/sci_octave.cpp
+++ b/sci_gateway/cpp/sci_octave.cpp
@@ -367,6 +367,9 @@ extern "C"
}
}
}
+ else if (ins[i].is_out_string == 1){
+ out[i] = scilab_createString(env, (wchar_t *) ins[i].out_data_real);
+ }
else
{
//printf("output %d is NOT complex\n", i);
diff --git a/src/fun.cpp b/src/fun.cpp
index 9017584..1362e67 100644
--- a/src/fun.cpp
+++ b/src/fun.cpp
@@ -303,6 +303,15 @@ extern "C"
idx++;
}
}
+ else if(out(ii).is_string()){
+ inp[ii].is_out_string = 1;
+
+ octave_value currOut = out(ii);
+ std::string currOutStr = currOut.string_value();
+
+ inp[ii].out_data_real = malloc(sizeof(wchar_t) * (currOutStr.length() + 1));
+ mbstowcs((wchar_t *) inp[ii].out_data_real, currOutStr.c_str(), currOutStr.length() + 1);
+ }
else
{
//std::cout << "out "<< ii<< " is NOT complex" << '\n';
diff --git a/src/fun.h b/src/fun.h
index 7336957..f79fbf4 100644
--- a/src/fun.h
+++ b/src/fun.h
@@ -42,6 +42,7 @@ extern "C"
int n_out_struct_len; // op struct length
int is_in_cmplx;
int is_out_cmplx;
+ int is_out_string;
int is_out_struct;
void* in_data_real;
void* in_data_img;
diff --git a/src/fun.o b/src/fun.o
index 372f7ee..ca3d57a 100644
--- a/src/fun.o
+++ b/src/fun.o
Binary files differ
diff --git a/src/libfun.so b/src/libfun.so
index 6dd4f31..581c20b 100755
--- a/src/libfun.so
+++ b/src/libfun.so
Binary files differ
diff --git a/src/testfun b/src/testfun
index a31b907..e17d476 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 7336957..f79fbf4 100644
--- a/thirdparty/linux/include/fun.h
+++ b/thirdparty/linux/include/fun.h
@@ -42,6 +42,7 @@ extern "C"
int n_out_struct_len; // op struct length
int is_in_cmplx;
int is_out_cmplx;
+ int is_out_string;
int is_out_struct;
void* in_data_real;
void* in_data_img;
diff --git a/thirdparty/linux/lib/x64/libfun.so b/thirdparty/linux/lib/x64/libfun.so
index 6dd4f31..581c20b 100755
--- a/thirdparty/linux/lib/x64/libfun.so
+++ b/thirdparty/linux/lib/x64/libfun.so
Binary files differ