Changeset decd4a6
- Timestamp:
- Nov 18, 2023, 7:41:47 AM (13 months ago)
- Branches:
- master
- Children:
- 8c13ca8
- Parents:
- f7f997a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
rf7f997a rdecd4a6 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Oct 18 22:05:54 202313 // Update Count : 5 4912 // Last Modified On : Wed Nov 15 10:51:14 2023 13 // Update Count : 552 14 14 // 15 15 … … 295 295 va_start( args, format ); 296 296 297 int len;297 int nargs; 298 298 for () { // no check for EINTR limit waiting for keyboard input 299 299 errno = 0; 300 300 disable_interrupts(); 301 len= vfscanf( (FILE *)(is.file$), format, args );301 nargs = vfscanf( (FILE *)(is.file$), format, args ); 302 302 enable_interrupts(); 303 if ( len!= EOF || errno != EINTR ) break; // timer interrupt ?304 } // for 305 if ( len == EOF ) {// EOF or matching failure ?303 if ( nargs != EOF || errno != EINTR ) break; // timer interrupt ? 304 } // for 305 if ( nargs == EOF ) { // EOF or matching failure ? 306 306 if ( ! feof( (FILE *)(is.file$) ) && ferror( (FILE *)(is.file$) ) ) { 307 307 abort | IO_MSG "invalid read"; … … 309 309 } // if 310 310 va_end( args ); 311 // if ( len == 0 ) throw ExceptionInst( missing_data ); 312 return len; 311 return nargs; 313 312 } // fmt 314 313 … … 323 322 324 323 // exception I/O constructors 325 void ?{}( open_failure & ex, ofstream & ostream ) with( ex) {324 void ?{}( open_failure & ex, ofstream & ostream ) with( ex ) { 326 325 virtual_table = &open_failure_vt; 327 326 ostream = &ostream; … … 329 328 } // ?{} 330 329 331 void ?{}( open_failure & ex, ifstream & istream ) with( ex) {330 void ?{}( open_failure & ex, ifstream & istream ) with( ex ) { 332 331 virtual_table = &open_failure_vt; 333 332 istream = &istream; … … 339 338 340 339 // exception I/O constructors 341 void ?{}( close_failure & ex, ofstream & ostream ) with( ex) {340 void ?{}( close_failure & ex, ofstream & ostream ) with( ex ) { 342 341 virtual_table = &close_failure_vt; 343 342 ostream = &ostream; … … 345 344 } // ?{} 346 345 347 void ?{}( close_failure & ex, ifstream & istream ) with( ex) {346 void ?{}( close_failure & ex, ifstream & istream ) with( ex ) { 348 347 virtual_table = &close_failure_vt; 349 348 istream = &istream; … … 355 354 356 355 // exception I/O constructors 357 void ?{}( write_failure & ex, ofstream & ostream ) with( ex) {356 void ?{}( write_failure & ex, ofstream & ostream ) with( ex ) { 358 357 virtual_table = &write_failure_vt; 359 358 ostream = &ostream; … … 361 360 } // ?{} 362 361 363 void ?{}( write_failure & ex, ifstream & istream ) with( ex) {362 void ?{}( write_failure & ex, ifstream & istream ) with( ex ) { 364 363 virtual_table = &write_failure_vt; 365 364 istream = &istream; … … 371 370 372 371 // exception I/O constructors 373 void ?{}( read_failure & ex, ofstream & ostream ) with( ex) {372 void ?{}( read_failure & ex, ofstream & ostream ) with( ex ) { 374 373 virtual_table = &read_failure_vt; 375 374 ostream = &ostream; … … 377 376 } // ?{} 378 377 379 void ?{}( read_failure & ex, ifstream & istream ) with( ex) {378 void ?{}( read_failure & ex, ifstream & istream ) with( ex ) { 380 379 virtual_table = &read_failure_vt; 381 380 istream = &istream;
Note: See TracChangeset
for help on using the changeset viewer.