summaryrefslogtreecommitdiffstats
path: root/scilab_doc
diff options
context:
space:
mode:
authorFarid Belahcene <farid.belahcene@inria.fr>2006-06-22 15:17:26 +0000
committerFarid Belahcene <farid.belahcene@inria.fr>2006-06-22 15:17:26 +0000
commitf0220839a37eebfb04d71e3ca06bd368f6533d97 (patch)
treee365e8cfb583ebb882db80a72c27d200733a532e /scilab_doc
parent04e4d05f186fa66421679c7c1893382d6ceea7dd (diff)
downloadscilab-f0220839a37eebfb04d71e3ca06bd368f6533d97.zip
scilab-f0220839a37eebfb04d71e3ca06bd368f6533d97.tar.gz
some improvements
Diffstat (limited to 'scilab_doc')
-rw-r--r--scilab_doc/toolbox_guide/html/toolbox.html165
1 files changed, 64 insertions, 101 deletions
diff --git a/scilab_doc/toolbox_guide/html/toolbox.html b/scilab_doc/toolbox_guide/html/toolbox.html
index a816e22..dd228ce 100644
--- a/scilab_doc/toolbox_guide/html/toolbox.html
+++ b/scilab_doc/toolbox_guide/html/toolbox.html
@@ -38,19 +38,19 @@
38 <ul> 38 <ul>
39 <a href="#chap2.1">2.1. The macros directory</a><br /> 39 <a href="#chap2.1">2.1. The macros directory</a><br />
40 <ul> 40 <ul>
41 <a href="#chap2.1.1">2.1.1. Creation of the builder</a><br /> 41 <a href="#chap2.1.1">2.1.1. The macros builder</a><br />
42 <a href="#chap2.1.2">2.1.2. Creation of the loader</a><br /> 42 <a href="#chap2.1.2">2.1.2. The macros loader</a><br />
43 </ul> 43 </ul>
44 <a href="#chap2.2">2.2. The src directory</a><br /> 44 <a href="#chap2.2">2.2. the interface and src directories</a><br />
45 <ul> 45 <ul>
46 <a href="#chap2.2.1">2.2.1. Interface</a><br /> 46 <a href="#chap2.2.1">2.2.1. interface examples</a><br />
47 <a href="#chap2.2.2">2.2.2. Creation of the builder</a><br /> 47 <a href="#chap2.2.2">2.2.2. Primitives builder</a><br />
48 </ul> 48 </ul>
49 <a href="#chap2.3">2.3. The man directory</a><br /> 49 <a href="#chap2.3">2.3. The man directory</a><br />
50 <ul> 50 <ul>
51 <a href="#chap2.3.1">2.3.1. Creation of .xml files</a><br /> 51 <a href="#chap2.3.1">2.3.1. Creation of .xml files</a><br />
52 <a href="#chap2.3.2">2.3.2. Creation of the builder</a><br /> 52 <a href="#chap2.3.2">2.3.2. The man builder</a><br />
53 <a href="#chap2.3.3">2.3.3. Creation of the loader</a><br /> 53 <a href="#chap2.3.3">2.3.3. The man loader</a><br />
54 </ul> 54 </ul>
55 </ul> 55 </ul>
56 <a href="#chap3">3. The main builder and loader</a><br /> 56 <a href="#chap3">3. The main builder and loader</a><br />
@@ -62,7 +62,7 @@
62 <p>The root directory has the generic name of the toolbox (here <b>toolbox_example</b>), it contains 7 sub-directories:</p> 62 <p>The root directory has the generic name of the toolbox (here <b>toolbox_example</b>), it contains 7 sub-directories:</p>
63 63
64 <ul style="list-style-type: disc"> 64 <ul style="list-style-type: disc">
65 <li><b>macros</b>: Scilab macros (all .sci files),the builder and loader scripts</li> 65 <li><b>macros</b>: Scilab macros (all .sci files), the builder and loader scripts</li>
66 <li><b>src</b>: code source (all .c and .f files), a builder script</li> 66 <li><b>src</b>: code source (all .c and .f files), a builder script</li>
67 <li><b>interface</b>: interface programs, a builder</li> 67 <li><b>interface</b>: interface programs, a builder</li>
68 <li><b>man</b>: all .xml files, the builder and loader scripts</li> 68 <li><b>man</b>: all .xml files, the builder and loader scripts</li>
@@ -85,10 +85,9 @@
85 The main builder and main loader scripts launch respectively the sub-builders and sub-loaders included in the sub-directories (macros, src, man, ...), to generate and to load the necessary libraries and the Scilab help files. 85 The main builder and main loader scripts launch respectively the sub-builders and sub-loaders included in the sub-directories (macros, src, man, ...), to generate and to load the necessary libraries and the Scilab help files.
86 </p> 86 </p>
87 87
88 <a name="#chap2.1"></a> 88 <a name="chap2.1"></a>
89 <h3>2.1 The macros directoy</h3> 89 <h3>2.1 The macros directory</h3>
90 <p> 90 <p>
91 The main builder and main loader scripts launche respectively the sub-builders and sub-loaders included in the sub-directories (macros, man, ...), to generate and to load the necessary libraries and the Scilab help files.
92 This directory included macros Scilab functions, a builder and a loader script.<br /> 91 This directory included macros Scilab functions, a builder and a loader script.<br />
93 A macros is a function written in Scilab code (included in .sci file)<br /> 92 A macros is a function written in Scilab code (included in .sci file)<br />
94 We consider that the macros directory of the toolbox <b>toolbox_example</b> contains just one .sci file: the function <var><strong>foo1</strong></var> (see above script). Given a matrix A, this function returns the positive components of the A diagonal. 93 We consider that the macros directory of the toolbox <b>toolbox_example</b> contains just one .sci file: the function <var><strong>foo1</strong></var> (see above script). Given a matrix A, this function returns the positive components of the A diagonal.
@@ -116,7 +115,7 @@ function [X]=foo1(A)
116endfunction</pre> 115endfunction</pre>
117 116
118 <a name="chap2.1.1"></a> 117 <a name="chap2.1.1"></a>
119 <h4>2.1.1 Creation of the builder</h4> 118 <h4>2.1.1 The macros builder</h4>
120 <p> 119 <p>
121 The builder (see above script) creates a library variable, (named here: toolbox_examplelib= toolbox name +'lib') 120 The builder (see above script) creates a library variable, (named here: toolbox_examplelib= toolbox name +'lib')
122 from functions .sci include in the directory macros, and saves it in the file lib. 121 from functions .sci include in the directory macros, and saves it in the file lib.
@@ -137,7 +136,7 @@ clear pathB genlib toolboxname</pre>
137 To customize this template, replace the characters string 'toolbox_example' by the name of your toolbox. 136 To customize this template, replace the characters string 'toolbox_example' by the name of your toolbox.
138 137
139 <a name="chap2.1.2"></a> 138 <a name="chap2.1.2"></a>
140 <h4>2.1.2 Creation of the loader</h4> 139 <h4>2.1.2 The macros loader</h4>
141 <p> 140 <p>
142 The loader (see above script) loads the library lib included in the directory macros. Like the builder, the code is generic, the first step to locate macrosloader.sce script, and the second to load the library (see help <strong><var>load</strong></var> function) 141 The loader (see above script) loads the library lib included in the directory macros. Like the builder, the code is generic, the first step to locate macrosloader.sce script, and the second to load the library (see help <strong><var>load</strong></var> function)
143 </p> 142 </p>
@@ -151,22 +150,22 @@ load(pathL+'/lib')
151clear pathL</pre> 150clear pathL</pre>
152 151
153 <a name="chap2.2"></a> 152 <a name="chap2.2"></a>
154 <h3>2.2 The src directory</h3> 153 <h3>2.2 Interface and src directories</h3>
155 <p> 154 <p>
156 This directory included .c files and a builder script<br />
157 A Scilab primitive is a Scilab function which calls a function written in C or fortran code (using an interface program)<br /> 155 A Scilab primitive is a Scilab function which calls a function written in C or fortran code (using an interface program)<br />
158 Before to write the builder, its necessary to create for each primitives the corresponding interface programs. When a Scilab primitive is called, the interface program checks that the number, the type and the size of inputs/outputs arguments is correct (using CheckRhs and CheckLhs functions), and get the adress of the rhs arguments which are in Scilab internal stack to give this information at the interfaced function. So in the first part we explain, thanks to template, how to implement some interfaces programs (written in C code). In this article we don't describe all the possibilities of the interface programs, for more explanations see the directory SCI/examples. 156 Before to write the builder, its necessary to create for each primitives the corresponding interface programs which are included in the directory: interface. When a Scilab primitive is called, the interface program checks that the number, the type and the size of inputs/outputs arguments is correct (using CheckRhs and CheckLhs functions), and get the adress of the rhs arguments which are in Scilab internal stack to give this information at the interfaced function. So in the first part we explain, thanks to template, how to implement some interfaces programs (written in C code). In this article we don't describe all the possibilities of the interface programs, for more explanations see the directory SCI/examples.
157 All interface programs are included in the directory: interface<br />
159 </p> 158 </p>
160 159
161 <a name="chap2.2.1"></a> 160 <a name="chap2.2.1"></a>
162 <h4>2.2.1 Interface</h4> 161 <h4>2.2.1 Examples of interfaces programs</h4>
163 <p> 162 <p>
164 Here two examples which enable to write many interfaces, so it's important to understand it, and know how to customize it for your toolbox. 163 Here two examples which enable to write many interfaces, so it's important to understand it, and know how to customize it for your toolbox.
165 </p> 164 </p>
166 165
167 <p> 166 <p>
168 <EM>Example a</EM>: <br /> 167 <EM>Example a</EM>: <br />
169 We consider an C routine sumab which returns the sum of two vectors. I suppose that the name of the corresponding primitive is 168 We consider an C routine <var><strong>sumab</strong></var> which returns the sum of two vectors. I suppose that the name of the corresponding primitive is
170 <var><strong>scisum</strong></var>. We can keep the same name that the C routine (sumab) or try an other name.<br /> 169 <var><strong>scisum</strong></var>. We can keep the same name that the C routine (sumab) or try an other name.<br />
171 The both following scripts represent the C code of <var><strong>sumab</strong></var> and its associated interface program when 170 The both following scripts represent the C code of <var><strong>sumab</strong></var> and its associated interface program when
172 we call the primitive <var><strong>scisum </strong></var>in a Scilab window as follows:<br /> 171 we call the primitive <var><strong>scisum </strong></var>in a Scilab window as follows:<br />
@@ -191,30 +190,30 @@ extern int sumab(int n, double * a, double * b, double * y);
191void intsumab(char *fname){ 190void intsumab(char *fname){
192int l1, m1, n1, l2, m2, n2, l3, n; 191int l1, m1, n1, l2, m2, n2, l3, n;
193 192
194/* 1 - Check the nuumber of input/output arguments */ 193/* 1 - Check the number of inputs/outputs arguments */
195int minlhs=1, maxlhs=1, minrhs=2, maxrhs=2; 194int minlhs=1, maxlhs=1, minrhs=2, maxrhs=2;
196CheckRhs(minrhs,maxrhs) ; 195CheckRhs(minrhs,maxrhs) ;
197CheckLhs(minlhs,maxlhs) ; 196CheckLhs(minlhs,maxlhs) ;
198 197
199/* 2 - Check input arguments type and get input arguments adress in the Scilab stack */ 198/* 2 - Check inputs arguments type, and get the size and the adress in the Scilab stack of the inputs arguments */
200GetRhsVar(1, "d", &m1, &n1, &l1); 199GetRhsVar(1, "d", &m1, &n1, &l1);
201GetRhsVar(2, "d", &m2, &n2, &l2); 200GetRhsVar(2, "d", &m2, &n2, &l2);
202 201
203/* 3 - Check that the input arguments have the same size */ 202/* 3 - Check that the inputs arguments have the same size */
203/* it's possible to use the chekdims and getscalar functions to do these checks*/
204n=m2*n2; 204n=m2*n2;
205if( n1!=n2 || m1!=m2) 205if( n1!=n2 || m1!=m2)
206{ 206{
207 cerro("input arguments must have the same size"); 207 cerro("inputs arguments must have the same size");
208 return 0; 208 return 0;
209} 209}
210if(n1!=0 && m1!=0) 210if(n1!=0 && m1!=0)
211 if(n1!=1 && m1!=1) 211 if(n1!=1 && m1!=1)
212 { 212 {
213 cerro("input arguments must be vectors"); 213 cerro("inputs arguments must be vectors");
214 return(0); 214 return(0);
215 } 215 }
216 216
217/* it's possible to use the chekdims and getscalar functions: a completer ................*/
218 217
219/* 4 - Create the output argument */ 218/* 4 - Create the output argument */
220CreateVar(3,"d",&m2,&n2,&l3); 219CreateVar(3,"d",&m2,&n2,&l3);
@@ -262,13 +261,13 @@ return 0;
262 <br /> 261 <br />
263 262
264 <EM>In Step 4</EM>: instruction <b><i>LhsVar(1) = 3</b></i><br /> 263 <EM>In Step 4</EM>: instruction <b><i>LhsVar(1) = 3</b></i><br />
265 The instruction <b><i>LhsVar(1) = 3</b></i> means the first output argument take the value of the variable placed in the 3th position (i.e Y)<br /> 264 The instruction <b><i>LhsVar(1) = 3</b></i> means the first output argument takes the value of the variable placed in the 3th position (i.e Y)<br />
266 265
267 <br /> 266 <br />
268 <br /> 267 <br />
269 268
270 <EM>Example b</EM>:<br /> 269 <EM>Example b</EM>:<br />
271 In the second example we describe the interface program (see above script) of the primitive </b></i>scifun1</b></i> which uses the C functions <b><i>fun1</b></i> and <b><i>fun2</b></i> (see above script). This primitive have two syntaxes:<br /> 270 In the second example we describe the interface program (see above script) of the primitive <b><i>scifun1</b></i> which uses the C functions <b><i>fun1</b></i> and <b><i>fun2</b></i> (see above script). This primitive has two syntaxes:<br />
272 271
273 <br /> 272 <br />
274 the first syntax is:</b></i><br /> 273 the first syntax is:</b></i><br />
@@ -282,20 +281,20 @@ return 0;
282 </p> 281 </p>
283 282
284 <br /> 283 <br />
285 fun1.c 284 fun1.c (the C function <b><i>fun1</b></i> creates the vector <b><i>X</b></i> and the scalar <b><i>Y</b></i>, it calls the C function <b><i>fun2</b></i> to get the needed size of <b><i>X</b></i> in order to allocate the memory place)
286 <pre class="entete"> 285 <pre class="entete">
287extern void fun2(double *, int, int *); 286extern void fun2(double *, int, int *);
288 287
289void fun1(double * a, int na, int * nb, double ** b , double * positive_sum){ 288void fun1(double * a, int na, int * nx, double ** x , double * y){
290 int i, k1=0; 289 int i, k1=0;
291 *positive_sum=0; 290 *y=0;
292 fun2(a, na, nb); 291 fun2(a, na, nx);
293 *b=(double *)malloc((*nb)*sizeof(double)); 292 *x=(double *)malloc((*nx)*sizeof(double));
294 *positive_sum=0; 293 *y=0;
295 for(i=0;i<na;i++) 294 for(i=0;i<na;i++)
296 if(a[i]>0) { 295 if(a[i]>0) {
297 *(*b+k1)=a[i]; 296 *(*x+k1)=a[i];
298 *positive_sum += a[i]; 297 *y += a[i];
299 k1++; 298 k1++;
300 }; 299 };
301}</pre> 300}</pre>
@@ -304,13 +303,13 @@ void fun1(double * a, int na, int * nb, double ** b , double * positive_sum){
304 303
305 fun2.c 304 fun2.c
306 <pre class="entete"> 305 <pre class="entete">
307void fun2(double * a, int na, int * m) 306void fun2(double * a, int na, int * nx)
308{ 307{
309 int i; 308 int i;
310 *m=0; 309 *nx=0;
311 for(i=0;i<na;i++) 310 for(i=0;i<na;i++)
312 if (a[i]>0) 311 if (a[i]>0)
313 (*m)++; 312 (*nx)++;
314}</pre> 313}</pre>
315 314
316 <br /> 315 <br />
@@ -323,8 +322,8 @@ extern void fun1(double * , int, int *, double **, double *);
323 322
324int intfun1(char *fname) 323int intfun1(char *fname)
325{ 324{
326 int l1, m1, n1, m=1, nX, i, l2, l3; 325 int la, ma, na, m=1, nx, i, lx, ls;
327 double * X, S; 326 double * x, s;
328 327
329 /* 1 - Check the number of inputs and outputs arguments */ 328 /* 1 - Check the number of inputs and outputs arguments */
330 /* You can use the variables: Lhs and Rhs */ 329 /* You can use the variables: Lhs and Rhs */
@@ -332,38 +331,38 @@ int intfun1(char *fname)
332 CheckRhs(minrhs,maxrhs) ; 331 CheckRhs(minrhs,maxrhs) ;
333 CheckLhs(minlhs,maxlhs) ; 332 CheckLhs(minlhs,maxlhs) ;
334 333
335 /* 2 - Check rhs type, get the rows number (m1) and the columns number (n1) of rhs, and its adress (l1) in the Scilab stack */ 334 /* 2 - Check the rhs type, get the rows number (ma) and the columns number (na) of rhs, and its adress (la) in the Scilab stack (first position) */
336 GetRhsVar(1, "d", &m1, &n1, &l1); 335 GetRhsVar(1, "d", &ma, &na, &la);
337 336
338 /* 3 - Check rhs is a vector */ 337 /* 3 - Check rhs is a vector */
339 if(m1!=0 && n1!=0 ) 338 if(ma!=0 && na!=0 )
340 { 339 {
341 if(m1!=1 && n1!=1) 340 if(ma!=1 && na!=1)
342 { 341 {
343 cerro("input argument must be a vector"); 342 cerro("input argument must be a vector");
344 return(0); 343 return(0);
345 } 344 }
346 } 345 }
347 346
348 fun1(stk(l1), n1*m1, &nX, &X, &S); 347 fun1(stk(la), na*ma, &nx, &x, &s);
349 348
350 /* 4 - Create the place for the first output X ( a vector of doubles, size: m*n ) to the adress l2 in the Scilab stack */ 349 /* 4 - Create the place for the first output argument x ( a vector of doubles, size: 1*nx ) to the adress lx in the Scilab stack (second position) */
351 CreateVar(2, "d", &m, &nX, &l2); 350 CreateVar(2, "d", &m, &nx, &lx);
352 351
353 /* if there are two outputs variable then: Create the place for the second output S ( a double, size 1*1) to the adress l3 in the Scilab stack */ 352 /* if there are two outputs variables then: Create the place for the second output s ( a double, size 1*1) to the adress ls in the Scilab stack (third position) */
354 /* get the value of S, and put it in the Scilab stack */ 353 /* get the value of s, and put it in the Scilab stack */
355 if(Lhs==2) 354 if(Lhs==2)
356 { 355 {
357 CreateVar(3, "d", &m, &m, &l3); 356 CreateVar(3, "d", &m, &m, &ls);
358 *stk(l3)=S; 357 *stk(ls)=s;
359 } 358 }
360 359
361 /* get the components of X, and put them in the Scilab stack */ 360 /* get the components of x, and put them in the Scilab stack */
362 for(i=0;i&gt;nX;i++) 361 for(i=0;i&gt;nx;i++)
363 stk(l2)[i]=X[i]; 362 stk(lx)[i]=x[i];
364 363
365 /* free memory */ 364 /* free memory */
366 free(X); 365 free(x);
367 366
368 /* 5 - Specification of outputs variables */ 367 /* 5 - Specification of outputs variables */
369 LhsVar(1) = 2; 368 LhsVar(1) = 2;
@@ -375,45 +374,10 @@ int intfun1(char *fname)
375 <br /> 374 <br />
376 375
377 <a name="chap2.2.2"></a> 376 <a name="chap2.2.2"></a>
378 <h4>2.2.2 Creation of the builder</h4> 377 <h4>2.2.2 Primitives builder</h4>
379 <p> 378 <p>Now the src and the interface directories contain all the necessary files (<b><i>fun1.c</b></i>, <b><i>fun2.c</b></i>, <b><i>intfun1.c</b></i>, <b><i>sumab.c</b></i>, <b><i>intsumab.c</b></i>) to create the builder (see above template) for the primitives <i><b>scifun1</i></b> and <i><b>scisum</i></b>.
380 Now the src directory of the toolbox toolbox_example contains all the necessary files (<b><i>fun1.c</b></i>,
381 <b><i>fun2.c</b></i>, <b><i>intfun1.c</b></i>, <b><i>sumab.c</b></i>, <b><i>intsumab.c</b></i>) to create the
382 builder (see above template) for the primitives scifun1 and scisum.
383 <br />
384 We need to write two builders: one the hand, the src builder (see above script) which creates a shared libraries (see help <i><b>ilib_for_link</b></i> function) corresponding to the .c functions.
385 And the other hand, the interface builder (see above script) which creates new shared libraries to link the compiled C or Fortran
386 new Scilab interface routines (thanks to src libraries), and generates a loader (see help <i><b>ilib_build</b></i> function).
387 This loader file calls the addinter function to dynamically load the shared library (see help <i><b>addinter</b></i> function)
388 </p>
389
390 the src builder
391 <pre class="entete">
392ilib_for_link('toolboxsrc',['fun1.o' 'fun2.o','sumab.o'],[],"c")</pre>
393
394 <br />
395 the interface builder<br />
396
397 <pre class="entete">
398// must be run from this directory
399ilib_name = 'libtoolbox_example' // interface library name
400files = ['intfun1.o', 'intsumab.o']; // objects files
401libs = ["../src/libtooloxsrc"] // other libs needed for linking
402table = [ 'scifun1', 'intfun1';
403 'scisum','intsumab']; // table of (scilab_name,interface-name)
404// do not modify below
405ilib_build(ilib_name,table,files,libs)</pre>
406
407 <br />
408 <br />
409
410 <a name="chap2.2.2"></a>
411 <h4>2.2.2 Creation of the builder</h4>
412 <p>Now the src directory of the toolbox toolbox_example contains all the necessary files (<b><i>fun1.c</b></i>, <b><i>fun2.c</b></i>, <b><i>intfun1.c</b></i>, <b><i>sumab.c</b></i>, <b><i>intsumab.c</b></i>) to create the builder (see above template) for the primitives scifun1 and scisum.
413 <br /> 379 <br />
414 We need to write two builders: one the hand, the src builder (see above script) which creates a shared libraries (see help <i><b>ilib_for_link</b></i> function) corresponding to the .c functions. 380 We need to write two builders:<br /> One the hand, in the src directory, this builder creates a shared libraries (see help <i><b>ilib_for_link</b></i> function) corresponding to the C functions.And the other hand, in the interface directory, this builder creates the new shared libraries to link the compiled C or Fortran new Scilab interface routines (thanks to src libraries), and generates a loader (see help <i><b>ilib_build</b></i> function).
415 And the other hand, the interface builder (see above script) which creates new shared libraries to link the compiled C or Fortran
416 new Scilab interface routines (thanks to src libraries), and generates a loader (see help <i><b>ilib_build</b></i> function).
417 This loader file calls the addinter function to dynamically load the shared library (see help <i><b>addinter</b></i> function)</p> 381 This loader file calls the addinter function to dynamically load the shared library (see help <i><b>addinter</b></i> function)</p>
418 382
419 the src builder 383 the src builder
@@ -442,14 +406,13 @@ ilib_build(ilib_name,table,files,libs)</pre>
442 <h3>2.3 The man directory</h3> 406 <h3>2.3 The man directory</h3>
443 <p>This directory included .xml files, a manbuilder and a manloader scripts 407 <p>This directory included .xml files, a manbuilder and a manloader scripts
444 On Unix/Linux systems: to create the manual pages you need 'sabcmd', an XML parser which is part of the Sablotron package.<br /> 408 On Unix/Linux systems: to create the manual pages you need 'sabcmd', an XML parser which is part of the Sablotron package.<br />
445 (here link to download it:<A href="http://www.scilab.org/download/index_download.php?page=related_tool.html"> http://www.scilab.org/download/index_download.php?page=related_tool.html</A>)<br /> 409 (see the link to download it:<A href="http://www.scilab.org/download/index_download.php?page=related_tool.html"> http://www.scilab.org/download/index_download.php?page=related_tool.html</A>)<br />
446 (.................... a completer ............................)
447 </p> 410 </p>
448 411
449 <a name="chap2.3.1"></a> 412 <a name="chap2.3.1"></a>
450 <h4>2.3.1 Creation of .xml files</h4> 413 <h4>2.3.1 Creation of .xml files</h4>
451 <p> 414 <p>
452 Here a template which helps you to write the .xml help files. You should just fill the different items(Langage, title, type, date, short description, ...) for the .xml files of your functions (here <b><i>foo1.xml</i></b>, <b><i>scifun1.xml</i></b>, <b><i>scisum.xml</i></b>) and put them in the man directory. 415 Here a template which shows you how to write the .xml help files. You should just fill the different items(Langage, title, type, date, short description, ...) for the .xml files of your functions (here <b><i>scifun1.xml</i></b>, <b><i>scisum.xml</i></b>) and put them in the man directory.
453 </p> 416 </p>
454 417
455 <pre class="entete"> 418 <pre class="entete">
@@ -457,7 +420,7 @@ ilib_build(ilib_name,table,files,libs)</pre>
457&lt;!DOCTYPE MAN SYSTEM &quot;/home/scilab/scilab-3.0/man/manrev.dtd&quot;&gt; 420&lt;!DOCTYPE MAN SYSTEM &quot;/home/scilab/scilab-3.0/man/manrev.dtd&quot;&gt;
458&lt;MAN&gt; 421&lt;MAN&gt;
459&lt;LANGUAGE&gt;eng&lt;/LANGUAGE&gt; 422&lt;LANGUAGE&gt;eng&lt;/LANGUAGE&gt;
460&lt;TITLE&gt;scifoo2&lt;/TITLE&gt; 423&lt;TITLE&gt;scisum&lt;/TITLE&gt;
461&lt;TYPE&gt;Scilab Function &lt;/TYPE&gt; 424&lt;TYPE&gt;Scilab Function &lt;/TYPE&gt;
462&lt;DATE&gt;20-Mar-2006&lt;/DATE&gt; 425&lt;DATE&gt;20-Mar-2006&lt;/DATE&gt;
463&lt;SHORT_DESCRIPTION name=&quot;add function name&quot;&gt; add short decription here&lt;/SHORT_DESCRIPTION&gt; 426&lt;SHORT_DESCRIPTION name=&quot;add function name&quot;&gt; add short decription here&lt;/SHORT_DESCRIPTION&gt;
@@ -513,7 +476,7 @@ Add here scilab instructions and comments
513&lt;/SEE_ALSO&gt; 476&lt;/SEE_ALSO&gt;
514 477
515&lt;BIBLIO&gt; 478&lt;BIBLIO&gt;
516Add here the function bibliography if any 479&lt;Add here the function bibliography if any
517&lt;/BIBLIO&gt; 480&lt;/BIBLIO&gt;
518 481
519&lt;AUTHORS&gt; 482&lt;AUTHORS&gt;
@@ -527,8 +490,8 @@ Add here the used function name and references
527&lt;/MAN&gt;</pre> 490&lt;/MAN&gt;</pre>
528 491
529 <a name="chap2.3.2"></a> 492 <a name="chap2.3.2"></a>
530 <h4>2.3.2 Creation of the builder</h4> 493 <h4>2.3.2 The man builder</h4>
531 <p>The manbuilder (see above) creates a whatis.htm file which is a short description of the functions, and translates the xml files to html (see help xmltohtml function) 494 <p>The manbuilder (see above) creates a whatis.htm file which is a short description of the functions, and translates the xml files to html (see help <b><i>xmltohtml</b></i> function)
532 </p> 495 </p>
533 496
534 <br /> 497 <br />
@@ -543,7 +506,7 @@ xmltohtml(path,"Title1")
543clear path add_help_chapter get_absolute_file_path </pre> 506clear path add_help_chapter get_absolute_file_path </pre>
544 507
545 <a name="chap2.3.3"></a> 508 <a name="chap2.3.3"></a>
546 <h4>2.3.3 Creation of the loader</h4> 509 <h4>2.3.3 The man loader</h4>
547 <p>The loader(see above script) add your help functions files in the help Scilab browser 510 <p>The loader(see above script) add your help functions files in the help Scilab browser
548 </p> 511 </p>
549 512