Changeset decd4a6 for libcfa


Ignore:
Timestamp:
Nov 18, 2023, 7:41:47 AM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
8c13ca8
Parents:
f7f997a
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    rf7f997a rdecd4a6  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 22:05:54 2023
    13 // Update Count     : 549
     12// Last Modified On : Wed Nov 15 10:51:14 2023
     13// Update Count     : 552
    1414//
    1515
     
    295295        va_start( args, format );
    296296
    297         int len;
     297        int nargs;
    298298    for () {                                                                                    // no check for EINTR limit waiting for keyboard input
    299299                errno = 0;
    300300                disable_interrupts();
    301                 len = vfscanf( (FILE *)(is.file$), format, args );
     301                nargs = vfscanf( (FILE *)(is.file$), format, args );
    302302                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 ?
    306306                if ( ! feof( (FILE *)(is.file$) ) && ferror( (FILE *)(is.file$) ) ) {
    307307                        abort | IO_MSG "invalid read";
     
    309309        } // if
    310310        va_end( args );
    311 //      if ( len == 0 ) throw ExceptionInst( missing_data );
    312         return len;
     311        return nargs;
    313312} // fmt
    314313
     
    323322
    324323// exception I/O constructors
    325 void ?{}( open_failure & ex, ofstream & ostream ) with(ex) {
     324void ?{}( open_failure & ex, ofstream & ostream ) with( ex ) {
    326325        virtual_table = &open_failure_vt;
    327326        ostream = &ostream;
     
    329328} // ?{}
    330329
    331 void ?{}( open_failure & ex, ifstream & istream ) with(ex) {
     330void ?{}( open_failure & ex, ifstream & istream ) with( ex ) {
    332331        virtual_table = &open_failure_vt;
    333332        istream = &istream;
     
    339338
    340339// exception I/O constructors
    341 void ?{}( close_failure & ex, ofstream & ostream ) with(ex) {
     340void ?{}( close_failure & ex, ofstream & ostream ) with( ex ) {
    342341        virtual_table = &close_failure_vt;
    343342        ostream = &ostream;
     
    345344} // ?{}
    346345
    347 void ?{}( close_failure & ex, ifstream & istream ) with(ex) {
     346void ?{}( close_failure & ex, ifstream & istream ) with( ex ) {
    348347        virtual_table = &close_failure_vt;
    349348        istream = &istream;
     
    355354
    356355// exception I/O constructors
    357 void ?{}( write_failure & ex, ofstream & ostream ) with(ex) {
     356void ?{}( write_failure & ex, ofstream & ostream ) with( ex ) {
    358357        virtual_table = &write_failure_vt;
    359358        ostream = &ostream;
     
    361360} // ?{}
    362361
    363 void ?{}( write_failure & ex, ifstream & istream ) with(ex) {
     362void ?{}( write_failure & ex, ifstream & istream ) with( ex ) {
    364363        virtual_table = &write_failure_vt;
    365364        istream = &istream;
     
    371370
    372371// exception I/O constructors
    373 void ?{}( read_failure & ex, ofstream & ostream ) with(ex) {
     372void ?{}( read_failure & ex, ofstream & ostream ) with( ex ) {
    374373        virtual_table = &read_failure_vt;
    375374        ostream = &ostream;
     
    377376} // ?{}
    378377
    379 void ?{}( read_failure & ex, ifstream & istream ) with(ex) {
     378void ?{}( read_failure & ex, ifstream & istream ) with( ex ) {
    380379        virtual_table = &read_failure_vt;
    381380        istream = &istream;
Note: See TracChangeset for help on using the changeset viewer.