changeset 11151:0c38b45ab49c

Deprecate betai, gammai, is_global functions.
author Rik <octave@nomad.inbox5.com>
date Sun, 24 Oct 2010 07:28:43 -0700
parents 564e998017f5
children 39ae406df598
files scripts/ChangeLog scripts/deprecated/betai.m scripts/deprecated/gammai.m scripts/deprecated/is_global.m scripts/deprecated/module.mk scripts/specfun/module.mk src/ChangeLog src/variables.cc
diffstat 8 files changed, 147 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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  <octave@nomad.inbox5.com>
+
+	* 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  <jwe@octave.org>
 
 	* strings/untabify.m, strings/strjust.m, io/strread.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
+## <http://www.gnu.org/licenses/>.
+
+## -*- 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
--- /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
+## <http://www.gnu.org/licenses/>.
+
+## -*- 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
--- /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
+## <http://www.gnu.org/licenses/>.
+
+## -*- 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
--- 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 \
--- 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 \
--- 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  <octave@nomad.inbox5.com>
+
+	* variables.cc: Deprecate is_global function
+
 2010-10-23  John W. Eaton  <jwe@octave.org>
 
 	* file-io.cc (Ffopen): Only handle fopen ("all") case if nargout
--- 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)
 {