# HG changeset patch # User Rik # Date 1386271828 28800 # Node ID e124ae274013e8d90e415024ab4fa2f5650f75be # Parent 2828203086501b27239e8b2c760a3d893f544f41 maint: Backout ca72f1b73216 on gui_release branch. diff -r 282820308650 -r e124ae274013 scripts/deprecated/default_save_options.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/default_save_options.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,42 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{val} =} default_save_options () +## @deftypefnx {Built-in Function} {@var{old_val} =} default_save_options (@var{new_val}) +## @deftypefnx {Built-in Function} {} default_save_options (@var{new_val}, "local") +## This function has been deprecated. Use @code{@file{save_default_options}} +## instead. +## @seealso{save_default_options} +## @end deftypefn + +## Deprecated in 3.8 + +function retval = default_save_options (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "default_save_options is obsolete and will be removed from a future version of Octave, please use save_default_options instead"); + endif + + retval = save_default_options (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/gen_doc_cache.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/gen_doc_cache.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,39 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} gen_doc_cache (@var{out_file}, @var{directory}) +## This function has been deprecated. Use @code{doc_cache_create} instead. +## @seealso{doc_cache_create} +## @end deftypefn + +## Deprecated in 3.8 + +function gen_doc_cache (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "gen_doc_cache is obsolete and will be removed from a future version of Octave, please use doc_cache_create instead"); + endif + + doc_cache_create (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/interp1q.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/interp1q.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,81 @@ +## Copyright (C) 2008-2013 David Bateman +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {@var{yi} =} interp1q (@var{x}, @var{y}, @var{xi}) +## One-dimensional linear interpolation without error checking. +## Interpolates @var{y}, defined at the points @var{x}, at the points +## @var{xi}. The sample points @var{x} must be a strictly monotonically +## increasing column vector. If @var{y} is a matrix or an N-dimensional +## array, the interpolation is performed on each column of @var{y}. If +## @var{y} is a vector, it must be a column vector of the same length as +## @var{x}. +## +## Values of @var{xi} beyond the endpoints of the interpolation result +## in NA being returned. +## +## Note that the error checking is only a significant portion of the +## execution time of this @code{interp1} if the size of the input arguments +## is relatively small. Therefore, the benefit of using @code{interp1q} +## is relatively small. +## @seealso{interp1} +## @end deftypefn + +function yi = interp1q (x, y, xi) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "interp1q is obsolete and will be removed from a future version of Octave; use interp1 instead"); + endif + + x = x(:); + nx = rows (x); + szy = size (y); + y = y(:,:); + [ny, nc] = size (y); + szx = size (xi); + xi = xi (:); + dy = diff (y); + dx = diff (x); + idx = lookup (x, xi, "lr"); + s = (xi - x (idx)) ./ dx (idx); + yi = bsxfun (@times, s, dy(idx,:)) + y(idx,:); + range = xi < x(1) | !(xi <= x(nx)); + yi(range,:) = NA; + if (length (szx) == 2 && any (szx == 1)) + yi = reshape (yi, [max(szx), szy(2:end)]); + else + yi = reshape (yi, [szx, szy(2:end)]); + endif +endfunction + + +%!shared xp, yp, xi, yi +%! xp = [0:2:10].'; yp = sin (2*pi*xp/5); +%! xi = [-1; 0; 2.2; 4; 6.6; 10; 11]; +%! yi = interp1 (xp,yp,xi); +%!assert (interp1q (xp,yp, [min(xp)-1; max(xp)+1]), [NA; NA]); +%!assert (interp1q (xp,yp,xp), yp, 100*eps); +%!assert (isempty (interp1q (xp,yp,[]))); +%!assert (interp1q (xp,yp,xi), yi); +%!assert (interp1q (xp,[yp,yp],xi), [yi, yi]); +%!assert (interp1q (xp,yp,[xi,xi]), [yi, yi]); +%!assert (interp1q (xp,[yp,yp],[xi,xi]), cat (3, [yi, yi], [yi, yi])); + diff -r 282820308650 -r e124ae274013 scripts/deprecated/isequalwithequalnans.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/isequalwithequalnans.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,50 @@ +## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{}) +## This function has been deprecated. Use @code{@file{isequaln}} instead. +## @seealso{isequaln} +## @end deftypefn + +## Deprecated in 3.8 + +function retval = isequalwithequalnans (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "isequalwithequalnans is obsolete and will be removed from a future version of Octave, please use isequaln instead"); + endif + + retval = isequaln (varargin{:}); + +endfunction + + +## test for equality +%!assert (isequalwithequalnans ({1,2,NaN,4},{1,2,NaN,4}), true) +%!assert (isequalwithequalnans ([1,2,NaN,4],[1,2,NaN,4]), true) +## test for inequality +%!assert (isequalwithequalnans ([1,2,NaN,4],[1,NaN,3,4]), false) +%!assert (isequalwithequalnans ([1,2,NaN,4],[1,2,3,4]), false) +## test for equality (struct) +%!assert (isequalwithequalnans (struct ('a',NaN,'b',2),struct ('a',NaN,'b',2),struct ('a',NaN,'b',2)), true) +%!assert (isequalwithequalnans (1,2,1), false) + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_convert_matrix.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_convert_matrix.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,48 @@ +## Copyright (C) 2012-2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{val} =} java_convert_matrix () +## @deftypefnx {Built-in Function} {@var{old_val} =} java_convert_matrix (@var{new_val}) +## @deftypefnx {Built-in Function} {} java_convert_matrix (@var{new_val}, "local") +## Query or set the internal variable that controls whether Java arrays are +## automatically converted to Octave matrices. The default value is false. +## +## When called from inside a function with the @qcode{"local"} option, the +## variable is changed locally for the function and any subroutines it calls. +## The original variable value is restored when exiting the function. +## @seealso{java_matrix_autoconversion, java_unsigned_conversion, java_debug} +## @end deftypefn + +function old_val = java_convert_matrix (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_convert_matrix is obsolete and will be removed from a future version of Octave; use java_matrix_autoconversion instead"); + endif + + if (nargin > 2) + print_usage (); + endif + + old_val = java_matrix_autoconversion (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_debug.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_debug.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,49 @@ +## Copyright (C) 2012-2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{val} =} java_debug () +## @deftypefnx {Built-in Function} {@var{old_val} =} java_debug (@var{new_val}) +## @deftypefnx {Built-in Function} {} java_debug (@var{new_val}, "local") +## Query or set the internal variable that determines whether extra debugging +## information regarding the initialization of the JVM and any Java exceptions +## is printed. +## +## When called from inside a function with the @qcode{"local"} option, the +## variable is changed locally for the function and any subroutines it calls. +## The original variable value is restored when exiting the function. +## @seealso{debug_java, java_convert_matrix, java_unsigned_conversion} +## @end deftypefn + +function old_val = java_debug (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_debug is obsolete and will be removed from a future version of Octave; use debug_java instead"); + endif + + if (nargin > 2) + print_usage (); + endif + + old_val = debug_java (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_get.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_get.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,63 @@ +## Copyright (C) 2012-2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{val} =} java_get (@var{obj}, @var{name}) +## Get the value of the field @var{name} of the Java object @var{obj}. For +## static fields, @var{obj} can be a string representing the fully qualified +## name of the corresponding class. +## +## When @var{obj} is a regular Java object, structure-like indexing can be +## used as a shortcut syntax. For instance, the two following statements are +## equivalent +## +## @example +## @group +## java_get (x, "field1") +## x.field1 +## @end group +## @end example +## +## @seealso{java_set, javaMethod, javaObject} +## @end deftypefn + +function retval = java_get (obj, name) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_get is obsolete and will be removed from a future version of Octave; use structure-like indexing instead"); + endif + + if (nargin != 2) + print_usage (); + endif + + if (isjava (obj)) + retval = obj.(name); + elseif (ischar (obj)) + ## FIXME: Need a solution for getting static fields of class + ## which does not depend on __java_get__ which will be removed. + retval = __java_get__ (obj, name); + else + error ("java_get: OBJ must be a Java object"); + endif + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_invoke.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_invoke.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,57 @@ +## Copyright (C) 2007, 2013 Michael Goffioul +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{ret} =} java_invoke (@var{obj}, @var{methodname}) +## @deftypefnx {Built-in Function} {@var{ret} =} java_invoke (@var{obj}, @var{methodname}, @var{arg1}, @dots{}) +## Invoke the method @var{methodname} on the Java object @var{obj} with the +## arguments @var{arg1}, @dots{} For static methods, @var{obj} can be a +## string representing the fully qualified name of the corresponding class. +## The function returns the result of the method invocation. +## +## When @var{obj} is a regular Java object, structure-like indexing can be +## used as a shortcut syntax. For instance, the two following statements are +## equivalent +## +## @example +## @group +## ret = java_invoke (x, "method1", 1.0, "a string") +## ret = x.method1 (1.0, "a string") +## @end group +## @end example +## +## @seealso{javaMethod, javaObject} +## @end deftypefn + +function retval = java_invoke (obj, methodname, varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_invoke is obsolete and will be removed from a future version of Octave, please use javaMethod instead"); + endif + + if (nargin < 2) + print_usage (); + endif + + retval = javaMethod (methodname, obj, varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_set.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_set.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,63 @@ +## Copyright (C) 2012-2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{obj} =} java_set (@var{obj}, @var{name}, @var{val}) +## Set the value of the field @var{name} of the Java object @var{obj} to +## @var{val}. For static fields, @var{obj} can be a string representing the +## fully qualified named of the corresponding Java class. +## +## When @var{obj} is a regular Java object, structure-like indexing can be +## used as a shortcut syntax. For instance, the two following statements are +## equivalent +## +## @example +## @group +## java_set (x, "field1", val) +## x.field1 = val +## @end group +## @end example +## +## @seealso{java_get, javaMethod, javaObject} +## @end deftypefn + +function retval = java_set (obj, name, val) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_set is obsolete and will be removed from a future version of Octave; use structure-like indexing instead"); + endif + + if (nargin != 3) + print_usage (); + endif + + if (isjava (obj)) + obj.(name) = val; + elseif (ischar (obj)) + ## FIXME: Need a solution for getting static fields of class + ## which does not depend on __java_set__ which will be removed. + retval = __java_set__ (obj, name, val); + else + error ("java_set: OBJ must be a Java object"); + endif + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/java_unsigned_conversion.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/java_unsigned_conversion.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,50 @@ +## Copyright (C) 2012-2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{val} =} java_unsigned_conversion () +## @deftypefnx {Built-in Function} {@var{old_val} =} java_unsigned_conversion (@var{new_val}) +## @deftypefnx {Built-in Function} {} java_unsigned_conversion (@var{new_val}, "local") +## Query or set the internal variable that controls how integer classes are +## converted when Java matrix autoconversion is enabled. When enabled, Java +## arrays of class Byte or Integer are converted to matrices of class uint8 or +## uint32 respectively. +## +## When called from inside a function with the @qcode{"local"} option, the +## variable is changed locally for the function and any subroutines it calls. +## The original variable value is restored when exiting the function. +## @seealso{java_unsigned_autoconversion, java_convert_matrix, debug_java} +## @end deftypefn + +function old_val = java_unsigned_conversion (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "java_unsigned_conversion is obsolete and will be removed from a future version of Octave; use java_unsigned_autoconversion instead"); + endif + + if (nargin > 2) + print_usage (); + endif + + old_val = java_unsigned_autoconversion (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/javafields.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/javafields.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,54 @@ +## Copyright (C) 2007, 2013 Michael Goffioul +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} javafields (@var{javaobj}) +## @deftypefnx {Function File} {} javafields ("@var{classname}") +## @deftypefnx {Function File} {@var{fld_names} =} javafields (@dots{}) +## Return the fields of a Java object or Java class in the form of a cell +## array of strings. If no output is requested, print the result +## to the standard output. +## @seealso{fieldnames, methods, javaObject} +## @end deftypefn + +function fld_names = javafields (javaobj) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "javafields is obsolete and will be removed from a future version of Octave, please use fieldnames instead"); + endif + + if (nargin != 1) + print_usage (); + endif + + c_methods = javaMethod ("getFields", "org.octave.ClassHelper", javaobj); + method_list = ostrsplit (c_methods, ';'); + + if (nargout == 0) + if (! isempty (method_list)) + disp (method_list); + endif + else + fld_names = cellstr (method_list); + endif + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/javamethods.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/javamethods.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,54 @@ +## Copyright (C) 2007, 2013 Michael Goffioul +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Function File} {} javamethods (@var{javaobj}) +## @deftypefnx {Function File} {} javamethods ("@var{classname}") +## @deftypefnx {Function File} {@var{mtd_names} =} javamethods (@dots{}) +## Return the methods of a Java object or Java class in the form of a cell +## array of strings. If no output is requested, print the result to the +## standard output. +## @seealso{methods, fieldnames, javaMethod, javaObject} +## @end deftypefn + +function mtd_names = javamethods (classname) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "javamethods is obsolete and will be removed from a future version of Octave, please use methods instead"); + endif + + if (nargin != 1) + print_usage (); + endif + + cls_methods = javaMethod ("getMethods", "org.octave.ClassHelper", classname); + method_list = ostrsplit (cls_methods, ';'); + + if (nargout == 0) + if (! isempty (method_list)) + disp (method_list); + endif + else + mtd_names = cellstr (method_list); + endif + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/module.mk --- a/scripts/deprecated/module.mk Thu Dec 05 11:15:37 2013 -0800 +++ b/scripts/deprecated/module.mk Thu Dec 05 11:30:28 2013 -0800 @@ -1,8 +1,23 @@ FCN_FILE_DIRS += deprecated deprecated_FCN_FILES = \ - deprecated/find_dir_in_path.m \ - deprecated/isstr.m + deprecated/default_save_options.m \ + deprecated/gen_doc_cache.m \ + deprecated/interp1q.m \ + deprecated/isequalwithequalnans.m \ + deprecated/isstr.m \ + deprecated/java_convert_matrix.m \ + deprecated/java_debug.m \ + deprecated/java_get.m \ + deprecated/java_invoke.m \ + deprecated/java_new.m \ + deprecated/java_unsigned_conversion.m \ + deprecated/java_set.m \ + deprecated/javafields.m \ + deprecated/javamethods.m \ + deprecated/re_read_readline_init_file.m \ + deprecated/read_readline_init_file.m \ + deprecated/saving_history.m FCN_FILES += $(deprecated_FCN_FILES) diff -r 282820308650 -r e124ae274013 scripts/deprecated/re_read_readline_init_file.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/re_read_readline_init_file.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,40 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {} re_read_readline_init_file (@var{file}) +## This function has been deprecated. Use +## @code{@file{readline_re_read_init_file}} instead. +## @seealso{readline_read_init_file} +## @end deftypefn + +## Deprecated in 3.8 + +function re_read_readline_init_file (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "re_read_readline_init_file is obsolete and will be removed from a future version of Octave, please use readline_re_read_init_file instead"); + endif + + readline_re_read_init_file (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/read_readline_init_file.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/read_readline_init_file.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,40 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {} read_readline_init_file (@var{file}) +## This function has been deprecated. Use +## @code{@file{readline_read_init_file}} instead. +## @seealso{readline_read_init_file} +## @end deftypefn + +## Deprecated in 3.8 + +function read_readline_init_file (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "read_readline_init_file is obsolete and will be removed from a future version of Octave, please use readline_read_init_file instead"); + endif + + readline_read_init_file (varargin{:}); + +endfunction + diff -r 282820308650 -r e124ae274013 scripts/deprecated/saving_history.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/saving_history.m Thu Dec 05 11:30:28 2013 -0800 @@ -0,0 +1,41 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## . + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {@var{val} =} saving_history () +## @deftypefnx {Built-in Function} {@var{old_val} =} saving_history (@var{new_val}) +## @deftypefnx {Built-in Function} {} saving_history (@var{new_val}, "local") +## This function has been deprecated. Use @code{@file{history_save}} instead. +## @seealso{history_save} +## @end deftypefn + +## Deprecated in 3.8 + +function retval = saving_history (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "saving_history is obsolete and will be removed from a future version of Octave, please use history_save instead"); + endif + + retval = save_default_options (varargin{:}); + +endfunction +