Revision help pages for module fileio. 92/8392/1
Stanislav KROTER [Mon, 30 Jul 2012 05:54:01 +0000 (07:54 +0200)]
Change-Id: I04fb25ce6c244688b0ed88c7806a6796bf31ed51

14 files changed:
scilab/modules/fileio/help/en_US/isfile.xml
scilab/modules/fileio/help/en_US/listfiles.xml
scilab/modules/fileio/help/en_US/listvarinfile.xml
scilab/modules/fileio/help/en_US/maxfiles.xml
scilab/modules/fileio/help/en_US/mclearerr.xml
scilab/modules/fileio/help/en_US/mclose.xml
scilab/modules/fileio/help/en_US/mdelete.xml
scilab/modules/fileio/help/en_US/meof.xml
scilab/modules/fileio/help/en_US/merror.xml
scilab/modules/fileio/help/en_US/mfprintf.xml
scilab/modules/fileio/help/en_US/mfscanf.xml
scilab/modules/fileio/help/en_US/mget.xml
scilab/modules/fileio/help/en_US/mgetl.xml
scilab/modules/fileio/help/en_US/mgetstr.xml

index 5c920b6..262de39 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="isfile" xml:lang="en">
   <refnamediv>
     <refname>isfile</refname>
-    <refpurpose>checks if argument is a file</refpurpose>
+    <refpurpose>checks whether argument is an existing file</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>a = isfile(filenames)</synopsis>
+    <synopsis>x = isfile(filenames)</synopsis>
   </refsynopsisdiv>
   <refsection>
     <title>Arguments</title>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term>a</term>
+        <term>x</term>
         <listitem>
-          <para>an matrix of boolean (%t is filenames exists).</para>
+          <para>
+            a matrix of boolean (<constant>%t</constant> if <varname>filenames</varname> are 
+            existing files).
+          </para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
   <refsection>
     <title>Description</title>
-    <para>x = isfile(filenames) checks if filenames is existing file or not. (a
-      directory is not a file. see isdir.)
+    <para>
+      <code>x = isfile(filenames)</code> checks whether <varname>filenames</varname> is an existing file or not (a
+      directory is not a file). See also <link linkend="isdir">isdir</link>.
     </para>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example">cd SCI
-      filenames = ls()
-      isfile(filenames)
+    <programlisting role="example">
+      filenames = ls(SCI)
       
-      isfile(filenames)
+      x = isfile(filenames)
       
       isfile(SCI + '/etc')
       isdir(SCI + '/etc')
index ca162f3..a43224f 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="listfiles">
   <refnamediv>
     <refname>listfiles</refname>
-    <refpurpose> list files</refpurpose>
+    <refpurpose>list of files</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>files= listfiles(paths [,flag,flagexpand])</synopsis>
+    <synopsis>files = listfiles(paths [,flag,flagexpand])</synopsis>
   </refsynopsisdiv>
   <refsection>
     <title>Arguments</title>
         <term>paths</term>
         <listitem>
           <para>
-            a string matrix giving a set of pathnames (eventually  ended by a pattern built with <literal>*</literal>)
+            a string matrix giving a set of pathnames (eventually  ended by a pattern built with <literal>*</literal>).
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term>flag,flagexpand</term>
+        <term>flag, flagexpand</term>
         <listitem>
           <para>
-            boolean optional parameters. (default value <literal>%t</literal>).
+            boolean optional parameters (default value is <constant>%t</constant>).
           </para>
         </listitem>
       </varlistentry>
   <refsection>
     <title>Description</title>
     <para>
-      <literal>listfiles</literal> can be used to list the files which match 
+      <function>listfiles</function> can be used to list the files which match 
       the patterns given by one of the paths entries. 
-      Patterns are given to the unix <literal>ls</literal> or to the windows
-      <literal>dir</literal> commands in order to get information on files. 
+      Patterns are given to the Unix <command>ls</command> or to the Windows
+      <command>dir</command> commands in order to get information about files. 
       Thus in order to write portable Scilab script valid wildcard patterns 
