Reorganization
Allan Cornet [Thu, 7 Sep 2006 19:23:46 +0000 (19:23 +0000)]
sort & remove macros/util

add functions module

132 files changed:
scilab/macros/buildmacros.sce
scilab/modules/cacsd/macros/bloc2exp.sci [moved from scilab/macros/util/bloc2exp.sci with 100% similarity]
scilab/modules/cacsd/macros/cmb_lin.sci [moved from scilab/macros/util/cmb_lin.sci with 100% similarity]
scilab/modules/cacsd/macros/lin.sci [moved from scilab/macros/util/lin.sci with 100% similarity]
scilab/modules/cacsd/macros/mps2linpro.sci [moved from scilab/macros/util/mps2linpro.sci with 100% similarity]
scilab/modules/cacsd/macros/solve.sci [moved from scilab/macros/util/solve.sci with 100% similarity]
scilab/modules/cacsd/macros/ssrand.sci [moved from scilab/macros/util/ssrand.sci with 100% similarity]
scilab/modules/cacsd/macros/sysconv.sci [moved from scilab/macros/util/sysconv.sci with 100% similarity]
scilab/modules/cacsd/macros/sysdiag.sci [moved from scilab/macros/util/sysdiag.sci with 100% similarity]
scilab/modules/cacsd/macros/syslin.sci [moved from scilab/macros/util/syslin.sci with 100% similarity]
scilab/modules/cacsd/macros/syssize.sci [moved from scilab/macros/util/syssize.sci with 100% similarity]
scilab/modules/cacsd/macros/trfmod.sci [moved from scilab/macros/util/trfmod.sci with 100% similarity]
scilab/modules/cacsd/macros/trianfml.sci [moved from scilab/macros/util/trianfml.sci with 100% similarity]
scilab/modules/cacsd/macros/trisolve.sci [moved from scilab/macros/util/trisolve.sci with 100% similarity]
scilab/modules/core/macros/OS_Version.sci [moved from scilab/macros/util/OS_Version.sci with 100% similarity]
scilab/modules/core/macros/getshell.sci [moved from scilab/macros/util/getshell.sci with 100% similarity]
scilab/modules/core/macros/typeof.sci [moved from scilab/macros/util/typeof.sci with 100% similarity]
scilab/modules/core/macros/whereami.sci [moved from scilab/macros/util/whereami.sci with 100% similarity]
scilab/modules/core/macros/who_user.sci [moved from scilab/macros/util/who_user.sci with 100% similarity]
scilab/modules/core/macros/whos.sci [moved from scilab/macros/util/whos.sci with 100% similarity]
scilab/modules/data_structures/macros/buildmacros.sce
scilab/modules/data_structures/macros/iscell.sci [moved from scilab/macros/util/iscell.sci with 100% similarity]
scilab/modules/data_structures/macros/isfield.sci [moved from scilab/macros/util/isfield.sci with 100% similarity]
scilab/modules/data_structures/macros/isstruct.sci [moved from scilab/macros/util/isstruct.sci with 100% similarity]
scilab/modules/elementaries_functions/macros/linspace.sci [moved from scilab/macros/util/linspace.sci with 100% similarity]
scilab/modules/elementaries_functions/macros/logspace.sci [moved from scilab/macros/util/logspace.sci with 100% similarity]
scilab/modules/elementaries_functions/macros/ndgrid.sci [moved from scilab/macros/util/ndgrid.sci with 100% similarity]
scilab/modules/fileio/macros/basename.sci [moved from scilab/macros/util/basename.sci with 100% similarity]
scilab/modules/fileio/macros/cd.sci [moved from scilab/macros/util/cd.sci with 100% similarity]
scilab/modules/fileio/macros/copyfile.sci [moved from scilab/macros/util/copyfile.sci with 100% similarity]
scilab/modules/fileio/macros/dir.sci [moved from scilab/macros/util/dir.sci with 100% similarity]
scilab/modules/fileio/macros/dirname.sci [moved from scilab/macros/util/dirname.sci with 100% similarity]
scilab/modules/fileio/macros/dispfiles.sci [moved from scilab/macros/util/dispfiles.sci with 100% similarity]
scilab/modules/fileio/macros/excel2sci.sci [moved from scilab/macros/util/excel2sci.sci with 100% similarity]
scilab/modules/fileio/macros/fileparts.sci [moved from scilab/macros/util/fileparts.sci with 100% similarity]
scilab/modules/fileio/macros/format_txt.sci [moved from scilab/macros/util/format_txt.sci with 100% similarity]
scilab/modules/fileio/macros/fullfile.sci [moved from scilab/macros/util/fullfile.sci with 100% similarity]
scilab/modules/fileio/macros/get_absolute_file_path.sci [moved from scilab/macros/util/get_absolute_file_path.sci with 100% similarity]
scilab/modules/fileio/macros/get_file_path.sci [moved from scilab/macros/util/get_file_path.sci with 100% similarity]
scilab/modules/fileio/macros/isdir.sci [moved from scilab/macros/util/isdir.sci with 100% similarity]
scilab/modules/fileio/macros/listfiles.sci [moved from scilab/macros/util/listfiles.sci with 100% similarity]
scilab/modules/fileio/macros/listvarinfile.sci [moved from scilab/macros/util/listvarinfile.sci with 100% similarity]
scilab/modules/fileio/macros/ls.sci [moved from scilab/macros/util/ls.sci with 100% similarity]
scilab/modules/fileio/macros/mdelete.sci [moved from scilab/macros/util/mdelete.sci with 100% similarity]
scilab/modules/fileio/macros/mkdir.sci [moved from scilab/macros/util/mkdir.sci with 100% similarity]
scilab/modules/fileio/macros/newest.sci [moved from scilab/macros/util/newest.sci with 100% similarity]
scilab/modules/fileio/macros/pathconvert.sci [moved from scilab/macros/util/pathconvert.sci with 100% similarity]
scilab/modules/fileio/macros/readxls.sci [moved from scilab/macros/util/readxls.sci with 100% similarity]
scilab/modules/fileio/macros/rmdir.sci [moved from scilab/macros/util/rmdir.sci with 100% similarity]
scilab/modules/fileio/macros/savematfile.sci [moved from scilab/macros/util/savematfile.sci with 100% similarity]
scilab/modules/fileio/macros/scanf.sci [moved from scilab/macros/util/scanf.sci with 100% similarity]
scilab/modules/fileio/macros/sci2excel.sci [moved from scilab/macros/util/sci2excel.sci with 100% similarity]
scilab/modules/functions/VERSION [new file with mode: 0644]
scilab/modules/functions/changelog.txt [new file with mode: 0644]
scilab/modules/functions/etc/functions.quit [new file with mode: 0644]
scilab/modules/functions/etc/functions.start [new file with mode: 0644]
scilab/modules/functions/help/eng/genlib.xml [new file with mode: 0644]
scilab/modules/functions/help/eng/helpbuildereng.sce [new file with mode: 0644]
scilab/modules/functions/help/fr/genlib.xml [new file with mode: 0644]
scilab/modules/functions/help/fr/helpbuilderfr.sce [new file with mode: 0644]
scilab/modules/functions/help/helpbuilder.sce [new file with mode: 0644]
scilab/modules/functions/licence.txt [new file with mode: 0644]
scilab/modules/functions/macros/buildmacros.sce [moved from scilab/macros/util/buildmacros.sce with 53% similarity]
scilab/modules/functions/macros/createfun.sci [moved from scilab/macros/util/createfun.sci with 100% similarity]
scilab/modules/functions/macros/genlib.sci [moved from scilab/macros/util/genlib.sci with 100% similarity]
scilab/modules/functions/macros/genlib_old.sci [moved from scilab/macros/util/genlib_old.sci with 100% similarity]
scilab/modules/functions/macros/get_function_path.sci [moved from scilab/macros/util/get_function_path.sci with 100% similarity]
scilab/modules/functions/macros/get_profile.sci [moved from scilab/macros/util/get_profile.sci with 100% similarity]
scilab/modules/functions/macros/getd.sci [moved from scilab/macros/util/getd.sci with 100% similarity]
scilab/modules/functions/macros/head_comments.sci [moved from scilab/macros/util/head_comments.sci with 100% similarity]
scilab/modules/functions/macros/macrovar.sci [moved from scilab/macros/util/macrovar.sci with 100% similarity]
scilab/modules/functions/macros/old2newinstr.sci [moved from scilab/macros/util/old2newinstr.sci with 100% similarity]
scilab/modules/functions/macros/plotprofile.sci [moved from scilab/macros/util/plotprofile.sci with 100% similarity]
scilab/modules/functions/macros/profile.sci [moved from scilab/macros/util/profile.sci with 100% similarity]
scilab/modules/functions/macros/showprofile.sci [moved from scilab/macros/util/showprofile.sci with 100% similarity]
scilab/modules/functions/readme.txt [new file with mode: 0644]
scilab/modules/graphics/macros/projaff.sci [moved from scilab/macros/util/projaff.sci with 100% similarity]
scilab/modules/graphics/macros/xs2eps.sci [moved from scilab/macros/util/xs2eps.sci with 100% similarity]
scilab/modules/gui/macros/menubar.sci [moved from scilab/macros/util/menubar.sci with 100% similarity]
scilab/modules/gui/macros/savedefaultbrowser.sci [moved from scilab/macros/util/savedefaultbrowser.sci with 100% similarity]
scilab/modules/gui/macros/show_startupinfo.sci [moved from scilab/macros/util/show_startupinfo.sci with 100% similarity]
scilab/modules/helptools/etc/helptools.start
scilab/modules/io/macros/fprintf.sci [moved from scilab/macros/util/fprintf.sci with 100% similarity]
scilab/modules/io/macros/fscanf.sci [moved from scilab/macros/util/fscanf.sci with 100% similarity]
scilab/modules/io/macros/getscilabkeywords.sci [moved from scilab/macros/util/getscilabkeywords.sci with 100% similarity]
scilab/modules/io/macros/halt.sci [moved from scilab/macros/util/halt.sci with 100% similarity]
scilab/modules/io/macros/input.sci [moved from scilab/macros/util/input.sci with 100% similarity]
scilab/modules/io/macros/printf.sci [moved from scilab/macros/util/printf.sci with 100% similarity]
scilab/modules/io/macros/readc_.sci [moved from scilab/macros/util/readc_.sci with 100% similarity]
scilab/modules/io/macros/sprintf.sci [moved from scilab/macros/util/sprintf.sci with 100% similarity]
scilab/modules/io/macros/sscanf.sci [moved from scilab/macros/util/sscanf.sci with 100% similarity]
scilab/modules/io/macros/ssprint.sci [moved from scilab/macros/util/ssprint.sci with 100% similarity]
scilab/modules/linear_algebra/macros/ReadmiMatrix.sci [moved from scilab/macros/util/ReadmiMatrix.sci with 100% similarity]
scilab/modules/linear_algebra/macros/WritemiMatrix.sci [moved from scilab/macros/util/WritemiMatrix.sci with 100% similarity]
scilab/modules/linear_algebra/macros/hypermat.sci [moved from scilab/macros/util/hypermat.sci with 100% similarity]
scilab/modules/linear_algebra/macros/ndims.sci [moved from scilab/macros/util/ndims.sci with 100% similarity]
scilab/modules/localization/etc/localization.quit
scilab/modules/localization/etc/localization.start
scilab/modules/localization/macros/buildmacros.sce
scilab/modules/localization/macros/setlanguage.sci [moved from scilab/macros/util/setlanguage.sci with 100% similarity]
scilab/modules/m2sci/macros/cat_code.sci [moved from scilab/macros/util/cat_code.sci with 100% similarity]
scilab/modules/m2sci/macros/changevarname.sci [moved from scilab/macros/util/changevarname.sci with 100% similarity]
scilab/modules/m2sci/macros/expression2code.sci [moved from scilab/macros/util/expression2code.sci with 100% similarity]
scilab/modules/m2sci/macros/instruction2code.sci [moved from scilab/macros/util/instruction2code.sci with 100% similarity]
scilab/modules/m2sci/macros/rhs2code.sci [moved from scilab/macros/util/rhs2code.sci with 100% similarity]
scilab/modules/m2sci/macros/sci2exp.sci [moved from scilab/macros/util/sci2exp.sci with 100% similarity]
scilab/modules/m2sci/macros/tree2code.sci [moved from scilab/macros/util/tree2code.sci with 100% similarity]
scilab/modules/metanet/macros/buildmacros.sce
scilab/modules/optimization/macros/derivative.sci [moved from scilab/macros/util/derivative.sci with 100% similarity]
scilab/modules/others/macros/add_demo.sci [moved from scilab/macros/util/add_demo.sci with 100% similarity]
scilab/modules/others/macros/edit.sci [moved from scilab/macros/util/edit.sci with 100% similarity]
scilab/modules/others/macros/initial_demos_tables.sci [moved from scilab/macros/util/initial_demos_tables.sci with 100% similarity]
scilab/modules/others/macros/make_help_index.sci [moved from scilab/macros/util/make_help_index.sci with 100% similarity]
scilab/modules/others/macros/maxindex.sci [moved from scilab/macros/util/maxindex.sci with 100% similarity]
scilab/modules/others/macros/perl.sci [moved from scilab/macros/util/perl.sci with 100% similarity]
scilab/modules/others/macros/scitest.sci [moved from scilab/macros/util/scitest.sci with 100% similarity]
scilab/modules/others/macros/toolboxes.sci [moved from scilab/macros/util/toolboxes.sci with 100% similarity]
scilab/modules/scicos/macros/genmoc.sce
scilab/modules/sparse/macros/adj2sp.sci [moved from scilab/macros/util/adj2sp.sci with 100% similarity]
scilab/modules/sparse/macros/issparse.sci [moved from scilab/macros/util/issparse.sci with 100% similarity]
scilab/modules/sparse/macros/sp2adj.sci [moved from scilab/macros/util/sp2adj.sci with 100% similarity]
scilab/modules/string/macros/base2dec.sci [moved from scilab/macros/util/base2dec.sci with 100% similarity]
scilab/modules/string/macros/dec2hex.sci [moved from scilab/macros/util/dec2hex.sci with 100% similarity]
scilab/modules/string/macros/eval.sci [moved from scilab/macros/util/eval.sci with 100% similarity]
scilab/modules/string/macros/evstr.sci [moved from scilab/macros/util/evstr.sci with 100% similarity]
scilab/modules/string/macros/hex2dec.sci [moved from scilab/macros/util/hex2dec.sci with 100% similarity]
scilab/modules/string/macros/oct2dec.sci [moved from scilab/macros/util/oct2dec.sci with 100% similarity]
scilab/modules/string/macros/stripblanks.sci [moved from scilab/macros/util/stripblanks.sci with 100% similarity]
scilab/modules/string/macros/tokenpos.sci [moved from scilab/macros/util/tokenpos.sci with 100% similarity]
scilab/modules/texmacs/macros/texprint.sci [moved from scilab/macros/util/texprint.sci with 100% similarity]
scilab/scilab.start
scilab/util/genmacros.sce

