comparison src/ls-oct-ascii.h @ 8087:7d19f4f70c61

ls-oct-ascii.{h,cc} (extract_keyword): accept \r as line ending character
author John W. Eaton <jwe@octave.org>
date Mon, 08 Sep 2008 12:45:53 -0400
parents a1dbe9d80eee
children ebf6f6a0f9a7 278afaecddd4
comparison
equal deleted inserted replaced
8086:83646120b54c 8087:7d19f4f70c61
97 { 97 {
98 while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) 98 while (is.get (c) && (c == ' ' || c == '\t' || c == ':'))
99 ; // Skip whitespace and the colon. 99 ; // Skip whitespace and the colon.
100 100
101 is.putback (c); 101 is.putback (c);
102 if (c != '\n') 102 if (c != '\n' && c != '\r')
103 is >> value; 103 is >> value;
104 if (is) 104 if (is)
105 status = true; 105 status = true;
106 while (is.get (c) && c != '\n') 106 while (is.get (c) && c != '\n' && c != '\r')
107 ; // Skip to beginning of next line; 107 ; // Skip to beginning of next line;
108 break; 108 break;
109 } 109 }
110 else if (next_only) 110 else if (next_only)
111 break; 111 break;
159 159
160 while (is.get (c) && (c == ' ' || c == '\t' || c == ':')) 160 while (is.get (c) && (c == ' ' || c == '\t' || c == ':'))
161 ; // Skip whitespace and the colon. 161 ; // Skip whitespace and the colon.
162 162
163 is.putback (c); 163 is.putback (c);
164 if (c != '\n') 164 if (c != '\n' && c != '\r')
165 is >> value; 165 is >> value;
166 if (is) 166 if (is)
167 status = true; 167 status = true;
168 while (is.get (c) && c != '\n') 168 while (is.get (c) && c != '\n' && c != '\r')
169 ; // Skip to beginning of next line; 169 ; // Skip to beginning of next line;
170 return status; 170 return status;
171 } 171 }
172 } 172 }
173 173