diff scripts/io/strread.m @ 13141:e81ddf9cacd5

maint: untabify and remove trailing whitespace from source files * bicg.m, gmres.m, pkg.m: Untabify and remove trailing whitespace. * libcruft/Makefile.am, libcruft/blas-xtra/cdotc3.f, libcruft/blas-xtra/cmatm3.f, libcruft/blas-xtra/ddot3.f, libcruft/blas-xtra/dmatm3.f, libcruft/blas-xtra/sdot3.f, libcruft/blas-xtra/smatm3.f, libcruft/blas-xtra/zdotc3.f, libcruft/blas-xtra/zmatm3.f, libcruft/lapack-xtra/crsf2csf.f, libcruft/lapack-xtra/zrsf2csf.f, liboctave/Array.cc, liboctave/DASPK-opts.in, liboctave/DASRT-opts.in, liboctave/DASSL-opts.in, liboctave/LSODE-opts.in, liboctave/Makefile.a,mliboctave/Quad-opts.in, liboctave/Sparse-perm-op-defs.h, scripts/Makefile.a,mscripts/deprecated/glpkmex.m, scripts/general/blkdiag.m, scripts/general/interp1.m, scripts/general/profshow.m, scripts/general/quadl.m, scripts/general/triplequad.m, scripts/help/__makeinfo__.m, scripts/io/strread.m, scripts/io/textread.m, scripts/io/textscan.m, scripts/linear-algebra/rank.m, scripts/miscellaneous/gzip.m, scripts/miscellaneous/private/__xzip__.m, scripts/miscellaneous/tempdir.m, scripts/miscellaneous/unpack.m, scripts/pkg/pkg.m, scripts/plot/allchild.m, scripts/plot/ancestor.m, scripts/plot/cla.m, scripts/plot/clf.m, scripts/plot/findall.m, scripts/plot/findobj.m, scripts/plot/gca.m, scripts/plot/gcf.m, scripts/plot/hggroup.m, scripts/plot/isfigure.m, scripts/plot/ishghandle.m, scripts/plot/legend.m, scripts/plot/line.m, scripts/plot/loglog.m, scripts/plot/patch.m, scripts/plot/print.m, scripts/plot/private/__quiver__.m, scripts/plot/private/__scatter__.m, scripts/plot/rectangle.m, scripts/plot/semilogx.m, scripts/plot/semilogy.m, scripts/plot/surface.m, scripts/plot/text.m, scripts/plot/title.m, scripts/plot/trisurf.m, scripts/plot/view.m, scripts/plot/whitebg.m, scripts/plot/xlabel.m, scripts/plot/xlim.m, scripts/plot/ylabel.m, scripts/plot/ylim.m, scripts/plot/zlabel.m, scripts/plot/zlim.m, scripts/polynomial/mkpp.m, scripts/polynomial/polygcd.m, scripts/polynomial/ppint.m, scripts/polynomial/ppjumps.m, scripts/polynomial/ppval.m, scripts/set/setxor.m, scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/sparse/spconvert.m, scripts/specfun/nthroot.m, scripts/strings/strmatch.m, scripts/strings/untabify.m, scripts/testfun/demo.m, scripts/testfun/example.m, src/DLD-FUNCTIONS/filter.cc, src/DLD-FUNCTIONS/mgorth.cc, src/DLD-FUNCTIONS/quadcc.cc, src/DLD-FUNCTIONS/str2double.cc, src/Makefile.a,msrc/gl-render.cc, src/gl2ps-renderer.cc, src/graphics.cc, src/octave-config.cc.in, src/octave-config.in, src/ov-class.h, src/ov-fcn.h, src/profiler.cc, src/profiler.h, src/pt-binop.cc, src/pt-unop.cc, src/symtab.cc, src/txt-eng-ft.cc: Remove trailing whitespace.
author John W. Eaton <jwe@octave.org>
date Thu, 15 Sep 2011 12:51:10 -0400
parents 3509cf60d1f6
children 9b8e786bbf3c
line wrap: on
line diff
--- a/scripts/io/strread.m	Thu Sep 15 12:02:54 2011 -0400
+++ b/scripts/io/strread.m	Thu Sep 15 12:51:10 2011 -0400
@@ -120,7 +120,7 @@
 ## @end itemize
 ##
 ## @item "delimiter"
-## Any character in @var{value} will be used to split @var{str} into words 
+## Any character in @var{value} will be used to split @var{str} into words
 ## (default value = any whitespace).
 ##
 ## @item "emptyvalue"
@@ -128,7 +128,7 @@
 ##
 ## @item "multipledelimsasone"
 ## Treat a series of consecutive delimiters, without whitespace in between,
-## as a single delimiter.  Consecutive delimiter series need not be vertically 
+## as a single delimiter.  Consecutive delimiter series need not be vertically
 ## "aligned".
 ##
 ## @item "treatasempty"
@@ -144,7 +144,7 @@
 ## trimmed; the string defining whitespace must be enclosed in double
 ## quotes for proper processing of special characters like \t.
 ## The default value for whitespace = " \b\r\n\t" (note the space).
-## 
+##
 ## @end table
 ##
 ## @seealso{textscan, textread, load, dlmread, fscanf}
@@ -220,7 +220,7 @@
             else
               ## FIXME - a user may have numeric values specified: {'//', 7}
               ##         this will lead to an error in the warning message
