Mercurial > hg > octave-lyh
changeset 10864:d19d2abdd65f
__fltk_print__.m: When running pstoedit, crop eps file after it is created.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 07 Aug 2010 13:47:52 -0400 |
parents | 5a55773fcaa9 |
children | f065b24f792a |
files | scripts/ChangeLog scripts/plot/__fltk_print__.m |
diffstat | 2 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-08-07 Ben Abbott <bpabbott@mac.com> + + * plot/__fltk_print__.m: When running pstoedit, crop eps file after it + is created. Correctly check error status. + 2010-08-06 Jaroslav Hajek <highegg@gmail.com> * general/cell2mat.m: Allow cells of struct arrays.
--- a/scripts/plot/__fltk_print__.m +++ b/scripts/plot/__fltk_print__.m @@ -149,15 +149,15 @@ devopt = opts.devopt; endif if (! isempty (opts.fig2dev_binary)) - cmd = sprintf ("%s -L %s %s %s 2>&1", opts.fig2dev_binary, devopt, figfile, devfile); + cmd = sprintf ("%s -L %s %s %s 2>&1", opts.fig2dev_binary, devopt, + figfile, devfile); [status, output] = system (cmd); - if (opts.debug) + if (opts.debug || status != 0) fprintf ("fig2dev command: %s", cmd) endif - if (status) + if (status != 0) + disp (output) warning ("print:fig2devfailed", "print.m: error running fig2dev.") - disp (cmd) - disp (output) endif elseif (isempty (opts.fig2dev_binary) && warn_on_absence) warning ("print:nofig2dev", "print.m: 'fig2dev' not found in EXEC_PATH.") @@ -173,21 +173,21 @@ if (nargin < 2) devopt = opts.devopt; endif + if (! isempty (opts.pstoedit_binary)) tmp_epsfile = strcat (tmpnam (), ".eps"); + drawnow ("eps", tmp_epsfile) if (opts.tight_flag) __tight_eps_bbox__ (opts, tmp_epsfile); endif - if (! isempty (opts.pstoedit_binary)) - drawnow ("eps", tmp_epsfile) - cmd = sprintf ("%s -f %s %s %s 2>&1", opts.pstoedit_binary, devopt, tmp_epsfile, name); + cmd = sprintf ("%s -f %s %s %s 2>&1", opts.pstoedit_binary, devopt, + tmp_epsfile, name); [status, output] = system (cmd); - if (opts.debug) + if (opts.debug || status != 0) fprintf ("pstoedit command: %s", cmd) endif - if (status) + if (status != 0) + disp (output) warning ("print:pstoeditfailed", "print.m: error running pstoedit.") - disp (cmd) - disp (output) endif [status, output] = unlink (tmp_epsfile); if (status != 0)