index eb81cc7..edffc74 100644 (file)
@@ -3,8 +3,8 @@ MSDOS=(getos()=='Windows');
 
 CurrentDirectory=pwd();
 
- Directories=["util"];
  
+Directories=["SCI/modules/functions/macros"]; 
 Directories=[Directories;"SCI/modules/arnoldi/macros"];
 Directories=[Directories;"SCI/modules/boolean/macros"];
 Directories=[Directories;"SCI/modules/cacsd/macros"];
@@ -56,6 +56,7 @@ Directories=[Directories;"SCI/modules/scicos/macros"];
 end
 Dim=size(Directories);
 
+exec('SCI/util/genmacros.sce');
 
 for i=1:Dim(1) do 
   chdir(Directories(i));
index 2e52baf..ed8081a 100644 (file)
@@ -4,5 +4,5 @@
 SCI=getenv('SCI'); \r
 TMPDIR=getenv('TMPDIR');\r
 //------------------------------------\r
-//genlib('dstructlib','SCI/modules/data_structures/macros');\r
+genlib('dstructlib','SCI/modules/data_structures/macros');\r
 //------------------------------------\r
diff --git a/scilab/modules/functions/VERSION b/scilab/modules/functions/VERSION
new file mode 100644 (file)
index 0000000..87d0f21
--- /dev/null
@@ -0,0 +1,5 @@
+SCI_VERSION_MAJOR 5\r
+SCI_VERSION_MINOR 0\r
+SCI_VERSION_MAINTENANCE 0\r
+SCI_VERSION_STRING unstable-svn\r
+SCI_VERSION_REVISION 0
\ No newline at end of file
diff --git a/scilab/modules/functions/changelog.txt b/scilab/modules/functions/changelog.txt
new file mode 100644 (file)
index 0000000..a493ce1
--- /dev/null
@@ -0,0 +1 @@
+changelog functions module
\ No newline at end of file
diff --git a/scilab/modules/functions/etc/functions.quit b/scilab/modules/functions/etc/functions.quit
new file mode 100644 (file)
index 0000000..4736195
--- /dev/null
@@ -0,0 +1,16 @@
+// ====================================================================
+// This file contains command to be executed at the end 
+// of a scilab session for functions module
+// Copyright INRIA 2006
+// ====================================================================
+// delete help chapter
+global LANGUAGE
+
+if LANGUAGE == 'fr' then
+       del_help_chapter("Fonctions");
+elseif LANGUAGE == 'eng' then
+       del_help_chapter("Functions");
+end
+
+clear del_help_chapter LANGUAGE;
+// ====================================================================
diff --git a/scilab/modules/functions/etc/functions.start b/scilab/modules/functions/etc/functions.start
new file mode 100644 (file)
index 0000000..7ebba7e
--- /dev/null
@@ -0,0 +1,23 @@
+// ====================================================================\r
+// functions module initialisation file \r
+// Copyright INRIA 2006\r
+// ====================================================================\r
+//Load  functions librarie\r
+load('SCI/modules/functions/macros/lib');\r
+// ====================================================================\r
+//add help chapter\r
+global LANGUAGE\r
+\r
+path = get_absolute_file_path('functions.start');\r
+path = getshortpathname(path);\r
+\r
+if LANGUAGE == 'fr' then\r
+       path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);\r
+       add_help_chapter("Fonctions",path);\r
+elseif LANGUAGE == 'eng' then\r
+       path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);\r
+       add_help_chapter("Functions",path);\r
+end\r
+\r
+clear path get_absolute_file_path add_help_chapter LANGUAGE;\r
+// ====================================================================\r
diff --git a/scilab/modules/functions/help/eng/genlib.xml b/scilab/modules/functions/help/eng/genlib.xml
new file mode 100644 (file)
index 0000000..ece17f3
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
+<MAN>
+  <LANGUAGE>eng</LANGUAGE>
+  <TITLE>genlib</TITLE>
+  <TYPE>Scilab Function</TYPE>
+  <DATE>Nov 2000</DATE>
+  <SHORT_DESCRIPTION name="genlib"> build library from functions in given directory</SHORT_DESCRIPTION>
+  <CALLING_SEQUENCE>
+    <CALLING_SEQUENCE_ITEM>genlib(lib_name [[,dir_name, [ Force [,verb [,Names]]]])  </CALLING_SEQUENCE_ITEM>
+    <CALLING_SEQUENCE_ITEM>genlib(lib_name [,path=dir_name] [,verbose=verb]
+      [,force=Force]  [,names=Names])  </CALLING_SEQUENCE_ITEM>
+  </CALLING_SEQUENCE>
+  <PARAM>
+    <PARAM_INDENT>
+      <PARAM_ITEM>
+        <PARAM_NAME>lib_name:  </PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>Scilab string.  The variable name of the library to (re)create.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>dir_name:  </PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>Scilab string.  The name of the directory to look for
+           <VERB>.sci</VERB>-files. </SP> 
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>Force</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: boolean value (default value is <VERB>%f</VERB>). Set it to
+           <VERB>%f</VERB> to force the sci-files recompilation.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>verb</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: boolean values (default value is <VERB>%f</VERB>). Set it to
+           <VERB>%f</VERB> to get information.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>Names</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: a vector of strings, the names of function to include in the
+           library. By default all the sci-files are taken into account</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+    </PARAM_INDENT>
+  </PARAM>
+  <DESCRIPTION>
+    <P>For each <VERB>.sci</VERB> file in <VERB>dir_name</VERB> (or only those
+      specified by the <VERB>Names</VERB> argument), <VERB>genlib</VERB> executes a
+    <VERB>getf</VERB> and saves the functions to the corresponding <VERB>.bin</VERB>
+    file.  The <VERB>.sci</VERB> file must not contain anything but Scilab
+    functions.  If a <VERB>.bin</VERB> file is newer than the associated
+    <VERB>.sci</VERB> file, <VERB>genlib</VERB> does not translate and save the file.</P>
+    
+    <P>This default behaviour can be changed if <VERB>force</VERB> is given and 
+    set to <VERB>%t</VERB>. In this latter case the recompilation is always 
+    performed for each <VERB>.sci</VERB> file.</P>
+
+    <P>When all <VERB>.sci</VERB> files have been processed, <VERB>genlib</VERB> creates a
+    library variable named <VERB>lib_name</VERB> and saves it in the file
+    <VERB>lib</VERB> in <VERB>dir_name</VERB>. If the Scilab variable
+      <VERB>lib_name</VERB> is not protected (see <LINK>predef</LINK>) this
+      variable is updated.</P>
+
+    <P>If <VERB>verbose</VERB> is et to <VERB>%t</VERB> information are displayed during 
+    the build process.</P>
+
+    <P>If <VERB>dir_name</VERB> argument is not given and if <VERB>lib_name</VERB>
+    Scilab variable  exists and it is a library dir_name is taken equal to the
+    <VERB>lib_name</VERB> library path (update mode).</P>
+
+  </DESCRIPTION>
+  <SECTION label="Restrictions">
+    <P>
+    Scilab tacitly assumes that file <VERB>foo.sci</VERB> defines at least a
+      function named <VERB>foo</VERB>. If subsidiary functions are included,
+      they are made known to Scilab only after the function <VERB>foo</VERB>
+      had been referenced.</P>
+  </SECTION>
+  <SEE_ALSO>
+    <SEE_ALSO_ITEM>
+      <LINK>getd</LINK>
+    </SEE_ALSO_ITEM>
+
+    <SEE_ALSO_ITEM>
+      <LINK>getf</LINK>
+    </SEE_ALSO_ITEM>
+    <SEE_ALSO_ITEM>
+      <LINK>save</LINK>
+    </SEE_ALSO_ITEM>
+    <SEE_ALSO_ITEM>
+      <LINK>lib</LINK>
+    </SEE_ALSO_ITEM>
+  </SEE_ALSO>
+</MAN>
diff --git a/scilab/modules/functions/help/eng/helpbuildereng.sce b/scilab/modules/functions/help/eng/helpbuildereng.sce
new file mode 100644 (file)
index 0000000..d4151ef
--- /dev/null
@@ -0,0 +1,6 @@
+mode(-1); //force silent execution
+path=get_absolute_file_path('helpbuildereng.sce');//get the absolute path of this file
+add_help_chapter("Functions",path);//add help chapter
+xmltohtml(path,"Functions");
+//clear the variable stack
+clear path add_help_chapter get_absolute_file_path; 
\ No newline at end of file
diff --git a/scilab/modules/functions/help/fr/genlib.xml b/scilab/modules/functions/help/fr/genlib.xml
new file mode 100644 (file)
index 0000000..ece17f3
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
+<MAN>
+  <LANGUAGE>eng</LANGUAGE>
+  <TITLE>genlib</TITLE>
+  <TYPE>Scilab Function</TYPE>
+  <DATE>Nov 2000</DATE>
+  <SHORT_DESCRIPTION name="genlib"> build library from functions in given directory</SHORT_DESCRIPTION>
+  <CALLING_SEQUENCE>
+    <CALLING_SEQUENCE_ITEM>genlib(lib_name [[,dir_name, [ Force [,verb [,Names]]]])  </CALLING_SEQUENCE_ITEM>
+    <CALLING_SEQUENCE_ITEM>genlib(lib_name [,path=dir_name] [,verbose=verb]
+      [,force=Force]  [,names=Names])  </CALLING_SEQUENCE_ITEM>
+  </CALLING_SEQUENCE>
+  <PARAM>
+    <PARAM_INDENT>
+      <PARAM_ITEM>
+        <PARAM_NAME>lib_name:  </PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>Scilab string.  The variable name of the library to (re)create.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>dir_name:  </PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>Scilab string.  The name of the directory to look for
+           <VERB>.sci</VERB>-files. </SP> 
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>Force</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: boolean value (default value is <VERB>%f</VERB>). Set it to
+           <VERB>%f</VERB> to force the sci-files recompilation.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>verb</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: boolean values (default value is <VERB>%f</VERB>). Set it to
+           <VERB>%f</VERB> to get information.</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+      <PARAM_ITEM>
+        <PARAM_NAME>Names</PARAM_NAME>
+        <PARAM_DESCRIPTION>
+          <SP>: a vector of strings, the names of function to include in the
+           library. By default all the sci-files are taken into account</SP>
+        </PARAM_DESCRIPTION>
+      </PARAM_ITEM>
+    </PARAM_INDENT>
+  </PARAM>
+  <DESCRIPTION>
+    <P>For each <VERB>.sci</VERB> file in <VERB>dir_name</VERB> (or only those
+      specified by the <VERB>Names</VERB> argument), <VERB>genlib</VERB> executes a
+    <VERB>getf</VERB> and saves the functions to the corresponding <VERB>.bin</VERB>
+    file.  The <VERB>.sci</VERB> file must not contain anything but Scilab
+    functions.  If a <VERB>.bin</VERB> file is newer than the associated
+    <VERB>.sci</VERB> file, <VERB>genlib</VERB> does not translate and save the file.</P>
+    
+    <P>This default behaviour can be changed if <VERB>force</VERB> is given and 
+    set to <VERB>%t</VERB>. In this latter case the recompilation is always 
+    performed for each <VERB>.sci</VERB> file.</P>
+
+    <P>When all <VERB>.sci</VERB> files have been processed, <VERB>genlib</VERB> creates a
+    library variable named <VERB>lib_name</VERB> and saves it in the file
+    <VERB>lib</VERB> in <VERB>dir_name</VERB>. If the Scilab variable
+      <VERB>lib_name</VERB> is not protected (see <LINK>predef</LINK>) this
+      variable is updated.</P>
+
+    <P>If <VERB>verbose</VERB> is et to <VERB>%t</VERB> information are displayed during 
+    the build process.</P>
+
+    <P>If <VERB>dir_name</VERB> argument is not given and if <VERB>lib_name</VERB>
+    Scilab variable  exists and it is a library dir_name is taken equal to the
+    <VERB>lib_name</VERB> library path (update mode).</P>
+
+  </DESCRIPTION>
+  <SECTION label="Restrictions">
+    <P>
+    Scilab tacitly assumes that file <VERB>foo.sci</VERB> defines at least a
+      function named <VERB>foo</VERB>. If subsidiary functions are included,
+      they are made known to Scilab only after the function <VERB>foo</VERB>
+      had been referenced.</P>
+  </SECTION>
+  <SEE_ALSO>
+    <SEE_ALSO_ITEM>
+      <LINK>getd</LINK>
+    </SEE_ALSO_ITEM>
+
+    <SEE_ALSO_ITEM>
+      <LINK>getf</LINK>
+    </SEE_ALSO_ITEM>
+    <SEE_ALSO_ITEM>
+      <LINK>save</LINK>
+    </SEE_ALSO_ITEM>
+    <SEE_ALSO_ITEM>
+      <LINK>lib</LINK>
+    </SEE_ALSO_ITEM>
+  </SEE_ALSO>
+</MAN>
diff --git a/scilab/modules/functions/help/fr/helpbuilderfr.sce b/scilab/modules/functions/help/fr/helpbuilderfr.sce
new file mode 100644 (file)
index 0000000..2f0281f
--- /dev/null
@@ -0,0 +1,6 @@
+mode(-1); //force silent execution
+path=get_absolute_file_path('helpbuilderfr.sce');//get the absolute path of this file
+add_help_chapter("Fonctions",path);//add help chapter
+xmltohtml(path,"Fonctions",'html-rev.xsl');
+//clear the variable stack
+clear path add_help_chapter get_absolute_file_path; 
\ No newline at end of file
diff --git a/scilab/modules/functions/help/helpbuilder.sce b/scilab/modules/functions/help/helpbuilder.sce
new file mode 100644 (file)
index 0000000..491c364
--- /dev/null
@@ -0,0 +1,9 @@
+mode(-1) //force silent execution
+
+cd 'eng'
+exec helpbuildereng.sce
+cd '..'
+
+cd 'fr'
+exec helpbuilderfr.sce
+cd '..'
diff --git a/scilab/modules/functions/licence.txt b/scilab/modules/functions/licence.txt
new file mode 100644 (file)
index 0000000..5aaa4cb
--- /dev/null
@@ -0,0 +1,3 @@
+licence file
+
+INRIA 2006
\ No newline at end of file
similarity index 53%
rename from scilab/macros/util/buildmacros.sce
rename to scilab/modules/functions/macros/buildmacros.sce
index 253de2c..1e6e08b 100644 (file)
@@ -1,12 +1,8 @@
 //------------------------------------
 // Allan CORNET INRIA 2005
 //------------------------------------
-SCI=getenv('SCI');
-// genmacros necessaire pour le Bootstrap de la compilation des macros
-exec('SCI/util/genmacros.sce');
-//------------------------------------
 SCI=getenv('SCI'); 
 TMPDIR=getenv('TMPDIR');
 //------------------------------------
-genlib('utillib','SCI/macros/util');
+genlib('functionslib','SCI/modules/functions/macros');
 //------------------------------------
diff --git a/scilab/modules/functions/readme.txt b/scilab/modules/functions/readme.txt
new file mode 100644 (file)
index 0000000..8ef381e
--- /dev/null
@@ -0,0 +1 @@
+readme.txt about functions module
\ No newline at end of file
index 6dbd5a7..3e5d721 100644 (file)
@@ -5,10 +5,14 @@
 //Load  functions librarie
 load('SCI/modules/helptools/macros/lib');
 // ====================================================================
+
 //add help chapter
 global LANGUAGE
 
+load('SCI/modules/fileio/macros/get_absolute_file_path.bin');
 path = get_absolute_file_path('helptools.start');
+clearfun get_absolute_file_path
+
 path = getshortpathname(path);
 
 if LANGUAGE == 'fr' then
index 609f8d8..4513fe3 100644 (file)
@@ -7,9 +7,9 @@
 global LANGUAGE\r
 \r
 if LANGUAGE == 'fr' then\r
-       //del_help_chapter("localization");\r
+       del_help_chapter("localization");\r
 elseif LANGUAGE == 'eng' then\r
-       //del_help_chapter("localization");\r
+       del_help_chapter("localization");\r
 end\r
 \r
 clear del_help_chapter LANGUAGE;\r
index e2df11c..52908f0 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright INRIA 2006\r
 // ====================================================================\r
 //Load  functions librarie\r
-//load('SCI/modules/localization/macros/lib');\r
+load('SCI/modules/localization/macros/lib');\r
 // ====================================================================\r
 //add help chapter\r
 global LANGUAGE\r
@@ -13,10 +13,10 @@ path = getshortpathname(path);
 \r
 if LANGUAGE == 'fr' then\r
        path = pathconvert(part(path,1:(length(path)-5))+'/help/fr',%f,%f);\r
-       //add_help_chapter("localization",path);\r
+       add_help_chapter("localization",path);\r
 elseif LANGUAGE == 'eng' then\r
        path = pathconvert(part(path,1:(length(path)-5))+'/help/eng',%f,%f);\r
-       //add_help_chapter("localization",path);\r
+       add_help_chapter("localization",path);\r
 end\r
 \r
 clear path get_absolute_file_path add_help_chapter LANGUAGE;\r
index 5d287bb..9d3a1de 100644 (file)
@@ -4,5 +4,5 @@
 SCI=getenv('SCI'); \r
 TMPDIR=getenv('TMPDIR');\r
 //------------------------------------\r
-//genlib('localizationlib','SCI/modules/localization/macros');\r
+genlib('localizationlib','SCI/modules/localization/macros');\r
 //------------------------------------\r
index 203fffd..37c55d4 100644 (file)
@@ -4,5 +4,5 @@
 SCI=getenv('SCI'); 
 TMPDIR=getenv('TMPDIR');
 //------------------------------------
-genlib('metalib','SCI/modules/metanet/macros');
+genlib('metanetlib','SCI/modules/metanet/macros');
 //------------------------------------
index 81b2944..ba5f392 100644 (file)
@@ -2,8 +2,8 @@ mode(-1)
 //this script is used to compile Modelica models of scicos implicit
 //blocks
 //mprintf('Compiling Modelica models in '+pwd()')
-load('SCI/macros/util/lib')
 
+load('SCI/modules/core/macros/lib')
 load('SCI/modules/overloading/macros/lib')
 load('SCI/modules/integer/macros/lib')
 load('SCI/modules/elementaries_functions/macros/lib')
index 01f8d46..22b9e2b 100644 (file)
@@ -58,9 +58,10 @@ MSDOS = (getos() == "Windows")
 PWD = getcwd()
 
 // loads modules ======================================================
-load('SCI/macros/util/lib')
 
 exec("SCI/modules/helptools/etc/helptools.start",-1);
+exec("SCI/modules/fileio/etc/fileio.start",-1);
+exec("SCI/modules/functions/etc/functions.start",-1);
 exec("SCI/modules/core/etc/core.start",-1);
 exec("SCI/modules/io/etc/io.start",-1);
 exec("SCI/modules/arnoldi/etc/arnoldi.start",-1);
@@ -70,7 +71,7 @@ exec("SCI/modules/data_structures/etc/data_structures.start",-1);
 exec("SCI/modules/differential_equations/etc/differential_equations.start",-1);
 exec("SCI/modules/double/etc/double.start",-1);
 exec("SCI/modules/elementaries_functions/etc/elementaries_functions.start",-1);
-exec("SCI/modules/fileio/etc/fileio.start",-1);
+
 exec("SCI/modules/graphics/etc/graphics.start",-1);
 exec("SCI/modules/gui/etc/gui.start",-1);
 exec("SCI/modules/incremental_link/etc/incremental_link.start",-1);
index f685905..690bb99 100644 (file)
@@ -12,39 +12,42 @@ function RemoveMinimalMacros()
   MSDOS=(getos()=='Windows')
   if MSDOS then
     CurrentDir=pwd();
-    chdir(SCI+'/macros/util');
+    chdir(SCI+'/modules/functions/macros');
     unix('if EXIST ""'+'genlib.bin'+'"" del /F ""'+'genlib.bin'+'""');
+    chdir(SCI+'/modules/fileio/macros');
     unix('if EXIST ""'+'fileparts.bin'+'"" del /F ""'+'fileparts.bin'+'""');
+    chdir(SCI+'/modules/core/macros');
     unix('if EXIST ""'+'getshell.bin'+'"" del /F ""'+'getshell.bin'+'""');
+    chdir(SCI+'/modules/fileio/macros');
     unix('if EXIST ""'+'pathconvert.bin'+'"" del /F ""'+'pathconvert.bin'+'""');
+    chdir(SCI+'/modules/string/macros');
     unix('if EXIST ""'+'stripblanks.bin'+'"" del /F ""'+'stripblanks.bin'+'""');
+    chdir(SCI+'/modules/fileio/macros');
     unix('if EXIST ""'+'listfiles.bin'+'"" del /F ""'+'listfiles.bin'+'""');
     chdir(SCI+'/modules/io/macros');
     unix('if EXIST ""'+'unix_g.bin'+'"" del /F ""'+'unix_g.bin'+'""');
-    chdir(CurrentDir);
-    chdir(SCI+'/macros/util');
+    chdir(SCI+'/modules/core/macros');
     unix('if EXIST ""'+'OS_Version.bin'+'"" del /F ""'+'OS_Version.bin'+'""');
+    chdir(SCI+'/modules/fileio/macros');
     unix('if EXIST ""'+'isdir.bin'+'"" del /F ""'+'isdir.bin'+'""');
     unix('if EXIST ""'+'basename.bin'+'"" del /F ""'+'basename.bin'+'""');
-    
     chdir(SCI+'/modules/fileio/macros');
     unix('if EXIST ""'+'mputl.bin'+'"" del /F ""'+'mputl.bin'+'""');
-    
     chdir(SCI+'/modules/overloading/macros');
     unix('if EXIST ""'+'%c_a_c.bin'+'"" del /F ""'+'%c_a_c.bin'+'""');
     chdir(CurrentDir);
   else
-    unix('rm -f '+SCI+'/macros/util/genlib.bin');
-    unix('rm -f '+SCI+'/macros/util/fileparts.bin');
-    unix('rm -f '+SCI+'/macros/util/getshell.bin');
-    unix('rm -f '+SCI+'/macros/util/pathconvert.bin');
-    unix('rm -f '+SCI+'/macros/util/stripblanks.bin');
-    unix('rm -f '+SCI+'/macros/util/listfiles.bin');
+    unix('rm -f '+SCI+'/modules/functions/macros/genlib.bin');
+    unix('rm -f '+SCI+'/modules/fileio/macros/fileparts.bin');
+    unix('rm -f '+SCI+'/modules/core/macros/getshell.bin');
+    unix('rm -f '+SCI+'/modules/fileio/macros/pathconvert.bin');
+    unix('rm -f '+SCI+'/modules/string/macros/stripblanks.bin');
+    unix('rm -f '+SCI+'/modules/fileio/macros/listfiles.bin');
     unix('rm -f '+SCI+'/modules/io/macros/unix_g.bin');
-    unix('rm -f '+SCI+'/macros/util/OS_Version.bin');
-    unix('rm -f '+SCI+'/macros/util/isdir.bin');
+    unix('rm -f '+SCI+'/modules/core/macros/OS_Version.bin');
+    unix('rm -f '+SCI+'/modules/fileio/macros/isdir.bin');
     unix('rm -f '+SCI+'/modules/overloading/macros/%c_a_c.bin');
-    unix('rm -f '+SCI+'/macros/util/basename.bin');
+    unix('rm -f '+SCI+'/modules/fileio/macros/basename.bin');
     unix('rm -f '+SCI+'/modules/fileio/macros/mputl.bin');
   end
   clear MSDOS;
@@ -70,11 +73,7 @@ function BuildMinimalMacros()
   scilabstart="SCI=getenv(''SCI'');MSDOS=(getos()==''Windows'');TMPDIR=getenv(''TMPDIR'');"
   scilabquit='clear;quit;'
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/OS_Version.sci'');save(SCI+''/macros/util/OS_Version.bin'');'+scilabquit
-  unix(startline+cmd+endline);
-  unix(SCI+LineToDo);
-  
-  cmd=scilabstart+'getf(SCI+''/macros/util/OS_Version.sci'');save(SCI+''/macros/util/OS_Version.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/core/macros/OS_Version.sci'');save(SCI+''/modules/core/macros/OS_Version.bin'');'+scilabquit
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
@@ -82,7 +81,7 @@ function BuildMinimalMacros()
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/basename.sci'');save(SCI+''/macros/util/basename.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/fileio/macros/basename.sci'');save(SCI+''/modules/fileio/macros/basename.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
@@ -90,7 +89,7 @@ function BuildMinimalMacros()
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/isdir.sci'');save(SCI+''/macros/util/isdir.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/fileio/macros/isdir.sci'');save(SCI+''/modules/fileio/macros/isdir.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
@@ -98,27 +97,27 @@ function BuildMinimalMacros()
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/listfiles.sci'');save(SCI+''/macros/util/listfiles.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/fileio/macros/listfiles.sci'');save(SCI+''/modules/fileio/macros/listfiles.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
-  cmd=scilabstart+'getf(SCI+''/macros/util/stripblanks.sci'');save(SCI+''/macros/util/stripblanks.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/string/macros/stripblanks.sci'');save(SCI+''/modules/string/macros/stripblanks.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/pathconvert.sci'');save(SCI+''/macros/util/pathconvert.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/fileio/macros/pathconvert.sci'');save(SCI+''/modules/fileio/macros/pathconvert.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/fileparts.sci'');save(SCI+''/macros/util/fileparts.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/fileio/macros/fileparts.sci'');save(SCI+''/modules/fileio/macros/fileparts.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
   
-  cmd=scilabstart+'getf(SCI+''/macros/util/getshell.sci'');save(SCI+''/macros/util/getshell.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/core/macros/getshell.sci'');save(SCI+''/modules/core/macros/getshell.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
-  cmd=scilabstart+'getf(SCI+''/macros/util/genlib.sci'');save(SCI+''/macros/util/genlib.bin'');'+scilabquit;
+  cmd=scilabstart+'getf(SCI+''/modules/functions/macros/genlib.sci'');save(SCI+''/modules/functions/macros/genlib.bin'');'+scilabquit;
   unix(startline+cmd+endline);
   unix(SCI+LineToDo);
 
@@ -143,18 +142,18 @@ RemoveMinimalMacros();
 BuildMinimalMacros();
 clear BuildMinimalMacros;
 SCI=getenv('SCI');
-load(SCI+'/macros/util/fileparts.bin');
-load(SCI+'/macros/util/getshell.bin');
-load(SCI+'/macros/util/pathconvert.bin');
-load(SCI+'/macros/util/stripblanks.bin');
-load(SCI+'/macros/util/listfiles.bin');
+load(SCI+'/modules/fileio/macros/fileparts.bin');
+load(SCI+'/modules/core/macros/getshell.bin');
+load(SCI+'/modules/fileio/macros/pathconvert.bin');
+load(SCI+'/modules/string/macros/stripblanks.bin');
+load(SCI+'/modules/fileio/macros/listfiles.bin');
 load(SCI+'/modules/io/macros/unix_g.bin');
-load(SCI+'/macros/util/OS_Version.bin');
-load(SCI+'/macros/util/isdir.bin');
+load(SCI+'/modules/core/macros/OS_Version.bin');
+load(SCI+'/modules/fileio/macros/isdir.bin');
 load(SCI+'/modules/overloading/macros/%c_a_c.bin');
-load(SCI+'/macros/util/basename.bin');
+load(SCI+'/modules/fileio/macros/basename.bin');
 load(SCI+'/modules/fileio/macros/mputl.bin');
-load(SCI+'/macros/util/genlib.bin');
+load(SCI+'/modules/functions/macros/genlib.bin');
 clear SCI;
 // Need to remove macros binary files before build by genlib
 RemoveMinimalMacros();