changeset 17312:088d014a7fe2

Use semicolon after "return" statement in core m-files. * scripts/general/accumdim.m, scripts/image/imformats.m, scripts/io/textread.m, scripts/io/textscan.m, scripts/linear-algebra/expm.m, scripts/miscellaneous/edit.m, scripts/optimization/lsqnonneg.m, scripts/optimization/pqpnonneg.m, scripts/pkg/private/dirempty.m, scripts/plot/findobj.m, scripts/plot/graphics_toolkit.m, scripts/plot/private/__errplot__.m, scripts/plot/private/__interp_cube__.m, scripts/plot/private/__marching_cube__.m, scripts/plot/subplot.m, scripts/polynomial/residue.m, scripts/sparse/sprandsym.m, scripts/special-matrix/gallery.m, scripts/strings/strjoin.m: Use semicolon after "return" statement in core m-files.
author Rik <rik@octave.org>
date Wed, 21 Aug 2013 19:53:42 -0700
parents 56404cdcb723
children 1e1d42f0f332
files scripts/general/accumdim.m scripts/image/imformats.m scripts/io/textread.m scripts/io/textscan.m scripts/linear-algebra/expm.m scripts/miscellaneous/edit.m scripts/optimization/lsqnonneg.m scripts/optimization/pqpnonneg.m scripts/pkg/private/dirempty.m scripts/plot/findobj.m scripts/plot/graphics_toolkit.m scripts/plot/private/__errplot__.m scripts/plot/private/__interp_cube__.m scripts/plot/private/__marching_cube__.m scripts/plot/subplot.m scripts/polynomial/residue.m scripts/sparse/sprandsym.m scripts/special-matrix/gallery.m scripts/strings/strjoin.m
diffstat 19 files changed, 22 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/accumdim.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/general/accumdim.m	Wed Aug 21 19:53:42 2013 -0700
@@ -108,7 +108,7 @@
       subsc{dim} = mask;
       A(subsc{:}) = fillval;
     endif
-    return
+    return;
   endif
 
   ## The general case.
--- a/scripts/image/imformats.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/image/imformats.m	Wed Aug 21 19:53:42 2013 -0700
@@ -175,7 +175,7 @@
   ## there's no need to go and calculate it all over again if we are
   ## requested to reset back to factory.
   if (! isempty (formats))
-    return
+    return;
   endif
 
   ##      Building the formats info
--- a/scripts/io/textread.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/io/textread.m	Wed Aug 21 19:53:42 2013 -0700
@@ -73,7 +73,7 @@
   if (nlines < 1)
     printf ("textread: N = 0, no data read\n");
     varargout = cell (1, nargout);
-    return
+    return;
   endif
 
   ## Read file
--- a/scripts/io/textscan.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/io/textscan.m	Wed Aug 21 19:53:42 2013 -0700
@@ -113,8 +113,7 @@
   endif
   if (nlines < 1)
     printf ("textscan: N = 0, no data read\n");
-    return
-  endif
+    return;  endif
 
   if (! any (strcmpi (args, "emptyvalue")))
     ## Matlab returns NaNs for missing values
--- a/scripts/linear-algebra/expm.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/linear-algebra/expm.m	Wed Aug 21 19:53:42 2013 -0700
@@ -83,10 +83,10 @@
 
   if (isscalar (A))
     r = exp (A);
-    return
+    return;
   elseif (strfind (typeinfo (A), "diagonal matrix"))
     r = diag (exp (diag (A)));
-    return
+    return;
   endif
 
   n = rows (A);
--- a/scripts/miscellaneous/edit.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/miscellaneous/edit.m	Wed Aug 21 19:53:42 2013 -0700
@@ -208,7 +208,7 @@
         else
           error ('edit: expected "edit MODE sync|async"');
         endif
-        return
+        return;
       case "EDITINPLACE"
         if (ischar (stateval))
           if (strcmpi (stateval, "true"))
@@ -220,14 +220,14 @@
           endif
         endif
         FUNCTION.EDITINPLACE = stateval;
-        return
+        return;
       case "GET"
         if (isfield (FUNCTION, toupper (stateval)))
           ret = FUNCTION.(toupper (stateval));
         else
           ret = FUNCTION;
         endif
-        return
+        return;
       otherwise
         ## If none of the states match, assume both inputs are
         ## actually both file names to be opened
--- a/scripts/optimization/lsqnonneg.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/optimization/lsqnonneg.m	Wed Aug 21 19:53:42 2013 -0700
@@ -79,7 +79,7 @@
 
   if (nargin == 1 && ischar (c) && strcmp (c, 'defaults'))
     x = optimset ("MaxIter", 1e5);
