Changeset 5a95560
- Timestamp:
- Jan 19, 2026, 11:24:34 AM (2 weeks ago)
- Branches:
- master
- Children:
- 9d3dc40
- Parents:
- fb7c9168 (diff), a2940184 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- libcfa/src
- Files:
-
- 3 edited
-
fstream.cfa (modified) (7 diffs)
-
fstream.hfa (modified) (4 diffs)
-
iostream.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
rfb7c9168 r5a95560 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
rfb7c9168 r5a95560 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 -
libcfa/src/iostream.hfa
rfb7c9168 r5a95560 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Sep 13 16:10:27 202513 // Update Count : 77 112 // Last Modified On : Wed Jan 14 21:23:53 2026 13 // Update Count : 772 14 14 // 15 15 … … 27 27 void (*sepReset$)( ostype & ); // set separator state to default state 28 28 void (*sepReset$)( ostype &, bool ); // set separator and default state 29 const char * (*sepGetCur$)( ostype & ); // get current separator string29 const char * (*sepGetCur$)( ostype & ); // get current separator string 30 30 void (*sepSetCur$)( ostype &, const char [] ); // set current separator string 31 bool (*getNL$)( ostype & ); // get newline31 bool (*getNL$)( ostype & ); // get newline 32 32 bool (*setNL$)( ostype &, bool ); // set newline 33 33 bool (*getANL$)( ostype & ); // get auto newline (on/off) … … 42 42 void (*nosep)( ostype & ); // turn separator state off 43 43 bool (*sepOn)( ostype & ); // set default state to on, and return previous state 44 bool (*sepOff)( ostype & ); // set default state to off, and return previous state45 const char * (*sepGet)( ostype & ); // get separator string44 bool (*sepOff)( ostype & ); // set default state to off, and return previous state 45 const char * (*sepGet)( ostype & ); // get separator string 46 46 void (*sepSet)( ostype &, const char [] ); // set separator to string (15 character maximum) 47 47 const char * (*sepGetTuple)( ostype & ); // get tuple separator string 48 void (*sepSetTuple)( ostype &, const char [] ); // set tuple separator to string (15 character maximum)48 void (*sepSetTuple)( ostype &, const char [] ); // set tuple separator to string (15 character maximum) 49 49 50 50 void (*ends)( ostype & ); // end of output statement
Note:
See TracChangeset
for help on using the changeset viewer.