-      for both os are to be given. Note that Pathname conversion is
+      for both OS are to be given. Note that pathname conversion is
       performed and for example <literal>SCI/core/macros/*.sci</literal> is a valid 
-      pattern for both unix and windows.
+      pattern for both Unix and Windows.
     </para>
     <para>
-      if <literal>flag</literal> is true the pathnames given by <literal>paths</literal> are 
-      converted according to the getos() == 'Windows' value (See <literal>pathconvert</literal>). 
-      Moreover, if <literal>flagexpand</literal> is true leading strings like
-      <literal>HOME</literal>, <literal>SCI</literal> or <literal>~</literal> are expanded using environment
-      variables.
+      If <varname>flag</varname> is true the pathnames given by 
+      <varname>paths</varname> are converted according to the <code>getos() == 'Windows'</code>
+      value (see also <link linkend="pathconvert">pathconvert</link>). 
+      Moreover, if <varname>flagexpand</varname> is true leading strings like
+      <varname>SCIHOME</varname>, <varname>SCI</varname> or 
+      <literal>~</literal> are expanded using environment variables.
     </para>
   </refsection>
   <refsection>
index 9c5b68f..1314b1f 100644 (file)
@@ -2,7 +2,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="listvarinfile">
   <refnamediv>
     <refname>listvarinfile</refname>
-    <refpurpose>list the contents of a saved data file</refpurpose>
+    <refpurpose>list of variables in a saved data file</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
       <varlistentry>
         <term>filename</term>
         <listitem>
-          <para>character string, the pathname of the file to be inspected
+          <para>
+            a character string, the pathname of the file to be inspected.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>nams</term>
         <listitem>
-          <para>character array, names of the variables saved in the file
+          <para>
+            a matrix of strings, names of the variables saved in the file.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>dims</term>
         <listitem>
-          <para>list, dimensions of the variables saved in the file
+          <para>
+            a list, dimensions of the variables saved in the file.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>typs</term>
         <listitem>
-          <para>numeric array, types of the variables saved in the file
+          <para>
+            a numeric matrix, types of the variables saved in the file.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>vols</term>
         <listitem>
-          <para>numeric array, size in bytes of the variables saved in the file 
+          <para>
+            a numeric matrix, size in bytes of the variables saved in the file.
           </para>
         </listitem>
       </varlistentry>
           a Scilab data file produced by <link linkend="save">save</link>.
         </para>
         <para>
-          Remark: hypermatrices are reported as plain mlists;
-          rationals and state-spaces are reported as plain tlists;
-          graphic handles are not recognized.
+          <note>
+            Hypermatrices are reported as plain mlists;
+            rationals and state-spaces are reported as plain tlists;
+            graphic handles are not recognized.
+          </note>
         </para>
       </listitem>
     </itemizedlist>
@@ -70,8 +77,8 @@
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
 a=eye(2,2); b=int16(ones(a)); c=rand(2,3,3);
-save("vals.dat",a,b,c)
-listvarinfile("vals.dat")
+save(fullfile(TMPDIR,"vals.sod"),'a','b','c')
+[names,typs,dims,vols] = listvarinfile(fullfile(TMPDIR,"vals.sod"))
  ]]></programlisting>
   </refsection>
   <refsection role="see also">
index 83e7901..40e8beb 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="maxfiles">
   <refnamediv>
     <refname>maxfiles</refname>
-    <refpurpose>sets the limit for the number of files a scilab is allowed to have open simultaneously.</refpurpose>
+    <refpurpose>sets the limit for the number of files a Scilab is allowed to have open simultaneously</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>r= maxfiles(newnumbermax)</synopsis>
+    <synopsis>r = maxfiles(newnumbermax)</synopsis>
   </refsynopsisdiv>
   <refsection>
     <title>Arguments</title>
       <varlistentry>
         <term>newnumbermax</term>
         <listitem>
-          <para>an integer the new value</para>
+          <para>an integer the new value.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>r</term>
         <listitem>
-          <para>effective new value.</para>
+          <para>an integer: effective new value.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
   <refsection>
     <title>Description</title>
-    <para>sets the limit for the number of files a scilab is allowed to have open simultaneously.</para>
+    <para>
+      <function>maxfiles</function> sets the limit for the number of files a Scilab is allowed to have open simultaneously.
+    </para>
     <para>Minimum : 20</para>
     <para>Maximum : 100</para>
     <para>Default : 20</para>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
-r=maxfiles(50);
+    <programlisting role="example"><![CDATA[
+r = maxfiles(50);
  ]]></programlisting>
   </refsection>
   <refsection role="see also">
index a9e019e..183703a 100644 (file)
@@ -14,7 +14,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="mclearerr">
   <refnamediv>
     <refname>mclearerr</refname>
-    <refpurpose> reset binary file access errors</refpurpose>
+    <refpurpose>resets binary file access errors</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
@@ -27,9 +27,9 @@
         <term>fd</term>
         <listitem>
           <para>
-            scalar. The <literal>fd</literal> parameter returned by the function
-            <literal>mopen</literal>. -1 stands for last opened file. Default value is
-            -1.
+            a scalar: the <varname>fd</varname> parameter returned by the 
+            function <function>mopen</function>. -1 stands for last opened 
+            file. Default value is -1.
           </para>
         </listitem>
       </varlistentry>
@@ -38,8 +38,8 @@
   <refsection>
     <title>Description</title>
     <para>
-      The function <literal>clearerr</literal> is used to resets the error indicator and
-      EOF  indicator to zero.
+      The function <function>mclearerr</function> is used to reset the error 
+      indicator and EOF indicator to zero.
     </para>
   </refsection>
   <refsection role="see also">
index 2a709a5..b6bdc2f 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="mclose">
   <refnamediv>
     <refname>mclose</refname>
-    <refpurpose> close an opened file</refpurpose>
+    <refpurpose>closes an opened file</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>err=mclose([fd])
+    <synopsis>
+      err=mclose([fd])
       mclose('all')
     </synopsis>
   </refsynopsisdiv>
         <term>fd</term>
         <listitem>
           <para>
-            scalar. The <literal>fd</literal> parameter returned by the function <literal>mopen</literal> is used as a file descriptor (it's a positive integer).
+            a scalar: the <varname>fd</varname> parameter returned by the function <function>mopen</function> is used as a file descriptor.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>err</term>
         <listitem>
-          <para>a scalar. Error indicator : vector</para>
+          <para>a scalar: an error indicator.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      <literal>mclose</literal> must be used to close a file opened by <literal>mopen</literal>. If fd
-      is omitted <literal>mclose</literal> closes the last opend file.
+      <function>mclose</function> must be used to close a file opened by 
+      <function>mopen</function>. If <varname>fd</varname> is omitted 
+      <function>mclose</function> closes the last opend file.
     </para>
     <para>
-      <literal>mclose('all')</literal> closes all files opened by <literal>file('open',..)</literal> or <literal>mopen</literal>. Be careful with this use of <literal>mclose</literal> because when it is used inside a Scilab script file, it also closes the script and Scilab will not execute commands written after <literal>mclose('all')</literal>.
+      <code>mclose('all')</code> closes all files opened by 
+      <code>file('open',..)</code> or <function>mopen</function>. 
+      <warning>
+        Be careful with this use of <function>mclose</function> because when 
+        it is used inside a Scilab script file, it also closes the script and 
+        Scilab will not execute commands written after 
+        <code>mclose('all')</code>.
+      </warning>
     </para>
   </refsection>
   <refsection role="see also">
         <link linkend="mputstr">mputstr</link>
       </member>
       <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
         <link linkend="mseek">mseek</link>
       </member>
       <member>
index 26a24f1..5944fc2 100644 (file)
@@ -14,7 +14,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="mdelete">
   <refnamediv>
     <refname>mdelete</refname>
-    <refpurpose>Delete file(s)</refpurpose>
+    <refpurpose>deletes file(s)</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
@@ -26,7 +26,9 @@
       <varlistentry>
         <term>filename</term>
         <listitem>
-          <para>a character string. The pathname of the file(s) to delete.</para>
+          <para>
+            a character string: the pathname of the file(s) to delete.
+          </para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      <literal>mdelete</literal> may be used to delete a file or a set of files if
-      <literal>filename</literal> contains meta-charaters.
+      <function>mdelete</function> may be used to delete a file or a set of files if
+      <varname>filename</varname> contains meta-charaters.
     </para>
     <para>
-      Note that <literal>mdelete</literal> does not ask for confirmation when you enter the delete command.
-      To avoid accidentally losing files, make sure that you have accurately specified the items you want deleted.
+      <warning>
+        Note that <function>mdelete</function> does not ask for confirmation 
+        when you enter the delete command.
+        To avoid accidentally losing files, make sure that you have 
+        accurately specified the items you want deleted.
+      </warning>
     </para>
   </refsection>
   <refsection role="see also">
index a3eaf05..4d988ce 100644 (file)
         <term>fd</term>
         <listitem>
           <para>
-            scalar. The <literal>fd</literal> parameter returned by the function <literal>mopen</literal>. -1 stands for last opened file. Default value is -1.
+            a scalar: the <varname>fd</varname> parameter returned by the function <function>mopen</function>. -1 stands for last opened file. Default value is -1.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>err</term>
         <listitem>
-          <para>scalar. Error indicator</para>
+          <para>a scalar: an error indicator.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      The function <literal>meof</literal> will return a non null value if end of file 
-      has been reached in a previous call to <literal>mget</literal> or <literal>mgetstr</literal>. 
-      The function <literal>clearerr</literal> is used to reset the error flag and
-      EOF flag to zero.
+      The function <function>meof</function> will return a non null value if 
+      end of file has been reached in a previous call to 
+      <function>mget</function> or <function>mgetstr</function>. The function 
+      <function>mclearerr</function> is used to reset the error flag and EOF 
+      flag to zero.
     </para>
   </refsection>
   <refsection role="see also">
@@ -88,9 +89,6 @@
         <link linkend="mputstr">mputstr</link>
       </member>
       <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
         <link linkend="mseek">mseek</link>
       </member>
       <member>
index 75df42f..b275978 100644 (file)
@@ -18,9 +18,9 @@
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>err = merror([fd])
-      
-      [err,msg] = merror([fd])
+    <synopsis>
+      err = merror([fd])      
+      [err, msg] = merror([fd])
     </synopsis>
   </refsynopsisdiv>
   <refsection>
         <term>fd</term>
         <listitem>
           <para>
-            scalar. The <literal>fd</literal> parameter returned by the
-            function <literal>mopen</literal>. -1 stands for last opened file.
-            Default value is -1.
+            a scalar: the <varname>fd</varname> parameter returned by the 
+            function <function>mopen</function> is used as a file descriptor 
+            (it's a positive integer). -1 stands for last opened file. The 
+            default value is -1.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>err</term>
         <listitem>
-          <para>scalar. returns the error status number errnum of the most
+          <para>a scalar: an error status number of the most
             recent file I/O operation associated with the specified file.
           </para>
-          <para>If the most recent I/O operation performed on the specified
-            file was successful, the value of msg is empty and merror returns an
-            err value of 0.
+          <para>
+            If the most recent I/O operation performed on the specified
+            file was successful, the value of <varname>msg</varname> is empty 
+            and <function>merror</function> returns an <varname>err</varname> 
+            value of 0.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>msg</term>
         <listitem>
-          <para>string. returns the error string message.</para>
+          <para>a string: an error string message.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      The function <literal>merror</literal> is used to tests the file
-      access errors indicator. returning non-zero if it is set. The error
-      indicator can only be reset by the <literal>mclearerr</literal>
+      The function <function>merror</function> is used to test the file
+      access errors indicator returning non-zero if it is set. The error
+      indicator can only be reset by the <function>mclearerr</function>
       function.
     </para>
-    <para>A nonzero err indicates that an error occurred in the most recent
-      file I/O operation. The value of message is a string that can contain
-      information about the nature of the error. If the message is not helpful,
-      consult the C run-time library manual for your host operating system for
-      further details.
+    <para>
+      A nonzero <varname>err</varname> indicates that an error occurred in the most recent file I/O operation. The value of message is a string that can contain information about the nature of the error. If the message is not helpful, consult the C run-time library manual for your host operating system for further details.
     </para>
   </refsection>
   <refsection>
index 5a851c7..0a840f0 100644 (file)
         <term>fd</term>
         <listitem>
           <para>
-            scalar, file descriptor given by <literal>mopen</literal>
+            a scalar, file descriptor given by <function>mopen</function>
             (it's a positive integer). 
           </para>
-          <para> if fd equals 0 redirection in stderr.</para>
-          <para> if fd equals 6 redirection in stdout.</para>
           <para>
-            OBSOLETE :The value <literal>-1</literal> refers to the
-            default file ( i.e the last opened file).
+            If <varname>fd</varname> equals 0 redirection in stderr.
           </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>format</term>
-        <listitem>
-          <para>a Scilab string describing the format to use to write the
-            remaining operands. The format operand follows, as close as
-            possible, the C printf format operand syntax.
+          <para>
+            If <varname>fd</varname> equals 6 redirection in stdout.
+          </para>
+          <para>
+            OBSOLETE: The value <literal>-1</literal> refers to the
+            default file (i.e the last opened file).
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term>str</term>
-        <listitem>
-          <para>a character string, string to be scanned.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>a1,...,an</term>
+        <term>format</term>
         <listitem>
-          <para>Specifies the data to be converted and printed according to
-            the format parameter.
-          </para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refsection>
-  <refsection>
-    <title>Description</title>
-    <para>
-      The <literal>mfprintf</literal> function is a interface for C-coded version of
-      <literal>fprintf</literal> functions.
-    </para>
-    <para>
-      The <literal>mfprintf</literal> function writes formatted operands
-      to the file specified by the file desciptor <literal>fd</literal>. The
-      argument operands are formatted under control of the format
-      operand.
-    </para>
-    <para>this function may be used to output column vectors of numbers
-      and string vectors without an explicit loop on the elements. In that case
-      this function iterates on the rows. The shortest vector gives the number
-      of time the format has to be iterated.
-    </para>
-    <para>An homogeneous sequence of identical type parameters can be replaced
-      by a matrix
-    </para>
-  </refsection>
-  <refsection>
-    <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+          <para>
+            a Scilab string describing the format to use to write the
+            remaining operands. The 
+            <varname>
+              format<varname>operand follows, 
+                as close as possible, the C 
+                <function>
+                  printf<function>format 
+                    operand syntax.
+                  </para>
+                </listitem>
+              </varlistentry>
+              <varlistentry>
+                <term>str</term>
+                <listitem>
+                  <para>a character string: a string to be scanned.</para>
+                </listitem>
+              </varlistentry>
+              <varlistentry>
+                <term>a1,...,an</term>
+                <listitem>
+                  <para>
+                    the data to be converted and printed according to
+                    the format parameter.
+                  </para>
+                </listitem>
+              </varlistentry>
+            </variablelist>
+          </refsection>
+          <refsection>
+            <title>Description</title>
+            <para>
+              The <function>mfprintf</function> function is a interface for C-coded 
+              version of <function>fprintf</function> function.
+            </para>
+            <para>
+              The <function>mfprintf</function> function writes formatted operands
+              to the file specified by the file desciptor <varname>fd</varname>. The
+              argument operands are formatted under control of the 
+              <varname>format</varname> operand.
+            </para>
+            <para>
+              This function may be used to output column vectors of numbers
+              and string vectors without an explicit loop on the elements. In that 
+              case this function iterates on the rows. The shortest vector gives the 
+              number of time the format has to be iterated.
+            </para>
+            <para>
+              An homogeneous sequence of identical type parameters can be replaced
+              by a matrix.
+            </para>
+          </refsection>
+          <refsection>
+            <title>Examples</title>
+            <programlisting role="example"><![CDATA[ 
 
 fd = mopen(TMPDIR+'/text.txt','wt');
 mfprintf(fd,'hello %s %d.\n','world',1);
 mfprintf(fd,'hello %s %d.\n','scilab',2);
+mfprintf(fd,'This line is built with a column vector (26:28) %d.\n',[26:28].');
+mfprintf(fd,'This line is built with a row vector (26:28) %d.\n',[26:28]);
+A = rand(3,6);
+mfprintf(fd,'This line is built with a matrix %.3f.\n',A);
 mclose(fd);
 if (isdef('editor') | (funptr('editor')<>0)) then
   editor(TMPDIR+'/text.txt')
@@ -98,58 +115,55 @@ end
 mfprintf(0,'stderr output.\n');
 mfprintf(6,'stdout output.\n');
  ]]></programlisting>
-  </refsection>
-  <refsection role="see also">
-    <title>See Also</title>
-    <simplelist type="inline">
-      <member>
-        <link linkend="mclose">mclose</link>
-      </member>
-      <member>
-        <link linkend="meof">meof</link>
-      </member>
-      <member>
-        <link linkend="fprintfMat">fprintfMat</link>
-      </member>
-      <member>
-        <link linkend="mfscanf">mfscanf</link>
-      </member>
-      <member>
-        <link linkend="fscanfMat">fscanfMat</link>
-      </member>
-      <member>
-        <link linkend="mget">mget</link>
-      </member>
-      <member>
-        <link linkend="mgetstr">mgetstr</link>
-      </member>
-      <member>
-        <link linkend="mopen">mopen</link>
-      </member>
-      <member>
-        <link linkend="mprintf">mprintf</link>
-      </member>
-      <member>
-        <link linkend="mput">mput</link>
-      </member>
-      <member>
-        <link linkend="mputstr">mputstr</link>
-      </member>
-      <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
-        <link linkend="mseek">mseek</link>
-      </member>
-      <member>
-        <link linkend="mtell">mtell</link>
-      </member>
-      <member>
-        <link linkend="mdelete">mdelete</link>
-      </member>
-      <member>
-        <link linkend="printf_conversion">printf_conversion</link>
-      </member>
-    </simplelist>
-  </refsection>
-</refentry>
+          </refsection>
+          <refsection role="see also">
+            <title>See Also</title>
+            <simplelist type="inline">
+              <member>
+                <link linkend="mclose">mclose</link>
+              </member>
+              <member>
+                <link linkend="meof">meof</link>
+              </member>
+              <member>
+                <link linkend="fprintfMat">fprintfMat</link>
+              </member>
+              <member>
+                <link linkend="mfscanf">mfscanf</link>
+              </member>
+              <member>
+                <link linkend="fscanfMat">fscanfMat</link>
+              </member>
+              <member>
+                <link linkend="mget">mget</link>
+              </member>
+              <member>
+                <link linkend="mgetstr">mgetstr</link>
+              </member>
+              <member>
+                <link linkend="mopen">mopen</link>
+              </member>
+              <member>
+                <link linkend="mprintf">mprintf</link>
+              </member>
+              <member>
+                <link linkend="mput">mput</link>
+              </member>
+              <member>
+                <link linkend="mputstr">mputstr</link>
+              </member>
+              <member>
+                <link linkend="mseek">mseek</link>
+              </member>
+              <member>
+                <link linkend="mtell">mtell</link>
+              </member>
+              <member>
+                <link linkend="mdelete">mdelete</link>
+              </member>
+              <member>
+                <link linkend="printf_conversion">printf_conversion</link>
+              </member>
+            </simplelist>
+          </refsection>
+        </refentry>
index b30c205..3efe839 100644 (file)
  *
  -->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="mfscanf" xml:lang="en">
-  <refnamediv xml:id="mscanf">
-    <refname>mscanf</refname>
-    <refpurpose>reads input from the standard input (interface to the C scanf
-      function)
-    </refpurpose>
-  </refnamediv>
   <refnamediv>
     <refname>mfscanf</refname>
-    <refpurpose>reads input from the stream pointer stream (interface to the C
+    <refpurpose>
+      reads input from the stream pointer stream (interface to the C
       fscanf function)
     </refpurpose>
   </refnamediv>
+  <refnamediv xml:id="mscanf">
+    <refname>mscanf</refname>
+    <refpurpose>
+      reads input from the standard input (interface to the C scanf
+      function)
+    </refpurpose>
+  </refnamediv>
   <refnamediv xml:id="msscanf">
     <refname>msscanf</refname>
     <refpurpose>reads its input from the character string (interface to the C
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>[n,v_1,...v_n]=mfscanf([niter,]fd,format)
-      L=mfscanf([niter,] fd,format)
+    <synopsis>
+      [n, v_1,..., v_m] = mfscanf([niter,]fd, format)
+      L = mfscanf([niter,] fd,format)
       
-      [n,v_1,...v_n]=mscanf([niter,] format)
-      L=mscanf([niter,]format)
+      [n, v_1,..., v_m] = mscanf([niter,] format)
+      L = mscanf([niter,]format)
       
-      [n,v_1,...v_m]=msscanf([niter,]str,format)
-      L=msscanf([niter,] str,format)
+      [n, v_1,..., v_m] = msscanf([niter,]str, format)
+      L = msscanf([niter,] str, format)
     </synopsis>
   </refsynopsisdiv>
   <refsection>
       <varlistentry>
         <term>format</term>
         <listitem>
-          <para>a Scilab string describing the format to use to write the
-            remaining operands. The format operand follows, as close as
-            possible, the C printf format operand syntax as described in
+          <para>
+            a Scilab string describing the format to use to write the
+            remaining operands. The <varname>format</varname> operand 
+            follows, as close as possible, the C <function>printf</function> 
+            format operand syntax as described in
             <link linkend="scanf_conversion">scanf_conversion</link>.
           </para>
         </listitem>
       <varlistentry>
         <term>fd</term>
         <listitem>
-          <para>The fd parameter returned by the function
-            <literal>mopen</literal> is used as a file descriptor (it's a
-            positive integer). The value -1 refers to the last opened
-            file.
+          <para>
+            a positive integer: a file descriptor returned by the function
+            <function>mopen</function>. The value -1 refers to the last 
+            opened file.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>niter</term>
         <listitem>
-          <para>an integer, the number of times the format as to be
-            used.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>n</term>
-        <listitem>
-          <para>an integer, the number of data read or -1 if EOL has been
-            encountered before any datum has been read.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>v_i</term>
-        <listitem>
-          <para>Each function reads characters, interprets them according to a
-            format, and stores the results in its output arguments. If more than
-            $n$ output arguments are provided, the last ones
-            <literal>v_n+1,...v_m</literal> are set to empty matrices.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>L</term>
-        <listitem>
-          <para>if all data are homogeneous they are stored in a unique vector
-            which is returned, otherwise subsequences of same data type are
-            stored in matrices and an <literal>mlist</literal> (with type
-            <literal>cblock</literal>) containing all the built matrices is
-            returned.
-          </para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refsection>
-  <refsection>
-    <title>Description</title>
-    <para>
-      The <literal>mfscanf</literal> function reads characters from the
-      stream <literal>fd</literal>.
-    </para>
-    <para>
-      The <literal>mscanf</literal> function reads characters from Scilab
-      window.
-    </para>
-    <para>
-      The <literal>msscanf</literal> function reads characters from the
-      Scilab string <literal>str</literal>.
-    </para>
-    <para>
-      The <literal>niter</literal> optional argument specifies how many
-      time the format has to used. One iteration produces one line in the output
-      matrix. If <literal>niter==-1</literal> the function iterates up to the
-      end of file. The <literal>niter</literal> default value is 1.
-    </para>
-    <para>comments about precision :</para>
-    <para>mfscanf is based on C function fscanf. If you use '%f', '%g', '%e'
-      as format your data will be cast to float and returned in a scilab
-      variable. 
-    </para>
-    <para>This scilab variable is a double then you can have some precision
-      errors. In this case, it is better to use '%lg' format.
-    </para>
-  </refsection>
-  <refsection>
-    <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+          <para>
+            an integer: the number of times the 
+            <varname>format<varname>
+                to be used.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>n</term>
+            <listitem>
+              <para>an integer: the number of data read or -1 if EOL has been
+                encountered before any datum has been read.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>v_i</term>
+            <listitem>
+              <para>
+                Each function reads characters, interprets them according to a
+                <varname>format</varname>, and stores the results in its output 
+                arguments. If more than <varname>n</varname> output arguments are 
+                provided, the last ones <varname>v_n+1, ..., v_m</varname> are 
+                set to empty matrices.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term>L</term>
+            <listitem>
+              <para>
+                if all data are homogeneous they are stored in a unique vector
+                which is returned, otherwise subsequences of same data type are
+                stored in matrices and a <literal>mlist</literal> (with type
+                <literal>cblock</literal>) containing all the built matrices is
+                returned.
+              </para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </refsection>
+      <refsection>
+        <title>Description</title>
+        <para>
+          The <function>mfscanf</function> function reads characters from the
+          stream <varname>fd</varname>.
+        </para>
+        <para>
+          The <function>mscanf</function> function reads characters from Scilab
+          window.
+        </para>
+        <para>
+          The <function>msscanf</function> function reads characters from the
+          Scilab string <varname>str</varname>.
+        </para>
+        <para>
+          The <varname>niter</varname> optional argument specifies how many
+          time the format has to used. One iteration produces one line in the output
+          matrix. If <code>niter==-1</code> the function iterates up to the
+          end of file. The <varname>niter</varname> default value is 1.
+        </para>
+        <para>Comments about precision:</para>
+        <para>
+          <function>mfscanf</function> is based on C function 
+          <function>fscanf</function>. If you use <literal>'%f'</literal>, 
+          <literal>'%g'</literal>, <literal>'%e'</literal> as format your data 
+          will be cast to float and returned in a Scilab variable. 
+        </para>
+        <para>
+          If this Scilab variable is a double then you can have some precision
+          errors. In this case, it is better to use <literal>'%lg'</literal> format.
+        </para>
+      </refsection>
+      <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
 //----------------------------------------------------------
 //--    Simple use                                        --
 //----------------------------------------------------------
@@ -160,8 +173,8 @@ msscanf('0xabc','%x') //scan with hexadecimal format
 msscanf('012345abczoo','%[0-9abc]%s')  //[] notation
 
 // reading float and double
-msscanf('4345.988','%g')-4345.988 // scan as float
-msscanf('4345.988','%lg')-4345.988 // scan as double
+msscanf('4345.988','%g')-4345.988 // scan as a float
+msscanf('4345.988','%lg')-4345.988 // scan as a double
 
 //----------------------------------------------------------
 //--    scanning multi-line data files                    --
@@ -193,61 +206,55 @@ typeof(D)
 Names=D(:,1) //strings
 Age=D(:,2)   //numerical values    
  ]]></programlisting>
-  </refsection>
-  <refsection role="see also">
-    <title>See Also</title>
-    <simplelist type="inline">
-      <member>
-        <link linkend="mclose">mclose</link>
-      </member>
-      <member>
-        <link linkend="meof">meof</link>
-      </member>
-      <member>
-        <link linkend="mfprintf">mfprintf</link>
-      </member>
-      <member>
-        <link linkend="fprintfMat">fprintfMat</link>
-      </member>
-      <member>
-        <link linkend="mfscanf">mfscanf</link>
-      </member>
-      <member>
-        <link linkend="fscanfMat">fscanfMat</link>
-      </member>
-      <member>
-        <link linkend="mget">mget</link>
-      </member>
-      <member>
-        <link linkend="mgetstr">mgetstr</link>
-      </member>
-      <member>
-        <link linkend="mopen">mopen</link>
-      </member>
-      <member>
-        <link linkend="mprintf">mprintf</link>
-      </member>
-      <member>
-        <link linkend="mput">mput</link>
-      </member>
-      <member>
-        <link linkend="mputstr">mputstr</link>
-      </member>
-      <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
-        <link linkend="mseek">mseek</link>
-      </member>
-      <member>
-        <link linkend="mtell">mtell</link>
-      </member>
-      <member>
-        <link linkend="mdelete">mdelete</link>
-      </member>
-      <member>
-        <link linkend="scanf_conversion">scanf_conversion</link>
-      </member>
-    </simplelist>
-  </refsection>
-</refentry>
+      </refsection>
+      <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+          <member>
+            <link linkend="mclose">mclose</link>
+          </member>
+          <member>
+            <link linkend="meof">meof</link>
+          </member>
+          <member>
+            <link linkend="mfprintf">mfprintf</link>
+          </member>
+          <member>
+            <link linkend="fprintfMat">fprintfMat</link>
+          </member>
+          <member>
+            <link linkend="fscanfMat">fscanfMat</link>
+          </member>
+          <member>
+            <link linkend="mget">mget</link>
+          </member>
+          <member>
+            <link linkend="mgetstr">mgetstr</link>
+          </member>
+          <member>
+            <link linkend="mopen">mopen</link>
+          </member>
+          <member>
+            <link linkend="mprintf">mprintf</link>
+          </member>
+          <member>
+            <link linkend="mput">mput</link>
+          </member>
+          <member>
+            <link linkend="mputstr">mputstr</link>
+          </member>
+          <member>
+            <link linkend="mseek">mseek</link>
+          </member>
+          <member>
+            <link linkend="mtell">mtell</link>
+          </member>
+          <member>
+            <link linkend="mdelete">mdelete</link>
+          </member>
+          <member>
+            <link linkend="scanf_conversion">scanf_conversion</link>
+          </member>
+        </simplelist>
+      </refsection>
+    </refentry>
index b4909b9..da7902f 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="mget" xml:lang="en">
   <refnamediv>
     <refname>mget</refname>
-    <refpurpose>reads byte or word in a given binary format and convert to
-      double
+    <refpurpose>reads byte or word in a given binary format and converts to
+      a double type
     </refpurpose>
   </refnamediv>
   <refnamediv xml:id="mgeti">
     <refname>mgeti</refname>
-    <refpurpose>reads byte or word in a given binary format return an int
-      type
+    <refpurpose>
+      reads byte or word in a given binary format and returns an int type
     </refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>x=mget([n,type,fd])
-      x=mgeti([n,type,fd])
+    <synopsis>
+      x = mget([n, type, fd])
+      x = mgeti([n, type, fd])
     </synopsis>
   </refsynopsisdiv>
   <refsection>
       <varlistentry>
         <term>n</term>
         <listitem>
-          <para>a positive scalar: The number of items to be read.</para>
+          <para>a positive scalar: the number of items to be read.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>fd</term>
         <listitem>
           <para>
-            a scalar. The <literal>fd</literal> parameter returned by the
-            function <literal>mopen</literal>. -1 stands for last opened file.
-            Default value is -1.
+            a scalar: the <varname>fd</varname> parameter returned by the
+            function <function>mopen</function>. -1 stands for the last 
+            opened file. Default value is -1.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>type</term>
         <listitem>
-          <para>a string. Give the binary format used to write all the entries
-            of x.
+          <para>
+            a string: the binary format used to write all the entries of 
+            <varname>x</varname>.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>x</term>
         <listitem>
-          <para>a vector of floating point or integer type numbers</para>
+          <para>a vector of floating point or integer numbers.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      The <literal>mget</literal> function reads data in the input
-      specified by the stream parameter <literal>fd</literal> and returns a
-      vector of floating point data. The <literal>mgeti</literal> function reads
-      data in the input specified by the stream parameter <literal>fd</literal>
-      and returns a vector of integer data.
+      The <function>mget</function> function reads data in the input
+      specified by the stream parameter <varname>fd</varname> and returns a
+      vector of floating point data. 
+    </para>
+     
+    <para>
+      The <function>mgeti</function> function reads data in the input 
+      specified by the stream parameter <varname>fd</varname> and returns a 
+      vector of integer data.
     </para>
-    <para>Data is read at the position at which the file pointer is currently
+    <para>
+      Data is read at the position at which the file pointer is currently
       pointing and advances the indicator appropriately.
     </para>
     <para>
-      The <literal>type</literal> parameter is a conversion specifier
-      which may be set to any of the following flag characters (with default
-      value "l"):
+      The <varname>type</varname> parameter is a conversion specifier
+      which may be set to any of the following flag characters (with default 
+      value <literal>"l"</literal>):
     </para>
     <para>
-      <emphasis role="bold">Note </emphasis>, On Windows, default behavior
-      is to skip byte 13 (0x0D). mopen should be called with the `b` option,
-      e.g. fd1=mopen(file1,'rb') , so that all bytes will be read without
-      exception.
+      <note>
+        On Windows, default behavior is to skip byte 13 (0x0D). 
+        <function>mopen</function> should be called with the 
+        <literal>'b'</literal> option, e.g. 
+        <code>fd1=mopen(file1,'rb')</code>, so that all bytes will be read 
+        without exception.
+      </note>
     </para>
     <para>Data type:</para>
     <variablelist>
       <varlistentry>
         <term>..l</term>
         <listitem>
-          <para>little endian (in combination with one of the above types)</para>
+          <para>
+            little endian (in combination with one of the above types)
+          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>..b</term>
         <listitem>
-          <para>big endian (in combination with one of the above types)</para>
+          <para>
+            big endian (in combination with one of the above types)
+          </para>
         </listitem>
       </varlistentry>
     </variablelist>
-    <para>Bytes read are automatically swapped if necessary (by checking
-      little=endian status).
+    <para>
+      Bytes read is automatically swapped if necessary (by checking 
+      <literal>little=endian</literal> status).
     </para>
-    <para>This default swapping behavior can be suprressed by adding a flag in
-      the mopen function.
+    <para>
+      This default swapping behavior can be suprressed by adding a flag in      
+      the <function>mopen</function> function.
     </para>
-    <para>Formats "l", "d", and "f" are only valid with the mget
-      function.
+    <para>
+      Formats <literal>"l"</literal>, <literal>"d"</literal> and 
+      <literal>"f"</literal> are only valid with the 
+      <function>mget</function> function.
     </para>
   </refsection>
   <refsection>
     <title>Examples</title>
     <programlisting role="example"><![CDATA[ 
-file1 = 'test1.bin';
-file2 = 'test2.bin';
+file1 = fullfile(TMPDIR,'test1.bin');
+file2 = fullfile(TMPDIR,'test2.bin');
 fd1=mopen(file1,'wb');
 fd2=mopen(file2,'wb');
 mput(1996,'ull',fd1);
@@ -171,9 +189,15 @@ mclose(fd1);
 mclose(fd2);
 
 fd1=mopen(file1,'rb');
-if 1996<>mget(1,'ull',fd1) ;write(%io(2),'Bug');end;
+if 1996<>mget(1,'ull',fd1)
+  write(%io(2),'Bug');
+end
+
 fd2=mopen(file2,'rb');
-if 1996<>mget(1,'ull',fd2) ;write(%io(2),'Bug');end;
+if 1996<>mget(1,'ull',fd2)
+  write(%io(2),'Bug');
+end
+
 mclose(fd1);
 mclose(fd2);
  ]]></programlisting>
@@ -221,9 +245,6 @@ mclose(fd2);
         <link linkend="mputstr">mputstr</link>
       </member>
       <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
         <link linkend="mseek">mseek</link>
       </member>
       <member>
index 2a6ea15..0e09353 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="mgetl">
   <refnamediv>
     <refname>mgetl</refname>
-    <refpurpose> read lines from an text file</refpurpose>
+    <refpurpose>reads lines from an text file</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-    <synopsis>txt=mgetl(file_desc [,m])</synopsis>
+    <synopsis>txt = mgetl(file_desc [,m])</synopsis>
   </refsynopsisdiv>
   <refsection>
     <title>Arguments</title>
       <varlistentry>
         <term>file_desc</term>
         <listitem>
-          <para>a character string giving the file name or a logical unit returned by mopen</para>
+          <para>
+            a character string giving the file name or a logical unit 
+            returned by <function>mopen</function>.
+          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>m</term>
         <listitem>
-          <para>an integer scalar. number of lines to read. Default value is -1.</para>
+          <para>
+            an integer scalar: a number of lines to read. Default value is -1.
+          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>txt</term>
         <listitem>
-          <para>a column vector of string</para>
+          <para>a column vector of strings.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      <literal>mgetl</literal> function allows to read a lines from an text file.
+      <function>mgetl</function> function allows to read a lines from an text file.
     </para>
     <para>
-      If <literal>m</literal> is
-      omitted or is <literal>-1</literal> all lines till end of file occurs are read.
+      If <varname>m</varname> is omitted or is <literal>-1</literal> all lines till end of file occurs are read.
     </para>
     <para>
-      If <literal>m</literal> is given <literal>mgetl</literal> tries to read exactly m lines. This
-      option is useful to sequentialy read part of a file. In this case if
-      an end of file (EOF) occurs before <literal>m</literal> lines are read the read lines are
-      returned (it is possible to check if EOF had occurred using the meof
-      function) issued.
+      If <varname>m</varname> is given <function>mgetl</function> tries to
+      read exactly <varname>m</varname> lines. This option is useful to
+      sequentialy read part of a file. In this case if an end of file (EOF)
+      occurs before <varname>m</varname> lines are read the read lines are
+      returned (it is possible to check if EOF had occurred using the
+      <function>meof</function> function) issued.
     </para>
     <para>
-      <literal>mgetl</literal> allows to read files coming from Unix, Windows, or Mac
-      operating systems.
+      <function>mgetl</function> allows to read files coming from Unix,
+      Windows or Mac operating systems.
     </para>
     <para>
-      <literal>mgetl</literal> supports only UTF-8 and ANSI file encoding.
+      <function>mgetl</function> supports only UTF-8 and ANSI file encoding.
     </para>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[ 
+    <programlisting role="example"><![CDATA[
 mgetl('SCI/etc/scilab.start',5)
 
 mgetl SCI/modules/elementary_functions/macros/erf.sci
index 333a9c7..1bc6e37 100644 (file)
@@ -15,7 +15,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="mgetstr" xml:lang="en">
   <refnamediv>
     <refname>mgetstr</refname>
-    <refpurpose>read a character string from a file</refpurpose>
+    <refpurpose>reads a character string from a file</refpurpose>
   </refnamediv>
   <refsynopsisdiv>
     <title>Calling Sequence</title>
@@ -27,7 +27,7 @@
       <varlistentry>
         <term>n</term>
         <listitem>
-          <para>Non negative integer: how many characters should be
+          <para>non-negative integer: how many characters should be
             read.
           </para>
         </listitem>
         <term>fd</term>
         <listitem>
           <para>
-            Integer file descriptor as returned by 
-            <link linkend="mopen">
-              <literal>mopen</literal>
-            </link>
-            :where
-            characters should be read. The value <literal>-1</literal>
-            stands for the last opened file and is the default.
+            an integer: file descriptor as returned by 
+            <link linkend="mopen">mopen</link>: where characters should be read. The value <literal>-1</literal> stands for the last opened file and is the default.
           </para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>str</term>
         <listitem>
-          <para>The character string read.</para>
+          <para>the character string to be read.</para>
         </listitem>
       </varlistentry>
     </variablelist>
   <refsection>
     <title>Description</title>
     <para>
-      The <literal>mgetstr</literal> function attempts to read up
-      to <literal>n</literal> characters from a file. If end of file is
-      reached before <literal>n</literal> characters are read,
-      <literal>mgetstr</literal> returns the properly read values
+      The <function>mgetstr</function> function attempts to read up
+      to <varname>n</varname> characters from a file. If end of file is
+      reached before <varname>n</varname> characters are read,
+      <function>mgetstr</function> returns the properly read values
       only. As a consequence, when the read cursor is already at the end
-      of the file when <literal>mgetstr</literal> is called, it returns
+      of the file when <function>mgetstr</function> is called, it returns
       an empty string no matter what value is provided for
-      <literal>n</literal>.
+      <varname>n</varname>.
     </para>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example">
+    <programlisting role="example"><![CDATA[
       fn = SCI + '/ACKNOWLEDGEMENTS'; // absolute path to some file
       details = fileinfo(fn);         // retrieve file details
       len = details(1);               // get file length
@@ -84,7 +79,7 @@
       str4 = mgetstr(10, fd)          // read 10 characters: returns empty string
       length(str4)                    // empty string
       mclose(fd);                     // close file descriptor
-    </programlisting>
+  ]]></programlisting>
   </refsection>
   <refsection role="see also">
     <title>See Also</title>
         <link linkend="mget">mget</link>
       </member>
       <member>
-        <link linkend="mgetstr">mgetstr</link>
-      </member>
-      <member>
         <link linkend="mopen">mopen</link>
       </member>
       <member>
         <link linkend="mputstr">mputstr</link>
       </member>
       <member>
-        <link linkend="mscanf">mscanf</link>
-      </member>
-      <member>
         <link linkend="mseek">mseek</link>
       </member>
       <member>