changeset 11033:d9c8916bb9dd

Untabify a few remaining .m scripts.
author Rik <octave@nomad.inbox5.com>
date Tue, 28 Sep 2010 13:24:21 -0700
parents c9b0a75b02e8
children 6589aaf769f6
files doc/ChangeLog doc/interpreter/geometryimages.m doc/interpreter/interpimages.m doc/interpreter/plotimages.m doc/interpreter/sparseimages.m scripts/ChangeLog scripts/linear-algebra/logm.m scripts/plot/legend.m scripts/signal/periodogram.m test/@Gork/set.m test/ChangeLog test/fntests.m test/test_func.m test/test_io.m
diffstat 14 files changed, 101 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-28  Rik <octave@nomad.inbox5.com>
+
+	* doc/interpreter/geometryimages.m, doc/interpreter/interpimages.m,
+	doc/interpreter/plotimages.m, doc/interpreter/sparseimages.m: Untabify
+	scripts.
+
 2010-09-27  Rik <octave@nomad.inbox5.com>
 
 	* interpreter/mk_doc_cache.m: Use single quotes for regular expression
--- a/doc/interpreter/geometryimages.m
+++ b/doc/interpreter/geometryimages.m
@@ -30,8 +30,8 @@
 
   if (isempty (findstr (octave_config_info ("DEFS"), "HAVE_QHULL"))
       && (strcmp (nm, "voronoi") || strcmp (nm, "griddata")
-	  || strcmp (nm, "convhull") || strcmp (nm, "delaunay")
-	  || strcmp (nm, "triplot")))
+          || strcmp (nm, "convhull") || strcmp (nm, "delaunay")
+          || strcmp (nm, "triplot")))
     sombreroimage (nm, typ);
   elseif (strcmp (typ, "txt"))
     image_as_txt (nm);
--- a/doc/interpreter/interpimages.m
+++ b/doc/interpreter/interpimages.m
@@ -37,7 +37,7 @@
     y = sin (4*t + 0.3) .* cos (3*t - 0.1);
     yp = sin (4*ti + 0.3) .* cos (3*ti - 0.1);
     plot (ti, yp, 'g', ti, interp1(t, y, ti, 'spline'), 'b', ...
-	  ti, interpft (y, k), 'c', t, y, 'r+');
+          ti, interpft (y, k), 'c', t, y, 'r+');
     legend ('sin(4t+0.3)cos(3t-0.1)','spline','interpft','data');
     print (cstrcat (nm, ".", typ), d_typ)
   elseif (strcmp (nm, "interpn"))
--- a/doc/interpreter/plotimages.m
+++ b/doc/interpreter/plotimages.m
@@ -35,17 +35,17 @@
     plot (x, sin (x));
     print (cstrcat (nm, ".", typ), d_typ)    
   elseif (strcmp (nm, "hist"))
-	 rand ("state", 2);
+    rand ("state", 2);
     hist (randn (10000, 1), 30);
     print (cstrcat (nm, ".", typ), d_typ)    
   elseif (strcmp (nm, "errorbar"))
-	 rand ("state", 2);
+    rand ("state", 2);
     x = 0:0.1:10;
     y = sin (x);
     yl = 0.1 .* rand (size (x));
     yu = 0.1 .* rand (size (x));
     errorbar (x, sin (x), yl, yu);
-	 axis ([0, 10, -1.1, 1.1]);
+    axis ([0, 10, -1.1, 1.1]);
     print (cstrcat (nm, ".", typ), d_typ)    
   elseif (strcmp (nm, "polar"))
     polar (0:0.1:10*pi, 0:0.1:10*pi);
--- a/doc/interpreter/sparseimages.m
+++ b/doc/interpreter/sparseimages.m
@@ -29,11 +29,11 @@
       txtimages (nm, 15, typ);
     else
       if (strcmp (nm, "gplot"))
-	gplotimages ("gplot", typ);
+        gplotimages ("gplot", typ);
       elseif (strcmp (nm, "grid"))
