# HG changeset patch # User Corbin Champion # Date 1351199195 25200 # Node ID edce7d75597b8c60c774e52258dc95e9b473d0e0 # Parent 5d6a5bc65ef18e28ecb955050172b351a3886c13 Change .m files to use tempdir instead of P_tmpdir (patch #7875) * scripts/help/__makeinfo__.m, scripts/miscellaneous/bzip2.m: Switching away from using P_tmpdir directly, to using tempdir. This allows the usage of TMPDIR to specify the temporary directory as is done in most other places. diff -r 5d6a5bc65ef1 -r edce7d75597b scripts/help/__makeinfo__.m --- a/scripts/help/__makeinfo__.m Thu Nov 29 23:10:51 2012 -0500 +++ b/scripts/help/__makeinfo__.m Thu Oct 25 14:06:35 2012 -0700 @@ -116,7 +116,7 @@ unwind_protect ## Write Texinfo to tmp file template = "octave-help-XXXXXX"; - [fid, name] = mkstemp (fullfile (P_tmpdir, template), true); + [fid, name] = mkstemp (fullfile (tempdir, template), true); if (fid < 0) error ("__makeinfo__: could not create temporary file"); endif diff -r 5d6a5bc65ef1 -r edce7d75597b scripts/miscellaneous/bzip2.m --- a/scripts/miscellaneous/bzip2.m Thu Nov 29 23:10:51 2012 -0500 +++ b/scripts/miscellaneous/bzip2.m Thu Oct 25 14:06:35 2012 -0700 @@ -49,9 +49,9 @@ %! filename = tmpnam; %! dummy = 1; %! save (filename, "dummy"); -%! n_tmpfiles_before = length (find (strncmp ("oct-", cellstr (ls (P_tmpdir)), 4))); +%! n_tmpfiles_before = length (find (strncmp ("oct-", cellstr (ls (tempdir)), 4))); %! entry = bzip2 (filename); -%! n_tmpfiles_after = length (find (strncmp ("oct-", cellstr (ls (P_tmpdir)), 4))); +%! n_tmpfiles_after = length (find (strncmp ("oct-", cellstr (ls (tempdir)), 4))); %! if (n_tmpfiles_before != n_tmpfiles_after) %! error ("bzip2 has not cleaned up temporary files correctly!"); %! endif