Mercurial > hg > octave-nkf
comparison src/ov-range.cc @ 8946:e7e928088e90
fix CRLF issues with text-mode reading in windows when loading ascii data
author | Benjamin Lindner <lindnerb@users.sourceforge.net> |
---|---|
date | Tue, 10 Mar 2009 01:01:50 -0400 |
parents | eb63fbe60fab |
children | 967a692ddfe2 |
comparison
equal
deleted
inserted
replaced
8945:45f8197ffd51 | 8946:e7e928088e90 |
---|---|
37 #include "ov-re-mat.h" | 37 #include "ov-re-mat.h" |
38 #include "ov-scalar.h" | 38 #include "ov-scalar.h" |
39 #include "pr-output.h" | 39 #include "pr-output.h" |
40 | 40 |
41 #include "byte-swap.h" | 41 #include "byte-swap.h" |
42 #include "ls-ascii-helper.h" | |
42 #include "ls-hdf5.h" | 43 #include "ls-hdf5.h" |
43 #include "ls-utils.h" | 44 #include "ls-utils.h" |
44 | 45 |
45 DEFINE_OCTAVE_ALLOCATOR (octave_range); | 46 DEFINE_OCTAVE_ALLOCATOR (octave_range); |
46 | 47 |
324 ; // Skip whitespace on way to beginning of next line. | 325 ; // Skip whitespace on way to beginning of next line. |
325 else | 326 else |
326 break; | 327 break; |
327 } | 328 } |
328 | 329 |
329 for (;;) | 330 skip_until_newline (is, false); |
330 { | |
331 if (is && (c == '%' || c == '#')) | |
332 while (is.get (c) && c != '\n') | |
333 ; // Skip to beginning of next line, ignoring everything. | |
334 else | |
335 break; | |
336 } | |
337 } | 331 } |
338 | 332 |
339 bool | 333 bool |
340 octave_range::save_ascii (std::ostream& os) | 334 octave_range::save_ascii (std::ostream& os) |
341 { | 335 { |