CAPI stuff moved into help/en_US/capi and examples to examples/
Sylvestre Ledru [Mon, 27 Apr 2009 14:45:08 +0000 (16:45 +0200)]
28 files changed:
scilab/modules/core/Makefile.in
scilab/modules/core/examples/capi/call_scifunction/call_scifunction.sce [moved from scilab/modules/core/help/en_US/capi/examples/call_scifunction/call_scifunction.sce with 100% similarity]
scilab/modules/core/examples/capi/call_scifunction/sci_call_scifunc.c [moved from scilab/modules/core/help/en_US/capi/examples/call_scifunction/sci_call_scifunc.c with 100% similarity]
scilab/modules/core/examples/capi/ex1/builder.sce [moved from scilab/modules/core/help/en_US/capi/examples/ex1/builder.sce with 100% similarity]
scilab/modules/core/examples/capi/ex1/multiply_by_two.c [moved from scilab/modules/core/help/en_US/capi/examples/ex1/multiply_by_two.c with 100% similarity]
scilab/modules/core/examples/capi/ex1/test.sce [moved from scilab/modules/core/help/en_US/capi/examples/ex1/test.sce with 100% similarity]
scilab/modules/core/help/en_US/capi/CallingAScilabFunctionFromACInterface.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/CallingAScilabFunctionFromACInterface.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/CheckLhs.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/CheckLhs.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/CheckRhs.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/CheckRhs.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/CreateVar.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/CreateVar.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/GetRhsVar.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/GetRhsVar.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/GetType.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/GetType.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/HowToAccessAMatrix_1.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/HowToAccessAMatrix_1.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/Lhs.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/Lhs.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/LhsVar.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/LhsVar.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/Rhs.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/Rhs.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/Scierror.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/Scierror.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/Scifunction.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/Scifunction.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/ScilabCTypes.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/ScilabCTypes.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/TODO [new file with mode: 0644]
scilab/modules/core/help/en_US/capi/help/en_US/build_help.sce [deleted file]
scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/javahelp.css [deleted file]
scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/master_help-processed.xml [deleted file]
scilab/modules/core/help/en_US/capi/istk.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/istk.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/master_help.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/master_help.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/sci_types.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/sci_types.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/sciprint.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/sciprint.xml with 100% similarity]
scilab/modules/core/help/en_US/capi/stk.xml [moved from scilab/modules/core/help/en_US/capi/help/en_US/stk.xml with 100% similarity]

index 5e1cd35..4f32c7a 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -934,8 +934,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
              exit 1;; \
          esac; \
        done; \