-    return
+    return;
   endif
 
   if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
--- a/scripts/optimization/pqpnonneg.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/optimization/pqpnonneg.m	Wed Aug 21 19:53:42 2013 -0700
@@ -72,7 +72,7 @@
 
   if (nargin == 1 && ischar (c) && strcmp (c, 'defaults'))
     x = optimset ("MaxIter", 1e5);
-    return
+    return;
   endif
 
   if (! (nargin >= 2 && nargin <= 4 && ismatrix (c) && ismatrix (d) && isstruct (options)))
--- a/scripts/pkg/private/dirempty.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/pkg/private/dirempty.m	Wed Aug 21 19:53:42 2013 -0700
@@ -40,7 +40,7 @@
       endfor
       if (! found)
         emp = false;
-        return
+        return;
       endif
     endfor
     emp = true;
--- a/scripts/plot/findobj.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/findobj.m	Wed Aug 21 19:53:42 2013 -0700
@@ -180,7 +180,7 @@
         ## This is sloppy ... but works like Matlab.
         if (strcmpi (args{na}, "-not"))
           h = [];
-          return
+          return;
         endif
         na = na + 1;
       endif
--- a/scripts/plot/graphics_toolkit.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/graphics_toolkit.m	Wed Aug 21 19:53:42 2013 -0700
@@ -53,7 +53,7 @@
     if (all (isfigure (name)))
       hlist = name;
       retval = get (hlist, "__graphics_toolkit__");
-      return
+      return;
     elseif (! ischar (name))
       error ("graphics_toolkit: invalid graphics toolkit NAME");
     endif
--- a/scripts/plot/private/__errplot__.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/private/__errplot__.m	Wed Aug 21 19:53:42 2013 -0700
@@ -287,7 +287,7 @@
                               xldata, xudata, "yerr", xscale, yscale);
     xdata = [x1; x2];
     ydata = [y1; y2];
-    return
+    return;
   else
     error ("errorbar: valid error bar types are xerr, yerr, boxxy, and xyerr");
   endif
--- a/scripts/plot/private/__interp_cube__.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/private/__interp_cube__.m	Wed Aug 21 19:53:42 2013 -0700
@@ -47,7 +47,7 @@
   ##endif
   if (isempty (v))
     Vxyz = idx = frac = [];
-    return
+    return;
   endif
 
   switch (req)
--- a/scripts/plot/private/__marching_cube__.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/private/__marching_cube__.m	Wed Aug 21 19:53:42 2013 -0700
@@ -149,7 +149,7 @@
   id =  find (cedge); # select only voxels which are intersected
   if (isempty (id))
     T = p = col = [];
-    return
+    return;
   endif
 
   ## phase II: calculate the list of intersection points
--- a/scripts/plot/subplot.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/plot/subplot.m	Wed Aug 21 19:53:42 2013 -0700
@@ -277,7 +277,7 @@
     else
       pos = get (0, "defaultaxesouterposition");
     endif
-    return
+    return;
   endif
 
   if (strcmp (position_property, "outerposition")
--- a/scripts/polynomial/residue.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/polynomial/residue.m	Wed Aug 21 19:53:42 2013 -0700
@@ -160,7 +160,7 @@
     ## The inputs are the residue, pole, and direct part. Solve for the
     ## corresponding numerator and denominator polynomials
     [r, p] = rresidue (b, a, varargin{1}, toler, e);
-    return
+    return;
   endif
 
   ## Make sure both polynomials are in reduced form.
--- a/scripts/sparse/sprandsym.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/sparse/sprandsym.m	Wed Aug 21 19:53:42 2013 -0700
@@ -121,7 +121,7 @@
   ## Degenerate case
   if (k == 1)
     r = 1;
-    return
+    return;
   endif
 
   ## Compute the stuff described above
--- a/scripts/special-matrix/gallery.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/special-matrix/gallery.m	Wed Aug 21 19:53:42 2013 -0700
@@ -2252,7 +2252,7 @@
     Q = qmult (p);
     A = Q' * sigma * Q;
     A = (A + A') / 2;  # Ensure matrix is symmetric.
-    return
+    return;
   endif
 
   if (m != n)
--- a/scripts/strings/strjoin.m	Wed Aug 21 19:39:56 2013 -0700
+++ b/scripts/strings/strjoin.m	Wed Aug 21 19:53:42 2013 -0700
@@ -58,7 +58,7 @@
 
   if (numel (cstr) == 1)
     rval = cstr{1};
-    return
+    return;
   endif
 
   if (ischar (delimiter))