# HG changeset patch # User Lachlan Andrew # Date 1448787532 -39600 # Node ID c06cbec3a88328a3bf531f431d830567f3d4dcf2 # Parent 4d78e076a592237f446663c9b16c06b73a4893f6 Open files when generating docs without sparse or QHULL libraries * doc/interpreter/geometryimages.m (geometryimages, sombreroimage): pass complete path name * doc/interpreter/sparseimages.m (sombreroimage): generate outfile variable diff -r 4d78e076a592 -r c06cbec3a883 doc/interpreter/geometryimages.m --- a/doc/interpreter/geometryimages.m Sat Nov 28 14:07:09 2015 -0500 +++ b/doc/interpreter/geometryimages.m Sun Nov 29 19:58:52 2015 +1100 @@ -33,7 +33,7 @@ function geometryimages (d, nm, typ) 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 @@ function [r, c] = tri2circ (tri, xx, yy) 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"); diff -r 4d78e076a592 -r c06cbec3a883 doc/interpreter/sparseimages.m --- a/doc/interpreter/sparseimages.m Sat Nov 28 14:07:09 2015 -0500 +++ b/doc/interpreter/sparseimages.m Sun Nov 29 19:58:52 2015 +1100 @@ -262,6 +262,7 @@ function sombreroimage (d, nm, typ) fclose (fid); return; else + outfile = fullfile (d, strcat (nm, ".", typ)); hide_output (); if (strcmp (typ, "eps")) d_typ = "-depsc2";