changeset 19102:be8a12acb20a

Deprecate nargchk in favor of narginchk. * NEWS: Announce deprecation. * func.txi: Remove reference to nargchk in manual. * narginchk.m, nargoutchk.m: Remove seealso references to nargchk. * __splinefit__.m: Replace nargchk with narginchk. * scripts/deprecated/nargchk.m: Moved from scripts/general. * scripts/deprecated/module.mk: Add nargchk to deprecated build system. * scripts/general/module.mk: Remove nargchk from regular build system.
author Rik <rik@octave.org>
date Mon, 01 Sep 2014 10:57:29 -0700
parents 4fd271cd9b37
children efd5cf93013b
files NEWS doc/interpreter/func.txi scripts/deprecated/module.mk scripts/general/module.mk scripts/general/narginchk.m scripts/general/nargoutchk.m scripts/polynomial/private/__splinefit__.m
diffstat 7 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Mon Sep 01 08:00:05 2014 -0700
+++ b/NEWS	Mon Sep 01 10:57:29 2014 -0700
@@ -80,6 +80,7 @@
 
       bicubic              syl
       find_dir_in_path
+      nargchk
       nfields
 
     The following functions were deprecated in Octave 3.8 and have been
--- a/doc/interpreter/func.txi	Mon Sep 01 08:00:05 2014 -0700
+++ b/doc/interpreter/func.txi	Mon Sep 01 10:57:29 2014 -0700
@@ -395,10 +395,8 @@
 
 @DOCSTRING(validateattributes)
 
-For compatibility with @sc{matlab}, @code{nargchk}, @code{narginchk} and
-@code{nargoutchk} are available which provide similar error checking.
-
-@DOCSTRING(nargchk)
+For compatibility with @sc{matlab}, @code{narginchk} and @code{nargoutchk} are
+available which provide similar error checking.
 
 @DOCSTRING(narginchk)
 
--- a/scripts/deprecated/module.mk	Mon Sep 01 08:00:05 2014 -0700
+++ b/scripts/deprecated/module.mk	Mon Sep 01 10:57:29 2014 -0700
@@ -4,6 +4,7 @@
   deprecated/bicubic.m \
   deprecated/find_dir_in_path.m \
   deprecated/isstr.m \
+  deprecated/nargchk.m \
   deprecated/nfields.m \
   deprecated/strmatch.m \
   deprecated/syl.m
--- a/scripts/general/module.mk	Mon Sep 01 08:00:05 2014 -0700
+++ b/scripts/general/module.mk	Mon Sep 01 10:57:29 2014 -0700
@@ -46,7 +46,6 @@
   general/loadobj.m \
   general/logspace.m \
   general/methods.m \
-  general/nargchk.m \
   general/narginchk.m \
   general/nargoutchk.m \
   general/nthargout.m \
--- a/scripts/general/narginchk.m	Mon Sep 01 08:00:05 2014 -0700
+++ b/scripts/general/narginchk.m	Mon Sep 01 10:57:29 2014 -0700
@@ -28,7 +28,7 @@
 ##
 ## Note that this function evaluates @code{nargin} on the caller.
 ##
-## @seealso{nargchk, nargoutchk, error, nargout, nargin}
+## @seealso{nargoutchk, error, nargout, nargin}
 ## @end deftypefn
 
 ## Author: Carnë Draug <carandraug+dev@gmail.com>
--- a/scripts/general/nargoutchk.m	Mon Sep 01 08:00:05 2014 -0700
+++ b/scripts/general/nargoutchk.m	Mon Sep 01 10:57:29 2014 -0700
@@ -38,7 +38,7 @@
 ##
 ## This is useful for checking to see that the number of output
 ## arguments supplied to a function is within an acceptable range.
-## @seealso{nargchk, narginchk, error, nargout, nargin}
+## @seealso{narginchk, error, nargout, nargin}
 ## @end deftypefn
 
 ## Author: Bill Denney <bill@denney.ws>
@@ -76,7 +76,7 @@
     if (strcmpi (outtype, "string"))
       msg = msg.message;
     elseif (isempty (msg.message))
-      ## Compatability: Matlab returns a 0x1 empty struct when nargchk passes
+      ## Compatibility: Matlab returns a 0x1 empty struct when nargoutchk passes
       msg = resize (msg, 0, 1);
     endif
 
--- a/scripts/polynomial/private/__splinefit__.m	Mon Sep 01 08:00:05 2014 -0700
+++ b/scripts/polynomial/private/__splinefit__.m	Mon Sep 01 10:57:29 2014 -0700
@@ -111,7 +111,7 @@
 %   2011-07-01  Robust fitting parameter added.
 
 % Check number of arguments
-error(nargchk(3,7,nargin));
+narginchk(3,7);
 
 % Check arguments
 [x,y,dim,breaks,n,periodic,beta,constr] = arguments(varargin{:});