@@ -2619,7 +2619,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
diff --git a/scilab/modules/core/help/en_US/capi/TODO b/scilab/modules/core/help/en_US/capi/TODO
new file mode 100644 (file)
index 0000000..f8380f6
--- /dev/null
@@ -0,0 +1,3 @@
+Functions:
+getWarningMode
+
diff --git a/scilab/modules/core/help/en_US/capi/help/en_US/build_help.sce b/scilab/modules/core/help/en_US/capi/help/en_US/build_help.sce
deleted file mode 100755 (executable)
index f121295..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// ====================================================================
-// Yann COLLETTE
-// Copyright 2009
-// This file is released into the public domain
-// ====================================================================
-
-help_lang_dir = get_absolute_file_path('build_help.sce');
-
-tbx_build_help("CAPI", help_lang_dir);
-
-clear help_lang_dir;
-
diff --git a/scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/javahelp.css b/scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/javahelp.css
deleted file mode 100755 (executable)
index 4f54533..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- */
-
-body  {
-    font-family: sans-serif;
-    font-size: small;
-    color: black;
-    background-color: white;
-    margin-left: 5;
-    margin-right: 5;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-    color: #483D8B; 
-    font-weight: bold;
-    margin-top: 10;
-    margin-bottom: 5;
-}
-
-h1,
-h2 {
-    font-size: large;
-}
-
-h3,
-h4 {
-    font-size: medium;
-}
-
-table {
-    border-width: 1; 
-    border-style: solid;
-    border-color: silver;
-    background-color: silver;
-    padding-left: 0;
-    padding-right: 0;
-    padding-top: 0;
-    padding-bottom: 0;
-    margin-top: 5;
-    margin-bottom: 5;
-}
-
-th,
-td {
-    border-width: 1; 
-    border-style: solid;
-    border-color: silver;
-    padding-left: 2;
-    padding-right: 2;
-    padding-top: 2;
-    padding-bottom: 2;
-}
-
-th {
-    background-color: #F0F0F0; 
-}
-
-td {
-    background-color: white;
-}
-
-dl {
-    margin-top: 10;
-    margin-bottom: 5;
-}
-
-dt {
-    font-weight: bold;
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-dd {
-    margin-top: 2;
-    margin-left: 24;
-}
-
-ul,
-ol {
-    margin-top: 5;
-    margin-bottom: 0;
-}
-
-ul {
-    margin-left: 16;
-}
-
-ol {
-     margin-left: 24;
-}
-
-li {
-    margin-top: 0;
-    margin-bottom: 5;
-}
-
-li p {
-    margin-top: 5;
-    margin-bottom: 0;
-}
-
-p {
-    margin-top: 5;
-    margin-bottom: 5;
-}
-
-div.sidebar { 
-    background-color: #F0F0FF; 
-    border-width: 1; 
-    border-style: solid;
-    border-color: gray;
-    padding-top: 5; 
-    padding-bottom: 5; 
-    padding-left: 5; 
-    padding-right: 5; 
-    margin-top: 20;
-    margin-bottom: 20;
-    margin-left: 20;
-    margin-right: 20;
-}
-
-pre.programlisting { 
-    background-color: #F0F0F0; 
-    border-width: 1; 
-    border-style: solid;
-    border-color: gray;
-    padding-top: 2; 
-    padding-bottom: 2; 
-    padding-left: 2; 
-    padding-right: 2; 
-}
-
-small {
-    font-size: x-small;
-}
-
-big {
-    font-size: medium;
-}
diff --git a/scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/master_help-processed.xml b/scilab/modules/core/help/en_US/capi/help/en_US/scilab_en_US_help/master_help-processed.xml
deleted file mode 100755 (executable)
index 06c77d4..0000000
+++ /dev/null
@@ -1,640 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<book version='5.0-subset Scilab' xml:lang='en_US'>
-  <info>
-    <title>CAPI</title>
-  </info>
-
-<reference xml:id='category_capi'>
-<title>CAPI</title>
-
-<refentry version='5.0-subset Scilab' xml:id='CreateVar'>
-  <refnamediv xml:id='???'>
-    <refname>CreateVar</refname>
-
-    <refpurpose>a C interface function which allows to create a new Scilab
-    variable</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <title>Calling Sequence</title>
-
-    <synopsis>CreateVar(StackPos,Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_pos);</synopsis>
-  </refsynopsisdiv>
-
-  <refsection>
-    <title>Parameters</title>
-
-    <variablelist>
-      <varlistentry>
-        <term>StackPos</term>
-
-        <listitem>
-          <para>the rank of the variable to be created (input
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>Type</term>
-
-        <listitem>
-          <para>the Scilab type of the variable to be created (input
-          parameter). Can be (see Scilab C Type for more informations):</para>
-
-          <itemizedlist>
-            <listitem>
-              <para>STRING_DATATYPE &quot;c&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_STRING_DATATYPE &quot;S&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_DOUBLE_DATATYPE &quot;d&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_RATIONAL_DATATYPE &quot;r&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE &quot;I&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_INTEGER_DATATYPE &quot;i&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_BOOLEAN_DATATYPE &quot;b&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_COMPLEX_DATATYPE &quot;z&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>SPARSE_MATRIX_DATATYPE &quot;s&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>TYPED_LIST_DATATYPE &quot;t&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE &quot;m&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>SCILAB_POINTER_DATATYPE &quot;p&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>GRAPHICAL_HANDLE_DATATYPE &quot;h&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>EXTERNAL_DATATYPE &quot;f&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_POLYNOMIAL_DATATYPE &quot;x&quot;</para>
-            </listitem>
-          </itemizedlist>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>m_rows</term>
-
-        <listitem>
-          <para>the number of lines of the matrix to be created (input
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>n_cols</term>
-
-        <listitem>
-          <para>the number of columns of the matrix to be created (input
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>l_stack_pos</term>
-
-        <listitem>
-          <para>the position on the stack of the created variable (output
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refsection>
-
-  <refsection>
-    <title>Description</title>
-
-    <para>A C interface function which allows to create a new Scilab
-    variable</para>
-  </refsection>
-
-  <refsection>
-    <title>Examples</title>
-
-    <programlisting role='example'> 
-#include &lt;stack-c.h&gt;
-
-int sci_myones(char * fname)
-{
-  int m_row, n_col, l_pos;
-  
-  m_row = 1; n_col = 1; // We create a scalar
-  CreateVar(1, MATRIX_OF_INTEGER_DATATYPE, &amp;m_row, &amp;n_col, &amp;l_pos);
-
-  *istk(l_pos) = 1;
-
-  LhsVar(1) = 1;
-
-  return 0;
-}
- </programlisting>
-  </refsection>
-
-  <refsection>
-    <title>See Also</title>
-
-    <simplelist type='inline'>
-      <member><link linkend='ScilabCTypes'>Scilab C Type</link></member>
-      <member><link linkend='istk'>istk</link></member>
-      <member><link linkend='LhsVar'>LhsVar</link></member>
-    </simplelist>
-  </refsection>
-</refentry>
-
-
-<refentry version='5.0-subset Scilab' xml:id='GetRhsVar'>
-  <refnamediv xml:id='???'>
-    <refname>GetRhsVar</refname>
-
-    <refpurpose>a C interface function which allows to access a parameter
-    transmitted to a Scilab function</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <title>Calling Sequence</title>
-
-    <synopsis>GetRhsVar(StackPos,Type, &amp;m_rows, &amp;n_cols, &amp;l_stack_pos);</synopsis>
-  </refsynopsisdiv>
-
-  <refsection>
-    <title>Parameters</title>
-
-    <variablelist>
-      <varlistentry>
-        <term>StackPos</term>
-
-        <listitem>
-          <para>the rank of the variable to be accessed (input
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>Type</term>
-
-        <listitem>
-          <para>the Scilab type of the variable to be accessed (input
-          parameter). Can be (see Scilab C Type for more informations):</para>
-
-          <itemizedlist>
-            <listitem>
-              <para>STRING_DATATYPE &quot;c&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_STRING_DATATYPE &quot;S&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_DOUBLE_DATATYPE &quot;d&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_RATIONAL_DATATYPE &quot;r&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE &quot;I&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_INTEGER_DATATYPE &quot;i&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_BOOLEAN_DATATYPE &quot;b&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_COMPLEX_DATATYPE &quot;z&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>SPARSE_MATRIX_DATATYPE &quot;s&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>TYPED_LIST_DATATYPE &quot;t&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_ORIENTED_TYPED_LIST_DATATYPE &quot;m&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>SCILAB_POINTER_DATATYPE &quot;p&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>GRAPHICAL_HANDLE_DATATYPE &quot;h&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>EXTERNAL_DATATYPE &quot;f&quot;</para>
-            </listitem>
-
-            <listitem>
-              <para>MATRIX_OF_POLYNOMIAL_DATATYPE &quot;x&quot;</para>
-            </listitem>
-          </itemizedlist>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>m_rows</term>
-
-        <listitem>
-          <para>the number of lines of the accessed variable (output
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>n_cols</term>
-
-        <listitem>
-          <para>the number of columns of the accessed variable (output
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term>l_stack_pos</term>
-
-        <listitem>
-          <para>the position on the stack of the accessed variable (output
-          parameter)</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refsection>
-
-  <refsection>
-    <title>Description</title>
-
-    <para>A C interface function which allows to access a parameter
-    transmitted to a Scilab function</para>
-  </refsection>
-
-  <refsection>
-    <title>Examples</title>
-
-    <para>In this example, the function has two input parameters:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>the number of columns (first parameter)</para>
-      </listitem>
-
-      <listitem>
-        <para>the number of lines (second parameter)</para>
-      </listitem>
-    </itemizedlist>
-
-    <para>The goal of this function is to created a matrix of integers equal
-    to 1.</para>
-
-    <programlisting role='example'> 
-#include &lt;stack-c.h&gt;
-#include &lt;string.h&gt;
-
-int sci_myones(char * fname)
-{
-  int m_param_1, n_param_1, l_param_1;
-  int m_param_2, n_param_2, l_param_2;
-  int m_out_row, n_out_col, l_out_pos;
-  
-  GetRhsVar(1, MATRIX_OF_INTEGER_DATATYPE, &amp;m_param_1, &amp;n_param_1, &amp;l_param_1);
-  GetRhsVar(2, MATRIX_OF_INTEGER_DATATYPE, &amp;m_param_2, &amp;n_param_2, &amp;l_param_2);
-
-  // We create a matrix of ints equal to 1
-  m_out_row = *istk(l_param_1);
-  n_out_col = *istk(l_param_2);
-
-  CreateVar(3, MATRIX_OF_INTEGER_DATATYPE, &amp;m_out_row, &amp;n_out_col, &amp;l_out_pos);
-
-  memset(istk(l_out_pos), 1, m_out_row * n_out_col * sizeof(int));
-
-  LhsVar(1) = 3;
-
-  return 0;
-}
- </programlisting>
-  </refsection>
-
-  <refsection>
-    <title>See Also</title>
-
-    <simplelist type='inline'>
-      <member><link linkend='ScilabCTypes'>Scilab C Type</link></member>
-      <member><link linkend='istk'>istk</link></member>
-      <member><link linkend='LhsVar'>LhsVar</link></member>
-    </simplelist>
-  </refsection>
-</refentry>
-
-
-<refentry version='5.0-subset Scilab' xml:id='HowToAccessAMatrix_1'>
-  <refnamediv xml:id='???'>
-    <refname>How to access a matrix</refname>
-
-    <refpurpose>how to access a matrix using the C API</refpurpose>
-  </refnamediv>
-
-  <refsection>
-    <title>Description</title>
-
-    <para>The goal is to get a matrix of doubles send to a function written in
-    C.</para>
-
-    <para>For this, we will wrote a C interface function in which we will
-    retrieve the matrix, we will perform some simple steps in this C
-    function:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>first, we will get an access to the matrix</para>
-      </listitem>
-
-      <listitem>
-        <para>we will perform some simple operations on the matrix (we will
-        multiply by 2 each elements of the matrix)</para>
-      </listitem>
-
-      <listitem>
-        <para>we will return the result to Scilab</para>
-      </listitem>
-    </itemizedlist>
-
-    <para>This example is available in the directory CAPI/examples/ex1.</para>
-  </refsection>
-
-  <refsection>
-    <title>The C function</title>
-
-    <programlisting role='example'> 
-#include &lt;stack-c.h&gt;
-
-int sci_multiply_by_two(char * fname)
-{
-  int m_in_var, n_in_var, l_in_var;
-  int m_out_var, n_out_var, l_out_var;
-  int i_row, j_col;
-
-  // First, access to the input variable (a matrix of doubles)
-  GetRhsVar(1, &quot;d&quot;, &amp;m_in_var, &amp;n_in_var, &amp;l_in_var);
-
-  // Create the returned variable (a matrix of doubles)
-  m_out_var = m_in_var;
-  n_out_var = n_in_var;
-  CreateVar(2, &quot;d&quot;, &amp;m_out_var, &amp;n_out_var, &amp;l_out_var);
-
-  // Perform some simple operations on the matrix
-  for(i_row=0; i_row&lt;m_in_var; i_row++)
-    {
-      for(j_col=0; j_col&lt;n_in_var; j_col++)
-        {
-          *stk(l_out_var + i_row + j_col * m_out_var) = 2 * (*stk(l_in_var + i_row + j_col * m_in_var));
-        }
-    }
-
-  // Return the output variable
-  LhsVar(1) = 2;
-
-  return 0;
-}
-  </programlisting>
-
-    <para>This file must be saved as &quot;multiply_by_two.c&quot;.</para>
-
-    <para>The main thing to highlight is that, to build a C interface
-    function, we need to include the header stack-c.h. In this header, we find
-    the prototypes and macros of the main C interface functions.</para>
-
-    <para>To be able to build and link such a C function to scilab, we need to
-    write a Scilab script which will compile this C function and then create a
-    loader script which will link the C function to a Scilab function.</para>
-  </refsection>
-
-  <refsection>
-    <title>The builder script</title>
-
-    <programlisting role='example'> 
-// This is the builder.sce 
-// must be run from this directory 
-
-lines(0);
-
-ilib_name  = &apos;lib_multiply_by_two&apos;;
-
-files = [&apos;multiply_by_two.c&apos;];
-
-libs  = [];
-
-table =[&apos;multiply_by_two&apos;, &apos;sci_multiply_by_two&apos;];
-
-ldflags = &quot;&quot;;
-cflags  = &quot;&quot;;
-fflags  = &quot;&quot;;
-
-// do not modify below 
-// ----------------------------------------------
-ilib_build(ilib_name,table,files,libs,&apos;Makelib&apos;,ldflags,cflags,fflags);
-  </programlisting>
-
-    <para>This file must be saved as &quot;builder.sce&quot;.</para>
-
-    <para>This script will tell Scilab which files must be compiled (here,
-    it&apos;s multiply_by_two.c), what will be the name of the shared library
-    (here, it&apos;s lib_multiply_by_two) and which C symbol will be linked to a
-    Scilab function (here, we will link the sci_multiply_by_two C symbol to
-    the Scilab function &quot;multiply_by_two&quot;).</para>
-
-    <para>To build this function, we just need to to:</para>
-
-    <programlisting> 
-exec builder.sce;
- </programlisting>
-
-    <para>Now we are able to test our new C function. First, let&apos;s load this
-    new function in scilab:</para>
-
-    <programlisting> 
-exec loader.sce; 
- </programlisting>
-
-    <para>The script loader.sce is normally automatically built by
-    builder.sce.</para>
-  </refsection>
-
-  <refsection>
-    <title>Testing our new function</title>
-
-    <para>We now write a simple example to test our new function.</para>
-
-    <programlisting role='example'> 
-A = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
-
-B = multiply_by_two(A);
-
-disp(B);
-  </programlisting>
-
-    <para>The script must be saved as &quot;test.sce&quot;.</para>
-
-    <para>Let&apos;s run our scripts and see what is the result:</para>
-
-    <programlisting> 
---&gt;exec builder.sce;
-   Generate a gateway file
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy multiply_by_two.c to TMPDIR
-   ilib_gen_Make: Copy lib_multiply_by_two.c to TMPDIR
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the makefile
---&gt;exec loader.sce;
-Shared archive loaded.
-Link done.
---&gt;exec test.sce;
-    2.     4.     6.     8.     10.  
-    12.    14.    16.    18.    20.  
-    22.    24.    26.    28.    30.  
---&gt; 
- </programlisting>
-
-    <para>This simple function has produced a new matrix which corresponds to
-    the matrix transmitted as an input parameter and for which each elements
-    of the matrix has been multiplied by 2.</para>
-
-    <para></para>
-  </refsection>
-
-  <refsection>
-    <title>Rebuilding an interface function</title>
-
-    <para>Let&apos;s imagine that our interface function has already been build and
-    we would like to make some changes in our function (multiply by 3 instead
-    of 2).</para>
-
-    <para>How do we perform such a changes without restarting Scilab ?</para>
-
-    <para>First, we need to list all the dynamic libraries which has been
-    loaded into Scilab. The can be done using the link(&apos;show&apos;)
-    function:</para>
-
-    <programlisting> 
---&gt;link(&apos;show&apos;)
-Number of entry points 1.
-Shared libraries :
-[ 0 ] : 1 libraries.
-Entry point lib_multiply_by_two in shared library 0.
- ans  =
-    0.  
- </programlisting>
-
-    <para>Here, in our current Scilab session, only 1 dynamic library has been
-    loaded. This library has a reference number. For our library, it&apos;s &quot;0&quot;.
-    Now that we know the reference number of our library, we are able
-    to:</para>
-
-    <itemizedlist>
-      <listitem>
-        <para>unload this library (using the function ulink(0) - 0 is the
-        reference number of our library)</para>
-      </listitem>
-
-      <listitem>
-        <para>perform some modification in the source code of our C interface
-        function (replace multiply by 2 by 3)</para>
-      </listitem>
-
-      <listitem>
-        <para>rebuild the C interface function (exec builder.sce;)</para>
-      </listitem>
-
-      <listitem>
-        <para>load the modified C interface function into scilab (exec
-        loader.sce;)</para>
-      </listitem>
-    </itemizedlist>
-
-    <para>This is what is done is the following example:</para>
-
-    <programlisting> 
---&gt;ulink(0)
---&gt;exec builder.sce;
-   Generate a gateway file
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy multiply_by_two.c to TMPDIR
-   ilib_gen_Make: Copy lib_multiply_by_two.c to TMPDIR
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the makefile
---&gt;exec loader.sce;
-Shared archive loaded.
-Link done.
---&gt;exec test.sce;
-    3.     6.     9.     12.    15.  
-    18.    21.    24.    27.    30.  
-    33.    36.    39.    42.    45.  
-  </programlisting>
-
-    <para></para>
-  </refsection>
-
-  <refsection>
-    <title>See Also</title>
-
-    <simplelist type='inline'>
-      <member><link linkend='GetRhsVar'>GetRhsVar</link></member>
-      <member><link linkend='ScilabCTypes'>Scilab C Types</link></member>
-      <member><link linkend='CreateVar'>CreateVar</link></member>
-      <member><link linkend='LhsVar'>LhsVar</link></member>
-      <member><link linkend='stk'>stk</link></member>
-      <member><link linkend='ilib_build'>ilib_build</link></member>
-      <member><link linkend='link'>link</link></member>
-      <member><link linkend='ulink'>ulink
\ No newline at end of file