aboutsummaryrefslogtreecommitdiff
path: root/src/tafreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tafreader.cpp')
-rw-r--r--src/tafreader.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/tafreader.cpp b/src/tafreader.cpp
index 7bb0933..4408cce 100644
--- a/src/tafreader.cpp
+++ b/src/tafreader.cpp
@@ -209,15 +209,32 @@ void Bu::TafReader::next()
209 iCol++; 209 iCol++;
210 if( c == '}' ) 210 if( c == '}' )
211 { 211 {
212 sIn.read( &c, 1 ); 212 rawread( &c );
213 if( c != '}' ) 213 if( c != '}' )
214 sIn.read( &la, 1 ); 214 rawread( &la );
215 } 215 }
216 else 216 else
217 { 217 {
218 c = la; 218 c = la;
219 if( c != '}' ) 219 if( c != '}' )
220 sIn.read( &la, 1 ); 220 rawread( &la );
221 }
222}
223
224void Bu::TafReader::rawread( char *c )
225{
226 if( sIn.read( c, 1 ) < 1 )
227 {
228 if( sIn.isEOS() )
229 {
230 throw TafException("%d:%d: Premature end of stream.",
231 iLine, iCol, c );
232 }
233 else
234 {
235 throw TafException("%d:%d: No data read, but not end of stream?",
236 iLine, iCol, c );
237 }
221 } 238 }
222} 239}
223 240