# HG changeset patch # User carandraug # Date 1331577111 0 # Node ID 0ff0c86afbe44103618910b6631a1a55f7dac63b # Parent 3250035e724f5ac71c5dfeb57f10ba1159a529a0 temp_name: deprecating function in favour of tmpnam diff -r 3250035e724f -r 0ff0c86afbe4 main/miscellaneous/NEWS --- a/main/miscellaneous/NEWS Mon Mar 12 18:16:27 2012 +0000 +++ b/main/miscellaneous/NEWS Mon Mar 12 18:31:51 2012 +0000 @@ -25,6 +25,9 @@ ** The function `partarray' has been deprecated. `mat2cell' from octave core should be used instead. + ** The function `temp_name' has been deprecated. `tmpnam' from octave core + should be used instead. + ** Multiple bug fixes and increased input check on many functions. ** The function `csv2cell' now returns an empty cell in the case of empty file diff -r 3250035e724f -r 0ff0c86afbe4 main/miscellaneous/inst/temp_name.m --- a/main/miscellaneous/inst/temp_name.m Mon Mar 12 18:16:27 2012 +0000 +++ b/main/miscellaneous/inst/temp_name.m Mon Mar 12 18:31:51 2012 +0000 @@ -33,6 +33,13 @@ function n = temp_name (rootname, quick) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "temp_name has been deprecated, and will be removed in the future. Use `tmpnam' instead."); + endif + ### Keep track of previously asked names persistent cnt = struct ("dummy",0);