Fix some help example
Pierre MARECHAL [Thu, 15 Jan 2009 13:22:57 +0000 (14:22 +0100)]
23 files changed:
scilab/modules/graphic_export/help/en_US/xs2bmp.xml
scilab/modules/graphic_export/help/en_US/xs2emf.xml
scilab/modules/graphic_export/help/en_US/xs2eps.xml
scilab/modules/graphic_export/help/en_US/xs2fig.xml
scilab/modules/graphic_export/help/en_US/xs2gif.xml
scilab/modules/graphic_export/help/en_US/xs2jpg.xml
scilab/modules/graphic_export/help/en_US/xs2pdf.xml
scilab/modules/graphic_export/help/en_US/xs2png.xml
scilab/modules/graphic_export/help/en_US/xs2ppm.xml
scilab/modules/graphic_export/help/en_US/xs2ps.xml
scilab/modules/graphic_export/help/en_US/xs2svg.xml
scilab/modules/graphic_export/macros/xs2fig.sci
scilab/modules/history_manager/help/en_US/addhistory.xml
scilab/modules/io/help/en_US/unix.xml
scilab/modules/io/help/en_US/unix_g.xml
scilab/modules/io/help/fr_FR/unix.xml
scilab/modules/io/help/fr_FR/unix_g.xml
scilab/modules/metanet/help/en_US/best_match.xml
scilab/modules/metanet/help/en_US/nodes_data_structure.xml
scilab/modules/metanet/help/en_US/save_graph.xml
scilab/modules/metanet/help/fr_FR/best_match.xml
scilab/modules/string/help/en_US/length.xml
scilab/modules/string/help/en_US/strcat.xml

index c0b74a0..f847987 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">    scf(0)
-    plot2d()
-    //BMP export
-    xs2bmp(0,'foo.bmp')
+    <programlisting role="example">
+scf(0)
+plot2d()
+//BMP export
+xs2bmp(0,'foo.bmp');
   </programlisting>
   </refsection>
 
index 7b434b7..9e7fd82 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">    scf(0)
-    plot2d()
-    //EMF export
-    xs2emf(0,'foo.emf')
+    <programlisting role="example">
+if MSDOS then
+  scf(0);
+  plot2d();
+  //EMF export
+  xs2emf(0,'foo.emf');
+end
   </programlisting>
   </refsection>
 
index 0d1c67a..3d467ed 100644 (file)
     <title>Examples</title>
 
     <programlisting role="example"> 
-    scf(0)
-    plot2d()
-    //EPS export
-    filename='foo'; // ! no extension
-    xs2eps(0,filename)
+scf(0);
+plot2d();
+//EPS export
+filename='foo.eps';
+xs2eps(0,filename);
   </programlisting>
   </refsection>
 
index 2cf1560..81be913 100644 (file)
     <title>Examples</title>
 
     <programlisting role="example"> 
-    //simple example
-    scf(0)
-    plot2d()
-    xs2fig(0,'foo.fig')
+//simple example
+scf(0);
+plot2d();
+xs2fig(0,'foo.fig');
   </programlisting>
   </refsection>
 
index c4edc19..f1b0b4e 100644 (file)
@@ -81,9 +81,9 @@
     <title>Examples</title>
 
     <programlisting role="example">    scf(0)
-    plot2d()
-    //GIF export
-    xs2gif(0,'foo.gif')
+plot2d()
+//GIF export
+xs2gif(0,'foo.gif');
   </programlisting>
   </refsection>
 
index de696dd..71b2d36 100644 (file)
   <refsection>
     <title>Examples</title>
 
-    <programlisting role="example">    scf(0)
-    plot2d()
-    //JPG export
-    xs2jpg(0,'foo.jpg')
+    <programlisting role="example">
+scf(0);
+plot2d();
+//JPG export
+xs2jpg(0,'foo.jpg');
   </programlisting>
   </refsection>
 
index f8d92a1..3ee3d15 100644 (file)
     <title>Examples</title>
 
     <programlisting role="example"> 