-              error ("strread: unknown or unrecognized comment style '%s'", 
+              error ("strread: unknown or unrecognized comment style '%s'",
                       varargin{n+1});
             endif
         endswitch
@@ -290,7 +290,7 @@
   ## Remove comments in str
   if (comment_flag)
     ## Expand 'eol_char' here, after option processing which may have set value
-    comment_end = regexprep (comment_end, 'eol_char', eol_char); 
+    comment_end = regexprep (comment_end, 'eol_char', eol_char);
     cstart = strfind (str, comment_start);
     cstop  = strfind (str, comment_end);
     ## Treat end of string as additional comment stop
@@ -339,7 +339,7 @@
   if (! isempty (white_spaces))
     ## Check if trailing "\n" might signal padding output arrays to equal size
     ## before it is trimmed away below
-    if ((str(end) == 10) && (nargout > 1)) 
+    if ((str(end) == 10) && (nargout > 1))
       pad_out = 1;
     endif
     ## Remove repeated white_space chars.  First find white_space positions
@@ -384,7 +384,7 @@
       words(idz) = {""};
     endfor
   endif
-  
+
   ## We now may have to cope with 3 cases:
   ## A: Trailing literals (%f<literal>) w/o delimiter in between.
   ## B: Leading literals (<literal>%f) w/o delimiter in between.
@@ -398,11 +398,11 @@
   idf = cellfun ("isempty", strfind (fmt_words, "%"));
   ## Find indices and pointers to conversion specifiers with fixed width
   idg = ! cellfun ("isempty", regexp (fmt_words, '%\*?\d'));
-  idy = find (idf | idg); 
+  idy = find (idf | idg);
 
   ## If needed, split up columns in three steps:
   if (! isempty (idy))
-    ## Try-catch because complexity of strings to read can be infinite    
+    ## Try-catch because complexity of strings to read can be infinite
     #try
 
       ## 1. Assess "period" in the split-up words array ( < num_words_per_line).
@@ -446,7 +446,7 @@
               ## Word completely "used up".  Next word
               ++iwrd; iwrdp = 0; iwrdl = length (words{iwrd});
             endif
-   
+
         else
           ## A simple format conv. specifier. Either (1) uses rest of word, or
           ## (2) is squeezed between current iwrdp and next literal, or (3) uses
@@ -462,7 +462,7 @@
             endif
           elseif (iwrdp < iwrdl)
             ## No bordering literal to the right => field occupies (rest of) word
-            ++iwrd; iwrdp = 0; 
+            ++iwrd; iwrdp = 0;
             if (ii < numel (fmt_words))
               iwrdl = length (words{iwrd});
             endif
@@ -478,7 +478,7 @@
       tmp_lines = ceil (num_words / words_period);
       num_words_padded = tmp_lines * words_period - num_words;
       if (num_words_padded)
-        words = [words'; cell(num_words_padded, 1)]; 
+        words = [words'; cell(num_words_padded, 1)];
       endif
       words = reshape (words, words_period, tmp_lines);
 
@@ -498,7 +498,7 @@
           endif
           if (! strcmp (fmt_words{ii}, words{icol, 1}))
             ## Column doesn't exactly match literal => split needed.  Insert a column
-            words(icol+1:end+1, :) = words(icol:end, :); 
+            words(icol+1:end+1, :) = words(icol:end, :);
             ## Watch out for empty cells
             jptr = find (! cellfun ("isempty", words(icol, :)));
 
@@ -523,7 +523,7 @@
                 wdth = floor (str2double (fmt_words{ii}(regexp(fmt_words{ii}, ...
                               '\d') : end-1)));
                 words(icol+1, jptr) = cellfun (@(x) x(wdth+1:end),
-                     words(icol,jptr), "UniformOutput", false);                 
+                     words(icol,jptr), "UniformOutput", false);
                 words(icol, jptr) = strtrunc (words(icol, jptr), wdth);
               else
                 ## FIXME: this assumes char(254)/char(255) won't occur in input!
@@ -566,7 +566,7 @@
 
     #end_try_catch
   endif
-  
+
   ## For each specifier, process corresponding column
   k = 1;
   for m = 1:num_words_per_line
@@ -587,7 +587,7 @@
       switch fmt_words{m}(1:min (2, length (fmt_words{m})))
         case "%s"
           if (pad_out)
-            data(end+1:num_lines) = {""}; 
+            data(end+1:num_lines) = {""};
           endif
           varargout{k} = data';
           k++;
@@ -596,7 +596,7 @@
           ### FIXME - erroneously formatted data lead to NaN, not an error
           data = str2double (data);
           if (! isempty (regexp (fmt_words{m}, "%[du]")))
-            ## Cast to integer 
+            ## Cast to integer
             ## FIXME: NaNs will be transformed into zeros
             data = int32 (data);
           end
@@ -623,7 +623,7 @@
                 sprec = str2double (nfmt{2});
                 data = 10^-sprec * round (10^sprec * data);
               elseif (! isempty (regexp (fmt_words{m}, "[du]")))
-                ## Cast to integer 
+                ## Cast to integer
                 ## FIXME: NaNs will be transformed into zeros
                 data = int32 (data);
               end
@@ -682,7 +682,7 @@
   if (!isempty (out) && any (sep == text(end)))
     out(end) = [];
   endif
-  
+
   ## Empty cells converted to empty cellstrings.
   out(cellfun ("isempty", out)) = {""};