# HG changeset patch # User Rik # Date 1287930523 25200 # Node ID 0c38b45ab49cb12225280cf1b6676fdcb74aa87b # Parent 564e998017f533369d84b5bd26c24f370ee0dea1 Deprecate betai, gammai, is_global functions. diff -r 564e998017f5 -r 0c38b45ab49c scripts/ChangeLog --- a/scripts/ChangeLog Sat Oct 23 03:33:25 2010 -0400 +++ b/scripts/ChangeLog Sun Oct 24 07:28:43 2010 -0700 @@ -1,3 +1,9 @@ +2010-10-24 Rik + + * specfun/module.mk, deprecated/module.mk, deprecated/betai.m, + deprecated/gammai.m, deprecated/is_global.m: Deprecate betai, + gammai, and is_global functions. + 2010-10-23 John W. Eaton * strings/untabify.m, strings/strjust.m, io/strread.m: diff -r 564e998017f5 -r 0c38b45ab49c scripts/deprecated/betai.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/betai.m Sun Oct 24 07:28:43 2010 -0700 @@ -0,0 +1,48 @@ +## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2005, 2006, +## 2007 John W. Eaton +## +## 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} {} betai (@var{a}, @var{b}, @var{x}) +## This function is provided for compatibility with older versions of +## Octave. New programs should use betainc instead. +## +## @code{betai (@var{a}, @var{b}, @var{x})} is the same as +## @code{betainc (@var{x}, @var{a}, @var{b})}. +## @end deftypefn + +## Author: jwe +## Created: 30 Jan 1998 + +## Deprecated in version 3.4 + +function retval = betai (a, b, x) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "betai is obsolete and will be removed from a future version of Octave; please use betainc instead"); + endif + + if (nargin == 3) + retval = betainc (x, a, b); + else + print_usage (); + endif + +endfunction diff -r 564e998017f5 -r 0c38b45ab49c scripts/deprecated/gammai.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/gammai.m Sun Oct 24 07:28:43 2010 -0700 @@ -0,0 +1,48 @@ +## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2005, 2006, +## 2007 John W. Eaton +## +## 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} {} gammai (@var{a}, @var{x}) +## This function is provided for compatibility with older versions of +## Octave. New programs should use @code{gammainc} instead. +## +## @code{gammai (@var{a}, @var{x})} is the same as +## @code{gammainc (@var{x}, @var{a})}. +## @end deftypefn + +## Author: jwe +## Created: 30 Jan 1998 + +## Deprecated in version 3.4 + +function retval = gammai (a, x) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "gammai is obsolete and will be removed from a future version of Octave; please use gammainc instead"); + endif + + if (nargin == 2) + retval = gammainc (x, a); + else + print_usage (); + endif + +endfunction diff -r 564e998017f5 -r 0c38b45ab49c scripts/deprecated/is_global.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/deprecated/is_global.m Sun Oct 24 07:28:43 2010 -0700 @@ -0,0 +1,38 @@ +## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2005, 2006, +## 2007, 2010 John W. Eaton +## +## 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} {} is_global (@var{name}) +## This function is provided for compatibility with older versions of +## Octave. New programs should use isglobal instead. +## @end deftypefn + +## Deprecated in version 3.4 + +function retval = is_global (name) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "is_global is obsolete and will be removed from a future version of Octave; please use isglobal instead"); + endif + + retval = isglobal(name); + +endfunction diff -r 564e998017f5 -r 0c38b45ab49c scripts/deprecated/module.mk --- a/scripts/deprecated/module.mk Sat Oct 23 03:33:25 2010 -0400 +++ b/scripts/deprecated/module.mk Sun Oct 24 07:28:43 2010 -0700 @@ -1,14 +1,17 @@ FCN_FILE_DIRS += deprecated deprecated_FCN_FILES = \ + deprecated/betai.m \ deprecated/cellidx.m \ deprecated/clg.m \ deprecated/complement.m \ deprecated/create_set.m \ deprecated/dmult.m \ deprecated/fstat.m \ + deprecated/gammai.m \ deprecated/intwarning.m \ deprecated/iscommand.m \ + deprecated/is_global.m \ deprecated/israwcommand.m \ deprecated/isstr.m \ deprecated/lchol.m \ diff -r 564e998017f5 -r 0c38b45ab49c scripts/specfun/module.mk --- a/scripts/specfun/module.mk Sat Oct 23 03:33:25 2010 -0400 +++ b/scripts/specfun/module.mk Sun Oct 24 07:28:43 2010 -0700 @@ -3,11 +3,9 @@ specfun_FCN_FILES = \ specfun/bessel.m \ specfun/beta.m \ - specfun/betai.m \ specfun/betaln.m \ specfun/factor.m \ specfun/factorial.m \ - specfun/gammai.m \ specfun/isprime.m \ specfun/legendre.m \ specfun/nchoosek.m \ diff -r 564e998017f5 -r 0c38b45ab49c src/ChangeLog --- a/src/ChangeLog Sat Oct 23 03:33:25 2010 -0400 +++ b/src/ChangeLog Sun Oct 24 07:28:43 2010 -0700 @@ -1,3 +1,7 @@ +2010-10-24 Rik + + * variables.cc: Deprecate is_global function + 2010-10-23 John W. Eaton * file-io.cc (Ffopen): Only handle fopen ("all") case if nargout diff -r 564e998017f5 -r 0c38b45ab49c src/variables.cc --- a/src/variables.cc Sat Oct 23 03:33:25 2010 -0400 +++ b/src/variables.cc Sun Oct 24 07:28:43 2010 -0700 @@ -370,15 +370,6 @@ return do_isglobal (args); } -DEFUN (is_global, args, , - "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} isglobal (@var{name})\n\ -This function has been deprecated. Use isglobal instead.\n\ -@end deftypefn") -{ - return do_isglobal (args); -} - static octave_value safe_symbol_lookup (const std::string& symbol_name) {