-    scf(0)
-    plot2d()
-    //PDF export
-    filename='foo'; // ! no extension
-    xs2pdf(0,filename)
+scf(0);
+plot2d();
+//PDF export
+filename='foo'; // ! no extension
+xs2pdf(0,filename);
   </programlisting>
   </refsection>
 
index 6be7019..9579df5 100644 (file)
@@ -69,7 +69,7 @@
     <programlisting role="example">    scf(0)
     plot2d()
     //PNG export
-    xs2png(0,'foo.png')
+    xs2png(0,'foo.png');
   </programlisting>
   </refsection>
 
index 13c95f9..24a40a0 100644 (file)
@@ -69,7 +69,7 @@
     <programlisting role="example">    scf(0)
     plot2d()
     //PPM export
-    xs2ppm(0,'foo.ppm')
+    xs2ppm(0,(foo.ppm');
   </programlisting>
   </refsection>
 
index 62cfee3..8ed564a 100644 (file)
@@ -85,8 +85,9 @@
 scf(0);
 plot2d();
 // Postcript export
-filename='foo.ps';
-xs2ps(0,filename);</programlisting>
+filename=foo.ps;
+xs2ps(0,filename);
+    </programlisting>
   </refsection>
 
   <refsection>
index cb4401d..270fba6 100644 (file)
@@ -79,8 +79,8 @@
     scf(0)
     plot2d()
     //SVG export
-    filename='foo'; // ! no extension
-    xs2svg(0,filename)
+    filename='foo.svg'
+    xs2svg(0,filename);
   </programlisting>
   </refsection>
 
index 7a9c6c2..fcf950f 100644 (file)
@@ -60,11 +60,11 @@ function xs2fig(figureNumber, fileName, orientation)
        end     
        
        
-       
+       pause
        if ~MSDOS then
          // os is a unix one
          // check that pstoedit is available on the computer
-         checkPstoedit = unix_g("which pstoedit");
+         [checkPstoedit,stat,err] = unix_g("which pstoedit");
          if (checkPstoedit == [] | checkPstoedit == "") then
            error(msprintf(gettext("%s: Unable to locate pstoedit. Please install pstoedit or add it to the PATH to be able to use this feature.\n"), "xs2fig"));
            return;
index 25cbd4e..f34dc97 100644 (file)
@@ -46,8 +46,10 @@ addhistory(string_matrix)</synopsis>
   </refsection>
   <refsection>
     <title>Examples</title>
-    <programlisting role="example"><![CDATA[addhistory('hello')
-addhistory(['hello','Scilab')]]></programlisting>
+    <programlisting role="example"><![CDATA[
+addhistory('hello')
+addhistory(['hello','Scilab'])
+]]></programlisting>
   </refsection>
   <refsection>
     <title>Authors</title>
index 0fa9245..4120c34 100644 (file)
@@ -54,11 +54,16 @@ if ~MSDOS then
   unix("ls $SCI/demos");
 end
 
-deff('wd=directory()','if MSDOS then unix(''cd>''+TMPDIR+''\path'');..
-                else unix(''pwd>''+TMPDIR+''/path'');end..
-      wd=read(TMPDIR+''/path'',1,1,''(a)'')')
+function wd=directory()
+  if MSDOS then
+    unix('cd>'+TMPDIR+'\path');
+  else
+    unix('pwd>'+TMPDIR+'/path');
+  end
+  wd=read(TMPDIR+'/path',1,1,'(a)');
+endfunction
+
 wd=directory()
   ]]></programlisting>
   </refsection>
   <refsection>
index 412b0a8..c1abf52 100644 (file)
@@ -102,7 +102,7 @@ function d=DIR(path)
   end
 endfunction
 
-DIR('SCI/demos')
+DIR('SCI/etc')
  
   </programlisting>
   </refsection>
index eede75c..9ebf1de 100644 (file)
   <refsection>
     <title>Exemples</title>
     <programlisting role="example"><![CDATA[
+if ~MSDOS then
+  unix("ls $SCI/demos");
+end
 
-unix("ls $SCI/demos");
-deff('wd=getdir()','if MSDOS then unix(''cd>''+TMPDIR+''\path'');..
-       else unix(''pwd>''+TMPDIR+''/path'');end..
-wd=read(TMPDIR+''/path'',1,1,''(a)'')')
-wd=getdir()
+function wd=directory()
+  if MSDOS then
+    unix('cd>'+TMPDIR+'\path');
+  else
+    unix('pwd>'+TMPDIR+'/path');
+  end
+  wd=read(TMPDIR+'/path',1,1,'(a)');
+endfunction
 
-       ]]></programlisting>
+wd=directory()
+  ]]></programlisting>
   </refsection>
   <refsection>
     <title>Voir Aussi</title>
index 52f512f..88bf605 100644 (file)
@@ -106,7 +106,7 @@ function d=DIR(path)
  end
 endfunction
 
-DIR('SCI/demos')</programlisting>
+DIR('SCI/etc')</programlisting>
   </refsection>
 
   <refsection>
index 2de58ae..3ad8ab4 100644 (file)
@@ -86,7 +86,7 @@ v=index_from_tail_head(g,1:n,match)
 hilite_edges(v);
 //
 // WITH A LARGER GRAPH
-g=load_graph(SCI+'/demos/metanet/mesh1000.graph');
+g=load_graph(SCI+'/modules/metanet/demos/mesh1000.graph');
 g.directed=0;
 ta=g.edges.tail;he=g.edges.head;n=node_number(g);
 show_graph(g,'new',1/2,[1000,400]);
index 40f48d6..92cce30 100644 (file)
@@ -54,10 +54,10 @@ g.nodes.graphics.x=[40,33,29,63,146,233,75,42,114,156,237,260,159];
 g.nodes.graphics.y=[7,61,103,142,145,143,43,120,145,18,36,107,107];
 show_graph(g,'new')
 
-GraphList.nodes.number
-GraphList.nodes
+g.nodes.number
+g.nodes
 
-g=add_node_data(GraphList,'Size',rand(1,GraphList.nodes.number,'u'));    
+g=add_node_data(g,'Size',rand(1,g.nodes.number,'u'));
 g.nodes(1:10)
 
 nodedatafields(g)
index a2f6517..19dc3d0 100644 (file)
@@ -57,7 +57,7 @@
     <title>Examples</title>
     <programlisting role="example"><![CDATA[
 
-g=load_graph(SCI+'/demos/metanet/mesh100.graph');
+g=load_graph(SCI+'/modules/metanet/demos/mesh100.graph');
 show_graph(g);
 save_graph(g,'mymesh100.graph');
 g=load_graph('mymesh100.graph');
index c3bfc7b..8e28445 100644 (file)
@@ -78,7 +78,7 @@ sp1=sparse([[1:n]' match'],ones(1,size(match,2))',[n,n]);
 show_arcs(v');
 //
 // AVEC UN GRAPHE PLUS GRAND
-g=load_graph(SCI+'/demos/metanet/mesh1000');
+g=load_graph(SCI+'/modules/metanet/demos/mesh1000.graph');
 g('directed')=0;
 ta=g('tail');he=g('head');n=node_number(g);
 show_graph(g,'new',1/2,[1000,400]);
index 332f95c..cc81ba9 100644 (file)
@@ -87,7 +87,7 @@
 
     <programlisting role="example">
 length([123 ; 456 ])
-length(['hello world',SCI)
+length(['hello world',SCI])
        </programlisting>
   </refsection>
 
index c9b028e..8683ff0 100644 (file)
@@ -101,7 +101,7 @@ txt=strcat(vector_of_strings [,string_added],["flag"])</synopsis>
 
     <programlisting role="example">
 strcat(string(1:10),',')
-<literal>strcat(["a","b"])</literal>
+strcat(["a","b"])
 strcat(["a","b"],'|')
 strcat('A')
 strcat('A','B')