-	femimages ("grid", typ);
+        femimages ("grid", typ);
       else
-	otherimages (nm, 200, typ);
+        otherimages (nm, 200, typ);
       endif
     endif
   else ## There is no sparse matrix implementation available because
@@ -65,7 +65,7 @@
   endif
 
   A = sparse ([2,6,1,3,2,4,3,5,4,6,1,5],
-	      [1,1,2,2,3,3,4,4,5,5,6,6], 1, 6, 6);
+              [1,1,2,2,3,3,4,4,5,5,6,6], 1, 6, 6);
   xy = [0,4,8,6,4,2;5,0,5,7,5,7]';
   gplot (A, xy)
   print (cstrcat (nm, ".", typ), d_typ)
@@ -86,13 +86,13 @@
     printsparse(a,cstrcat("spmatrix.",typ));
   else
     if (!isempty(findstr(octave_config_info ("DEFS"),"HAVE_COLAMD")) &&
-	!isempty(findstr(octave_config_info ("DEFS"),"HAVE_CHOLMOD")))
+        !isempty(findstr(octave_config_info ("DEFS"),"HAVE_CHOLMOD")))
       if (strcmp (nm, "spchol"))
-	r1 = chol(a);
-	printsparse(r1,cstrcat("spchol.",typ));
+        r1 = chol(a);
+        printsparse(r1,cstrcat("spchol.",typ));
       elseif (strcmp (nm, "spcholperm"))
-	[r2,p2,q2]=chol(a);
-	printsparse(r2,cstrcat("spcholperm.",typ));
+        [r2,p2,q2]=chol(a);
+        printsparse(r2,cstrcat("spcholperm.",typ));
       endif
       ## printf("Text NNZ: Matrix %d, Chol %d, PermChol %d\n",nnz(a),nnz(r1),nnz(r2));
     endif
@@ -116,19 +116,19 @@
     hide_output ();
   else
     if (!isempty(findstr(octave_config_info ("DEFS"),"HAVE_COLAMD")) &&
-	!isempty(findstr(octave_config_info ("DEFS"),"HAVE_CHOLMOD")))
+        !isempty(findstr(octave_config_info ("DEFS"),"HAVE_CHOLMOD")))
       if (strcmp (nm, "spchol"))
-	r1 = chol(a);
-	spy(r1);
-	axis("ij")
-	print(cstrcat("spchol.",typ), d_typ)
-	hide_output ();
+        r1 = chol(a);
+        spy(r1);
+        axis("ij")
+        print(cstrcat("spchol.",typ), d_typ)
+        hide_output ();
       elseif (strcmp (nm, "spcholperm"))
-	[r2,p2,q2]=chol(a);
-	spy(r2);
-	axis("ij")
-	print(cstrcat("spcholperm.",typ), d_typ)
-	hide_output ();
+        [r2,p2,q2]=chol(a);
+        spy(r2);
+        axis("ij")
+        print(cstrcat("spcholperm.",typ), d_typ)
+        hide_output ();
       endif
       ## printf("Image NNZ: Matrix %d, Chol %d, PermChol %d\n",nnz(a),nnz(r1),nnz(r2));
     endif
@@ -146,9 +146,9 @@
     endif
     for j = 1:size(a,2)
       if (a(i,j) == 0)
-	fprintf(fid,"  ")
+        fprintf(fid,"  ")
       else
-	fprintf(fid," *")
+        fprintf(fid," *")
       endif
     endfor
     fprintf(fid,"\n")
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-28  Rik <octave@nomad.inbox5.com>
+
+	* scripts/linear-algebra/logm.m, scripts/plot/legend.m, 
+	scripts/signal/periodogram.m: Untabify scripts.
+
 2010-09-27  Rik <octave@nomad.inbox5.com>
 
 	* scripts/io/dlmwrite.m: Replace non-POSIX '\d' regex pattern.
