Changeset 39eb23b0 for libcfa/src/fstream.cfa
- Timestamp:
- Jan 14, 2026, 9:21:02 PM (2 weeks ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- a2940184
- Parents:
- 4904b05
- File:
-
- 1 edited
-
libcfa/src/fstream.cfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r4904b05 r39eb23b0 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Apr 14 20:41:51 202513 // Update Count : 5 8312 // Last Modified On : Wed Jan 14 21:12:05 2026 13 // Update Count : 596 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[] ) { open( os, name, mode ); } 66 void ?{}( ofstream & os, const char name[] ) { open( os, name, "w" ); } 65 void ?{}( ofstream & os, const char name[], const char mode[] ) { os{}; open( os, name, mode ); } 67 66 void ^?{}( ofstream & os ) { close( os ); } 68 67 … … 124 123 // abort | IO_MSG "open output file \"" | name | "\"" | nl | strerror( errno ); 125 124 } // if 126 (os){ file };// initialize125 os{ file }; // initialize 127 126 } // open 128 127 129 void open( ofstream & os, const char name[] ) { open( os, name, "w" ); }128 //void open( ofstream & os, const char name[] ) { open( os, name, "w" ); } 130 129 131 130 void close( ofstream & os ) with( os ) { … … 309 308 ifstream_data.fail = fail; 310 309 ifstream_data.open = (void(*)(ifstream &, const char *, const char *))open; 311 ifstream_data.open = (void(*)(ifstream &, const char *))open;310 // ifstream_data.open = (void(*)(ifstream &, const char *))open; 312 311 ifstream_data.close = close; 313 312 ifstream_data.read = read; … … 324 323 // public 325 324 void ?{}( ifstream & is ) { is.file$ = 0p; } 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" ); } 325 void ?{}( ifstream & is, const char name[], const char mode[] ) { is{}; open( is, name, mode ); } 328 326 void ^?{}( ifstream & is ) { close( is ); } 329 327 … … 336 334 bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ) != 0; } 337 335 338 void open( ifstream & is, const char name[], const char mode[] ) {336 void open( ifstream & is, const char name[], const char mode[] = "r" ) { 339 337 FILE * file; 340 338 for ( cnt; 10 ) { … … 348 346 // abort | IO_MSG "open input file \"" | name | "\"" | nl | strerror( errno ); 349 347 } // if 350 (is){ file };// initialize348 is{ file }; // initialize 351 349 } // open 352 350 353 void open( ifstream & is, const char name[] ) { open( is, name, "r" ); }351 //void open( ifstream & is, const char name[] ) { open( is, name, "r" ); } 354 352 355 353 void close( ifstream & is ) with( is ) {
Note:
See TracChangeset
for help on using the changeset viewer.