Changes in libcfa/src/fstream.cfa [5cb2b8c:0efb269]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r5cb2b8c r0efb269 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu May 16 08:33:28201913 // Update Count : 3 2812 // Last Modified On : Sat Apr 20 12:03:43 2019 13 // Update Count : 311 14 14 // 15 15 … … 27 27 #define IO_MSG "I/O error: " 28 28 29 void ?{}( ofstream & os, void * file ) {29 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, bool nlOnOff, bool prt, const char * separator, const char * tupleSeparator ) { 30 30 os.file = file; 31 os.sepDefault = true;32 os.sepOnOff = false;33 os.nlOnOff = true;34 os.prt = false;31 os.sepDefault = sepDefault; 32 os.sepOnOff = sepOnOff; 33 os.nlOnOff = nlOnOff; 34 os.prt = prt; 35 35 os.sawNL = false; 36 sepSet( os, " ");36 sepSet( os, separator ); 37 37 sepSetCur( os, sepGet( os ) ); 38 sepSetTuple( os, ", ");38 sepSetTuple( os, tupleSeparator ); 39 39 } 40 40 … … 104 104 105 105 void open( ofstream & os, const char * name, const char * mode ) { 106 FILE * 106 FILE *file = fopen( name, mode ); 107 107 #ifdef __CFA_DEBUG__ 108 108 if ( file == 0 ) { … … 110 110 } // if 111 111 #endif // __CFA_DEBUG__ 112 (os){ file };112 (os){ file, true, false, true, false, " ", ", " }; 113 113 } // open 114 114 … … 152 152 } // fmt 153 153 154 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_) };154 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, true, false, " ", ", " }; 155 155 ofstream & sout = soutFile; 156 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_) };156 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, true, false, " ", ", " }; 157 157 ofstream & serr = serrFile; 158 158 159 // static ofstream sexitFile = { (FILE *)(&_IO_2_1_stdout_) };160 // ofstream & sexit = sexitFile;161 // static ofstream sabortFile = { (FILE *)(&_IO_2_1_stderr_) };162 // ofstream & sabort = sabortFile;163 164 void nl( ofstream & os ) {165 if ( getANL( os ) ) (ofstream &)(nl( os )); // implementation only166 else setPrt( os, false ); // turn off167 }168 159 169 160 //---------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.