Changeset 39eb23b0 for libcfa/src
- Timestamp:
- Jan 14, 2026, 9:21:02 PM (2 weeks ago)
- Branches:
- master, stuck-waitfor-destruct
- Children:
- a2940184
- Parents:
- 4904b05
- Location:
- libcfa/src
- Files:
-
- 2 edited
-
fstream.cfa (modified) (7 diffs)
-
fstream.hfa (modified) (4 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 ) { -
libcfa/src/fstream.hfa
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:42:01 202513 // Update Count : 2 7612 // Last Modified On : Wed Jan 14 21:11:16 2026 13 // Update Count : 280 14 14 // 15 15 … … 78 78 void clearerr( ofstream & ); 79 79 int flush( ofstream & ); 80 void open( ofstream &, const char name[], const char mode[] ); // FIX ME: use default = "w" 81 void open( ofstream &, const char name[] ); 80 void open( ofstream &, const char name[], const char mode[] = "w" ); 82 81 void close( ofstream & ); 83 82 … … 85 84 86 85 void ?{}( ofstream & ); 87 void ?{}( ofstream &, const char name[], const char mode[] ); // FIX ME: use default = "w" 88 void ?{}( ofstream &, const char name[] ); 86 void ?{}( ofstream &, const char name[], const char mode[] = "w" ); 89 87 void ^?{}( ofstream & ); 90 88 … … 127 125 bool fail( ifstream & is ); 128 126 void clearerr( ifstream & ); 129 void open( ifstream & is, const char name[], const char mode[] ); // FIX ME: use default = "r" 130 void open( ifstream & is, const char name[] ); 127 void open( ifstream & is, const char name[], const char mode[] = "r" ); 131 128 void close( ifstream & is ); 132 129 ifstream & read( ifstream & is, char data[], size_t size ); 133 130 134 131 void ?{}( ifstream & is ); 135 void ?{}( ifstream & is, const char name[], const char mode[] ); // FIX ME: use default = "r" 136 void ?{}( ifstream & is, const char name[] ); 132 void ?{}( ifstream & is, const char name[], const char mode[] = "r" ); 137 133 void ^?{}( ifstream & is ); 138 134
Note:
See TracChangeset
for help on using the changeset viewer.