comparison scripts/plot/util/copyobj.m @ 19312:6ca096827123

Use tempname() rather than tmpnam() in core Octave. * scripts/miscellaneous/tempname.m: Removed m-file as function is now C++. * scripts/miscellaneous/tmpnam.m: New m-file is an alias that calls tempname. * scripts/miscellaneous/module.mk: Add tmpnam.m to build system. * io.txi: Place tempname, tempdir, P_tmpdir docstrings in section on temporary files. * system.txi: Remove tempname, tempdir, P_tmpdir docstrings from generic system functions section of manual. * dirfns.cc, dlmread.cc, md5sum.cc, ov-fcn-handle.cc: Replace instances of tmpnam with tempname in BIST code. * file-io.cc (Ftempname): Change DEFUNX for tmpnam to DEFUN for tempname. Remove seealso links to tmpnam. * ftp.m, playaudio.m, wavwrite.m, imformats.m, imread.m, imwrite.m, imageIO.m, csvwrite.m, dlmwrite.m, fileread.m, importdata.m, textread.m, textscan.m, genvarname.m, unpack.m, install.m, legend.m, __gnuplot_drawnow__.m, copyobj.m, hgsave.m, print.m, __ghostscript__.m, __gnuplot_get_var__.m, __gnuplot_ginput__.m, __gnuplot_print__.m: Replace tmpnam with tempname in core code. * build-sparse-tests.sh, io.tst, prefer.tst, system.tst: Replace tmpnam with tempname in test code.
author Rik <rik@octave.org>
date Wed, 22 Oct 2014 10:41:15 -0700
parents 9a5e03801d23
children 0e1f5a750d00
comparison
equal deleted inserted replaced
19311:18a3eaf7bdf0 19312:6ca096827123
146 %! text (4.5, 80, "Right Axis", ... 146 %! text (4.5, 80, "Right Axis", ...
147 %! "color", [0 0.5 0], "horizontalalignment", "center"); 147 %! "color", [0 0.5 0], "horizontalalignment", "center");
148 %! s1 = hdl2struct (h1); 148 %! s1 = hdl2struct (h1);
149 %! h2 = struct2hdl (s1); 149 %! h2 = struct2hdl (s1);
150 %! s2 = hdl2struct (h2); 150 %! s2 = hdl2struct (h2);
151 %! png1 = strcat (tmpnam (), ".png"); 151 %! png1 = [tempname() ".png"];
152 %! png2 = strcat (tmpnam (), ".png"); 152 %! png2 = [tempname() ".png"];
153 %! unwind_protect 153 %! unwind_protect
154 %! print (h1, png1); 154 %! print (h1, png1);
155 %! [img1, map1, alpha1] = imread (png1); 155 %! [img1, map1, alpha1] = imread (png1);
156 %! print (h2, png2); 156 %! print (h2, png2);
157 %! [img2, map2, alpha2] = imread (png2); 157 %! [img2, map2, alpha2] = imread (png2);