changeset 15701:edce7d75597b

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.
author Corbin Champion <corbinlc@gmail.com>
date Thu, 25 Oct 2012 14:06:35 -0700
parents 5d6a5bc65ef1
children 534b6f7108b7
files scripts/help/__makeinfo__.m scripts/miscellaneous/bzip2.m
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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