Mercurial > hg > octave-lojdl
changeset 15202:f3b5cadfd6d5
fix missing semicolons in various .m files
* playaudio.m, accumarray.m, accumdim.m, bicubic.m, narginchk.m,
nargoutchk.m, nthargout.m, image.m, pkg.m, colorbar.m, hdl2struct.m,
legend.m, plotyy.m, private/__go_draw_axes__.m,
private/__print_parse_opts__.m, shrinkfaces.m, pchip.m, polyval.m,
rundemos.m: Fix lines with missing semicolons.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 19 Aug 2012 10:50:40 -0400 |
parents | efac5593b1de |
children | aa7f4e33c524 |
files | scripts/audio/playaudio.m scripts/general/accumarray.m scripts/general/accumdim.m scripts/general/bicubic.m scripts/general/narginchk.m scripts/general/nargoutchk.m scripts/general/nthargout.m scripts/image/image.m scripts/pkg/pkg.m scripts/plot/colorbar.m scripts/plot/hdl2struct.m scripts/plot/legend.m scripts/plot/plotyy.m scripts/plot/private/__go_draw_axes__.m scripts/plot/private/__print_parse_opts__.m scripts/plot/shrinkfaces.m scripts/polynomial/pchip.m scripts/polynomial/polyval.m scripts/testfun/rundemos.m |
diffstat | 19 files changed, 38 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/audio/playaudio.m +++ b/scripts/audio/playaudio.m @@ -47,7 +47,7 @@ fclose (fid); [status, out] = system (sprintf ('cat "%s" > /dev/dsp', file)); if (status != 0) - system (sprintf ("paplay --raw \"%s\"", file)) + system (sprintf ("paplay --raw \"%s\"", file)); endif unwind_protect_cleanup unlink (file); @@ -62,12 +62,12 @@ if (any (strcmp (ext, {"lin", "raw"}))) [status, out] = system (sprintf ('cat "%s" > /dev/dsp', name)); if (status != 0) - system (sprintf ('paplay --raw "%s"', name)) + system (sprintf ('paplay --raw "%s"', name)); endif elseif (any (strcmp (ext, {"mu", "au" "snd", "ul"}))) [status, out] = system (sprintf ('cat "%s" > /dev/audio', name)); if (status != 0) - system (sprintf ('paplay "%s"', name)) + system (sprintf ('paplay "%s"', name)); endif else error ("playaudio: unsupported extension '%s'", ext);
--- a/scripts/general/accumarray.m +++ b/scripts/general/accumarray.m @@ -150,7 +150,7 @@ else ndims = columns (subs); if (lenvals > 1 && lenvals != rows (subs)) - error ("accumarray: dimension mismatch") + error ("accumarray: dimension mismatch"); endif endif
--- a/scripts/general/accumdim.m +++ b/scripts/general/accumdim.m @@ -93,7 +93,7 @@ sz(dim) = n; if (length (subs) != size (vals, dim)) - error ("accumdim: dimension mismatch") + error ("accumdim: dimension mismatch"); endif if (isempty (func) || func == @sum)
--- a/scripts/general/bicubic.m +++ b/scripts/general/bicubic.m @@ -94,7 +94,7 @@ elseif (all (diff (x) > 0)) flipx = false; else - error ("bicubic:nonmonotonic", "bicubic: X values must be monotonic") + error ("bicubic:nonmonotonic", "bicubic: X values must be monotonic"); endif if (all (diff (y) < 0)) flipy = true; @@ -102,7 +102,7 @@ elseif (all (diff (y) > 0)) flipy = false; else - error ("bicubic:nonmonotonic", "bicubic: Y values must be monotonic") + error ("bicubic:nonmonotonic", "bicubic: Y values must be monotonic"); endif ## Mark values outside the lookup table.
--- a/scripts/general/narginchk.m +++ b/scripts/general/narginchk.m @@ -42,7 +42,7 @@ elseif (!isnumeric (maxargs) || !isscalar (maxargs)) error ("maxargs must be a numeric scalar"); elseif (minargs > maxargs) - error ("minargs cannot be larger than maxargs") + error ("minargs cannot be larger than maxargs"); endif args = evalin ("caller", "nargin;");
--- a/scripts/general/nargoutchk.m +++ b/scripts/general/nargoutchk.m @@ -87,7 +87,7 @@ elseif (!isnumeric (maxargs) || !isscalar (maxargs)) error ("maxargs must be a numeric scalar"); elseif (minargs > maxargs) - error ("minargs cannot be larger than maxargs") + error ("minargs cannot be larger than maxargs"); endif args = evalin ("caller", "nargout;");
--- a/scripts/general/nthargout.m +++ b/scripts/general/nthargout.m @@ -84,7 +84,7 @@ endif if (any (n != fix (n)) || ntot != fix (ntot) || any (n <= 0) || ntot <= 0) - error ("nthargout: N and NTOT must consist of positive integers") + error ("nthargout: N and NTOT must consist of positive integers"); endif outargs = cell (1, ntot);
--- a/scripts/image/image.m +++ b/scripts/image/image.m @@ -127,7 +127,7 @@ dy = std (dy) / mean (abs (dy)); tol = 100*eps; if (any (dx > tol) || any (dy > tol)) - warning ("Image does not map to non-linearly spaced coordinates") + warning ("Image does not map to non-linearly spaced coordinates"); endif ca = gca ();
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -318,7 +318,7 @@ page_output_immediately (true, "local"); case "-forge" if (! octave_config_info ("CURL_LIBS")) - error ("pkg: can't download from forge without the cURL library") + error ("pkg: can't download from forge without the cURL library"); endif octave_forge = true; case "-local"
--- a/scripts/plot/colorbar.m +++ b/scripts/plot/colorbar.m @@ -197,13 +197,13 @@ function resetaxis (cax, d, ax, orig_props) if (ishandle (ax) && strcmp (get (ax, "type"), "axes")) - dellistener (ax, "position") + dellistener (ax, "position"); units = get (ax, "units"); - set (ax, "units", orig_props.units) + set (ax, "units", orig_props.units); set (ax, "position", orig_props.position, ... "outerposition", orig_props.outerposition, ... "activepositionproperty", orig_props.activepositionproperty); - set (ax, "units", units) + set (ax, "units", units); endif endfunction
--- a/scripts/plot/hdl2struct.m +++ b/scripts/plot/hdl2struct.m @@ -91,7 +91,7 @@ ii++; s.children(ii) = hdl2struct (lg); elseif (nlg > 1) - error ("hdl2struct: more than one legend found") + error ("hdl2struct: more than one legend found"); endif cb = findobj (par, "-depth", 1, "tag", "colorbar"); @@ -105,7 +105,7 @@ ii++; s.children(ii) = hdl2struct (cb); elseif (nlg > 1) - error ("hdl2struct: more than one colorbar found") + error ("hdl2struct: more than one colorbar found"); endif endif @@ -120,9 +120,9 @@ hdlist = []; regkids = get ( h, "children"); - set (0, "showhiddenhandles", "on") + set (0, "showhiddenhandles", "on"); allkids = get ( h, "children"); - set (0, "showhiddenhandles", "off") + set (0, "showhiddenhandles", "off"); speckids = arrayfun (@(x) ! any (x == regkids), allkids); hdlist = allkids (find (speckids)); hdlist = reshape (hdlist, 1, numel (hdlist));
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -131,7 +131,7 @@ elseif (all (ishandle (plty))) ca = [ca, plty(:).']; else - error ("legend.m: This should not happen. File a bug report.") + error ("legend.m: This should not happen. File a bug report."); endif ## Remove duplicates while preserving order [~, n] = unique (ca);
--- a/scripts/plot/plotyy.m +++ b/scripts/plot/plotyy.m @@ -91,7 +91,7 @@ ax = ax(1:2); elseif (length (ax) == 1) ax(2) = axes (); - set (ax(2), "nextplot", get (ax(1), "nextplot")) + set (ax(2), "nextplot", get (ax(1), "nextplot")); elseif (isempty (ax)) ax(1) = axes (); ax(2) = axes (); @@ -157,7 +157,7 @@ axes (ax(2)); else ax(2) = axes (); - set (ax(2), "nextplot", get (ax(1), "nextplot")) + set (ax(2), "nextplot", get (ax(1), "nextplot")); endif newplot (); @@ -218,14 +218,14 @@ elseif (ishandle (ax(1))) set (ax(1), "__plotyy_axes__", ax); else - error ("plotyy.m: This shouldn't happen. File a bug report.") + error ("plotyy.m: This shouldn't happen. File a bug report."); endif if (ishandle (ax(2)) && ! isprop (ax(2), "__plotyy_axes__")) addproperty ("__plotyy_axes__", ax(2), "data", ax); elseif (ishandle (ax(2))) set (ax(2), "__plotyy_axes__", ax); else - error ("plotyy.m: This shouldn't happen. File a bug report.") + error ("plotyy.m: This shouldn't happen. File a bug report."); endif endfunction
--- a/scripts/plot/private/__go_draw_axes__.m +++ b/scripts/plot/private/__go_draw_axes__.m @@ -48,7 +48,7 @@ h = axis_obj.__plotyy_axes__; h = h(ishandle (h)); h = h(isprop (h, "__ploty_axes__")); - rmappdata (h, "__plotyy_axes__") + rmappdata (h, "__plotyy_axes__"); endif endif
--- a/scripts/plot/private/__print_parse_opts__.m +++ b/scripts/plot/private/__print_parse_opts__.m @@ -125,14 +125,14 @@ if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124")) arg_st.ghostscript.antialiasing_textalphabits = str2num (arg(end)); else - error ("print: improper syntax, or value, for TextAlphaBits") + error ("print: improper syntax, or value, for TextAlphaBits"); endif elseif (strncmpi (arg, "-graphicsalphabits=", 19)) n = find (arg == "="); if (! isempty (n) && n == numel (arg) - 1 && ismember (arg(end), "124")) arg_st.ghostscript.antialiasing_graphicsalphabits = str2num (arg(end)); else - error ("print: improper syntax, or value, for GraphicsAlphaBits") + error ("print: improper syntax, or value, for GraphicsAlphaBits"); endif elseif ((length (arg) > 2) && arg(1:2) == "-G") arg_st.ghostscript.binary = file_in_path (getenv ("PATH"), arg(3:end));
--- a/scripts/plot/shrinkfaces.m +++ b/scripts/plot/shrinkfaces.m @@ -101,17 +101,17 @@ endif if (! isscalar (sf) || sf <= 0) - error ("shrinkfaces: scale factor must be a positive scalar") + error ("shrinkfaces: scale factor must be a positive scalar"); endif n = columns (vertices); if (n < 2 || n > 3) - error ("shrinkfaces: only 2D and 3D patches are supported") + error ("shrinkfaces: only 2D and 3D patches are supported"); endif m = columns (faces); if (m < 3) - error ("shrinkfaces: faces must consist of at least 3 vertices") + error ("shrinkfaces: faces must consist of at least 3 vertices"); endif v = vertices(faces'(:), :); @@ -134,8 +134,9 @@ switch (nargout) case 0 if (ishandle (p)) - set (p, "FaceVertexCData", [], "CData", []) # avoid exceptions - set (p, "Vertices", v, "Faces", f, "FaceVertexCData", c) + ## avoid exceptions + set (p, "FaceVertexCData", [], "CData", []); + set (p, "Vertices", v, "Faces", f, "FaceVertxCData", c); else nf = struct ("faces", f, "vertices", v, "facevertexcdata", c); endif
--- a/scripts/polynomial/pchip.m +++ b/scripts/polynomial/pchip.m @@ -80,12 +80,12 @@ y = y(:).'; ##row vector szy = size (y); if (! size_equal (x, y)) - error ("pchip: length of X and Y must match") + error ("pchip: length of X and Y must match"); endif else szy = size (y); if (n != szy(end)) - error ("pchip: length of X and last dimension of Y must match") + error ("pchip: length of X and last dimension of Y must match"); endif y = reshape (y, [prod(szy(1:end-1)), szy(end)]); endif
--- a/scripts/polynomial/polyval.m +++ b/scripts/polynomial/polyval.m @@ -79,10 +79,10 @@ dy = reshape (dy, size (x)); catch if (isempty (s)) - error ("polyval: third input is required.") + error ("polyval: third input is required."); elseif (isstruct (s) && all (ismember ({"R", "normr", "df"}, fieldnames (s)))) - error (lasterr ()) + error (lasterr ()); elseif (isstruct (s)) error ("polyval: third input is missing the required fields."); else