changeset 4717:7fa16e369904

[project @ 2004-01-23 03:15:53 by jwe]
author jwe
date Fri, 23 Jan 2004 03:15:53 +0000
parents fe25e290fafb
children ab71705f294f
files scripts/ChangeLog scripts/plot/__errcomm__.m scripts/plot/__errplot__.m scripts/plot/__plt__.m scripts/plot/plot_border.m
diffstat 5 files changed, 25 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Fri Jan 23 03:09:59 2004 +0000
+++ b/scripts/ChangeLog	Fri Jan 23 03:15:53 2004 +0000
@@ -1,5 +1,10 @@
 2004-01-22  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* plot/__errcomm__.m: Cope with nargin now being a function.
+	* plot/__errplot__.m: Likewise.
+	* plot/__plt__.m: Likewise.
+	* plot/plot_border.m: Likewise.
+
 	* Makefile.in (distclean, maintainer-clean): Remove DOCSTRINGS,
 	not $(DOCSTRINGS).
 
--- a/scripts/plot/__errcomm__.m	Fri Jan 23 03:09:59 2004 +0000
+++ b/scripts/plot/__errcomm__.m	Fri Jan 23 03:15:53 2004 +0000
@@ -31,11 +31,13 @@
 
 function __errcomm__ (caller, varargin)
 
-  if (nargin < 3)
+  nargs = nargin ();
+
+  if (nargs < 3)
     usage ("%s (...)", caller);
   endif
 
-  nargin--;
+  nargs--;
   save_hold = ishold;
   unwind_protect
     if (! ishold)
@@ -43,9 +45,9 @@
     endif
     hold on;
     k = 1;
-    while (nargin)
+    while (nargs)
       a = varargin{k++};
-      nargin--;
+      nargs--;
       if (isvector (a))
         a = a(:);
       elseif (ismatrix (a))
@@ -56,8 +58,7 @@
       sz = size (a);
       ndata = 1;
       arg1 = a;
-      while (nargin)
-	nargin--;
+      while (nargs--)
 	a = varargin{k++};
 	if (isstr (a))
 	  fmt = a;
--- a/scripts/plot/__errplot__.m	Fri Jan 23 03:09:59 2004 +0000
+++ b/scripts/plot/__errplot__.m	Fri Jan 23 03:15:53 2004 +0000
@@ -35,7 +35,9 @@
 
 function __errplot__ (varargin)
 
-  if (nargin < 3) # atleast two data arguments needed
+  nargs = nargin ();
+
+  if (nargs < 3) # atleast two data arguments needed
     usage ("__errplot__ (arg1, ..., fmt)");
   endif
 
@@ -43,7 +45,7 @@
   ndata = 0;
   k = 1;
 
-  while (nargin--)
+  while (nargs--)
     a = varargin{k++};
     if (! isstr (a))
       ndata++;
--- a/scripts/plot/__plt__.m	Fri Jan 23 03:09:59 2004 +0000
+++ b/scripts/plot/__plt__.m	Fri Jan 23 03:15:53 2004 +0000
@@ -25,11 +25,13 @@
 
 function __plt__ (caller, varargin)
 
-  if (nargin == 2)
+  nargs = nargin ();
+
+  if (nargs == 2)
 
     __plt1__ (varargin{1}, "");
 
-  elseif (nargin > 2)
+  elseif (nargs > 2)
 
     first_plot = 1;
     hold_state = ishold ();
@@ -38,13 +40,13 @@
 
       k = 1;
       x = varargin{k++};
-      nargin = nargin - 2;
+      nargs -= 2;
       x_set = 1;
       y_set = 0;
 
       ## Gather arguments, decode format, and plot lines.
 
-      while (nargin-- > 0)
+      while (nargs-- > 0)
 
         fmt = "";
         new = varargin{k++};
--- a/scripts/plot/plot_border.m	Fri Jan 23 03:09:59 2004 +0000
+++ b/scripts/plot/plot_border.m	Fri Jan 23 03:15:53 2004 +0000
@@ -62,7 +62,9 @@
 
   k = 1;
 
-  while (nargin--)
+  nargs = nargin ();
+
+  while (nargs--)
 
     arg = varargin{k++};