changeset 20776:38968777601b

Open files when generating docs without sparse or QHULL libraries. * geometryimages.m (geometryimages, sombreroimage): pass complete path name. * sparseimages.m (sombreroimage): generate outfile variable.
author Lachlan Andrew <lachlanbis@gmail.com>
date Sun, 29 Nov 2015 19:58:52 +1100
parents cd50ce72fa24
children 29861f5f28c5
files doc/interpreter/geometryimages.m doc/interpreter/sparseimages.m
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/geometryimages.m	Sun Nov 29 09:31:32 2015 -0800
+++ b/doc/interpreter/geometryimages.m	Sun Nov 29 19:58:52 2015 +1100
@@ -33,7 +33,7 @@
   if (! __have_feature__ ("QHULL")
       && any (strcmp (nm, {"voronoi", "griddata", "convhull", "delaunay", ...
                            "triplot"})))
-    sombreroimage (nm, typ, d_typ);
+    sombreroimage (outfile, typ, d_typ);
   elseif (strcmp (typ, "txt"))
     image_as_txt (d, nm);
   elseif (strcmp (nm, "voronoi"))
@@ -113,9 +113,9 @@
   r = sqrt ((xc - x(1)).^2 + (yc - y(1)).^2);
 endfunction
 
-function sombreroimage (nm, typ, d_typ)
+function sombreroimage (outfile, typ, d_typ)
   if (strcmp (typ, "txt"))
-    fid = fopen ([nm ".txt"], "wt");
+    fid = fopen (outfile, "wt");
     fputs (fid, "+-----------------------------+\n");
     fputs (fid, "| Image unavailable because   |\n");
     fputs (fid, "| of a missing QHULL library. |\n");
--- a/doc/interpreter/sparseimages.m	Sun Nov 29 09:31:32 2015 -0800
+++ b/doc/interpreter/sparseimages.m	Sun Nov 29 19:58:52 2015 +1100
@@ -262,6 +262,7 @@
     fclose (fid);
     return;
   else
+    outfile = fullfile (d, strcat (nm, ".", typ));
     hide_output ();
     if (strcmp (typ, "eps"))
       d_typ = "-depsc2";