comparison src/ls-mat-ascii.cc @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents fd0a3ac60b0e
children 72c96de7a403
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
147 147
148 if (end != std::string::npos) 148 if (end != std::string::npos)
149 { 149 {
150 beg = buf.find_first_not_of (", \t", end); 150 beg = buf.find_first_not_of (", \t", end);
151 151
152 if (beg == std::string::npos || (buf[beg] == '\r' && 152 if (beg == std::string::npos || (buf[beg] == '\r' &&
153 beg == buf.length () - 1)) 153 beg == buf.length () - 1))
154 { 154 {
155 // We had a line with trailing spaces and 155 // We had a line with trailing spaces and
156 // ending with a CRLF, so this should look like EOL, 156 // ending with a CRLF, so this should look like EOL,
157 // not a new colum. 157 // not a new colum.
358 for (octave_idx_type i = 0; i < m.rows (); i++) 358 for (octave_idx_type i = 0; i < m.rows (); i++)
359 { 359 {
360 for (octave_idx_type j = 0; j < m.cols (); j++) 360 for (octave_idx_type j = 0; j < m.cols (); j++)
361 { 361 {
362 // Omit leading tabs. 362 // Omit leading tabs.
363 if (j != 0) os << '\t'; 363 if (j != 0) os << '\t';
364 octave_write_double (os, m (i, j)); 364 octave_write_double (os, m (i, j));
365 } 365 }
366 os << "\n"; 366 os << "\n";
367 } 367 }
368 } 368 }