Mercurial > octave-libgccjit
comparison src/ls-oct-ascii.h @ 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 | aabf7a8c2e57 |
comparison
equal
deleted
inserted
replaced
8945:45f8197ffd51 | 8946:e7e928088e90 |
---|---|
27 | 27 |
28 #include <sstream> | 28 #include <sstream> |
29 #include <string> | 29 #include <string> |
30 | 30 |
31 #include "str-vec.h" | 31 #include "str-vec.h" |
32 | |
33 #include "ls-ascii-helper.h" | |
32 | 34 |
33 // Flag for cell elements | 35 // Flag for cell elements |
34 #define CELL_ELT_TAG "<cell-element>" | 36 #define CELL_ELT_TAG "<cell-element>" |
35 | 37 |
36 // Used when converting Inf to something that gnuplot can read. | 38 // Used when converting Inf to something that gnuplot can read. |
101 is.putback (c); | 103 is.putback (c); |
102 if (c != '\n' && c != '\r') | 104 if (c != '\n' && c != '\r') |
103 is >> value; | 105 is >> value; |
104 if (is) | 106 if (is) |
105 status = true; | 107 status = true; |
106 while (is.get (c) && c != '\n' && c != '\r') | 108 skip_until_newline (is, false); |
107 ; // Skip to beginning of next line; | |
108 break; | 109 break; |
109 } | 110 } |
110 else if (next_only) | 111 else if (next_only) |
111 break; | 112 break; |
112 } | 113 } |
163 is.putback (c); | 164 is.putback (c); |
164 if (c != '\n' && c != '\r') | 165 if (c != '\n' && c != '\r') |
165 is >> value; | 166 is >> value; |
166 if (is) | 167 if (is) |
167 status = true; | 168 status = true; |
168 while (is.get (c) && c != '\n' && c != '\r') | 169 skip_until_newline (is, false); |
169 ; // Skip to beginning of next line; | |
170 return status; | 170 return status; |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 if (next_only) | 174 if (next_only) |