Ignore:
Timestamp:
Apr 29, 2021, 4:26:37 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
34b2796, 63a4b92
Parents:
c993b15 (diff), 2d8a770 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    rc993b15 r3eb55f98  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Apr 27 22:08:57 2021
    13 // Update Count     : 442
     12// Last Modified On : Wed Apr 28 20:37:53 2021
     13// Update Count     : 445
    1414//
    1515
     
    114114} // fail
    115115
     116void clear( ofstream & os ) {
     117        clearerr( (FILE *)(os.file$) );
     118} // clear
     119
    116120int flush( ofstream & os ) {
    117121        return fflush( (FILE *)(os.file$) );
     
    207211} // nl
    208212
     213
    209214// *********************************** ifstream ***********************************
    210215
     
    240245} // fail
    241246
     247void clear( ifstream & is ) {
     248        clearerr( (FILE *)(is.file$) );
     249} // clear
     250
    242251void ends( ifstream & is ) {
    243252        if ( is.acquired$ ) { is.acquired$ = false; release( is ); }
    244253} // ends
    245254
    246 int eof( ifstream & is ) {
     255bool eof( ifstream & is ) {
    247256        return feof( (FILE *)(is.file$) );
    248257} // eof
     
    273282} // close
    274283
    275 ifstream & read( ifstream & is, char * data, size_t size ) {
     284ifstream & read( ifstream & is, char data[], size_t size ) {
    276285        if ( fail( is ) ) {
    277286                abort | IO_MSG "attempt read I/O on failed stream";
Note: See TracChangeset for help on using the changeset viewer.