Changeset 00e9be9 for libcfa/src/fstream.cfa
- Timestamp:
- Apr 28, 2021, 9:29:07 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 99b2407
- Parents:
- c7015e6b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
rc7015e6b r00e9be9 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 27 22:08:57202113 // Update Count : 44 212 // Last Modified On : Wed Apr 28 20:37:53 2021 13 // Update Count : 445 14 14 // 15 15 … … 114 114 } // fail 115 115 116 void clear( ofstream & os ) { 117 clearerr( (FILE *)(os.file$) ); 118 } // clear 119 116 120 int flush( ofstream & os ) { 117 121 return fflush( (FILE *)(os.file$) ); … … 207 211 } // nl 208 212 213 209 214 // *********************************** ifstream *********************************** 210 215 … … 240 245 } // fail 241 246 247 void clear( ifstream & is ) { 248 clearerr( (FILE *)(is.file$) ); 249 } // clear 250 242 251 void ends( ifstream & is ) { 243 252 if ( is.acquired$ ) { is.acquired$ = false; release( is ); } 244 253 } // ends 245 254 246 inteof( ifstream & is ) {255 bool eof( ifstream & is ) { 247 256 return feof( (FILE *)(is.file$) ); 248 257 } // eof … … 273 282 } // close 274 283 275 ifstream & read( ifstream & is, char * data, size_t size ) {284 ifstream & read( ifstream & is, char data[], size_t size ) { 276 285 if ( fail( is ) ) { 277 286 abort | IO_MSG "attempt read I/O on failed stream";
Note: See TracChangeset
for help on using the changeset viewer.