Changes in libcfa/src/fstream.cfa [39eb23b0:ae0c1c3]
- File:
-
- 1 edited
-
libcfa/src/fstream.cfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r39eb23b0 rae0c1c3 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 14 21:12:05 202613 // Update Count : 5 9612 // Last Modified On : Mon Apr 14 20:41:51 2025 13 // Update Count : 583 14 14 // 15 15 … … 63 63 // public 64 64 void ?{}( ofstream & os ) { os.file$ = 0p; } 65 void ?{}( ofstream & os, const char name[], const char mode[] ) { os{}; open( os, name, mode ); } 65 void ?{}( ofstream & os, const char name[], const char mode[] ) { open( os, name, mode ); } 66 void ?{}( ofstream & os, const char name[] ) { open( os, name, "w" ); } 66 67 void ^?{}( ofstream & os ) { close( os ); } 67 68 … … 123 124 // abort | IO_MSG "open output file \"" | name | "\"" | nl | strerror( errno ); 124 125 } // if 125 os{ file };// initialize126 (os){ file }; // initialize 126 127 } // open 127 128 128 //void open( ofstream & os, const char name[] ) { open( os, name, "w" ); }129 void open( ofstream & os, const char name[] ) { open( os, name, "w" ); } 129 130 130 131 void close( ofstream & os ) with( os ) { … … 308 309 ifstream_data.fail = fail; 309 310 ifstream_data.open = (void(*)(ifstream &, const char *, const char *))open; 310 //ifstream_data.open = (void(*)(ifstream &, const char *))open;311 ifstream_data.open = (void(*)(ifstream &, const char *))open; 311 312 ifstream_data.close = close; 312 313 ifstream_data.read = read; … … 323 324 // public 324 325 void ?{}( ifstream & is ) { is.file$ = 0p; } 325 void ?{}( ifstream & is, const char name[], const char mode[] ) { is{}; open( is, name, mode ); } 326 void ?{}( ifstream & is, const char name[], const char mode[] ) { open( is, name, mode ); } 327 void ?{}( ifstream & is, const char name[] ) { open( is, name, "r" ); } 326 328 void ^?{}( ifstream & is ) { close( is ); } 327 329 … … 334 336 bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ) != 0; } 335 337 336 void open( ifstream & is, const char name[], const char mode[] = "r") {338 void open( ifstream & is, const char name[], const char mode[] ) { 337 339 FILE * file; 338 340 for ( cnt; 10 ) { … … 346 348 // abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno ); 347 349 } // if 348 is{ file };// initialize350 (is){ file }; // initialize 349 351 } // open 350 352 351 //void open( ifstream & is, const char name[] ) { open( is, name, "r" ); }353 void open( ifstream & is, const char name[] ) { open( is, name, "r" ); } 352 354 353 355 void close( ifstream & is ) with( is ) {
Note:
See TracChangeset
for help on using the changeset viewer.