Changeset 200fcb3 for libcfa/src/fstream.cfa
- Timestamp:
- Dec 12, 2018, 9:16:12 AM (4 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, 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:
- 5ebb1368
- Parents:
- 3d99498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r3d99498 r200fcb3 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 : 2 8412 // Last Modified On : Wed Dec 12 08:34:28 2018 13 // Update Count : 298 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 nonlManip, 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.nonlManip = nonlManip; 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 getNonl( ofstream & os ) { return os.nonlManip; } 49 void setNonl( ofstream & os, bool state ) { os.nonlManip = 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 … … 147 154 } // fmt 148 155 149 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, " ", ", " };156 static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), true, false, true, false, " ", ", " }; 150 157 ofstream & sout = soutFile; 151 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, " ", ", " };158 static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), true, false, true, false, " ", ", " }; 152 159 ofstream & serr = serrFile; 153 160
Note: See TracChangeset
for help on using the changeset viewer.