Mercurial > hg > octave-nkf
changeset 17306:09543e9c8f40
Use explicit form of end (endif, endfor, etc.) in core m-files.
* scripts/general/interp1.m, scripts/image/rgb2ind.m,
scripts/plot/__gnuplot_drawnow__.m, scripts/plot/private/__ezplot__.m,
scripts/plot/private/__go_draw_axes__.m, scripts/special-matrix/gallery.m,
scripts/strings/strjoin.m, scripts/testfun/assert.m, scripts/ui/questdlg.m:
Use explicit form of end (endif, endfor, etc.) in core m-files.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 21 Aug 2013 16:42:13 -0700 |
parents | ab71b9829752 |
children | 4448cc742880 |
files | scripts/general/interp1.m scripts/image/rgb2ind.m scripts/plot/__gnuplot_drawnow__.m scripts/plot/private/__ezplot__.m scripts/plot/private/__go_draw_axes__.m scripts/special-matrix/gallery.m scripts/strings/strjoin.m scripts/testfun/assert.m scripts/ui/questdlg.m |
diffstat | 9 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/interp1.m +++ b/scripts/general/interp1.m @@ -187,7 +187,7 @@ rightcontinuous = false; else rightcontinuous = true; - end + endif endif if ((rightcontinuous && (x(end) < x(1))) @@ -195,7 +195,7 @@ ## Switch between left-continuous and right-continuous x = flipud (x); y = flipud (y); - end + endif starmethod = method(1) == "*";
--- a/scripts/image/rgb2ind.m +++ b/scripts/image/rgb2ind.m @@ -145,7 +145,7 @@ ## before processing it with Graphicsmagick if (numel (sz) > 3) rgb = reshape (rgb, [prod(sz(1:end-2)), sz(end-1), 3]); - end + endif ## Prepare the Graphicsmagick dithering option if (strcmp (dither_option, "nodither"))
--- a/scripts/plot/__gnuplot_drawnow__.m +++ b/scripts/plot/__gnuplot_drawnow__.m @@ -302,7 +302,7 @@ "pslatex", "pstext", "svg", "tgif", "x11"}))) term_str = [term_str " dashed"]; endif - end + endif if (any (strcmp (term, {"aqua", "wxt"}))) term_str = [term_str, " ", "dashlength 1"]; elseif (any (strcmp (term, {"epslatex", "postscript", "pslatex"})))
--- a/scripts/plot/private/__ezplot__.m +++ b/scripts/plot/private/__ezplot__.m @@ -420,7 +420,7 @@ if (! auto_domain_done) domain = find_valid_domain (X, Y, Z); endif - end + endif endif endif endif
--- a/scripts/plot/private/__go_draw_axes__.m +++ b/scripts/plot/private/__go_draw_axes__.m @@ -442,13 +442,13 @@ if (isfield (obj, "xdata")) obj.xdata = double (obj.xdata); - end + endif if (isfield (obj, "ydata")) obj.ydata = double (obj.ydata); - end + endif if (isfield (obj, "zdata")) obj.zdata = double (obj.zdata); - end + endif if (isfield (obj, "units")) units = obj.units;
--- a/scripts/special-matrix/gallery.m +++ b/scripts/special-matrix/gallery.m @@ -1949,7 +1949,7 @@ Q(1,2:n) = ones (1, n-1); for i = 2:n Q(i,i) = -(i-1); - end + endfor Q = diag (sqrt ([n 1:n-1] .* [1:n])) \ Q; case (5) @@ -2217,8 +2217,8 @@ if (p == 1) A = randn (m, n); A = A / norm (A); - return - end + return; + endif ## Set up vector sigma of singular values. switch (abs (mode)) @@ -2244,7 +2244,7 @@ ## Convert to diagonal matrix of singular values. if (mode < 0) sigma = sigma (p:-1:1); - end + endif sigma = diag (sigma); if (posdef) @@ -2258,7 +2258,7 @@ if (m != n) ## Expand to m-by-n diagonal matrix sigma(m, n) = 0; - end + endif if (kl == 0 && ku == 0) ## Diagonal matrix requested - nothing more to do.
--- a/scripts/strings/strjoin.m +++ b/scripts/strings/strjoin.m @@ -64,7 +64,7 @@ if (ischar (delimiter)) delimiter = do_string_escapes (delimiter); delimiter = {delimiter}; - end + endif num = numel (cstr); if (numel (delimiter) == 1 && num > 1)
--- a/scripts/testfun/assert.m +++ b/scripts/testfun/assert.m @@ -67,7 +67,7 @@ if (call_depth == 0) errmsg = ""; - end + endif in = deblank (argn(1,:)); for i = 2:rows (argn) @@ -367,7 +367,7 @@ errmsg = [errmsg "\n"]; endif errmsg = [errmsg, pprint(in, err)]; - end + endif endif
--- a/scripts/ui/questdlg.m +++ b/scripts/ui/questdlg.m @@ -82,7 +82,7 @@ options{4} = varargin{1}; # default if (! any (strcmp (options{4}, options(1:3)))) error (defbtn_error_msg); - end + endif case 3 ## two buttons and default button string @@ -92,7 +92,7 @@ options{4} = varargin{3}; # default if (! any (strcmp (options{4}, options([1 3])))) error (defbtn_error_msg); - end + endif case 4 ## three buttons and default button string @@ -102,7 +102,7 @@ options{4} = varargin{4}; # default if (! any (strcmp (options{4}, options(1:3)))) error (defbtn_error_msg); - end + endif otherwise print_usage ();