changeset 21501:24aab5c342bf

more style fixes for textscan
author John W. Eaton <jwe@octave.org>
date Sat, 19 Mar 2016 09:20:05 -0400
parents 7a6589e2867a
children 7a19c5678f91
files libinterp/corefcn/textscan.cc libinterp/corefcn/textscan.h
diffstat 2 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/textscan.cc	Sat Mar 19 08:53:24 2016 -0400
+++ b/libinterp/corefcn/textscan.cc	Sat Mar 19 09:20:05 2016 -0400
@@ -96,7 +96,7 @@
   // to avoid overflow by calling putbacks only for a character got by
   // get() or get_undelim(), with no intervening
   // get, get_delim, field_done, refresh_buf, getline, read or seekg.
-  void putback (char /*ch*/ = 0)  { if (! eof ()) --idx; }
+  void putback (char /*ch*/ = 0) { if (! eof ()) --idx; }
 
   int getline  (std::string& dest, char delim);
 
@@ -115,7 +115,7 @@
     return (eob == buf && i_stream.eof ()) || (flags & std::ios_base::eofbit);
   }
 
-  operator const void* (void) { return (!eof () && !flags) ? this : 0; }
+  operator const void* (void) { return (! eof () && ! flags) ? this : 0; }
 
   bool fail (void) { return flags & std::ios_base::failbit; }
 
@@ -1316,7 +1316,7 @@
   if (fmt_list.num_conversions () == 0)
     error ("textscan: no valid format conversion specifiers\n");
 
-  // skip the first  header_lines
+  // skip the first header_lines
   std::string dummy;
   for (int i = 0; i < header_lines && isp; i++)
     getline (isp, dummy, static_cast<char> (eol2));
@@ -1466,8 +1466,8 @@
     }
   else  // group adjacent cells of the same type into a single cell
     {
-      octave_value    cur;                // current cell, accumulating columns
-      octave_idx_type group_size = 0;     // columns in this cell
+      octave_value cur;                // current cell, accumulating columns
+      octave_idx_type group_size = 0;  // columns in this cell
       int prev_type = -1;
 
       conv = 0;
@@ -1501,7 +1501,7 @@
   return retval;
 }
 
-// Calculate x^n.  Used for ...e+nn  so that, for example, 1e2 is
+// Calculate x^n.  Used for ...e+nn so that, for example, 1e2 is
 // exactly 100 and 5e-1 is 1/2
 
 static double
@@ -1519,8 +1519,8 @@
   return retval;
 }
 
-// Read a double considering the "precision" field of  fmt  and the
-// exp_chars  option of  options.
+// Read a double considering the "precision" field of FMT and the
+// EXP_CHARS option of OPTIONS.
 
 double
 textscan::read_double (delimited_stream& is,
@@ -2593,7 +2593,7 @@
                   do
                     {           // find sequence ending with last char
                       scan_caret (is, last, dummy);
-                      is.get_undelim ();        // (read   last  itself)
+                      is.get_undelim ();        // (read LAST itself)
 
                       may_match = may_match + dummy + last;
                       if (may_match.length () > end_c.length ())
--- a/libinterp/corefcn/textscan.h	Sat Mar 19 08:53:24 2016 -0400
+++ b/libinterp/corefcn/textscan.h	Sat Mar 19 09:20:05 2016 -0400
@@ -171,9 +171,9 @@
 
   bool match_literal (delimited_stream& isp, const textscan_format_elt& elem);
 
-  int  skip_whitespace (delimited_stream& is, bool EOLstop = false);
+  int skip_whitespace (delimited_stream& is, bool EOLstop = false);
 
-  int  skip_delim (delimited_stream& is);
+  int skip_delim (delimited_stream& is);
 
   bool is_delim (unsigned char ch) const
   {