diff options
author | shag527 | 2021-05-07 11:22:00 +0530 |
---|---|---|
committer | shag527 | 2021-05-07 11:22:00 +0530 |
commit | 3949f2171492554c9039b4b813f6f7dd871cd510 (patch) | |
tree | 8cf9f9c1cb306699c03fef12c501e2c3ea21fa9e | |
parent | 86daf6f44d7cf1007448f25843d5b46e8115e7be (diff) | |
download | fossee-scilab-octave-toolbox-3949f2171492554c9039b4b813f6f7dd871cd510.tar.gz fossee-scilab-octave-toolbox-3949f2171492554c9039b4b813f6f7dd871cd510.tar.bz2 fossee-scilab-octave-toolbox-3949f2171492554c9039b4b813f6f7dd871cd510.zip |
Retrieved Struct Data
17 files changed, 143 insertions, 17 deletions
diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml index 3ec9204..b69c571 100644 --- a/help/en_US/master_help.xml +++ b/help/en_US/master_help.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book [ <!--Begin Entities--> -<!ENTITY aa15f19e90e8889fc1cf1bbfeeb08ce0d SYSTEM "/home/ananmay/Documents/fossee-scilab-octave-toolbox/help/en_US/octave_fun.xml"> +<!ENTITY a6cc3dc89e25a63d5d5def95b52cbd1c1 SYSTEM "/home/shagun/Desktop/fossee-scilab-octave-toolbox_2/help/en_US/octave_fun.xml"> <!--End Entities--> ]> <book version="5.0-subset Scilab" xml:lang="en_US" @@ -16,8 +16,8 @@ <title>scilab_octave</title> </info> -<part xml:id='section_03d75e04f21a47a401a1c20a6b501bc4'> +<part xml:id='section_328782206fa125cbdc0430b054fffa2f'> <title>scilab_octave</title> -&aa15f19e90e8889fc1cf1bbfeeb08ce0d; +&a6cc3dc89e25a63d5d5def95b52cbd1c1; </part> </book> diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differindex e7476c0..05ed080 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB Binary files differindex d8995ba..d8be745 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS index ec3f923..49845b0 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS @@ -1 +1 @@ -‡™€ƒÀadn`
\ No newline at end of file +„ö a@€D þ$z˜
\ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex 14c2668..4d70a0b 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA index 89ef6f0..c1b7d51 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -1,2 +1,2 @@ JavaSearch 1.0 -TMAP bs=2048 rt=0 fl=-1 id1=121 id2=1 +TMAP bs=2048 rt=0 fl=-1 id1=122 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differindex 33d0cbc..c3eb111 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/help/en_US/scilab_en_US_help/index.html b/help/en_US/scilab_en_US_help/index.html index 5851fba..12a0617 100644 --- a/help/en_US/scilab_en_US_help/index.html +++ b/help/en_US/scilab_en_US_help/index.html @@ -31,7 +31,7 @@ <h3 class="book-title">scilab_octave</h3> <ul class="list-part"><a name="scilab_octave_manual"></a><div class="info"></div> -<li><a href="section_03d75e04f21a47a401a1c20a6b501bc4.html" class="part">scilab_octave</a> +<li><a href="section_328782206fa125cbdc0430b054fffa2f.html" class="part">scilab_octave</a> <ul class="list-chapter"><li><a href="octave_fun.html" class="refentry">octave_fun</a> — <span class="refentry-description">Calls an octave function with given inputs and returns the expected output</span></li></ul></li></ul> <br /> diff --git a/help/en_US/scilab_en_US_help/jhelpmap.jhm b/help/en_US/scilab_en_US_help/jhelpmap.jhm index bd4e16f..0130989 100644 --- a/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ b/help/en_US/scilab_en_US_help/jhelpmap.jhm @@ -2,6 +2,6 @@ <!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" "http://java.sun.com/products/javahelp/map_1_0.dtd"> <map version="1.0"> <mapID target="index" url="index.html"/> -<mapID target="section_03d75e04f21a47a401a1c20a6b501bc4" url="section_03d75e04f21a47a401a1c20a6b501bc4.html"/> +<mapID target="section_328782206fa125cbdc0430b054fffa2f" url="section_328782206fa125cbdc0430b054fffa2f.html"/> <mapID target="octave_fun" url="octave_fun.html"/> </map>
\ No newline at end of file diff --git a/help/en_US/scilab_en_US_help/jhelptoc.xml b/help/en_US/scilab_en_US_help/jhelptoc.xml index 5b72dc8..f6b705d 100644 --- a/help/en_US/scilab_en_US_help/jhelptoc.xml +++ b/help/en_US/scilab_en_US_help/jhelptoc.xml @@ -2,7 +2,7 @@ <!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 1.0//EN" "http://java.sun.com/products/javahelp/toc_1_0.dtd"> <toc version="1.0"> <tocitem target="index" text="scilab_octave"> -<tocitem target="section_03d75e04f21a47a401a1c20a6b501bc4" text="scilab_octave"> +<tocitem target="section_328782206fa125cbdc0430b054fffa2f" text="scilab_octave"> <tocitem target="octave_fun" text="octave_fun"/> </tocitem> </tocitem> diff --git a/help/en_US/scilab_en_US_help/octave_fun.html b/help/en_US/scilab_en_US_help/octave_fun.html index 16b6d23..827d29a 100644 --- a/help/en_US/scilab_en_US_help/octave_fun.html +++ b/help/en_US/scilab_en_US_help/octave_fun.html @@ -12,11 +12,11 @@ <div class="manualnavbar"> <table width="100%"><tr> <td width="30%"> - <span class="previous"><a href="section_03d75e04f21a47a401a1c20a6b501bc4.html"><< scilab_octave</a></span> + <span class="previous"><a href="section_328782206fa125cbdc0430b054fffa2f.html"><< scilab_octave</a></span> </td> <td width="40%" class="center"> - <span class="top"><a href="section_03d75e04f21a47a401a1c20a6b501bc4.html">scilab_octave</a></span> + <span class="top"><a href="section_328782206fa125cbdc0430b054fffa2f.html">scilab_octave</a></span> </td> <td width="30%" class="next"> @@ -28,7 +28,7 @@ - <span class="path"><a href="index.html">scilab_octave</a> >> <a href="section_03d75e04f21a47a401a1c20a6b501bc4.html">scilab_octave</a> > octave_fun</span> + <span class="path"><a href="index.html">scilab_octave</a> >> <a href="section_328782206fa125cbdc0430b054fffa2f.html">scilab_octave</a> > octave_fun</span> <br /><br /> <div class="refnamediv"><h1 class="refname">octave_fun</h1> @@ -94,11 +94,11 @@ <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> <tr> <td width="30%"> - <span class="previous"><a href="section_03d75e04f21a47a401a1c20a6b501bc4.html"><< scilab_octave</a></span> + <span class="previous"><a href="section_328782206fa125cbdc0430b054fffa2f.html"><< scilab_octave</a></span> </td> <td width="40%" class="center"> - <span class="top"><a href="section_03d75e04f21a47a401a1c20a6b501bc4.html">scilab_octave</a></span> + <span class="top"><a href="section_328782206fa125cbdc0430b054fffa2f.html">scilab_octave</a></span> </td> <td width="30%" class="next"> diff --git a/help/en_US/scilab_en_US_help/section_03d75e04f21a47a401a1c20a6b501bc4.html b/help/en_US/scilab_en_US_help/section_328782206fa125cbdc0430b054fffa2f.html index a828712..a828712 100644 --- a/help/en_US/scilab_en_US_help/section_03d75e04f21a47a401a1c20a6b501bc4.html +++ b/help/en_US/scilab_en_US_help/section_328782206fa125cbdc0430b054fffa2f.html diff --git a/help/en_US/scilab_en_US_help/section_727141a355b34790bc75f83053036755.html b/help/en_US/scilab_en_US_help/section_727141a355b34790bc75f83053036755.html new file mode 100644 index 0000000..a828712 --- /dev/null +++ b/help/en_US/scilab_en_US_help/section_727141a355b34790bc75f83053036755.html @@ -0,0 +1,55 @@ +<html><head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title></title> + <style type="text/css" media="all"> + @import url("scilab_code.css"); + @import url("xml_code.css"); + @import url("c_code.css"); + @import url("style.css"); + </style> + </head> + <body> + <div class="manualnavbar"> + <table width="100%"><tr> + <td width="30%"> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="index.html">scilab_octave</a></span> + + </td> + <td width="30%" class="next"> + + </td> + </tr></table> + <hr /> + </div> + + + + <span class="path"><a href="index.html">scilab_octave</a> >> scilab_octave</span> + + <br /><br /> + <h3 class="title-part">scilab_octave</h3> +<ul class="list-chapter"><li><a href="octave_fun.html" class="refentry">octave_fun</a> — <span class="refentry-description">Calls an octave function with given inputs and returns the expected output</span></li></ul> + <br /> + + <div class="manualnavbar"> + <table width="100%"> + <tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr> +<tr> + <td width="30%"> + + </td> + <td width="40%" class="center"> + <span class="top"><a href="index.html">scilab_octave</a></span> + + </td> + <td width="30%" class="next"> + + </td> + </tr></table> + <hr /> + </div> + </body> +</html> diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex 02270d7..81861cc 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar diff --git a/macros/octave_fun.bin b/macros/octave_fun.bin Binary files differindex 065f472..ca3bb48 100644 --- a/macros/octave_fun.bin +++ b/macros/octave_fun.bin diff --git a/sci_gateway/cpp/libscilab_octave.so b/sci_gateway/cpp/libscilab_octave.so Binary files differindex e5c4f0f..a3f2512 100755 --- a/sci_gateway/cpp/libscilab_octave.so +++ b/sci_gateway/cpp/libscilab_octave.so diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp index e773c65..da56af1 100644 --- a/sci_gateway/cpp/sci_octave.cpp +++ b/sci_gateway/cpp/sci_octave.cpp @@ -74,7 +74,7 @@ extern "C" ins[i].type = TYPE_DOUBLE; if (scilab_isComplex(env, in[i]) == 1) { - //printf("input %d is complex \n", i); + //printf("input %d is complex1 \n", i); ins[i].is_in_cmplx = 1; size = scilab_getDim2d(env, in[i], &row, &col); ins[i].n_in_rows = row; @@ -95,8 +95,8 @@ extern "C" rd[k] = in_real[p + q * row]; cd[k] = in_img[p + q * row]; k++; - //printf("%d\n",in_real[k]); - //printf("%d\n",in_img[k]); + printf("%d\n",in_real[k]); + printf("%d\n",in_img[k]); } } } @@ -126,7 +126,7 @@ extern "C" } ///////////////////////////////////////// } - else if (scilab_getType(env, in[i]) == 10) + else if (scilab_getType(env, in[i]) == 10) // Checking for String Argument { ins[i].is_in_cmplx = 0; wchar_t *in1 = 0; @@ -152,12 +152,83 @@ extern "C" //printf("in scilab strin is: %s\n", c); } } + else if (scilab_getType(env, in[i]) == 18) //Checking for Struct input + { + wchar_t** fields = NULL; + scilabVar struct_out; + int dims=0; + + dims=scilab_getFields(env,in[i],&fields); // Retrieving Struct Fields + //std::cout<<dims<<std::endl; + + for (j = 0; j < dims; j++) + { + wcstombs(str, fields[j], sizeof(str)); + std::cout<<str<<std::endl; + struct_out=scilab_getStructMatrix2dData(env,in[i],fields[j],0,0); // Retrieving Struct Data + + // Checking Type of data in struct + if (scilab_getType(env,struct_out) == 1) + { + ins[i].type = TYPE_DOUBLE; + if (scilab_isComplex(env,struct_out) == 1) + { + //printf("input %d is complex \n", i) + size = scilab_getDim2d(env, struct_out, &row, &col); + scilab_getDoubleComplexArray(env, struct_out, &in_real, &in_img); + + ////This code snippet is to flatten matrix row wise and then store it + int p, q, k = 0; + for (p = 0; p < row; p++) + { + for (q = 0; q < col; q++) + { + printf("%d\n",in_real[p + q * row]); + printf("%d\n",in_img[p + q * row]); + k++; + } + } + } + else + { + //printf("input %d is NOT complex \n", i); + size = scilab_getDim2d(env, struct_out, &row, &col); + scilab_getDoubleArray(env, struct_out, &n); + + ////This code snippet is to flatten matrix row wise and then store it + int p, q, k = 0; + for (p = 0; p < row; p++) + { + for (q = 0; q < col; q++) + { + printf("%f\n",n[k]); + k++; + + } + } + } + } + else if (scilab_getType(env,struct_out) == 10) + { + wchar_t *in1 = 0; + + scilab_getString(env, struct_out, &in1); + //printf("%S\n", in1); + + wcstombs(str, in1, sizeof(str)); + printf("%s\n", str); + } + } + Scierror(999, _("%s: Encountered Struct at %d Argument.\n"), fname, i); + return STATUS_ERROR; + } else { Scierror(999, _("%s: Wrong type of input argument %d.\n"), fname, i); return STATUS_ERROR; } } + // Capturing Errors and warnings std::stringstream buffer_err; |