changeset 21030:66a08c3cafe3

maint: Follow Octave coding conventions in m-files. * repmat.m, strread.m, qmr.m: use "endif" rather than "end". * binoinv.m, nbininv.m: Use "endwhile" rather than "end". * edit.m: Remove useless "return" after error(). * krylov.m, __gnuplot_draw_axes__.m, __splinefit__.m: Fix indentation.
author Rik <rik@octave.org>
date Sun, 03 Jan 2016 14:22:08 -0800
parents e204d44f5069
children 13b9cac748f2
files scripts/general/repmat.m scripts/io/strread.m scripts/linear-algebra/krylov.m scripts/miscellaneous/edit.m scripts/plot/util/private/__gnuplot_draw_axes__.m scripts/polynomial/private/__splinefit__.m scripts/sparse/qmr.m scripts/statistics/distributions/binoinv.m scripts/statistics/distributions/nbininv.m
diffstat 9 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/repmat.m
+++ b/scripts/general/repmat.m
@@ -76,7 +76,7 @@
         n = [];
       else
         error ("repmat: all input arguments must be scalar");
-      end
+      endif
     elseif (isempty (m))
       m = n = 1;
     elseif (isscalar (m))
--- a/scripts/io/strread.m
+++ b/scripts/io/strread.m
@@ -390,7 +390,7 @@
     if (cstop + c2len == len)
       ## Ignore last char of to-the-end-of-line comments
       c2len += 1;
-    end
+    endif
     str = cellslices (str, [1, cstop + c2len], [cstart - 1, len]);
     str = [str{:}];
   endif
--- a/scripts/linear-algebra/krylov.m
+++ b/scripts/linear-algebra/krylov.m
@@ -87,7 +87,7 @@
   [m, kb] = size (V);
   if (m != na)
     error ("krylov: A(%d x %d), V(%d x %d): argument dimensions do not match",
-          na, na, m, kb);
+           na, na, m, kb);
   endif
 
   if (! isscalar (k))
--- a/scripts/miscellaneous/edit.m
+++ b/scripts/miscellaneous/edit.m
@@ -162,7 +162,6 @@
       case "EDITOR"
         error ("Octave:deprecated-function",
                "The EDITOR option of edit has been removed.  Use EDITOR() directly.")
-        return;
       case "HOME"
         if (! isempty (stateval) && stateval(1) == "~")
           stateval = [ get_home_directory, stateval(2:end) ];
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m
@@ -1397,8 +1397,7 @@
         endif
 
       otherwise
-        error ("__gnuplot_draw_axes__: unknown object class, %s",
-               obj.type);
+        error ("__gnuplot_draw_axes__: unknown object class, %s", obj.type);
     endswitch
 
   endwhile
--- a/scripts/polynomial/private/__splinefit__.m
+++ b/scripts/polynomial/private/__splinefit__.m
@@ -1,7 +1,6 @@
 ## This function is private because it is maintained by Jonas Lundgren
-## separtely from Octave.  Please do not reformat to match Octave coding
-## conventions as that would make it harder to integrate upstream
-## changes.
+## separately from Octave.  Please do not reformat to match Octave coding
+## conventions as that would make it harder to integrate upstream changes.
 
 % Copyright (c) 2010, Jonas Lundgren
 % All rights reserved.
--- a/scripts/sparse/qmr.m
+++ b/scripts/sparse/qmr.m
@@ -223,7 +223,7 @@
       res1 = norm (r) / bnorm;
       if (nargout > 4)
         resvec(iter + 1, 1) = norm (r);
-      end
+      endif
 
       if (res1 < tol)
         ## Convergence achieved.
--- a/scripts/statistics/distributions/binoinv.m
+++ b/scripts/statistics/distributions/binoinv.m
@@ -143,7 +143,7 @@
     k = (x > cdf);
     lower(k) = limit;
     limit += limit;
-  end
+  endwhile
   upper = max (2*lower, 1);
   k = find (lower != limit/2);       # elements for which above loop finished
   for i = 1:ceil (log2 (max (lower)))
--- a/scripts/statistics/distributions/nbininv.m
+++ b/scripts/statistics/distributions/nbininv.m
@@ -115,7 +115,7 @@
     k = (x > cdf);
     lower(k) = limit;
     limit += limit;
-  end
+  endwhile
   upper = max (2*lower, 1);
   k = find (lower != limit/2);    # elements for which above loop finished
   for i = 1:ceil (log2 (max (lower)))