Changeset e99e43f for libcfa/src/fstream.cfa
- Timestamp:
- Jan 10, 2019, 3:50:34 PM (5 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- d97c3a4
- Parents:
- aeb8f70 (diff), 08222c7 (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. - git-author:
- Aaron Moss <a3moss@…> (01/10/19 14:46:09)
- git-committer:
- Aaron Moss <a3moss@…> (01/10/19 15:50:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
raeb8f70 re99e43f 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 10 18:19:40201813 // Update Count : 28412 // Last Modified On : Mon Dec 24 18:33:38 2018 13 // Update Count : 304 14 14 // 15 15 … … 20 20 #include <stdarg.h> // varargs 21 21 #include <string.h> // strlen 22 #include <stdbool.h> // true/false23 22 #include <float.h> // DBL_DIG, LDBL_DIG 24 23 #include <complex.h> // creal, cimag … … 27 26 #define IO_MSG "I/O error: " 28 27 29 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, const char * separator, const char * tupleSeparator ) {28 void ?{}( ofstream & os, void * file, bool sepDefault, bool sepOnOff, bool nlOnOff, bool prt, const char * separator, const char * tupleSeparator ) { 30 29 os.file = file; 31 30 os.sepDefault = sepDefault; 32 31 os.sepOnOff = sepOnOff; 32 os.nlOnOff = nlOnOff; 33 os.prt = prt; 33 34 sepSet( os, separator ); 34 35 sepSetCur( os, sepGet( os ) ); … … 44 45 bool getNL( ofstream & os ) { return os.sawNL; } 45 46 void setNL( ofstream & os, bool state ) { os.sawNL = state; } 47 bool getANL( ofstream & os ) { return os.nlOnOff; } 48 bool getPrt( ofstream & os ) { return os.prt; } 49 void setPrt( ofstream & os, bool state ) { os.prt = state; } 46 50 47 51 // public … … 72 76 } // sepEnable 73 77 78 void nlOn( ofstream & os ) { os.nlOnOff = true; } 79 void nlOff( ofstream & os ) { os.nlOnOff = false; } 80 74 81 const char * sepGet( ofstream & os ) { return os.separator; } 75 82 void sepSet( ofstream & os, const char * s ) { … … 103 110 } // if 104 111 #endif // __CFA_DEBUG__ 105 (os){ file, true, false, " ", ", " };112 (os){ file, true, false, true, false, " ", ", " }; 106 113 } // open 107 114 … … 143 150 va_end( args ); 144 151 152 setPrt( os, true ); // called in output cascade 145 153 sepReset( os ); // reset separator 146 154 return len; 147 155 } // fmt 148 156 149 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, " ", ", " };157 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, true, false, " ", ", " }; 150 158 ofstream & sout = soutFile; 151 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, " ", ", " };159 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, true, false, " ", ", " }; 152 160 ofstream & serr = serrFile; 153 161
Note: See TracChangeset
for help on using the changeset viewer.