# HG changeset patch # User jwe # Date 1026323134 0 # Node ID e0b7a493e5a8cbcda7cc9c14314541b8a29e9b6a # Parent 10bc4c350d61c4e6934bb0e34e42bc6e2d093bba [project @ 2002-07-10 17:45:34 by jwe] diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/ChangeLog --- a/scripts/ChangeLog Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/ChangeLog Wed Jul 10 17:45:34 2002 +0000 @@ -1,3 +1,36 @@ +2002-07-10 John W. Eaton + + * control/system/sysmult.m: Use varargin instead of old style varargs. + * control/system/sysadd.m: Likewise. + * control/system/sysgroup.m: Likewise. + * control/system/syssub.m: Likewise. + * elfun/gcd.m: Likewise. + * elfun/lcm.m: Likewise. + * general/common_size.m: Likewise. + * io/printf.m: Likewise. + * miscellaneous/menu.m: Likewise. + * miscellaneous/path.m: Likewise. + * plot/__errplot__.m: Likewise. + * plot/__plt__.m: Likewise. + * plot/axis.m: Likewise. + * plot/errorbar.m: Likewise. + * plot/mplot.m: Likewise. + * plot/loglog.m: Likewise. + * plot/plot.m: Likewise. + * plot/plot_border.m: Likewise. + * plot/semilogx.m: Likewise. + * plot/semilogy.m: Likewise. + * plot/xlabel.m: Likewise. + * plot/ylabel.m: Likewise. + * plot/zlabel.m: Likewise. + * statistics/base/ppplot.m: Likewise. + * statistics/base/qqplot.m: Likewise. + * statistics/tests/bartlett_test.m: Likewise. + * statistics/tests/kolmogorov_smirnov_test.m: Likewise. + * statistics/tests/kruskal_wallis_test.m: Likewise. + * strings/str2mat.m: Likewise. + * strings/strcat.m: Likewise. + 2002-06-27 Paul Kienzle * statistics/distributions/gamma_pdf.m: Avoid overflow in more cases. diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/control/system/sysadd.m --- a/scripts/control/system/sysadd.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/control/system/sysadd.m Wed Jul 10 17:45:34 2002 +0000 @@ -43,7 +43,7 @@ ## Created: July 1996 ## Updated for variable number of arguments July 1999 A. S. Hodel -function sys = sysadd (...) +function sys = sysadd (varargin) if(nargin < 1) usage("sysadd: sys = sysysadd(Gsys{,Hsys, ...})"); @@ -51,9 +51,8 @@ ## collect all arguments arglist = list(); - va_start(); for kk=1:nargin - arglist(kk) = va_arg(); + arglist(kk) = varargin{kk}; if(!is_struct(nth(arglist,kk))) error("sysadd: argument %d is not a data structure",kk); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/control/system/sysgroup.m --- a/scripts/control/system/sysgroup.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/control/system/sysgroup.m Wed Jul 10 17:45:34 2002 +0000 @@ -50,7 +50,7 @@ ## modified by John Ingram July 1996 ## A. S. Hodel: modified for variable number of arguments 1999 -function sys = sysgroup (...) +function sys = sysgroup (varargin) save_emp = empty_list_elements_ok; empty_list_elements_ok = 1; @@ -61,9 +61,8 @@ ## collect all arguments arglist = list(); - va_start(); for kk=1:nargin - arglist(kk) = va_arg(); + arglist(kk) = varargin{kk}; if(!is_struct(nth(arglist,kk))) error("sysgroup: argument %d is not a data structure",kk); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/control/system/sysmult.m --- a/scripts/control/system/sysmult.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/control/system/sysmult.m Wed Jul 10 17:45:34 2002 +0000 @@ -36,7 +36,7 @@ ## Created: July 1996 ## updated for variable number of arguments by A. S. Hodel July 1999 -function sys = sysmult (...) +function sys = sysmult (varargin) if(nargin < 1) usage("sysmult: sys = sysmult(Asys{,Bsys,...})"); @@ -44,9 +44,8 @@ ## collect all arguments arglist = list(); - va_start(); for kk=1:nargin - arglist(kk) = va_arg(); + arglist(kk) = varargin{kk}; if(!is_struct(nth(arglist,kk))) error("sysadd: argument %d is not a data structure",kk); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/control/system/syssub.m --- a/scripts/control/system/syssub.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/control/system/syssub.m Wed Jul 10 17:45:34 2002 +0000 @@ -42,7 +42,7 @@ ## Created: July 1996 ## updated for variable numbers of input arguments by July 1999 A. S. Hodel -function sys = syssub (...) +function sys = syssub (varargin) if(nargin < 1) usage("syssub: sys = syssub(Gsys{,Hsys,...})"); @@ -50,9 +50,8 @@ ## collect all arguments arglist = list(); - va_start(); for kk=1:nargin - arglist(kk) = va_arg(); + arglist(kk) = varargin{kk}; if(!is_struct(nth(arglist,kk))) error("syssub: argument %d is not a data structure",kk); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/elfun/gcd.m --- a/scripts/elfun/gcd.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/elfun/gcd.m Wed Jul 10 17:45:34 2002 +0000 @@ -46,16 +46,16 @@ ## Created: 16 September 1994 ## Adapted-By: jwe -function [g, v] = gcd (a, ...) +function [g, v] = gcd (a, varargin) if (nargin == 0) usage ("[g, v] = gcd (a, ...)"); endif if (nargin > 1) - va_start; - for k = 2:nargin; - a = [a, (va_arg ())]; + k = 1; + for i = 2:nargin + a = [a, varargin{k++}]; endfor endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/elfun/lcm.m --- a/scripts/elfun/lcm.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/elfun/lcm.m Wed Jul 10 17:45:34 2002 +0000 @@ -39,16 +39,16 @@ ## Created: 16 September 1994 ## Adapted-By: jwe -function l = lcm (a, ...) +function l = lcm (a, varargin) if (nargin == 0) usage ("lcm (a, ...)"); endif if (nargin > 1) - va_start; - for k = 2:nargin; - a = [a, (va_arg ())]; + k = 1; + for i = 2:nargin + a = [a, varargin{k++}]; endfor endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/general/common_size.m --- a/scripts/general/common_size.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/general/common_size.m Wed Jul 10 17:45:34 2002 +0000 @@ -43,32 +43,26 @@ ## Created: 15 October 1994 ## Adapted-By: jwe -function [errorcode, ...] = common_size (...) +function [errorcode, varargout] = common_size (varargin) if (nargin < 2) error ("common_size: only makes sense if nargin >= 2"); endif - va_start (); - for k = 1 : nargin - s(k, :) = size (va_arg ()); + for i = 1 : nargin + s(i,:) = size (varargin{i}); endfor m = max (s); if (any (any ((s != 1)') & any ((s != ones (nargin, 1) * m)'))) errorcode = 1; - va_start (); - for k = 1 : nargin - vr_val (va_arg ()); - endfor + varargout = varargin; else errorcode = 0; - va_start (); - for k = 1 : nargin - if (prod (s(k, :)) == 1) - vr_val (va_arg () * ones (m)); - else - vr_val (va_arg ()); + for i = 1 : nargin + varargout{i} = varargin{i}; + if (prod (s(i,:)) == 1) + varargout{i} *= ones (m); endif endfor endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/io/printf.m --- a/scripts/io/printf.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/io/printf.m Wed Jul 10 17:45:34 2002 +0000 @@ -27,12 +27,12 @@ ## Author: jwe -function retval = printf (fmt, ...) +function retval = printf (fmt, varargin) retval = -1; if (nargin > 0) - retval = fprintf (stdout, fmt, all_va_args); + retval = fprintf (stdout, fmt, varargin{:}); else usage ("printf (fmt, ...)"); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/miscellaneous/menu.m --- a/scripts/miscellaneous/menu.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/miscellaneous/menu.m Wed Jul 10 17:45:34 2002 +0000 @@ -30,7 +30,7 @@ ## Author: jwe -function num = menu (t, ...) +function num = menu (t, varargin) if (nargin < 2) usage ("menu (title, opt1, ...)"); @@ -57,10 +57,9 @@ nopt = nargin - 1; while (1) - va_start (); for i = 1:nopt printf (" [%2d] ", i); - disp (va_arg ()); + disp (varargin{i}); endfor printf ("\n"); s = input ("pick a number, any number: ", "s"); diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/miscellaneous/path.m --- a/scripts/miscellaneous/path.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/miscellaneous/path.m Wed Jul 10 17:45:34 2002 +0000 @@ -36,7 +36,7 @@ ## Author: jwe -function p = path (...) +function p = path (varargin) if (nargin == 0) if (nargout == 0) @@ -46,9 +46,9 @@ p = LOADPATH; endif else - p = va_arg (); + p = varargin{1}; for i = 2:nargin - p = sprintf ("%s:%s", p, va_arg ()); + p = sprintf ("%s:%s", p, varargin{i}); endfor LOADPATH = p; endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/__errplot__.m --- a/scripts/plot/__errplot__.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/__errplot__.m Wed Jul 10 17:45:34 2002 +0000 @@ -33,18 +33,18 @@ ## Author: Teemu Ikonen ## Keywords: errorbar, plotting -function __errplot__ (...) +function __errplot__ (varargin) if (nargin < 3) # atleast two data arguments needed usage ("__errplot__ (arg1, ..., fmt)"); endif fstr = " "; - ndata = 0; + k = 1; while (nargin--) - a = va_arg (); + a = varargin{k++}; if (! isstr (a)) ndata++; eval (sprintf ("arg%d = a;", ndata)); diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/__plt__.m --- a/scripts/plot/__plt__.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/__plt__.m Wed Jul 10 17:45:34 2002 +0000 @@ -23,11 +23,11 @@ ## Author: jwe -function __plt__ (caller, ...) +function __plt__ (caller, varargin) if (nargin == 2) - __plt1__ (va_arg (), ""); + __plt1__ (varargin{1}, ""); elseif (nargin > 2) @@ -36,7 +36,8 @@ unwind_protect - x = va_arg (); + k = 1; + x = varargin{k++}; nargin = nargin - 2; x_set = 1; y_set = 0; @@ -46,7 +47,7 @@ while (nargin-- > 0) fmt = ""; - new = va_arg (); + new = varargin{k++}; if (isstr (new)) if (! x_set) diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/axis.m --- a/scripts/plot/axis.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/axis.m Wed Jul 10 17:45:34 2002 +0000 @@ -114,7 +114,7 @@ ## Author: jwe -function curr_axis = axis (ax, ...) +function curr_axis = axis (ax, varargin) ## This may not be correct if someone has used the gnuplot interface ## directly... @@ -259,7 +259,7 @@ endif if (nargin > 1) - axis(all_va_args); + axis (varargin{:}); endif endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/errorbar.m --- a/scripts/plot/errorbar.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/errorbar.m Wed Jul 10 17:45:34 2002 +0000 @@ -110,7 +110,7 @@ ## Author: Teemu Ikonen ## Keywords: errorbar, plotting -function errorbar (...) +function errorbar (varargin) if (nargin < 2) usage ("errorbar (...)"); @@ -122,8 +122,9 @@ clg () endif hold ("on"); + k = 1; while (nargin) - a = va_arg (); + a = varargin{k++}; nargin--; if (is_vector (a)) a = a(:); @@ -138,7 +139,7 @@ fmt = " "; while (nargin) nargin--; - a = va_arg (); + a = varargin{k++}; if (isstr (a)) fmt = a; cmd = "__errplot__ (arg1"; diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/loglog.m --- a/scripts/plot/loglog.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/loglog.m Wed Jul 10 17:45:34 2002 +0000 @@ -28,7 +28,7 @@ ## Author: jwe -function loglog (...) +function loglog (varargin) ## XXX FIXME XXX -- these plot states should really just be set ## temporarily, probably inside an unwind_protect block, but there is @@ -38,6 +38,6 @@ gset logscale y; gset nopolar; - __plt__ ("loglog", all_va_args); + __plt__ ("loglog", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/mplot.m --- a/scripts/plot/mplot.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/mplot.m Wed Jul 10 17:45:34 2002 +0000 @@ -32,7 +32,7 @@ ## Author: Vinayak Dutt ## Adapted-By: jwe -function mplot (...) +function mplot (varargin) if (! gnuplot_has_multiplot) error ("mplot: gnuplot does not appear to support this feature"); @@ -51,7 +51,7 @@ gset nologscale; gset nopolar; - __plt__ ("plot", all_va_args); + __plt__ ("plot", varargin{:}); ## update the plot position diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/plot.m --- a/scripts/plot/plot.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/plot.m Wed Jul 10 17:45:34 2002 +0000 @@ -183,7 +183,7 @@ ## Author: jwe -function plot (...) +function plot (varargin) ## XXX FIXME XXX -- these plot states should really just be set ## temporarily, probably inside an unwind_protect block, but there is @@ -192,6 +192,6 @@ gset nologscale; gset nopolar; - __plt__ ("plot", all_va_args); + __plt__ ("plot", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/plot_border.m --- a/scripts/plot/plot_border.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/plot_border.m Wed Jul 10 17:45:34 2002 +0000 @@ -51,7 +51,7 @@ ## Created: 3 July 95 ## Adapted-By: jwe -function plot_border (...) +function plot_border (varargin) if (! gnuplot_has_multiplot) error ("plot_border: gnuplot does not appear to support this feature"); @@ -64,11 +64,11 @@ all = 0; none = 1; - va_start (); + k = 1; while (nargin--) - arg = va_arg (); + arg = varargin{k++}; if (! isstr (arg)) error ("plot_border: input not a string"); diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/semilogx.m --- a/scripts/plot/semilogx.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/semilogx.m Wed Jul 10 17:45:34 2002 +0000 @@ -28,7 +28,7 @@ ## Author: jwe -function semilogx (...) +function semilogx (varargin) ## XXX FIXME XXX -- these plot states should really just be set ## temporarily, probably inside an unwind_protect block, but there is @@ -38,6 +38,6 @@ gset nologscale y; gset nopolar; - __plt__ ("semilogx", all_va_args); + __plt__ ("semilogx", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/semilogy.m --- a/scripts/plot/semilogy.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/semilogy.m Wed Jul 10 17:45:34 2002 +0000 @@ -28,7 +28,7 @@ ## Author: jwe -function semilogy (...) +function semilogy (varargin) ## XXX FIXME XXX -- these plot states should really just be set ## temporarily, probably inside an unwind_protect block, but there is @@ -38,6 +38,6 @@ gset logscale y; gset nopolar; - __plt__ ("semilogy", all_va_args); + __plt__ ("semilogy", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/xlabel.m --- a/scripts/plot/xlabel.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/xlabel.m Wed Jul 10 17:45:34 2002 +0000 @@ -30,8 +30,8 @@ ## Author: jwe -function xlabel (...) +function xlabel (varargin) - __axis_label__ ("xlabel", all_va_args); + __axis_label__ ("xlabel", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/ylabel.m --- a/scripts/plot/ylabel.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/ylabel.m Wed Jul 10 17:45:34 2002 +0000 @@ -24,8 +24,8 @@ ## Author: jwe -function ylabel (...) +function ylabel (varargin) - __axis_label__ ("ylabel", all_va_args); + __axis_label__ ("ylabel", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/plot/zlabel.m --- a/scripts/plot/zlabel.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/plot/zlabel.m Wed Jul 10 17:45:34 2002 +0000 @@ -26,8 +26,8 @@ ## Created: 3 July 95 ## Adapted-By: jwe -function zlabel (...) +function zlabel (varargin) - __axis_label__ ("zlabel", all_va_args); + __axis_label__ ("zlabel", varargin{:}); endfunction diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/statistics/base/ppplot.m --- a/scripts/statistics/base/ppplot.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/statistics/base/ppplot.m Wed Jul 10 17:45:34 2002 +0000 @@ -43,7 +43,7 @@ ## Author: KH ## Description: Perform a PP-plot (probability plot) -function [p, y] = ppplot (x, dist, ...) +function [p, y] = ppplot (x, dist, varargin) if (nargin < 1) usage ("ppplot (x, dist, params)"); @@ -64,7 +64,7 @@ if (nargin <= 2) y = feval (F, s); else - y = feval (F, s, all_va_args); + y = feval (F, s, varargin{:}); endif if (nargout == 0) diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/statistics/base/qqplot.m --- a/scripts/statistics/base/qqplot.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/statistics/base/qqplot.m Wed Jul 10 17:45:34 2002 +0000 @@ -45,7 +45,7 @@ ## Author: KH ## Description: Perform a QQ-plot (quantile plot) -function [q, s] = qqplot (x, dist, ...) +function [q, s] = qqplot (x, dist, varargin) if (nargin < 1) usage ("qqplot (x, dist, params)"); @@ -67,9 +67,9 @@ q = feval (f, t); q_label = f; else - param_string = sprintf ("%g", va_arg ()); + param_string = sprintf ("%g", varargin{1}); for k = 2 : (nargin - 2); - param_string = sprintf ("%s, %g", param_string, va_arg ()) + param_string = sprintf ("%s, %g", param_string, varargin{k}) endfor q = eval (sprintf ("%s (t, %s);", f, param_string)); q_label = sprintf ("%s with parameter(s) %s", f, param_string); diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/statistics/tests/bartlett_test.m --- a/scripts/statistics/tests/bartlett_test.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/statistics/tests/bartlett_test.m Wed Jul 10 17:45:34 2002 +0000 @@ -35,7 +35,7 @@ ## Author: KH ## Description: Bartlett test for homogeneity of variances -function [pval, chisq, df] = bartlett_test (...) +function [pval, chisq, df] = bartlett_test (varargin) k = nargin; if (k < 2) @@ -44,9 +44,9 @@ f = zeros (k, 1); v = zeros (k, 1); - va_start (); + for i = 1 : k; - x = va_arg (); + x = varargin{i}; if (! is_vector (x)) error ("bartlett_test: all arguments must be vectors"); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/statistics/tests/kolmogorov_smirnov_test.m --- a/scripts/statistics/tests/kolmogorov_smirnov_test.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/statistics/tests/kolmogorov_smirnov_test.m Wed Jul 10 17:45:34 2002 +0000 @@ -50,7 +50,7 @@ ## Author: KH ## Description: One-sample Kolmogorov-Smirnov test -function [pval, ks] = kolmogorov_smirnov_test (x, dist, ...) +function [pval, ks] = kolmogorov_smirnov_test (x, dist, varargin) if (nargin < 2) usage ("[pval, ks] = kolmogorov_smirnov_test (x, dist,, params, alt)"); @@ -71,7 +71,7 @@ else args = ""; for k = 1 : (nargin-2); - tmp = va_arg (); + tmp = varargin{k}; if isstr (tmp) alt = tmp; else diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/statistics/tests/kruskal_wallis_test.m --- a/scripts/statistics/tests/kruskal_wallis_test.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/statistics/tests/kruskal_wallis_test.m Wed Jul 10 17:45:34 2002 +0000 @@ -38,7 +38,7 @@ ## Author: KH ## Description: Kruskal-Wallis test -function [pval, k, df] = kruskal_wallis_test (...) +function [pval, k, df] = kruskal_wallis_test (varargin) m = nargin; if (m < 2) @@ -47,9 +47,9 @@ n = []; p = []; - va_start; + for i = 1 : m; - x = va_arg (); + x = varargin{i}; if (! is_vector (x)) error ("kruskal_wallis_test: all arguments must be vectors"); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/strings/str2mat.m --- a/scripts/strings/str2mat.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/strings/str2mat.m Wed Jul 10 17:45:34 2002 +0000 @@ -32,7 +32,7 @@ ## Author: Kurt Hornik ## Adapted-By: jwe -function retval = str2mat (...) +function retval = str2mat (varargin) if (nargin == 0) usage ("str2mat (s1, ...)"); @@ -41,12 +41,10 @@ nc = 0; nr = 0; - va_start (); - nr = zeros (nargin, 1); nc = zeros (nargin, 1); for k = 1 : nargin - s = va_arg (); + s = varargin{k}; if (! isstr (s)) s = setstr (s); endif @@ -64,11 +62,9 @@ retval = setstr (ones (retval_nr, retval_nc) * toascii (" ")); - va_start (); - row_offset = 0; for k = 1 : nargin - s = va_arg (); + s = varargin{k}; if (! isstr (s)) s = setstr (s); endif diff -r 10bc4c350d61 -r e0b7a493e5a8 scripts/strings/strcat.m --- a/scripts/strings/strcat.m Fri Jul 05 17:55:11 2002 +0000 +++ b/scripts/strings/strcat.m Wed Jul 10 17:45:34 2002 +0000 @@ -33,7 +33,7 @@ ## Author: jwe -function st = strcat (s, t, ...) +function st = strcat (s, t, varargin) if (nargin > 1) save_empty_list_elements_ok = empty_list_elements_ok; @@ -45,8 +45,9 @@ error ("strcat: all arguments must be strings"); endif n = nargin - 2; + k = 1; while (n--) - tmp = va_arg (); + tmp = varargin{k++}; if (isstr (tmp)) tmpst = [tmpst, tmp]; else