Ignore:
Timestamp:
Apr 24, 2021, 11:29:51 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
fec63b2
Parents:
85d8153
Message:

formatting, rename public enum sepSize to ofstream_sepSize, change return type to bool for function fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.hfa

    r85d8153 rb431515  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Apr 20 19:04:12 2021
    13 // Update Count     : 218
     12// Last Modified On : Sat Apr 24 09:04:03 2021
     13// Update Count     : 219
    1414//
    1515
     
    2424
    2525
    26 enum { sepSize = 16 };
     26enum { ofstream_sepSize = 16 };
    2727struct ofstream {
    2828        void * file$;
     
    3333        bool sawNL$;
    3434        const char * sepCur$;
    35         char separator$[sepSize];
    36         char tupleSeparator$[sepSize];
     35        char separator$[ofstream_sepSize];
     36        char tupleSeparator$[ofstream_sepSize];
    3737        multiple_acquisition_lock lock$;
    3838        bool acquired$;
    3939}; // ofstream
     40
     41// Satisfies ostream
    4042
    4143// private
     
    6466void sepSetTuple( ofstream &, const char [] );
    6567
    66 void ends( ofstream & os );
    67 int fail( ofstream & );
     68void ends( ofstream & );
     69int fmt( ofstream &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
     70
     71bool fail( ofstream & );
    6872int flush( ofstream & );
    6973void open( ofstream &, const char name[], const char mode[] );
     
    7175void close( ofstream & );
    7276ofstream & write( ofstream &, const char data[], size_t size );
    73 int fmt( ofstream &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
    74 void acquire( ofstream & os );
    75 void release( ofstream & os );
     77
     78void acquire( ofstream & );
     79void release( ofstream & );
    7680
    7781struct osacquire {
    7882        ofstream & os;
    7983};
    80 void ?{}( osacquire & acq, ofstream & os );
     84void ?{}( osacquire & acq, ofstream & );
    8185void ^?{}( osacquire & acq );
    8286
    83 void ?{}( ofstream & os );
    84 void ?{}( ofstream & os, const char name[], const char mode[] );
    85 void ?{}( ofstream & os, const char name[] );
    86 void ^?{}( ofstream & os );
     87void ?{}( ofstream & );
     88void ?{}( ofstream &, const char name[], const char mode[] );
     89void ?{}( ofstream &, const char name[] );
     90void ^?{}( ofstream & );
    8791
    8892extern ofstream & sout, & stdout, & serr, & stderr;             // aliases
     
    100104}; // ifstream
    101105
     106// Satisfies istream
     107
    102108// public
    103109void nlOn( ifstream & );
     
    105111bool getANL( ifstream & );
    106112void ends( ifstream & );
    107 int fail( ifstream & is );
     113bool fail( ifstream & is );
    108114int eof( ifstream & is );
    109115void open( ifstream & is, const char name[], const char mode[] );
     
    142148);
    143149
    144 void ?{}( Open_Failure & this, ofstream & ostream );
    145 void ?{}( Open_Failure & this, ifstream & istream );
     150void ?{}( Open_Failure & this, ofstream & );
     151void ?{}( Open_Failure & this, ifstream & );
    146152
    147153// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.