Changeset 5cb2b8c
- Timestamp:
 - May 16, 2019, 9:38:21 AM (6 years ago)
 - Branches:
 - ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
 - Children:
 - 3c5dee4
 - Parents:
 - e0d19f8
 - Location:
 - libcfa/src
 - Files:
 - 
      
- 2 edited
 
- 
          
  fstream.cfa (modified) (5 diffs)
 - 
          
  fstream.hfa (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
libcfa/src/fstream.cfa
re0d19f8 r5cb2b8c 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 20 12:03:43201913 // Update Count : 3 1112 // Last Modified On : Thu May 16 08:33:28 2019 13 // Update Count : 328 14 14 // 15 15 … … 27 27 #define IO_MSG "I/O error: " 28 28 29 void ?{}( ofstream & os, void * file , bool sepDefault, bool sepOnOff, bool nlOnOff, bool prt, const char * separator, const char * tupleSeparator) {29 void ?{}( ofstream & os, void * file ) { 30 30 os.file = file; 31 os.sepDefault = sepDefault;32 os.sepOnOff = sepOnOff;33 os.nlOnOff = nlOnOff;34 os.prt = prt;31 os.sepDefault = true; 32 os.sepOnOff = false; 33 os.nlOnOff = true; 34 os.prt = false; 35 35 os.sawNL = false; 36 sepSet( os, separator);36 sepSet( os, " " ); 37 37 sepSetCur( os, sepGet( os ) ); 38 sepSetTuple( os, tupleSeparator);38 sepSetTuple( os, ", " ); 39 39 } 40 40 … … 104 104 105 105 void open( ofstream & os, const char * name, const char * mode ) { 106 FILE * file = fopen( name, mode );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 , true, false, true, false, " ", ", "};112 (os){ file }; 113 113 } // open 114 114 … … 152 152 } // fmt 153 153 154 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_) , true, false, true, false, " ", ", "};154 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_) }; 155 155 ofstream & sout = soutFile; 156 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_) , true, false, true, false, " ", ", "};156 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_) }; 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 only 166 else setPrt( os, false ); // turn off 167 } 159 168 160 169 //---------------------------------------  - 
      
libcfa/src/fstream.hfa
re0d19f8 r5cb2b8c 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 20 12:03:58201913 // Update Count : 15 112 // Last Modified On : Thu May 16 08:34:10 2019 13 // Update Count : 157 14 14 // 15 15 … … 70 70 extern ofstream & sout, & serr; 71 71 72 // extern ofstream & sout, & serr, & sexit, & sabort; 73 // void nl( ofstream & os ); 74 72 75 73 76 struct ifstream {  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.