# HG changeset patch # User jwe # Date 1194574015 0 # Node ID f70121606be5f3e96ebaead48e92bafb3aa92fc9 # Parent 38fe664f0ef18d348e80b729926a1e24fe5c5dc7 [project @ 2007-11-09 02:06:54 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2007-11-08 John W. Eaton + + * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_save_data__): + Note obsolescence in doc string. + (WARN_OBSOLETE): New macro + (F__gnuplot_save_data__, Fgnuplot_command_plot, + Fgnuplot_command_replot, Fgnuplot_command_splot, + Fgnuplot_command_using, Fgnuplot_command_with, + Fgnuplot_command_axes, Fgnuplot_command_title, + Fgnuplot_command_end, Fgnuplot_use_title_option, + F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files, + F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__, + F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__, + F__gnuplot_replot__): Use WARN_OBSOLETE. + 2007-11-07 John W. Eaton * DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H. Check diff --git a/src/DLD-FUNCTIONS/__gnuplot_raw__.l b/src/DLD-FUNCTIONS/__gnuplot_raw__.l --- a/src/DLD-FUNCTIONS/__gnuplot_raw__.l +++ b/src/DLD-FUNCTIONS/__gnuplot_raw__.l @@ -689,11 +689,29 @@ return name; } +#define WARN_OBSOLETE(nm) \ + do \ + { \ + static warned = false; \ + \ + if (! warned) \ + { \ + warning (nm ## ": this function is obsolete and will be removed from a future version of Octave"); \ + \ + warned = true; \ + } \ + } \ + while (0) + DEFUN_DLD (__gnuplot_save_data__, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})\n\ +@strong{This function is obsolete and will be removed from a future version\n\ +of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__gnuplot_save_data__"); + octave_value retval; int nargin = args.length (); @@ -1571,6 +1589,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_plot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_plot); } @@ -1582,6 +1602,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_replot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_replot); } @@ -1593,6 +1615,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_splot"); + return SET_INTERNAL_VARIABLE (gnuplot_command_splot); } @@ -1604,6 +1628,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_using"); + return SET_INTERNAL_VARIABLE (gnuplot_command_using); } @@ -1614,6 +1640,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_with"); + return SET_INTERNAL_VARIABLE (gnuplot_command_with); } @@ -1625,6 +1653,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_axes"); + return SET_INTERNAL_VARIABLE (gnuplot_command_axes); } @@ -1636,6 +1666,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_title"); + return SET_INTERNAL_VARIABLE (gnuplot_command_title); } @@ -1648,6 +1680,8 @@ \n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_end"); + return SET_INTERNAL_VARIABLE (gnuplot_command_end); } @@ -1663,6 +1697,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("gnuplot_command_use_title_option"); + return SET_INTERNAL_VARIABLE (gnuplot_use_title_option); } @@ -1676,6 +1712,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__clear_plot_window__"); + gnuplot::clear (); return octave_value_list (); @@ -1692,6 +1730,8 @@ @seealso{close}\n\ @end deftypefn") { + WARN_OBSOLETE ("closeplot"); + gnuplot::close (); return octave_value_list (); @@ -1711,6 +1751,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("purge_tmp_files"); + gnuplot::cleanup_tmp_files (); return octave_value_list (); @@ -1725,6 +1767,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__gnuplot_raw__"); + if (args.length () == 1 && args(0).is_string ()) { std::string cmd = args(0).string_value (); @@ -1746,6 +1790,8 @@ of Octave.}\n\ @end deftypefn") { + WARN_OBSOLETE ("__gnuplot_send_inline_data__"); + octave_value retval; int nargin = args.length (); @@ -1784,6 +1830,8 @@ of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_set__"); + string_vector argv = args.make_argv ("set"); if (! error_state) @@ -1801,6 +1849,8 @@ of Octave.}\n\ @end deffn") { + WARN_OBSOLETE ("__gnuplot_show__"); + string_vector argv = args.make_argv ("show"); if (! error_state) @@ -1816,6 +1866,8 @@ @strong{This function is obsolete and will be removed from a future version\n\ of Octave.}") { + WARN_OBSOLETE ("__gnuplot_plot__"); + string_vector argv = args.make_argv ("plot"); if (! error_state) @@ -1831,6 +1883,8 @@ @strong{This function is obsolete and will be removed from a future version\n\ of Octave.}") { + WARN_OBSOLETE ("__gnuplot_splot__"); + string_vector argv = args.make_argv ("splot"); if (! error_state) @@ -1846,6 +1900,8 @@ @strong{This function is obsolete and will be removed from a future version\n\ of Octave.}") { + WARN_OBSOLETE ("__gnuplot_replot__"); + string_vector argv = args.make_argv ("replot"); if (! error_state)