--- a/scripts/linear-algebra/logm.m
+++ b/scripts/linear-algebra/logm.m
@@ -36,7 +36,7 @@
 ## @end deftypefn
 
 ## Reference: N. J. Higham, Functions of Matrices: Theory and Computation 
-## 	 (SIAM, 2008.)
+##            (SIAM, 2008.)
 ##
 
 function [s, iters] = logm (a, opt_iters)
@@ -101,10 +101,10 @@
 endfunction
 
 ################## ANCILLARY FUNCTIONS ################################
-######	Taken from the mfttoolbox (GPL 3) by D. Higham.
+######  Taken from the mfttoolbox (GPL 3) by D. Higham.
 ######  Reference: 
 ######      D. Higham, Functions of Matrices: Theory and Computation 
-######		(SIAM, 2008.).
+######      (SIAM, 2008.).
 #######################################################################
 
 ##LOGM_PADE_PF   Evaluate Pade approximant to matrix log by partial fractions.
--- a/scripts/plot/legend.m
+++ b/scripts/plot/legend.m
@@ -636,9 +636,9 @@
               l1 = line ("xdata", (xoffset + 0.5 * linelength  + xk * xstep) / lpos(3),
                          "ydata", (lpos(4) - yoffset - yk * ystep) / lpos(4), 
                          "color", color, "marker", marker,
-	                 "markeredgecolor", get (hplots (k), "markeredgecolor"),
-	                 "markerfacecolor", get (hplots (k), "markerfacecolor"),
-	                 "markersize", get (hplots (k), "markersize"));
+                         "markeredgecolor", get (hplots (k), "markeredgecolor"),
+                         "markerfacecolor", get (hplots (k), "markerfacecolor"),
+                         "markersize", get (hplots (k), "markersize"));
               hobjects = [hobjects, l1];
             endif
           case "patch"
--- a/scripts/signal/periodogram.m
+++ b/scripts/signal/periodogram.m
@@ -136,7 +136,7 @@
     Pxx = 0;
     rr = rem (length (x), nfft);
     if (rr)
-    	x = [x(:);zeros (nfft-rr, 1)];
+      x = [x(:);zeros (nfft-rr, 1)];
     end
     x = sum (reshape (x, nfft, []), 2);
   endif
--- a/test/@Gork/set.m
+++ b/test/@Gork/set.m
@@ -7,11 +7,11 @@
     propArgs  = propArgs(3:end);
     switch propName
       case 'cork'
-	if(isa(propValue,'Cork'))
+        if(isa(propValue,'Cork'))
           s.Cork = propValue;
-	else
-	  s.Cork = set(s.Cork, 'click',propValue);
-	end
+        else
+          s.Cork = set(s.Cork, 'click',propValue);
+        end
       case 'gark'
         s.gark = propValue;
       otherwise
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-28  Rik <octave@nomad.inbox5.com>
+
+	* test/@Gork/set.m, test/fntests.m, test/test_func.m, test/test_io.m:
+	Untabify scripts.
+
 2010-09-27  Rik <octave@nomad.inbox5.com>
 
 	* fntests.m: Use single quotes for regex when possible.
--- a/test/fntests.m
+++ b/test/fntests.m
@@ -107,16 +107,16 @@
   for i = 1:length (lst)
     nm = lst(i).name;
     if (length (nm) > 5 && strcmp (nm(1:5), "test_")
-	&& strcmp (nm((end-1):end), ".m"))
+        && strcmp (nm((end-1):end), ".m"))
       p = n = xf = sk = 0;
       ffnm = fullfile (d, nm);
       if (has_tests (ffnm))
-	print_test_file_name (nm);
-	[p, n, xf, sk] = test (nm(1:(end-2)), "quiet", fid);
-	print_pass_fail (n, p);
-	files_with_tests(end+1) = ffnm;
+        print_test_file_name (nm);
+        [p, n, xf, sk] = test (nm(1:(end-2)), "quiet", fid);
+        print_pass_fail (n, p);
+        files_with_tests(end+1) = ffnm;
       else
