summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2011-03-21 22:38:30 +0100
committerVincent COUVERT <vincent.couvert@scilab.org>2011-05-06 14:14:29 +0200
commit5496e8202d59d86db0ba66e83acfa4d0c571fd32 (patch)
treea0aaf1e1d8dca4a08978aed2f49d36152b83f8ec
parent4e37a6fde8b9af45e3cbeb86a41b9cbcd277959e (diff)
downloadscilab-5496e8202d59d86db0ba66e83acfa4d0c571fd32.zip
scilab-5496e8202d59d86db0ba66e83acfa4d0c571fd32.tar.gz
Remove old and deprecated documentation
Change-Id: I908c62fef64f227d1cc77b7f9f551769697b0518
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckColumn.xml118
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckDimProp.xml116
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckDims.xml130
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckLength.xml112
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckRow.xml113
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckSameDims.xml146
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckScalar.xml118
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckSquare.xml113
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CheckVector.xml114
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CreateListVarFrom.xml229
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CreateListVarFromPtr.xml228
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/CreateVar.xml178
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/FindOpt.xml149
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/FirstOpt.xml123
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/GetListRhsVar.xml216
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/GetRhsVar.xml212
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/GetType.xml87
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/IsOpt.xml141
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/LhsVar.xml74
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/NumOpt.xml122
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/OverLoad.xml159
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/ScilabCTypes.xml243
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/get_optionals.xml150
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/howto/CallingAScilabFunctionFromACInterface.xml4
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/howto/HowToAccessAMatrix_1.xml291
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/howto/HowToCheckParameters.xml319
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/howto/HowToCreateAndAccessAList_1.xml342
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/howto/HowToDealWithOptionalParameters.xml285
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/istk.xml81
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/sci_types.xml107
-rw-r--r--scilab/modules/api_scilab/help/en_US/capi/stk.xml81
31 files changed, 93 insertions, 4808 deletions
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckColumn.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckColumn.xml
deleted file mode 100644
index 66e631c..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckColumn.xml
+++ /dev/null
@@ -1,118 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckColumn" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckColumn</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function is a column vector or not</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckColumn(StackPos,m_var,n_var)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the argument for which we
31 want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks if a parameter send to the C
59 function is a column vector or not. You must include stack-c.h to benefit
60 from this function.</para>
61
62 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
63 </refsection>
64
65 <refsection>
66 <title>Examples</title>
67
68 <para>In this example, the C interface function takes one input parameters
69 and prints the integer corresponding to the type of the variable sent as
70 parameter in the Scilab console. If the test fails, we return from the C
71 interface and an adequate error message is printed in the Scilab
72 console.</para>
73
74 <programlisting role="example"><![CDATA[
75#include <stack-c.h>
76
77int sci_check_properties(char * fname)
78{
79 int m1, n1, l1;
80
81 CheckRhs(1,1);
82
83 GetRhsVar(1, "d", &m1, &n1, &l1);
84
85 CheckColumn(1,m1,n1); // Check that first argument is a column vector
86
87 return 0;
88}
89 ]]></programlisting>
90 </refsection>
91
92 <refsection role="see also">
93<title>See Also</title>
94
95 <simplelist type="inline">
96 <member><link linkend="CheckDims">CheckDims</link></member>
97
98 <member><link linkend="CheckRow">CheckRow</link></member>
99
100 <member><link linkend="CheckScalar">CheckScalar</link></member>
101
102 <member><link linkend="CheckVector">CheckVector</link></member>
103
104 <member><link linkend="OverLoad">CheckOverLoad</link></member>
105
106 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
107
108 <member><link linkend="CheckLength">CheckLength</link></member>
109
110 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
111
112 <member><link linkend="CheckSquare">CheckSquare</link></member>
113
114 <member><link linkend="HowToCheckParameters">How to check
115 parameters</link></member>
116 </simplelist>
117 </refsection>
118</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckDimProp.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckDimProp.xml
deleted file mode 100644
index 46a4259..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckDimProp.xml
+++ /dev/null
@@ -1,116 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckDimProp" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckDimProp</refname>
11
12 <refpurpose>C interface function which checks the comatibility between 2
13 arguments send to the C function</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckColumn(StackPos_var1,StackPos_var2,expression)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos_var1</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the first parameter for
31 which we want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>StackPos_var2</term>
37
38 <listitem>
39 <para>the position in the Scilab memory of the second variable for
40 which we want to perform the check (input parameter)</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>expression</term>
46
47 <listitem>
48 <para>a boolean expression which represent the size check we want to
49 perform</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks the compatibility between 2
59 arguments send to the C function. You must include stack-c.h to benefit
60 from this function. If the test fails, we return from the C interface and
61 an adequate error message is printed in the Scilab console.</para>
62
63 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
64 </refsection>
65
66 <refsection>
67 <title>Examples</title>
68
69 <programlisting role="example"><![CDATA[
70#include <stack-c.h>
71
72int sci_check_properties(char * fname)
73{
74 int m1, n1, l1;
75 int m2, n2, l2;
76
77 CheckRhs(2,2);
78
79 GetRhsVar(1, "d", &m1, &n1, &l1);
80 GetRhsVar(2, "d", &m2, &n2, &l2);
81
82 // Check compatibility beetween arg 1 and arg 2. We want m1*n1 == n2
83 CheckDimProp(1,2, m1 * n1 != n2);
84
85 return 0;
86}
87 ]]></programlisting>
88 </refsection>
89
90 <refsection role="see also">
91<title>See Also</title>
92
93 <simplelist type="inline">
94 <member><link linkend="CheckColumn">CheckColumn</link></member>
95
96 <member><link linkend="CheckDims">CheckDims</link></member>
97
98 <member><link linkend="CheckRow">CheckRow</link></member>
99
100 <member><link linkend="CheckScalar">CheckScalar</link></member>
101
102 <member><link linkend="CheckVector">CheckVector</link></member>
103
104 <member><link linkend="OverLoad">CheckOverLoad</link></member>
105
106 <member><link linkend="CheckLength">CheckLength</link></member>
107
108 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
109
110 <member><link linkend="CheckSquare">CheckSquare</link></member>
111
112 <member><link linkend="HowToCheckParameters">How to check
113 parameters</link></member>
114 </simplelist>
115 </refsection>
116</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckDims.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckDims.xml
deleted file mode 100644
index 8ad4c04..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckDims.xml
+++ /dev/null
@@ -1,130 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckDims" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckDims</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function has the required dimensions</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckDims(StackPos,m_var,n_var,m_required,n_required)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to know the type (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory (input parameter)</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory (input parameter)</para>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term>m_required</term>
55
56 <listitem>
57 <para>the required number of lines (input parameter)</para>
58 </listitem>
59 </varlistentry>
60
61 <varlistentry>
62 <term>n_required</term>
63
64 <listitem>
65 <para>the required number of columns (input parameter)</para>
66 </listitem>
67 </varlistentry>
68 </variablelist>
69 </refsection>
70
71 <refsection>
72 <title>Description</title>
73
74 <para>C interface function which checks if a parameter send to the C
75 function has the required dimensions. You must include stack-c.h to
76 benefit from this function. If the test fails, we return from the C
77 interface and an adequate error message is printed in the Scilab
78 console.</para>
79
80 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
81 </refsection>
82
83 <refsection>
84 <title>Examples</title>
85
86 <programlisting role="example"><![CDATA[
87#include <stack-c.h>
88
89int sci_check_properties(char * fname)
90{
91 int m1, n1, l1;
92
93 CheckRhs(1,1);
94
95 GetRhsVar(1, "d", &m1, &n1, &l1);
96
97 CheckDims(1,m1,n1,1,4); // Check that argument is a 1x4 matrix
98
99 return 0;
100}
101 ]]></programlisting>
102 </refsection>
103
104 <refsection role="see also">
105<title>See Also</title>
106
107 <simplelist type="inline">
108 <member><link linkend="CheckColumn">CheckColumn</link></member>
109
110 <member><link linkend="CheckRow">CheckRow</link></member>
111
112 <member><link linkend="CheckScalar">CheckScalar</link></member>
113
114 <member><link linkend="CheckVector">CheckVector</link></member>
115
116 <member><link linkend="OverLoad">CheckOverLoad</link></member>
117
118 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
119
120 <member><link linkend="CheckLength">CheckLength</link></member>
121
122 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
123
124 <member><link linkend="CheckSquare">CheckSquare</link></member>
125
126 <member><link linkend="HowToCheckParameters">How to check
127 parameters</link></member>
128 </simplelist>
129 </refsection>
130</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckLength.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckLength.xml
deleted file mode 100644
index 14b8d52..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckLength.xml
+++ /dev/null
@@ -1,112 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckLength" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckLength</refname>
11
12 <refpurpose>C interface function which checks the length of a vector send
13 as a parameter to the C function</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckLength(StackPos,m_var,m_required)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory (input parameter)</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>m_required</term>
46
47 <listitem>
48 <para>the required number of lines (input parameter)</para>
49 </listitem>
50 </varlistentry>
51 </variablelist>
52 </refsection>
53
54 <refsection>
55 <title>Description</title>
56
57 <para>C interface function which checks the length of a vector send as a
58 parameter to the C function. You must include stack-c.h to benefit from
59 this function. If the test fails, we return from the C interface and an
60 adequate error message is printed in the Scilab console.</para>
61
62 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
63 </refsection>
64
65 <refsection>
66 <title>Examples</title>
67
68 <programlisting role="example"><![CDATA[
69#include <stack-c.h>
70
71int sci_check_properties(char * fname)
72{
73 int m1, n1, l1;
74
75 CheckRhs(1,1);
76
77 GetRhsVar(1, "d", &m1, &n1, &l1);
78
79 CheckLength(1,m1*n1,4); // Check that vector has 4 elements
80
81 return 0;
82}
83 ]]></programlisting>
84 </refsection>
85
86 <refsection role="see also">
87<title>See Also</title>
88
89 <simplelist type="inline">
90 <member><link linkend="CheckColumn">CheckColumn</link></member>
91
92 <member><link linkend="CheckDims">CheckDims</link></member>
93
94 <member><link linkend="CheckRow">CheckRow</link></member>
95
96 <member><link linkend="CheckScalar">CheckScalar</link></member>
97
98 <member><link linkend="CheckVector">CheckVector</link></member>
99
100 <member><link linkend="OverLoad">CheckOverLoad</link></member>
101
102 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
103
104 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
105
106 <member><link linkend="CheckSquare">CheckSquare</link></member>
107
108 <member><link linkend="HowToCheckParameters">How to check
109 parameters</link></member>
110 </simplelist>
111 </refsection>
112</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckRow.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckRow.xml
deleted file mode 100644
index 3b9227a..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckRow.xml
+++ /dev/null
@@ -1,113 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckRow" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckRow</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function is a row vector or not</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckRow(StackPos,m_var,n_var)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to know the type (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks if a parameter send to the C
59 function is a row vector or not. You must include stack-c.h to benefit
60 from this function. If the test fails, we return from the C interface and
61 an adequate error message is printed in the Scilab console.</para>
62
63 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
64 </refsection>
65
66 <refsection>
67 <title>Examples</title>
68
69 <programlisting role="example"><![CDATA[
70#include <stack-c.h>
71
72int sci_check_properties(char * fname)
73{
74 int m1, n1, l1;
75
76 CheckRhs(1,1);
77
78 GetRhsVar(1, "d", &m1, &n1, &l1);
79
80 CheckRow(1,m1,n1); // Check that first argument is a row vector
81
82 return 0;
83}
84 ]]></programlisting>
85 </refsection>
86
87 <refsection role="see also">
88<title>See Also</title>
89
90 <simplelist type="inline">
91 <member><link linkend="CheckColumn">CheckColumn</link></member>
92
93 <member><link linkend="CheckDims">CheckDims</link></member>
94
95 <member><link linkend="CheckScalar">CheckScalar</link></member>
96
97 <member><link linkend="CheckVector">CheckVector</link></member>
98
99 <member><link linkend="OverLoad">CheckOverLoad</link></member>
100
101 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
102
103 <member><link linkend="CheckLength">CheckLength</link></member>
104
105 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
106
107 <member><link linkend="CheckSquare">CheckSquare</link></member>
108
109 <member><link linkend="HowToCheckParameters">How to check
110 parameters</link></member>
111 </simplelist>
112 </refsection>
113</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckSameDims.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckSameDims.xml
deleted file mode 100644
index c1dac9d..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckSameDims.xml
+++ /dev/null
@@ -1,146 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckSameDims" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckSameDims</refname>
11
12 <refpurpose>C interface function which checks if two parameters send to
13 the C function have the same size</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckSameDims(StackPos_var1,StackPos_var2,m_var1,n_var1,m_var2,n_var2)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos_var1</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the first parameter for
31 which we want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>StackPos_var2</term>
37
38 <listitem>
39 <para>the position in the Scilab memory of the second parameter for
40 which we want to perform the check (input parameter)</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>m_var1</term>
46
47 <listitem>
48 <para>the number of lines of the parameter at position StackPos_var1
49 in the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term>n_var1</term>
55
56 <listitem>
57 <para>the number of columns of the parameter at position
58 StackPos_var1 in the Scilab memory</para>
59 </listitem>
60 </varlistentry>
61
62 <varlistentry>
63 <term>m_var2</term>
64
65 <listitem>
66 <para>the number of lines of the parameter at position StackPos_var2
67 in the Scilab memory</para>
68 </listitem>
69 </varlistentry>
70
71 <varlistentry>
72 <term>n_var2</term>
73
74 <listitem>
75 <para>the number of columns of the parameter at position
76 StackPos_var2 in the Scilab memory</para>
77 </listitem>
78 </varlistentry>
79 </variablelist>
80 </refsection>
81
82 <refsection>
83 <title>Description</title>
84
85 <para>C interface function which checks if two parameters send to the C
86 function have the same size. You must include stack-c.h to benefit from
87 this function. If the test fails, we return from the C interface and an
88 adequate error message is printed in the Scilab console.</para>
89
90 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
91 </refsection>
92
93 <refsection>
94 <title>Examples</title>
95
96 <para>In this example, the C interface function takes one input parameters
97 and prints the integer corresponding to the type of the variable sent as
98 parameter in the Scilab console.</para>
99
100 <programlisting role="example"><![CDATA[
101#include <stack-c.h>
102
103int sci_check_properties(char * fname)
104{
105 int m1, n1, l1;
106 int m2, n2, l2;
107
108 CheckRhs(2,2);
109
110 GetRhsVar(1, "d", &m1, &n1, &l1);
111 GetRhsVar(2, "d", &m2, &n2, &l2);
112
113 CheckSameDims(1,2,m1,n1,m2,n2); // Check that both vectors have the same size
114
115 return 0;
116}
117 ]]></programlisting>
118 </refsection>
119
120 <refsection role="see also">
121<title>See Also</title>
122
123 <simplelist type="inline">
124 <member><link linkend="CheckColumn">CheckColumn</link></member>
125
126 <member><link linkend="CheckDims">CheckDims</link></member>
127
128 <member><link linkend="CheckRow">CheckRow</link></member>
129
130 <member><link linkend="CheckScalar">CheckScalar</link></member>
131
132 <member><link linkend="CheckVector">CheckVector</link></member>
133
134 <member><link linkend="OverLoad">CheckOverLoad</link></member>
135
136 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
137
138 <member><link linkend="CheckLength">CheckLength</link></member>
139
140 <member><link linkend="CheckSquare">CheckSquare</link></member>
141
142 <member><link linkend="HowToCheckParameters">How to check
143 parameters</link></member>
144 </simplelist>
145 </refsection>
146</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckScalar.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckScalar.xml
deleted file mode 100644
index 0341a86..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckScalar.xml
+++ /dev/null
@@ -1,118 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckScalar" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckScalar</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function is a scalar or not</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckScalar(StackPos,m_var,n_var)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks if a parameter send to the C
59 function is a scalar or not. You must include stack-c.h to benefit from
60 this function.</para>
61
62 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
63 </refsection>
64
65 <refsection>
66 <title>Examples</title>
67
68 <para>In this example, the C interface function takes one input parameters
69 and prints the integer corresponding to the type of the variable sent as
70 parameter in the Scilab console. If the test fails, we return from the C
71 interface and an adequate error message is printed in the Scilab
72 console.</para>
73
74 <programlisting role="example"><![CDATA[
75#include <stack-c.h>
76
77int sci_check_properties(char * fname)
78{
79 int m1, n1, l1;
80
81 CheckRhs(1,1);
82
83 GetRhsVar(1, "d", &m1, &n1, &l1);
84
85 CheckScalar(1,m1,n1); // Check that first argument is a scalar
86
87 return 0;
88}
89 ]]></programlisting>
90 </refsection>
91
92 <refsection role="see also">
93<title>See Also</title>
94
95 <simplelist type="inline">
96 <member><link linkend="CheckColumn">CheckColumn</link></member>
97
98 <member><link linkend="CheckDims">CheckDims</link></member>
99
100 <member><link linkend="CheckRow">CheckRow</link></member>
101
102 <member><link linkend="CheckVector">CheckVector</link></member>
103
104 <member><link linkend="OverLoad">CheckOverLoad</link></member>
105
106 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
107
108 <member><link linkend="CheckLength">CheckLength</link></member>
109
110 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
111
112 <member><link linkend="CheckSquare">CheckSquare</link></member>
113
114 <member><link linkend="HowToCheckParameters">How to check
115 parameters</link></member>
116 </simplelist>
117 </refsection>
118</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckSquare.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckSquare.xml
deleted file mode 100644
index 4c38c3c..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckSquare.xml
+++ /dev/null
@@ -1,113 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckSquare" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckSquare</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function is a square matrix or not</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckSquare(StackPos,m_var,n_var)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks if a parameter send to the C
59 function is a square matrix or not. You must include stack-c.h to benefit
60 from this function. If the test fails, we return from the C interface and
61 an adequate error message is printed in the Scilab console.</para>
62
63 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
64 </refsection>
65
66 <refsection>
67 <title>Examples</title>
68
69 <programlisting role="example"><![CDATA[
70#include <stack-c.h>
71
72int sci_check_properties(char * fname)
73{
74 int m1, n1, l1;
75
76 CheckRhs(1,1);
77
78 GetRhsVar(1, "d", &m1, &n1, &l1);
79
80 CheckSquare(1,m1,n1); // Check that first argument is a square matrix
81
82 return 0;
83}
84 ]]></programlisting>
85 </refsection>
86
87 <refsection role="see also">
88<title>See Also</title>
89
90 <simplelist type="inline">
91 <member><link linkend="CheckColumn">CheckColumn</link></member>
92
93 <member><link linkend="CheckDims">CheckDims</link></member>
94
95 <member><link linkend="CheckRow">CheckRow</link></member>
96
97 <member><link linkend="CheckScalar">CheckScalar</link></member>
98
99 <member><link linkend="CheckVector">CheckVector</link></member>
100
101 <member><link linkend="OverLoad">CheckOverLoad</link></member>
102
103 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
104
105 <member><link linkend="CheckLength">CheckLength</link></member>
106
107 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
108
109 <member><link linkend="HowToCheckParameters">How to check
110 parameters</link></member>
111 </simplelist>
112 </refsection>
113</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CheckVector.xml b/scilab/modules/api_scilab/help/en_US/capi/CheckVector.xml
deleted file mode 100644
index 9e81d20..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CheckVector.xml
+++ /dev/null
@@ -1,114 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CheckVector" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>CheckVector</refname>
11
12 <refpurpose>C interface function which checks if a parameter send to the C
13 function is a vector (column or row) or not</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>CheckVector(StackPos,m_var,n_var)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to perform the check (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>m_var</term>
37
38 <listitem>
39 <para>the number of lines of the parameter at position StackPos in
40 the Scilab memory</para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>n_var</term>
46
47 <listitem>
48 <para>the number of columns of the parameter at position StackPos in
49 the Scilab memory</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C interface function which checks if a parameter send to the C
59 function is a vector (column or row) or not. You must include stack-c.h to
60 benefit from this function. If the test fails, we return from the C
61 interface and an adequate error message is printed in the Scilab
62 console.</para>
63
64 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
65 </refsection>
66
67 <refsection>
68 <title>Examples</title>
69
70 <programlisting role="example"><![CDATA[
71#include <stack-c.h>
72
73int sci_check_properties(char * fname)
74{
75 int m1, n1, l1;
76
77 CheckRhs(1,1);
78
79 GetRhsVar(1, "d", &m1, &n1, &l1);
80
81 CheckVector(1,m1,n1); // Check that first argument is a vector (column or row)
82
83 return 0;
84}
85 ]]></programlisting>
86 </refsection>
87
88 <refsection role="see also">
89<title>See Also</title>
90
91 <simplelist type="inline">
92 <member><link linkend="CheckColumn">CheckColumn</link></member>
93
94 <member><link linkend="CheckDims">CheckDims</link></member>
95
96 <member><link linkend="CheckRow">CheckRow</link></member>
97
98 <member><link linkend="CheckScalar">CheckScalar</link></member>
99
100 <member><link linkend="OverLoad">CheckOverLoad</link></member>
101
102 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
103
104 <member><link linkend="CheckLength">CheckLength</link></member>
105
106 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
107
108 <member><link linkend="CheckSquare">CheckSquare</link></member>
109
110 <member><link linkend="HowToCheckParameters">How to check
111 parameters</link></member>
112 </simplelist>
113 </refsection>
114</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFrom.xml b/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFrom.xml
deleted file mode 100644
index f25a4a6..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFrom.xml
+++ /dev/null
@@ -1,229 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CreateListVarFrom"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>CreateListVarFrom</refname>
12
13 <refpurpose>a C interface function which allows to create a new Scilab
14 parameter in a [mt]list</refpurpose>
15 </refnamediv>
16
17 <refsynopsisdiv>
18 <title>Calling Sequence</title>
19
20 <synopsis>CreateListVarFrom(StackPos,Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_list_pos, &amp;l_stack_pos);</synopsis>
21 </refsynopsisdiv>
22
23 <refsection>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term>StackPos</term>
29
30 <listitem>
31 <para>the rank of the parameter to be created (input
32 parameter)</para>
33 </listitem>
34 </varlistentry>
35
36 <varlistentry>
37 <term>Type</term>
38
39 <listitem>
40 <para>the Scilab type of the parameter to be created (input
41 parameter). Can be (see Scilab C Type for more informations):</para>
42
43 <itemizedlist>
44 <listitem>
45 <para>STRING_DATATYPE "c"</para>
46 </listitem>
47
48 <listitem>
49 <para>MATRIX_OF_STRING_DATATYPE "S"</para>
50 </listitem>
51
52 <listitem>
53 <para>MATRIX_OF_DOUBLE_DATATYPE "d"</para>
54 </listitem>
55
56 <listitem>
57 <para>MATRIX_OF_RATIONAL_DATATYPE "r"</para>
58 </listitem>
59
60 <listitem>
61 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE "I"</para>
62 </listitem>
63
64 <listitem>
65 <para>MATRIX_OF_INTEGER_DATATYPE "i"</para>
66 </listitem>
67
68 <listitem>
69 <para>MATRIX_OF_BOOLEAN_DATATYPE "b"</para>
70 </listitem>
71
72 <listitem>
73 <para>MATRIX_OF_COMPLEX_DATATYPE "z"</para>
74 </listitem>
75
76 <listitem>
77 <para>SPARSE_MATRIX_DATATYPE "s"</para>
78 </listitem>
79
80 <listitem>
81 <para>TYPED_LIST_DATATYPE "t"</para>
82 </listitem>
83
84 <listitem>
85 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE "m"</para>
86 </listitem>
87
88 <listitem>
89 <para>SCILAB_POINTER_DATATYPE "p"</para>
90 </listitem>
91
92 <listitem>
93 <para>GRAPHICAL_HANDLE_DATATYPE "h"</para>
94 </listitem>
95
96 <listitem>
97 <para>EXTERNAL_DATATYPE "f"</para>
98 </listitem>
99
100 <listitem>
101 <para>MATRIX_OF_POLYNOMIAL_DATATYPE "x"</para>
102 </listitem>
103 </itemizedlist>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term>m_rows</term>
109
110 <listitem>
111 <para>the number of lines of the matrix to be created (input
112 parameter)</para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term>n_cols</term>
118
119 <listitem>
120 <para>the number of columns of the matrix to be created (input
121 parameter)</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term>l_stack_list_pos</term>
127
128 <listitem>
129 <para>the position in the Scilab memory of the created variable in
130 the list(output parameter)</para>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term>l_stack_pos</term>
136
137 <listitem>
138 <para>the position in the Scilab memory of the created variable
139 (input parameter)</para>
140 </listitem>
141 </varlistentry>
142 </variablelist>
143 </refsection>
144
145 <refsection>
146 <title>Description</title>
147
148 <para>A C interface function which allows to create a new Scilab variable
149 in a [mt]list</para>
150
151 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
152 </refsection>
153
154 <refsection>
155 <title>Examples</title>
156
157 <programlisting role="code_gateway"><![CDATA[
158#include <stack-c.h>
159#include <string.h>
160
161int sci_create_list(char * fname)
162{
163 int m_list_out, n_list_out;
164 int m_var1, n_var1, l_var1, l_list_var1;
165 int m_var2, n_var2, l_var2, l_list_var2;
166 int m_mlist, n_mlist, l_mlist;
167
168 // The labels of our mlist
169 static const char * ListLabels [] = {"mylist","var1","var2"};
170
171 // First, we create the variables using a classical way
172 // The size of the Scilab variables
173 m_var1 = 1; n_var1 = strlen("a string")+1; // a null terminated string
174 m_var2 = 2; n_var2 = 2; // A 2x2 double matrix
175 m_mlist = 3; n_mlist = 1; // A mlist with 3 elements
176
177 // Creation of the Scilab variables
178 // A('var1')
179 CreateVar(1, "c", &m_var1, &n_var1, &l_var1);
180 // A('var2')
181 CreateVar(2, "d", &m_var2, &n_var2, &l_var2);
182 // A
183 CreateVar(3, "m", &m_mlist, &n_mlist, &l_mlist);
184
185 // We store values in the create variables
186 // The matrix will be stored in A('var2')
187 *stk(l_var2+0) = 1;
188 *stk(l_var2+1) = 2;
189 *stk(l_var2+2) = 3;
190 *stk(l_var2+3) = 4;
191
192 // The string will be stored in A('var1')
193 strncpy(cstk(l_var1),"a string\0",n_var1);
194
195 m_list_out = 3; n_list_out = 1;
196
197 // now, affect the variable to the mlist
198 // The labels (it corresponds to A = mlist(['mylist','var1','var2'], ...
199 CreateListVarFromPtr(3, 1, "S", &m_list_out, &n_list_out, ListLabels);
200 // The value stored in A('var1') (it corresponds to A = ...,'a string', ...
201 CreateListVarFrom(3, 2, "c", &m_var1, &n_var1, &l_list_var1, &l_var1);
202 // The value stored in A('var2') (it corresponds to A = ...,[1 2,3 4]);
203 CreateListVarFrom(3, 3, "d", &m_var2, &n_var2, &l_list_var2, &l_var2);
204
205 // We return only the mlist which has been created at position 3
206 LhsVar(1) = 3;
207
208 return 0;
209}
210 ]]></programlisting>
211
212 <para>This example is available in
213 SCI/modules/core/example/create_list.</para>
214 </refsection>
215
216 <refsection role="see also">
217<title>See Also</title>
218
219 <simplelist type="inline">
220 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
221
222 <member><link linkend="istk">istk</link></member>
223
224 <member><link linkend="LhsVar">LhsVar</link></member>
225
226 <member><link linkend="CreateVar">CreateVar</link></member>
227 </simplelist>
228 </refsection>
229</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFromPtr.xml b/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFromPtr.xml
deleted file mode 100644
index b86a8e7..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CreateListVarFromPtr.xml
+++ /dev/null
@@ -1,228 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CreateListVarFromPtr"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>CreateListVarFromPtr</refname>
12
13 <refpurpose>a C interface function which allows to create a new Scilab
14 parameter from a pointer in a [mt]list</refpurpose>
15 </refnamediv>
16
17 <refsynopsisdiv>
18 <title>Calling Sequence</title>
19
20 <synopsis>CreateListVarFrom(StackPos, Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_list_pos, void * Pointer);</synopsis>
21 </refsynopsisdiv>
22
23 <refsection>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term>StackPos</term>
29
30 <listitem>
31 <para>the rank of the parameter to be created (input
32 parameter)</para>
33 </listitem>
34 </varlistentry>
35
36 <varlistentry>
37 <term>Type</term>
38
39 <listitem>
40 <para>the Scilab type of the parameter to be created (input
41 parameter). Can be (see Scilab C Type for more informations):</para>
42
43 <itemizedlist>
44 <listitem>
45 <para>STRING_DATATYPE "c"</para>
46 </listitem>
47
48 <listitem>
49 <para>MATRIX_OF_STRING_DATATYPE "S"</para>
50 </listitem>
51
52 <listitem>
53 <para>MATRIX_OF_DOUBLE_DATATYPE "d"</para>
54 </listitem>
55
56 <listitem>
57 <para>MATRIX_OF_RATIONAL_DATATYPE "r"</para>
58 </listitem>
59
60 <listitem>
61 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE "I"</para>
62 </listitem>
63
64 <listitem>
65 <para>MATRIX_OF_INTEGER_DATATYPE "i"</para>
66 </listitem>
67
68 <listitem>
69 <para>MATRIX_OF_BOOLEAN_DATATYPE "b"</para>
70 </listitem>
71
72 <listitem>
73 <para>MATRIX_OF_COMPLEX_DATATYPE "z"</para>
74 </listitem>
75
76 <listitem>
77 <para>SPARSE_MATRIX_DATATYPE "s"</para>
78 </listitem>
79
80 <listitem>
81 <para>TYPED_LIST_DATATYPE "t"</para>
82 </listitem>
83
84 <listitem>
85 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE "m"</para>
86 </listitem>
87
88 <listitem>
89 <para>SCILAB_POINTER_DATATYPE "p"</para>
90 </listitem>
91
92 <listitem>
93 <para>GRAPHICAL_HANDLE_DATATYPE "h"</para>
94 </listitem>
95
96 <listitem>
97 <para>EXTERNAL_DATATYPE "f"</para>
98 </listitem>
99
100 <listitem>
101 <para>MATRIX_OF_POLYNOMIAL_DATATYPE "x"</para>
102 </listitem>
103 </itemizedlist>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term>m_rows</term>
109
110 <listitem>
111 <para>the number of lines of the matrix to be created (input
112 parameter)</para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term>n_cols</term>
118
119 <listitem>
120 <para>the number of columns of the matrix to be created (input
121 parameter)</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term>l_stack_list_pos</term>
127
128 <listitem>
129 <para>the position in the Scilab memory of the created parameter in
130 the list (output parameter)</para>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term>Pointer</term>
136
137 <listitem>
138 <para>the pointer to the data area (input parameter)</para>
139 </listitem>
140 </varlistentry>
141 </variablelist>
142 </refsection>
143
144 <refsection>
145 <title>Description</title>
146
147 <para>A C interface function which allows to create a new Scilab parameter
148 from a pointer in a [mt]list</para>
149
150 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
151 </refsection>
152
153 <refsection>
154 <title>Examples</title>
155
156 <programlisting role="code_gateway"><![CDATA[
157#include <stack-c.h>
158#include <string.h>
159
160int sci_create_list(char * fname)
161{
162 int m_list_out, n_list_out;
163 int m_var1, n_var1, l_var1, l_list_var1;
164 int m_var2, n_var2, l_var2, l_list_var2;
165 int m_mlist, n_mlist, l_mlist;
166
167 // The labels of our mlist
168 static const char * ListLabels [] = {"mylist","var1","var2"};
169
170 // First, we create the variables using a classical way
171 // The size of the Scilab variables
172 m_var1 = 1; n_var1 = strlen("a string")+1; // a null terminated string
173 m_var2 = 2; n_var2 = 2; // A 2x2 double matrix
174 m_mlist = 3; n_mlist = 1; // A mlist with 3 elements
175
176 // Creation of the Scilab variables
177 // A('var1')
178 CreateVar(1, "c", &m_var1, &n_var1, &l_var1);
179 // A('var2')
180 CreateVar(2, "d", &m_var2, &n_var2, &l_var2);
181 // A
182 CreateVar(3, "m", &m_mlist, &n_mlist, &l_mlist);
183
184 // We store values in the create variables
185 // The matrix will be stored in A('var2')
186 *stk(l_var2+0) = 1;
187 *stk(l_var2+1) = 2;
188 *stk(l_var2+2) = 3;
189 *stk(l_var2+3) = 4;
190
191 // The string will be stored in A('var1')
192 strncpy(cstk(l_var1),"a string\0",n_var1);
193
194 m_list_out = 3; n_list_out = 1;
195
196 // now, affect the variable to the mlist
197 // The labels (it corresponds to A = mlist(['mylist','var1','var2'], ...
198 CreateListVarFromPtr(3, 1, "S", &m_list_out, &n_list_out, ListLabels);
199 // The value stored in A('var1') (it corresponds to A = ...,'a string', ...
200 CreateListVarFrom(3, 2, "c", &m_var1, &n_var1, &l_list_var1, &l_var1);
201 // The value stored in A('var2') (it corresponds to A = ...,[1 2,3 4]);
202 CreateListVarFrom(3, 3, "d", &m_var2, &n_var2, &l_list_var2, &l_var2);
203
204 // We return only the mlist which has been created at position 3
205 LhsVar(1) = 3;
206
207 return 0;
208}
209 ]]></programlisting>
210
211 <para>This example is available in
212 SCI/modules/core/example/create_list.</para>
213 </refsection>
214
215 <refsection role="see also">
216<title>See Also</title>
217
218 <simplelist type="inline">
219 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
220
221 <member><link linkend="istk">istk</link></member>
222
223 <member><link linkend="LhsVar">LhsVar</link></member>
224
225 <member><link linkend="CreateVar">CreateVar</link></member>
226 </simplelist>
227 </refsection>
228</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/CreateVar.xml b/scilab/modules/api_scilab/help/en_US/capi/CreateVar.xml
deleted file mode 100644
index 72b4b76..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/CreateVar.xml
+++ /dev/null
@@ -1,178 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="CreateVar"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>CreateVar</refname>
12
13 <refpurpose>a C gateway function which allows to create a new Scilab
14 parameter</refpurpose>
15 </refnamediv>
16
17 <refsynopsisdiv>
18 <title>Calling Sequence</title>
19
20 <synopsis>CreateVar(StackPos, Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_pos);</synopsis>
21 </refsynopsisdiv>
22
23 <refsection>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term>StackPos</term>
29
30 <listitem>
31 <para>The rank of the parameter to be created (input
32 argument)</para>
33 </listitem>
34 </varlistentry>
35
36 <varlistentry>
37 <term>Type</term>
38
39 <listitem>
40 <para>The <link linkend="ScilabCTypes">Scilab C Type</link> of the
41 parameter to be created (input argument).</para>
42
43 <itemizedlist>
44 <listitem>
45 <para>STRING_DATATYPE "c"</para>
46 </listitem>
47
48 <listitem>
49 <para>MATRIX_OF_STRING_DATATYPE "S"</para>
50 </listitem>
51
52 <listitem>
53 <para>MATRIX_OF_DOUBLE_DATATYPE "d"</para>
54 </listitem>
55
56 <listitem>
57 <para>MATRIX_OF_RATIONAL_DATATYPE "r"</para>
58 </listitem>
59
60 <listitem>
61 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE "I"</para>
62 </listitem>
63
64 <listitem>
65 <para>MATRIX_OF_INTEGER_DATATYPE "i"</para>
66 </listitem>
67
68 <listitem>
69 <para>MATRIX_OF_BOOLEAN_DATATYPE "b"</para>
70 </listitem>
71
72 <listitem>
73 <para>MATRIX_OF_COMPLEX_DATATYPE "z"</para>
74 </listitem>
75
76 <listitem>
77 <para>SPARSE_MATRIX_DATATYPE "s"</para>
78 </listitem>
79
80 <listitem>
81 <para>TYPED_LIST_DATATYPE "t"</para>
82 </listitem>
83
84 <listitem>
85 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE "m"</para>
86 </listitem>
87
88 <listitem>
89 <para>SCILAB_POINTER_DATATYPE "p"</para>
90 </listitem>
91
92 <listitem>
93 <para>GRAPHICAL_HANDLE_DATATYPE "h"</para>
94 </listitem>
95
96 <listitem>
97 <para>EXTERNAL_DATATYPE "f"</para>
98 </listitem>
99
100 <listitem>
101 <para>MATRIX_OF_POLYNOMIAL_DATATYPE "x"</para>
102 </listitem>
103 </itemizedlist>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term>m_rows</term>
109
110 <listitem>
111 <para>the number of lines of the matrix to be created (input
112 argument)</para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term>n_cols</term>
118
119 <listitem>
120 <para>the number of columns of the matrix to be created (input
121 argument)</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term>l_stack_pos</term>
127
128 <listitem>
129 <para>the position in the Scilab memory of the created parameter
130 (output argument)</para>
131 </listitem>
132 </varlistentry>
133 </variablelist>
134 </refsection>
135
136 <refsection>
137 <title>Description</title>
138
139 <para>A C gateway function which allows to create a new Scilab
140 parameter</para>
141
142 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
143 </refsection>
144
145 <refsection>
146 <title>Examples</title>
147
148 <programlisting role="example"><![CDATA[
149#include <stack-c.h>
150
151int sci_myones(char * fname)
152{
153 int m_row, n_col, l_pos;
154
155 m_row = 1; n_col = 1; // We create a scalar
156 CreateVar(1, MATRIX_OF_INTEGER_DATATYPE, &m_row, &n_col, &l_pos);
157
158 *istk(l_pos) = 1;
159
160 LhsVar(1) = 1;
161
162 return 0;
163}
164 ]]></programlisting>
165 </refsection>
166
167 <refsection role="see also">
168<title>See Also</title>
169
170 <simplelist type="inline">
171 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
172
173 <member><link linkend="istk">istk</link></member>
174
175 <member><link linkend="LhsVar">LhsVar</link></member>
176 </simplelist>
177 </refsection>
178</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/FindOpt.xml b/scilab/modules/api_scilab/help/en_US/capi/FindOpt.xml
deleted file mode 100644
index 58ea397..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/FindOpt.xml
+++ /dev/null
@@ -1,149 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="FindOpt" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>FindOpt</refname>
11
12 <refpurpose>C gateway function find the position of an optional argument
13 given its name</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>Pos FindOpt(varname, opts)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>varname</term>
28
29 <listitem>
30 <para>the name of the optional parameter</para>
31 </listitem>
32 </varlistentry>
33
34 <varlistentry>
35 <term>opts</term>
36
37 <listitem>
38 <para>a C list of optional parameters</para>
39
40 <programlisting role = ""><![CDATA[
41typedef struct rhs_opts__ {
42 int position ; // stack position : -1 if not present
43 char *name; // the name of the variable
44 char *type; // a Scilab type (like "d") representing the type of the variable
45 int m,n; // the size of the variable
46 unsigned long int l; // a pointer to the Scilab stack
47} rhs_opts;
48 ]]></programlisting>
49 </listitem>
50 </varlistentry>
51
52 <varlistentry>
53 <term>Pos</term>
54
55 <listitem>
56 <para>the rank of the optional parameter if it has been found in the
57 parameters sent to the C function, 0 otherwise.</para>
58 </listitem>
59 </varlistentry>
60 </variablelist>
61 </refsection>
62
63 <refsection>
64 <title>Description</title>
65
66 <para>A C gateway function which find the position of an optional argument
67 given its name. You must include stack-c.h to benefit from this
68 function.</para>
69
70 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
71 </refsection>
72
73 <refsection>
74 <title>Examples</title>
75
76 <para>A more complete example is available in the directory
77 SCI/modules/core/example/optional_parameters.</para>
78
79 <programlisting role="example"><![CDATA[
80#include <stack-c.h>
81
82int sci_optional_parameters(char * fname)
83{
84 int m1,n1,l1;
85
86 // optional names must be stored in alphabetical order in opts
87 static rhs_opts opts[]= {{-1,"v1","d",0,0,0},
88 {-1,"v2","d",0,0,0},
89 {-1,NULL,NULL,0,0}};
90
91 int minrhs = 1, maxrhs = 1;
92 int minlhs = 1, maxlhs = 3;
93 int nopt, iopos, res;
94 char buffer_name[csiz]; // csiz used for character coding
95
96 nopt = NumOpt();
97
98 CheckRhs(minrhs,maxrhs+nopt);
99 CheckLhs(minlhs,maxlhs);
100
101 // first non optional argument
102 GetRhsVar( 1, "c", &m1, &n1, &l1);
103
104 if (get_optionals(fname,opts)==0) return 0;
105
106 sciprint("number of optional parameters = %d\n", NumOpt());
107 sciprint("first optional parameters = %d\n", FirstOpt());
108 sciprint("FindOpt(v1) = %d\n", FindOpt("v1", opts));
109 sciprint("FindOpt(v2) = %d\n", FindOpt("v2", opts));
110
111 if (IsOpt(1,buffer_name))
112 sciprint("parameter 1 is optional: %s\n", buffer_name);
113 if (IsOpt(2,buffer_name))
114 sciprint("parameter 2 is optional: %s\n", buffer_name);
115 if (IsOpt(3,buffer_name))
116 sciprint("parameter 3 is optional: %s\n", buffer_name);
117
118 return 0;
119}
120 ]]></programlisting>
121 </refsection>
122
123 <refsection role="see also">
124<title>See Also</title>
125
126 <simplelist type="inline">
127 <member><link linkend="CheckDims">CheckDims</link></member>
128
129 <member><link linkend="CheckRow">CheckRow</link></member>
130
131 <member><link linkend="CheckScalar">CheckScalar</link></member>
132
133 <member><link linkend="CheckVector">CheckVector</link></member>
134
135 <member><link linkend="OverLoad">CheckOverLoad</link></member>
136
137 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
138
139 <member><link linkend="CheckLength">CheckLength</link></member>
140
141 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
142
143 <member><link linkend="CheckSquare">CheckSquare</link></member>
144
145 <member><link linkend="HowToCheckParameters">How to check
146 parameters</link></member>
147 </simplelist>
148 </refsection>
149</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/FirstOpt.xml b/scilab/modules/api_scilab/help/en_US/capi/FirstOpt.xml
deleted file mode 100644
index ad272af..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/FirstOpt.xml
+++ /dev/null
@@ -1,123 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="FirstOpt" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>FirstOpt</refname>
11
12 <refpurpose>C gateway function which returns the position of the first
13 optional parameter</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>Pos FirstOpt()</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>Pos</term>
28
29 <listitem>
30 <para>the position of the first optional parameter, Rhs + 1 if no
31 optional parameters have been given to the function</para>
32 </listitem>
33 </varlistentry>
34 </variablelist>
35 </refsection>
36
37 <refsection>
38 <title>Description</title>
39
40 <para>A C gateway function which returns the position of the first
41 optional parameter. You must include stack-c.h to benefit from this
42 function.</para>
43
44 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
45 </refsection>
46
47 <refsection>
48 <title>Examples</title>
49
50 <para>A more complete example is available in the directory
51 SCI/modules/core/example/optional_parameters.</para>
52
53 <programlisting role="example"><![CDATA[
54#include <stack-c.h>
55
56int sci_optional_parameters(char * fname)
57{
58 int m1,n1,l1;
59
60 // optional names must be stored in alphabetical order in opts
61 static rhs_opts opts[]= {{-1,"v1","d",0,0,0},
62 {-1,"v2","d",0,0,0},
63 {-1,NULL,NULL,0,0}};
64
65 int minrhs = 1, maxrhs = 1;
66 int minlhs = 1, maxlhs = 3;
67 int nopt, iopos, res;
68 char buffer_name[csiz]; // csiz used for character coding
69
70 nopt = NumOpt();
71
72 CheckRhs(minrhs,maxrhs+nopt);
73 CheckLhs(minlhs,maxlhs);
74
75 // first non optional argument
76 GetRhsVar( 1, "c", &m1, &n1, &l1);
77
78 if (get_optionals(fname,opts)==0) return 0;
79
80 sciprint("number of optional parameters = %d\n", NumOpt());
81 sciprint("first optional parameters = %d\n", FirstOpt());
82 sciprint("FindOpt(v1) = %d\n", FindOpt("v1", opts));
83 sciprint("FindOpt(v2) = %d\n", FindOpt("v2", opts));
84
85 if (IsOpt(1,buffer_name))
86 sciprint("parameter 1 is optional: %s\n", buffer_name);
87 if (IsOpt(2,buffer_name))
88 sciprint("parameter 2 is optional: %s\n", buffer_name);
89 if (IsOpt(3,buffer_name))
90 sciprint("parameter 3 is optional: %s\n", buffer_name);
91
92 return 0;
93}
94 ]]></programlisting>
95 </refsection>
96
97 <refsection role="see also">
98<title>See Also</title>
99
100 <simplelist type="inline">
101 <member><link linkend="CheckDims">CheckDims</link></member>
102
103 <member><link linkend="CheckRow">CheckRow</link></member>
104
105 <member><link linkend="CheckScalar">CheckScalar</link></member>
106
107 <member><link linkend="CheckVector">CheckVector</link></member>
108
109 <member><link linkend="OverLoad">CheckOverLoad</link></member>
110
111 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
112
113 <member><link linkend="CheckLength">CheckLength</link></member>
114
115 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
116
117 <member><link linkend="CheckSquare">CheckSquare</link></member>
118
119 <member><link linkend="HowToCheckParameters">How to check
120 parameters</link></member>
121 </simplelist>
122 </refsection>
123</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/GetListRhsVar.xml b/scilab/modules/api_scilab/help/en_US/capi/GetListRhsVar.xml
deleted file mode 100644
index dedfa32..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/GetListRhsVar.xml
+++ /dev/null
@@ -1,216 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="GetListRhsVar"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>GetListRhsVar</refname>
12
13 <refpurpose>a C gateway function which allows to access a parameter stored
14 in a [mt]list transmitted to a Scilab function</refpurpose>
15 </refnamediv>
16
17 <refsynopsisdiv>
18 <title>Calling Sequence</title>
19
20 <synopsis>GetListRhsVar(StackPos,ListPos, Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_pos);</synopsis>
21 </refsynopsisdiv>
22
23 <refsection>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term>StackPos</term>
29
30 <listitem>
31 <para>the rank of the [mt]list to be accessed (input
32 parameter)</para>
33 </listitem>
34 </varlistentry>
35
36 <varlistentry>
37 <term>ListPos</term>
38
39 <listitem>
40 <para>the rank in the list of the parameter to be accessed (input
41 parameter)</para>
42 </listitem>
43 </varlistentry>
44
45 <varlistentry>
46 <term>Type</term>
47
48 <listitem>
49 <para>the Scilab type of the parameter to be accessed (input
50 parameter). Can be (see Scilab C Type for more informations):</para>
51
52 <itemizedlist>
53 <listitem>
54 <para>STRING_DATATYPE "c"</para>
55 </listitem>
56
57 <listitem>
58 <para>MATRIX_OF_STRING_DATATYPE "S"</para>
59 </listitem>
60
61 <listitem>
62 <para>MATRIX_OF_DOUBLE_DATATYPE "d"</para>
63 </listitem>
64
65 <listitem>
66 <para>MATRIX_OF_RATIONAL_DATATYPE "r"</para>
67 </listitem>
68
69 <listitem>
70 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE "I"</para>
71 </listitem>
72
73 <listitem>
74 <para>MATRIX_OF_INTEGER_DATATYPE "i"</para>
75 </listitem>
76
77 <listitem>
78 <para>MATRIX_OF_BOOLEAN_DATATYPE "b"</para>
79 </listitem>
80
81 <listitem>
82 <para>MATRIX_OF_COMPLEX_DATATYPE "z"</para>
83 </listitem>
84
85 <listitem>
86 <para>SPARSE_MATRIX_DATATYPE "s"</para>
87 </listitem>
88
89 <listitem>
90 <para>TYPED_LIST_DATATYPE "t"</para>
91 </listitem>
92
93 <listitem>
94 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE "m"</para>
95 </listitem>
96
97 <listitem>
98 <para>SCILAB_POINTER_DATATYPE "p"</para>
99 </listitem>
100
101 <listitem>
102 <para>GRAPHICAL_HANDLE_DATATYPE "h"</para>
103 </listitem>
104
105 <listitem>
106 <para>EXTERNAL_DATATYPE "f"</para>
107 </listitem>
108
109 <listitem>
110 <para>MATRIX_OF_POLYNOMIAL_DATATYPE "x"</para>
111 </listitem>
112 </itemizedlist>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term>m_rows</term>
118
119 <listitem>
120 <para>the number of lines of the accessed parameter (output
121 parameter)</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term>n_cols</term>
127
128 <listitem>
129 <para>the number of columns of the accessed parameter (output
130 parameter)</para>
131 </listitem>
132 </varlistentry>
133
134 <varlistentry>
135 <term>l_stack_pos</term>
136
137 <listitem>
138 <para>the position on the stack of the accessed parameter (output
139 parameter)</para>
140 </listitem>
141 </varlistentry>
142 </variablelist>
143 </refsection>
144
145 <refsection>
146 <title>Description</title>
147
148 <para>A C gateway function which allows to access a parameter stored in a
149 [mt]list transmitted to a Scilab function</para>
150
151 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
152 </refsection>
153
154 <refsection>
155 <title>Examples</title>
156
157 <para>In this example, the function has one input parameter. It gets a
158 mlist and the prints some informations related to the content of the
159 mlist.</para>
160
161 <programlisting role="example"><![CDATA[
162#include <stack-c.h>
163#include <sciprint.h>
164
165int sci_print_list(char * fname)
166{
167 int m_list_in, n_list_in, l_list_in;
168 int m_type, n_type;
169 int m_var1, n_var1, l_var1;
170 int m_var2, n_var2, l_var2;
171 char ** LabelList = NULL;
172
173 CheckRhs(1,1); // We accept only 1 parameter
174
175 GetRhsVar(1,"m",&m_list_in,&n_list_in,&l_list_in); // Get a mlist
176
177 // Get the type and the name of the variables (the first element of the mlist)
178 GetListRhsVar(1,1,"S",&m_type,&n_type,&LabelList);
179
180 if (strcmp(LabelList[0],"mytype")!=0)
181 {
182 sciprint("error, you must ship a mlist or type mytype\n");
183 return 0;
184 }
185
186 // Get the first variable (a string)
187 GetListRhsVar(1,2,"c",&m_var1,&n_var1,&l_var1);
188 sciprint("var1 = %s\n",cstk(l_var1));
189
190 // Get the second variable (a double matrix)
191 GetListRhsVar(1,3,"d",&m_var2,&n_var2,&l_var2);
192 sciprint("var2 = [%f %f %f %f]\n",*stk(l_var2+0),
193 *stk(l_var2+1),
194 *stk(l_var2+2),
195 *stk(l_var2+3));
196
197 return 0;
198}
199 ]]></programlisting>
200
201 <para>This example is available in
202 SCI/modules/core/example/print_list.</para>
203 </refsection>
204
205 <refsection role="see also">
206<title>See Also</title>
207
208 <simplelist type="inline">
209 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
210
211 <member><link linkend="istk">istk</link></member>
212
213 <member><link linkend="LhsVar">LhsVar</link></member>
214 </simplelist>
215 </refsection>
216</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/GetRhsVar.xml b/scilab/modules/api_scilab/help/en_US/capi/GetRhsVar.xml
deleted file mode 100644
index 1dcaa56..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/GetRhsVar.xml
+++ /dev/null
@@ -1,212 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="GetRhsVar"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>GetRhsVar</refname>
12
13 <refpurpose>a C gateway function which allows to access an argument
14 transmitted to a Scilab function</refpurpose>
15 </refnamediv>
16
17 <refsynopsisdiv>
18 <title>Calling Sequence</title>
19
20 <synopsis>GetRhsVar(StackPos, Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_pos);</synopsis>
21 </refsynopsisdiv>
22
23 <refsection>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term>StackPos</term>
29
30 <listitem>
31 <para>The rank of the variable to be accessed (input
32 argument)</para>
33 </listitem>
34 </varlistentry>
35
36 <varlistentry>
37 <term>Type</term>
38
39 <listitem>
40 <para>The <link linkend="ScilabCTypes">Scilab C Type</link> of the
41 parameter to be accessed (input argument).</para>
42
43 <itemizedlist>
44 <listitem>
45 <para>STRING_DATATYPE "c"</para>
46 </listitem>
47
48 <listitem>
49 <para>MATRIX_OF_STRING_DATATYPE "S"</para>
50 </listitem>
51
52 <listitem>
53 <para>MATRIX_OF_DOUBLE_DATATYPE "d"</para>
54 </listitem>
55
56 <listitem>
57 <para>MATRIX_OF_RATIONAL_DATATYPE "r"</para>
58 </listitem>
59
60 <listitem>
61 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE "I"</para>
62 </listitem>
63
64 <listitem>
65 <para>MATRIX_OF_INTEGER_DATATYPE "i"</para>
66 </listitem>
67
68 <listitem>
69 <para>MATRIX_OF_BOOLEAN_DATATYPE "b"</para>
70 </listitem>
71
72 <listitem>
73 <para>MATRIX_OF_COMPLEX_DATATYPE "z"</para>
74 </listitem>
75
76 <listitem>
77 <para>SPARSE_MATRIX_DATATYPE "s"</para>
78 </listitem>
79
80 <listitem>
81 <para>TYPED_LIST_DATATYPE "t"</para>
82 </listitem>
83
84 <listitem>
85 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE "m"</para>
86 </listitem>
87
88 <listitem>
89 <para>SCILAB_POINTER_DATATYPE "p"</para>
90 </listitem>
91
92 <listitem>
93 <para>GRAPHICAL_HANDLE_DATATYPE "h"</para>
94 </listitem>
95
96 <listitem>
97 <para>EXTERNAL_DATATYPE "f"</para>
98 </listitem>
99
100 <listitem>
101 <para>MATRIX_OF_POLYNOMIAL_DATATYPE "x"</para>
102 </listitem>
103 </itemizedlist>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term>m_rows</term>
109
110 <listitem>
111 <para>the number of lines of the accessed parameter (output
112 argument)</para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term>n_cols</term>
118
119 <listitem>
120 <para>the number of columns of the accessed parameter (output
121 argument)</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry>
126 <term>l_stack_pos</term>
127
128 <listitem>
129 <para>the position in the Scilab memory of the accessed parameter
130 (output argument)</para>
131 </listitem>
132 </varlistentry>
133 </variablelist>
134 </refsection>
135
136 <refsection>
137 <title>Description</title>
138
139 <para>A C gateway function which allows to access a argument transmitted
140 to a Scilab function</para>
141
142 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
143 </refsection>
144
145 <refsection>
146 <title>Examples</title>
147
148 <para>In this example, the function has two input arguments:</para>
149
150 <itemizedlist>
151 <listitem>
152 <para>the number of columns (first argument)</para>
153 </listitem>
154
155 <listitem>
156 <para>the number of lines (second argument)</para>
157 </listitem>
158 </itemizedlist>
159
160 <para>The goal of this function is to created a matrix of integers equal
161 to 1.</para>
162
163 <!-- TODO: Add the potential profil of the function in Scilab -->
164
165 <programlisting role="example"><![CDATA[
166#include <stack-c.h>
167#include <string.h>
168
169int sci_myones(char * fname)
170{
171 int m_param_1, n_param_1, l_param_1;
172 int m_param_2, n_param_2, l_param_2;
173 int m_out_row, n_out_col, l_out_pos;
174 int i;
175 int * pOutPos = NULL;
176
177 GetRhsVar(1, MATRIX_OF_INTEGER_DATATYPE, &m_param_1, &n_param_1, &l_param_1);
178 GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &m_param_2, &n_param_2, &l_param_2);
179
180 // We create a matrix of ints equal to 1
181 m_out_row = *istk(l_param_1); // The first dimension of the matrix to be created
182 // is stored in the first input parameter
183 n_out_col = *istk(l_param_2); // The second dimension of the matrix to be created
184 // is stored in the second input parameter
185
186 CreateVar(3, MATRIX_OF_INTEGER_DATATYPE, &m_out_row, &n_out_col, &l_out_pos);
187
188 pOutPos = istk(l_out_pos); // Get a pointer to the area allocated by CreateVar (a pointer to an integer)
189 for(i=0;i<m_out_row*n_out_row;i++) pOutPos[i] = 1;
190
191 // A concise way to write the preceding line of code:
192 // for(i=0;i<m_out_row*n_out_row;i++) *istk(l_out_pos+i) = 1;
193
194 LhsVar(1) = 3; // We return the 3rd Scilab variable of our gateway
195
196 return 0;
197}
198 ]]></programlisting>
199 </refsection>
200
201 <refsection role="see also">
202<title>See Also</title>
203
204 <simplelist type="inline">
205 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
206
207 <member><link linkend="istk">istk</link></member>
208
209 <member><link linkend="LhsVar">LhsVar</link></member>
210 </simplelist>
211 </refsection>
212</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/GetType.xml b/scilab/modules/api_scilab/help/en_US/capi/GetType.xml
deleted file mode 100644
index b5936f4..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/GetType.xml
+++ /dev/null
@@ -1,87 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="GetType" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>GetType</refname>
11
12 <refpurpose>C gateway function which returns the type of a parameter in
13 the Scilab memory</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>SciType GetType(StackPos)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position on the Scilab memory of the parameter for which
31 we want to know the type (input argument)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>SciType</term>
37
38 <listitem>
39 <para>the type (defined in the <link
40 linkend="sci_types">sci_types</link> enum which you can find in
41 stack-c.h) of the parameter at position StackPos in the Scilab
42 memory</para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsection>
47
48 <refsection>
49 <title>Description</title>
50
51 <para>GetType is a C gateway function which returns the type of a
52 parameter in the Scilab memory. You must include stack-c.h to benefit from
53 this function.</para>
54
55 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
56 </refsection>
57
58 <refsection>
59 <title>Examples</title>
60
61 <para>In this example, the C gateway function takes one input argument and
62 prints the integer corresponding to the type of the variable sent as
63 argument in the Scilab console.</para>
64
65 <programlisting role="example"><![CDATA[
66#include <stack-c.h>
67#include <sciprint.h>
68
69int sci_mygettype(char * fname)
70{
71 sciprint("The type of the first argument is %d\n", GetType(1));
72
73 return 0;
74}
75 ]]></programlisting>
76 </refsection>
77
78 <refsection role="see also">
79<title>See Also</title>
80
81 <simplelist type="inline">
82 <member><link linkend="sciprint">sciprint</link></member>
83
84 <member><link linkend="sci_types">sci_types</link></member>
85 </simplelist>
86 </refsection>
87</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/IsOpt.xml b/scilab/modules/api_scilab/help/en_US/capi/IsOpt.xml
deleted file mode 100644
index 867263a..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/IsOpt.xml
+++ /dev/null
@@ -1,141 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="IsOpt" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>IsOpt</refname>
11
12 <refpurpose>C gateway function which checks if a parameter is optional and
13 returns the name of the parameter</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>Res IsOpt(Pos,buffer_name)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>Pos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter to be
31 checked (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>buffer_name</term>
37
38 <listitem>
39 <para>an array of char (of size csiz which correspond to the maximum
40 length of a Scilab variable) in which the name of the parameter will
41 be copied if the position Pos is optional (output parameter)</para>
42 </listitem>
43 </varlistentry>
44
45 <varlistentry>
46 <term>Res</term>
47
48 <listitem>
49 <para>1 if Pos has an optional parameter, 0 otherwise</para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsection>
54
55 <refsection>
56 <title>Description</title>
57
58 <para>C gateway function which checks if a parameter is optional and
59 returns the name of the parameter. You must include stack-c.h to benefit
60 from this function.</para>
61
62 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
63 </refsection>
64
65 <refsection>
66 <title>Examples</title>
67
68 <para>A more complete example is available in the directory
69 SCI/modules/core/example/optional_parameters.</para>
70
71 <programlisting role="example"><![CDATA[
72#include <stack-c.h>
73
74int sci_optional_parameters(char * fname)
75{
76 int m1,n1,l1;
77
78 // optional names must be stored in alphabetical order in opts
79 static rhs_opts opts[]= {{-1,"v1","d",0,0,0},
80 {-1,"v2","d",0,0,0},
81 {-1,NULL,NULL,0,0}};
82
83 int minrhs = 1, maxrhs = 1;
84 int minlhs = 1, maxlhs = 3;
85 int nopt, iopos, res;
86 char buffer_name[csiz]; // csiz used for character coding
87
88 nopt = NumOpt();
89
90 CheckRhs(minrhs,maxrhs+nopt);
91 CheckLhs(minlhs,maxlhs);
92
93 // first non optional argument
94 GetRhsVar( 1, "c", &m1, &n1, &l1);
95
96 if (get_optionals(fname,opts)==0) return 0;
97
98 sciprint("number of optional parameters = %d\n", NumOpt());
99 sciprint("first optional parameters = %d\n", FirstOpt());
100 sciprint("FindOpt(v1) = %d\n", FindOpt("v1", opts));
101 sciprint("FindOpt(v2) = %d\n", FindOpt("v2", opts));
102
103 if (IsOpt(1,buffer_name))
104 sciprint("parameter 1 is optional: %s\n", buffer_name);
105 if (IsOpt(2,buffer_name))
106 sciprint("parameter 2 is optional: %s\n", buffer_name);
107 if (IsOpt(3,buffer_name))
108 sciprint("parameter 3 is optional: %s\n", buffer_name);
109
110 return 0;
111}
112 ]]></programlisting>
113 </refsection>
114
115 <refsection role="see also">
116<title>See Also</title>
117
118 <simplelist type="inline">
119 <member><link linkend="CheckDims">CheckDims</link></member>
120
121 <member><link linkend="CheckRow">CheckRow</link></member>
122
123 <member><link linkend="CheckScalar">CheckScalar</link></member>
124
125 <member><link linkend="CheckVector">CheckVector</link></member>
126
127 <member><link linkend="OverLoad">CheckOverLoad</link></member>
128
129 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
130
131 <member><link linkend="CheckLength">CheckLength</link></member>
132
133 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
134
135 <member><link linkend="CheckSquare">CheckSquare</link></member>
136
137 <member><link linkend="HowToCheckParameters">How to check
138 parameters</link></member>
139 </simplelist>
140 </refsection>
141</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/LhsVar.xml b/scilab/modules/api_scilab/help/en_US/capi/LhsVar.xml
index 0c1d841..c9e34d4 100644
--- a/scilab/modules/api_scilab/help/en_US/capi/LhsVar.xml
+++ b/scilab/modules/api_scilab/help/en_US/capi/LhsVar.xml
@@ -50,7 +50,6 @@
50 <para>A C gateway function which specifies which variables created inside 50 <para>A C gateway function which specifies which variables created inside
51 the C interface will be returned as an output argumen into Scilab.</para> 51 the C interface will be returned as an output argumen into Scilab.</para>
52 52
53 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
54 </refsection> 53 </refsection>
55 54
56 <refsection> 55 <refsection>
@@ -74,49 +73,42 @@
74 73
75 <para>TODO: insert an example in the Scilab language</para> 74 <para>TODO: insert an example in the Scilab language</para>
76 75
77 <programlisting role="example"><![CDATA[ 76 <programlisting role="example"><![CDATA[
78#include <stack-c.h> 77#include "stack-c.h"
79 78#include "api_scilab.h"
80int sci_mysizedouble(char * fname) 79int sci_mysizedouble(char * fname, unsigned long fname_len)
81{ 80{
82 int m_in_row, n_in_col, l_in_pos; 81 int m_in_row;
83 int m_out_lines_row, n_out_lines_col, l_out_lines_pos; 82 int n_in_col;
84 int m_out_columns_row, n_out_columns_col, l_out_columns_pos; 83 int *piAddr = NULL;
85 int m_nop, n_nop, l_nop; 84 double *pdblData = NULL;
86 85 SciErr sciErr;
87 GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &m_in_row, &n_in_col, &l_in_pos); 86
88 87 sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
89 m_out_lines_row = 1; n_out_lines_col = 1; // We create a scalar 88 if(sciErr.iErr)
90 m_out_columns_row = 1; n_out_columns_col = 1; // We create a scalar 89 {
91 m_nop = 1; n_nop = 1; // We create a scalar 90 printError(&sciErr, 0);
92 91 return 0;
93 CreateVar(2, MATRIX_OF_INTEGER_DATATYPE, &m_out_lines_row, &n_out_lines_col, &l_out_lines_pos); 92 }
94 CreateVar(3, MATRIX_OF_INTEGER_DATATYPE, &m_nop, &n_nop, &l_nop); 93
95 CreateVar(4, MATRIX_OF_INTEGER_DATATYPE, &m_out_columns_row, &n_out_columns_col, &l_out_columns_pos); 94 /* get dimensions */
96 95 sciErr = getMatrixOfDouble(pvApiCtx, piAddr, &m_in_row, &n_in_col, &pdblData);
97 *istk(l_out_lines_pos) = m_in_row; // the out_lines_pos parameter handles the number of lines of the matrix sent as argument 96 if(sciErr.iErr)
98 *istk(l_nop) = 1; // store a mere value, but will neither be used nor returned to Scilab 97 {
99 *istk(l_out_columns_pos) = n_in_col; // the out_columns_pos parameter handles the number of columns of the matrix sent as argument 98 printError(&sciErr, 0);
100 99 return 0;
101 LhsVar(1) = 2; // We set the parameter 2 as an output argument 100 }
102 LhsVar(2) = 4; // We set the parameter 4 as an output argument 101
103 102 sciErr = createMatrixOfInteger32(pvApiCtx, 2, 1, 1, &m_in_row); // the out_lines_pos parameter handles the number of lines of the matrix sent as argument
104 return 0; 103 sciErr = createMatrixOfInteger32(pvApiCtx, 3, 1, 1, &m_in_row); // store a mere value, but will neither be used nor returned to Scilab
104 sciErr = createMatrixOfInteger32(pvApiCtx, 4, 1, 1, &n_in_col); // store a mere value, but will neither be used nor returned to Scilab
105
106 LhsVar(1) = 2; // We set the parameter 2 as an output argument
107 LhsVar(2) = 4; // We set the parameter 4 as an output argument
108 PutLhsVar();
109 return 0;
105} 110}
106 ]]></programlisting> 111 ]]></programlisting>
107 </refsection> 112 </refsection>
108 113
109 <refsection role="see also">
110<title>See Also</title>
111
112 <simplelist type="inline">
113 <member><link linkend="ScilabCTypes">Scilab C Type</link></member>
114
115 <member><link linkend="istk">istk</link></member>
116
117 <member><link linkend="CreateVar">CreateVar</link></member>
118
119 <member><link linkend="GetRhsVar">GetRhsVar</link></member>
120 </simplelist>
121 </refsection>
122</refentry> 114</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/NumOpt.xml b/scilab/modules/api_scilab/help/en_US/capi/NumOpt.xml
deleted file mode 100644
index c4d4dbf..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/NumOpt.xml
+++ /dev/null
@@ -1,122 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="NumOpt" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>NumOpt</refname>
11
12 <refpurpose>C gateway function which returns the number of optional
13 parameters sent to a C function</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>Res = NumOpt()</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>Res</term>
28
29 <listitem>
30 <para>the number of optional parameters detected</para>
31 </listitem>
32 </varlistentry>
33 </variablelist>
34 </refsection>
35
36 <refsection>
37 <title>Description</title>
38
39 <para>A C gateway function which returns the number of optional parameters
40 sent to a C function. You must include stack-c.h to benefit from this
41 function.</para>
42
43 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
44 </refsection>
45
46 <refsection>
47 <title>Examples</title>
48
49 <para>A more complete example is available in the directory
50 SCI/modules/core/example/optional_parameters.</para>
51
52 <programlisting role="example"><![CDATA[
53#include <stack-c.h>
54
55int sci_optional_parameters(char * fname)
56{
57 int m1,n1,l1;
58
59 // optional names must be stored in alphabetical order in opts
60 static rhs_opts opts[]= {{-1,"v1","d",0,0,0},
61 {-1,"v2","d",0,0,0},
62 {-1,NULL,NULL,0,0}};
63
64 int minrhs = 1, maxrhs = 1;
65 int minlhs = 1, maxlhs = 3;
66 int nopt, iopos, res;
67 char buffer_name[csiz]; // csiz used for character coding
68
69 nopt = NumOpt();
70
71 CheckRhs(minrhs,maxrhs+nopt);
72 CheckLhs(minlhs,maxlhs);
73
74 // first non optional argument
75 GetRhsVar( 1, "c", &m1, &n1, &l1);
76
77 if (get_optionals(fname,opts)==0) return 0;
78
79 sciprint("number of optional parameters = %d\n", NumOpt());
80 sciprint("first optional parameters = %d\n", FirstOpt());
81 sciprint("FindOpt(v1) = %d\n", FindOpt("v1", opts));
82 sciprint("FindOpt(v2) = %d\n", FindOpt("v2", opts));
83
84 if (IsOpt(1,buffer_name))
85 sciprint("parameter 1 is optional: %s\n", buffer_name);
86 if (IsOpt(2,buffer_name))
87 sciprint("parameter 2 is optional: %s\n", buffer_name);
88 if (IsOpt(3,buffer_name))
89 sciprint("parameter 3 is optional: %s\n", buffer_name);
90
91 return 0;
92}
93 ]]></programlisting>
94 </refsection>
95
96 <refsection role="see also">
97<title>See Also</title>
98
99 <simplelist type="inline">
100 <member><link linkend="CheckDims">CheckDims</link></member>
101
102 <member><link linkend="CheckRow">CheckRow</link></member>
103
104 <member><link linkend="CheckScalar">CheckScalar</link></member>
105
106 <member><link linkend="CheckVector">CheckVector</link></member>
107
108 <member><link linkend="OverLoad">CheckOverLoad</link></member>
109
110 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
111
112 <member><link linkend="CheckLength">CheckLength</link></member>
113
114 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
115
116 <member><link linkend="CheckSquare">CheckSquare</link></member>
117
118 <member><link linkend="HowToCheckParameters">How to check
119 parameters</link></member>
120 </simplelist>
121 </refsection>
122</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/OverLoad.xml b/scilab/modules/api_scilab/help/en_US/capi/OverLoad.xml
deleted file mode 100644
index d87d9e2..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/OverLoad.xml
+++ /dev/null
@@ -1,159 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="OverLoad" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>OverLoad</refname>
11
12 <refpurpose>C gateway function which tells Scilab to look for another
13 overloaded function</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>OverLoad(StackPos)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>StackPos</term>
28
29 <listitem>
30 <para>the position in the Scilab memory of the parameter for which
31 we want to take into account for the overloading process (input
32 argument)</para>
33 </listitem>
34 </varlistentry>
35 </variablelist>
36 </refsection>
37
38 <refsection>
39 <title>Description</title>
40
41 <para>A C gateway function which tells Scilab to look for another
42 overloaded function. Scilab then appends to the name of the function a
43 prefix (like %sp_ if the parameter taken into account is sparse) and look
44 for the overloaded function. You must include stack-c.h to benefit from
45 this function. </para>
46
47 <para>Be careful with the Scilab name of the function. Indeed, the current
48 overloading process of Scilab works only on Scilab primitives (Scilab
49 function wrote in C) which must have a Scilab name which is maximum 8 char
50 wide.</para>
51
52 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
53 </refsection>
54
55 <refsection>
56 <title>Examples</title>
57
58 <para>In this example, the C interface function takes one input parameters
59 and prints the integer corresponding to the type of the variable sent as
60 parameter in the Scilab console.</para>
61
62 <programlisting role = "code_gateway"><![CDATA[
63#include <stack-c.h>
64#include <sciprint.h>
65
66int sci_check_properties_2(char * fname)
67{
68 int m1,n1,l1;
69
70 CheckRhs(1,1);
71 CheckLhs(0,1) ;
72
73 switch(VarType(1))
74 {
75 case sci_matrix:
76 GetRhsVar(1, "d", &m1, &n1, &l1);
77 sciprint("1 is a scalar matrix\n");
78 break;
79 case sci_strings:
80 GetRhsVar(1, "c", &m1, &n1, &l1);
81 sciprint("1 is a string\n");
82 break;
83 case sci_sparse:
84 sciprint("1 is a sparse trying to overload\n");
85 OverLoad(1);
86 }
87
88 LhsVar(1) = 0;
89
90 return 0;
91}
92 </programlisting>
93
94 <para>The builder.sce script look like this:</para>
95
96 <programlisting role = "example"><![CDATA[
97// This is the builder.sce
98// must be run from this directory
99
100lines(0);
101
102ilib_name = 'lib_check_properties';
103
104files = ['check_properties.c'];
105
106libs = [];
107
108table =['chprop2', 'sci_check_properties_2'];
109
110// We must be careful when we choose a scilab function name in case of overloading.
111// We Scilab name function must be 8 char max.
112
113ldflags = "";
114cflags = "";
115fflags = "";
116
117ilib_build(ilib_name,table,files,libs,'Makelib',ldflags,cflags,fflags);
118 ]]></programlisting>
119
120 <para>And now, an example of use of this new function:</para>
121
122 <programlisting role = "example"><![CDATA[
123chprop2([1,2,2]);
124chprop2('foo');
125
126// overload case
127
128deff('[]=%sp_chprop2(sp)','disp(''sparse overloaded'')');
129chprop2(sparse([1,2,3]));
130 ]]></programlisting>
131 </refsection>
132
133 <refsection role="see also">
134<title>See Also</title>
135
136 <simplelist type="inline">
137 <member><link linkend="CheckColumn">CheckColumn</link></member>
138
139 <member><link linkend="CheckDims">CheckDims</link></member>
140
141 <member><link linkend="CheckRow">CheckRow</link></member>
142
143 <member><link linkend="CheckScalar">CheckScalar</link></member>
144
145 <member><link linkend="CheckVector">CheckVector</link></member>
146
147 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
148
149 <member><link linkend="CheckLength">CheckLength</link></member>
150
151 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
152
153 <member><link linkend="CheckSquare">CheckSquare</link></member>
154
155 <member><link linkend="HowToCheckParameters">How to check
156 parameters</link></member>
157 </simplelist>
158 </refsection>
159</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/ScilabCTypes.xml b/scilab/modules/api_scilab/help/en_US/capi/ScilabCTypes.xml
deleted file mode 100644
index 61ce39b..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/ScilabCTypes.xml
+++ /dev/null
@@ -1,243 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry role="" version="5.0-subset Scilab" xml:id="ScilabCTypes"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>Scilab C Types</refname>
12
13 <refpurpose>the C types available in a C gateway</refpurpose>
14 </refnamediv>
15
16 <refsection>
17 <title>Description</title>
18
19 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
20
21 <para>The string/char * datatype in the Scilab memory:</para>
22
23 <itemizedlist>
24 <listitem>
25 <para>STRING_DATATYPE</para>
26 </listitem>
27
28 <listitem>
29 <para>"c"</para>
30 </listitem>
31 </itemizedlist>
32
33 <para>The string/char ** datatype in the Scilab memory:</para>
34
35 <itemizedlist>
36 <listitem>
37 <para>MATRIX_OF_STRING_DATATYPE</para>
38 </listitem>
39
40 <listitem>
41 <para>"S"</para>
42 </listitem>
43 </itemizedlist>
44
45 <para>A matrix of double * if the size of the matrix is 1,1, it is a
46 single value:</para>
47
48 <itemizedlist>
49 <listitem>
50 <para>MATRIX_OF_DOUBLE_DATATYPE</para>
51 </listitem>
52
53 <listitem>
54 <para>"d"</para>
55 </listitem>
56 </itemizedlist>
57
58 <para>A matrix of rational * if the size of the matrix is 1,1, it is a
59 single value</para>
60
61 <itemizedlist>
62 <listitem>
63 <para>MATRIX_OF_RATIONAL_DATATYPE</para>
64 </listitem>
65
66 <listitem>
67 <para>"r"</para>
68 </listitem>
69 </itemizedlist>
70
71 <para>A matrix of integer * if the size of the matrix is 1,1, it is a
72 single value:</para>
73
74 <itemizedlist>
75 <listitem>
76 <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE</para>
77 </listitem>
78
79 <listitem>
80 <para>"I"</para>
81 </listitem>
82 </itemizedlist>
83
84 <para>A matrix of 'little' integer * 'little' because in reality, this int
85 is a complex with the imaginary * part set to 0 * if the size of the
86 matrix is 1,1, it is a single value:</para>
87
88 <itemizedlist>
89 <listitem>
90 <para>MATRIX_OF_INTEGER_DATATYPE</para>
91 </listitem>
92
93 <listitem>
94 <para>"i"</para>
95 </listitem>
96 </itemizedlist>
97
98 <para>A matrix of boolean * if the size of the matrix is 1,1, it is a
99 single value:</para>
100
101 <itemizedlist>
102 <listitem>
103 <para>MATRIX_OF_BOOLEAN_DATATYPE</para>
104 </listitem>
105
106 <listitem>
107 <para>"b"</para>
108 </listitem>
109 </itemizedlist>
110
111 <para>A matrix of complex * if the size of the matrix is 1,1, it is a
112 single value:</para>
113
114 <itemizedlist>
115 <listitem>
116 <para>MATRIX_OF_COMPLEX_DATATYPE</para>
117 </listitem>
118
119 <listitem>
120 <para>"z"</para>
121 </listitem>
122 </itemizedlist>
123
124 <para>A sparse matrix * if the size of the matrix is 1,1, it is a single
125 value</para>
126
127 <itemizedlist>
128 <listitem>
129 <para>SPARSE_MATRIX_DATATYPE</para>
130 </listitem>
131
132 <listitem>
133 <para>"s"</para>
134 </listitem>
135 </itemizedlist>
136
137 <para>A list:</para>
138
139 <itemizedlist>
140 <listitem>
141 <para>LIST_DATATYPE</para>
142 </listitem>
143
144 <listitem>
145 <para>"l"</para>
146 </listitem>
147 </itemizedlist>
148
149 <para>A typed list:</para>
150
151 <itemizedlist>
152 <listitem>
153 <para>TYPED_LIST_DATATYPE</para>
154 </listitem>
155
156 <listitem>
157 <para>"t"</para>
158 </listitem>
159 </itemizedlist>
160
161 <para>A Matrix oriented typed list * mlist object are very similar to
162 tlist objects. But * if M is an mlist, for any index i which is not a
163 field name, * M(i) is not the i th field of the list but is interpreted as
164 * the i th entry of M seen as a vector. * This is the only difference
165 between mlist and tlist:</para>
166
167 <itemizedlist>
168 <listitem>
169 <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE</para>
170 </listitem>
171
172 <listitem>
173 <para>"m"</para>
174 </listitem>
175 </itemizedlist>
176
177 <para>The scilab pointer datatype in the Scilab memory:</para>
178
179 <itemizedlist>
180 <listitem>
181 <para>SCILAB_POINTER_DATATYPE</para>
182 </listitem>
183
184 <listitem>
185 <para>"p"</para>
186 </listitem>
187 </itemizedlist>
188
189 <para>The scilab graphic handle datatype in the Scilab memory:</para>
190
191 <itemizedlist>
192 <listitem>
193 <para>GRAPHICAL_HANDLE_DATATYPE</para>
194 </listitem>
195
196 <listitem>
197 <para>"h"</para>
198 </listitem>
199 </itemizedlist>
200
201 <para>An "external" is a function or routine which is used as an argument
202 * of some high-level primitives (such as ode, optim, schur...):</para>
203
204 <itemizedlist>
205 <listitem>
206 <para>EXTERNAL_DATATYPE</para>
207 </listitem>
208
209 <listitem>
210 <para>"f"</para>
211 </listitem>
212 </itemizedlist>
213
214 <para>A matrix of polynomial coeff * if the size of the matrix is 1,1, it
215 is a single value:</para>
216
217 <itemizedlist>
218 <listitem>
219 <para>MATRIX_OF_POLYNOMIAL_DATATYPE</para>
220 </listitem>
221
222 <listitem>
223 <para>"x"</para>
224 </listitem>
225 </itemizedlist>
226 </refsection>
227
228 <refsection role="see also">
229<title>See Also</title>
230
231 <simplelist type="inline">
232 <member><link linkend="mlist">mlist</link></member>
233
234 <member><link linkend="list">list</link></member>
235
236 <member><link linkend="tlist">tlist</link></member>
237
238 <member><link linkend="CreateVar">CreateVar</link></member>
239
240 <member><link linkend="GetRhsVar">GetRhsVar</link></member>
241 </simplelist>
242 </refsection>
243</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/get_optionals.xml b/scilab/modules/api_scilab/help/en_US/capi/get_optionals.xml
deleted file mode 100644
index a59f3cf..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/get_optionals.xml
+++ /dev/null
@@ -1,150 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="get_optionals" xml:lang="en"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns:mml="http://www.w3.org/1998/Math/MathML"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:db="http://docbook.org/ns/docbook">
9 <refnamediv>
10 <refname>get_optionals</refname>
11
12 <refpurpose>C gateway function which initialize the list of optional
13 parameters</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17 <title>Calling Sequence</title>
18
19 <synopsis>res get_optionals(fname, opts)</synopsis>
20 </refsynopsisdiv>
21
22 <refsection>
23 <title>Arguments</title>
24
25 <variablelist>
26 <varlistentry>
27 <term>fname</term>
28
29 <listitem>
30 <para>the name passed to the C gateway. The name of the calling
31 function (of type char *) (input parameter)</para>
32 </listitem>
33 </varlistentry>
34
35 <varlistentry>
36 <term>opts</term>
37
38 <listitem>
39 <para>a C list of optional parameters</para>
40
41 <programlisting role = ""><![CDATA[
42typedef struct rhs_opts__ {
43 int position ; // stack position : -1 if not present
44 char *name; // the name of the variable
45 char *type; // a Scilab type (like "d") representing the type of the variable
46 int m,n; // the size of the variable
47 unsigned long int l; // a pointer to the Scilab stack
48} rhs_opts;
49 ]]></programlisting>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term>res</term>
55
56 <listitem>
57 <para>if no optional parameters has been sent, the res = 0.
58 Otherwise, res = 1.</para>
59 </listitem>
60 </varlistentry>
61 </variablelist>
62 </refsection>
63
64 <refsection>
65 <title>Description</title>
66
67 <para>A C gateway function which initialize the list of optional
68 parameters. You must include stack-c.h to benefit from this
69 function.</para>
70
71 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
72 </refsection>
73
74 <refsection>
75 <title>Examples</title>
76
77 <para>A more complete example is available in the directory
78 SCI/modules/core/example/optional_parameters.</para>
79
80 <programlisting role="example"><![CDATA[
81#include <stack-c.h>
82
83int sci_optional_parameters(char * fname)
84{
85 int m1,n1,l1;
86
87 // optional names must be stored in alphabetical order in opts
88 static rhs_opts opts[]= {{-1,"v1","d",0,0,0},
89 {-1,"v2","d",0,0,0},
90 {-1,NULL,NULL,0,0}};
91
92 int minrhs = 1, maxrhs = 1;
93 int minlhs = 1, maxlhs = 3;
94 int nopt, iopos, res;
95 char buffer_name[csiz]; // csiz used for character coding
96
97 nopt = NumOpt();
98
99 CheckRhs(minrhs,maxrhs+nopt);
100 CheckLhs(minlhs,maxlhs);
101
102 // first non optional argument
103 GetRhsVar( 1, "c", &m1, &n1, &l1);
104
105 if (get_optionals(fname,opts)==0) return 0;
106
107 sciprint("number of optional parameters = %d\n", NumOpt());
108 sciprint("first optional parameters = %d\n", FirstOpt());
109 sciprint("FindOpt(v1) = %d\n", FindOpt("v1", opts));
110 sciprint("FindOpt(v2) = %d\n", FindOpt("v2", opts));
111
112 if (IsOpt(1,buffer_name))
113 sciprint("parameter 1 is optional: %s\n", buffer_name);
114 if (IsOpt(2,buffer_name))
115 sciprint("parameter 2 is optional: %s\n", buffer_name);
116 if (IsOpt(3,buffer_name))
117 sciprint("parameter 3 is optional: %s\n", buffer_name);
118
119 return 0;
120}
121 ]]></programlisting>
122 </refsection>
123
124 <refsection role="see also">
125<title>See Also</title>
126
127 <simplelist type="inline">
128 <member><link linkend="CheckDims">CheckDims</link></member>
129
130 <member><link linkend="CheckRow">CheckRow</link></member>
131
132 <member><link linkend="CheckScalar">CheckScalar</link></member>
133
134 <member><link linkend="CheckVector">CheckVector</link></member>
135
136 <member><link linkend="OverLoad">CheckOverLoad</link></member>
137
138 <member><link linkend="CheckDimProp">CheckDimProp</link></member>
139
140 <member><link linkend="CheckLength">CheckLength</link></member>
141
142 <member><link linkend="CheckSameDims">CheckSameDims</link></member>
143
144 <member><link linkend="CheckSquare">CheckSquare</link></member>
145
146 <member><link linkend="HowToCheckParameters">How to check
147 parameters</link></member>
148 </simplelist>
149 </refsection>
150</refentry>
diff --git a/scilab/modules/api_scilab/help/en_US/capi/howto/CallingAScilabFunctionFromACInterface.xml b/scilab/modules/api_scilab/help/en_US/capi/howto/CallingAScilabFunctionFromACInterface.xml
index 5bf7800..9395574 100644
--- a/scilab/modules/api_scilab/help/en_US/capi/howto/CallingAScilabFunctionFromACInterface.xml
+++ b/scilab/modules/api_scilab/help/en_US/capi/howto/CallingAScilabFunctionFromACInterface.xml
@@ -195,12 +195,8 @@ int sci_call_scifunc(char *fname)
195 195
196 <member><link linkend="CheckRhs">CheckRhs</link></member> 196 <member><link linkend="CheckRhs">CheckRhs</link></member>
197 197
198 <member><link linkend="stk">stk</link></member>
199
200 <member><link linkend="LhsVar">LhsVar</link></member> 198 <member><link linkend="LhsVar">LhsVar</link></member>
201 199
202 <member><link linkend="GetType">GetType</link></member>
203
204 <member><link linkend="Scierror">Scierror</link></member> 200 <member><link linkend="Scierror">Scierror</link></member>
205 201
206 <!--<member><link linkend="Scifunction">Scifunction</link></member>--> 202 <!--<member><link linkend="Scifunction">Scifunction</link></member>-->
diff --git a/scilab/modules/api_scilab/help/en_US/capi/howto/HowToAccessAMatrix_1.xml b/scilab/modules/api_scilab/help/en_US/capi/howto/HowToAccessAMatrix_1.xml
deleted file mode 100644
index 124120c..0000000
--- a/scilab/modules/api_scilab/help/en_US/capi/howto/HowToAccessAMatrix_1.xml
+++ /dev/null
@@ -1,291 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<refentry version="5.0-subset Scilab" xml:id="HowToAccessAMatrix_1"
3 xmlns="http://docbook.org/ns/docbook"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xi="http://www.w3.org/2001/XInclude"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns:mml="http://www.w3.org/1998/Math/MathML"
8 xmlns:html="http://www.w3.org/1999/xhtml"
9 xmlns:db="http://docbook.org/ns/docbook">
10 <refnamediv>
11 <refname>How to access a matrix</refname>
12
13 <refpurpose>How to access a matrix using the C gateway
14 functions</refpurpose>
15 </refnamediv>
16
17 <refsection>
18 <title>Description</title>
19
20 <para>WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use <link linkend="api_scilab">API Scilab</link> (the new Scilab API).</para>
21
22 <para>The goal is to get a matrix of doubles send to a function written in
23 C.</para>
24
25 <para>For this, we will wrote a C gateway function in which we will
26 retrieve the matrix, we will perform some simple steps in this C
27 function:</para>
28
29 <itemizedlist>
30 <listitem>
31 <para>First, we will get an access to the matrix in the Scilab
32 memory</para>
33 </listitem>
34
35 <listitem>
36 <para>We will perform some simple operations on the matrix (in this
37 example, we will multiply by 2 each elements of the matrix)</para>
38 </listitem>
39
40 <listitem>
41 <para>We will return the result to Scilab</para>
42 </listitem>
43 </itemizedlist>
44
45 <para>This example is available in the directory
46 SCI/modules/core/examples/ex1.</para>
47 </refsection>
48
49 <refsection>
50 <title>The C function</title>
51
52 <programlisting role="example"><![CDATA[
53#include <stack-c.h>
54
55int sci_multiply_by_two(char * fname)
56{
57 int m_in_var, n_in_var, l_in_var;
58 int m_out_var, n_out_var, l_out_var;
59 int i_row, j_col;
60 double * pMatrix = NULL;
61
62 // First, access to the input variable (a matrix of doubles)
63 GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &m_in_var, &n_in_var, &l_in_var);
64
65 // Create the returned variable (a matrix of doubles)
66 m_out_var = m_in_var;
67 n_out_var = n_in_var;
68 CreateVar(2, MATRIX_OF_DOUBLE_DATATYPE, &m_out_var, &n_out_var, &l_out_var);
69
70 pMatrix = stk(l_in_var);
71
72 // Perform some simple operations on the matrix
73 for(i_row=0; i_row<m_in_var; i_row++)
74 {
75 for(j_col=0; j_col<n_in_var; j_col++)
76 {
77 pMatrix[i_row + j_col * m_out_var] = 2 * pMatrix[i_row + j_col * m_in_var];
78 }
79 }
80
81 // Return the output variable
82 LhsVar(1) = 2;
83
84 return 0;
85}
86 ]]></programlisting>
87
88 <para>This file must be saved as "multiply_by_two.c".</para>
89
90 <para>The main thing to highlight is that, to build a C gateway function,
91 we need to include the header stack-c.h. In this header, we find the
92 prototypes and macros of the main C gateway functions.</para>
93
94 <para>To be able to build and link such a C function to scilab, we need to
95 write a Scilab script which will compile this C function and then create a
96 loader script which will link the C function to a Scilab function.</para>
97 </refsection>
98
99 <refsection>
100 <title>The builder script</title>
101
102 <programlisting role="example"><![CDATA[
103// This is the builder.sce
104// must be run from this directory
105
106lines(0);
107
108ilib_name = 'lib_multiply_by_two';
109
110files = ['multiply_by_two.c'];
111
112libs = [];
113
114table =['multiply_by_two', 'sci_multiply_by_two'];
115
116ldflags = "";
117cflags = "";
118fflags = "";
119