-	files_with_no_tests(end+1) = ffnm;
+        files_with_no_tests(end+1) = ffnm;
       endif
       dp += p;
       dn += n;
@@ -136,7 +136,7 @@
   for i = 1:length (lst)
     nm = lst(i).name;
     if (lst(i).isdir && ! strcmp (nm, ".") && ! strcmp (nm, "..")
-	&& ! strcmp (nm, "CVS") && ! strcmp (nm, "deprecated") )
+        && ! strcmp (nm, "CVS") && ! strcmp (nm, "deprecated") )
       [p, n, xf, sk] = run_test_script (fid, [d, "/", nm]);
       dp += p;
       dn += n;
@@ -156,20 +156,20 @@
       p = n = xf = 0;
       ## Only run if it contains %!test, %!assert %!error or %!warning
       if (has_tests (f))
-	tmp = strrep (f, [topsrcdir, "/"], "");
-	tmp = strrep (tmp, [topbuilddir, "/"], "../");
-	print_test_file_name (tmp);
-	[p, n, xf, sk] = test (f, "quiet", fid);
-	print_pass_fail (n, p);
-	dp += p;
-	dn += n;
-	dxf += xf;
-	dsk += sk;
-	files_with_tests(end+1) = f;
+        tmp = strrep (f, [topsrcdir, "/"], "");
+        tmp = strrep (tmp, [topbuilddir, "/"], "../");
+        print_test_file_name (tmp);
+        [p, n, xf, sk] = test (f, "quiet", fid);
+        print_pass_fail (n, p);
+        dp += p;
+        dn += n;
+        dxf += xf;
+        dsk += sk;
+        files_with_tests(end+1) = f;
       elseif (has_functions (f))
-	## To reduce the list length, only mark .cc files that contain
-	## DEFUN definitions.
-	files_with_no_tests(end+1) = f;
+        ## To reduce the list length, only mark .cc files that contain
+        ## DEFUN definitions.
+        files_with_no_tests(end+1) = f;
       endif
     endif
   endfor 
@@ -249,7 +249,7 @@
       t2 = "failure";
     endif
     printf ("\nThere %s %d expected %s (see fntests.log for details).\n",
-	    t1, dxf, t2);
+            t1, dxf, t2);
     puts ("\nExpected failures are known bugs.  Please help improve\n");
     puts ("Octave by contributing fixes for them.\n");
   endif
@@ -267,7 +267,7 @@
   puts ("these files (see the list in the file fntests.log).\n\n");
 
   fprintf (fid, "\nFiles with no tests:\n\n%s",
-	  list_in_columns (files_with_no_tests, 80));
+          list_in_columns (files_with_no_tests, 80));
   fclose (fid);
 
   page_screen_output (pso);
--- a/test/test_func.m
+++ b/test/test_func.m
@@ -75,11 +75,11 @@
 %!    y = feval (fn, m, varargin{:});
 %!    y2 = feval (fn, reshape (mn, size (m)), varargin{:});
 %!    if (!strcmp (class (y), class (m)) ||
-%!	   issparse (y) != issparse (m) || !size_equal (y, y2))
+%!         issparse (y) != issparse (m) || !size_equal (y, y2))
 %!      error ('failed for type %s\n', typ{i});
 %!    endif
 %!    if (!(strcmp (typ{i}, 'cell') || strcmp (typ{i}, 'struct')) &&
-%!	  any (vec (cast (real (y), 'double')) !=
+%!        any (vec (cast (real (y), 'double')) !=
 %!             vec (feval (fn , cast (real (m), 'double'), varargin{:}))))
 %!      error ('failed for type %s\n', typ{i});
 %!    endif
--- a/test/test_io.m
+++ b/test/test_io.m
@@ -105,59 +105,59 @@
 %!      assert (a4, b4, tol);
 %!
 %!      if (! isequal (a5, b5))
-%!	  error ("failed: %s boolean", file);
+%!        error ("failed: %s boolean", file);
 %!      endif
 %!
 %!      if (! strcmp (file, "mat5") && ! strcmp (file, "mat7"))
 %!        if (! isequal (a6, b6))
-%!	    error ("failed: %s boolean matrix", file);
+%!          error ("failed: %s boolean matrix", file);
 %!        endif
 %!      endif
 %!
 %!      assert ([a7], [b7], tol);
 %!
 %!      if (! isequal (a8, b8))
-%!	  error ("failed: %s struct", file);
+%!        error ("failed: %s struct", file);
 %!      endif
 %!      
 %!      if (! isequal (a9, b9))
-%!	  error ("failed: %s cell", file);
+%!        error ("failed: %s cell", file);
 %!      endif
 %!      
 %!      if (! isequal (a10, b10))
-%!	  error ("failed: %s string", file);
+%!        error ("failed: %s string", file);
 %!      endif
 %!
 %!      if (! isequal (a11, b11))
-%!	  error ("failed: %s int8", file);
+%!        error ("failed: %s int8", file);
 %!      endif
 %!
 %!      if (! isequal (a12, b12))
-%!	  error ("failed: %s int16", file);
+%!        error ("failed: %s int16", file);
 %!      endif
 %!
 %!      if (! isequal (a13, b13))
-%!	  error ("failed: %s int32", file);
+%!        error ("failed: %s int32", file);
 %!      endif
 %!
 %!      if (! isequal (a14, b14))
-%!	  error ("failed: %s int64", file);
+%!        error ("failed: %s int64", file);
 %!      endif
 %!
 %!      if (! isequal (a15, b15))
-%!	  error ("failed: %s uint8", file);
+%!        error ("failed: %s uint8", file);
 %!      endif
 %!
 %!      if (! isequal (a16, b16))
-%!	  error ("failed: %s uint16", file);
+%!        error ("failed: %s uint16", file);
 %!      endif
 %!
 %!      if (! isequal (a17, b17))
-%!	  error ("failed: %s uint32", file);
+%!        error ("failed: %s uint32", file);
 %!      endif
 %!
 %!      if (! isequal (a18, b18))
-%!	  error ("failed: %s uint64", file);
+%!        error ("failed: %s uint64", file);
 %!      endif
 %!
 %!      assert (a19, b19, tol);
@@ -171,7 +171,7 @@
 %!          || isglobal ("a13") || isglobal ("a14") || isglobal ("a15")
 %!          || isglobal ("a16") || isglobal ("a17") || isglobal ("a18")
 %!          || isglobal ("a19") || isglobal ("a20"))
-%!	  error ("failed: %s global test", file); 
+%!        error ("failed: %s global test", file); 
 %!      endif
 %!    endfor
 %!  endif
@@ -201,20 +201,20 @@
 %! STR = load ("struct.dat");
 %!
 %! assert(STR.scalar_fld == 1 && ...
-%! 	STR.matrix_fld == [1.1,2;3,4] && ...
-%! 	STR.string_fld == "Octave" && ...
-%! 	STR.struct_fld.x == 0 && ...
-%! 	STR.struct_fld.y == 1 );
+%!        STR.matrix_fld == [1.1,2;3,4] && ...
+%!        STR.string_fld == "Octave" && ...
+%!        STR.struct_fld.x == 0 && ...
+%!        STR.struct_fld.y == 1 );
 %!
 %!
 %! save -binary struct.dat -struct STR matrix_fld str*_fld;
 %! STR = load ("struct.dat");
 %!
 %! assert(!isfield(STR,"scalar_fld") && ...
-%! 	STR.matrix_fld == [1.1,2;3,4] && ...
-%! 	STR.string_fld == "Octave" && ...
-%! 	STR.struct_fld.x == 0 && ...
-%! 	STR.struct_fld.y == 1);
+%!        STR.matrix_fld == [1.1,2;3,4] && ...
+%!        STR.string_fld == "Octave" && ...
+%!        STR.struct_fld.x == 0 && ...
+%!        STR.struct_fld.y == 1);
 %!
 %! delete struct.dat;
 %!