Changeset b431515 for libcfa/src/fstream.cfa
- Timestamp:
- Apr 24, 2021, 11:29:51 AM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- fec63b2
- Parents:
- 85d8153
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r85d8153 rb431515 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 20 19:04:46 202113 // Update Count : 42 512 // Last Modified On : Sat Apr 24 09:05:16 2021 13 // Update Count : 426 14 14 // 15 15 … … 19 19 #include <stdlib.h> // exit 20 20 #include <stdarg.h> // varargs 21 #include <string.h> // strlen 22 #include <float.h> // DBL_DIG, LDBL_DIG 23 #include <complex.h> // creal, cimag 21 #include <string.h> // strncpy, strerror 24 22 #include <assert.h> 25 23 #include <errno.h> // errno … … 93 91 void sepSet( ofstream & os, const char s[] ) { 94 92 assert( s ); 95 strncpy( os.separator$, s, sepSize - 1 );96 os.separator$[ sepSize - 1] = '\0';93 strncpy( os.separator$, s, ofstream_sepSize - 1 ); 94 os.separator$[ofstream_sepSize - 1] = '\0'; 97 95 } // sepSet 98 96 … … 100 98 void sepSetTuple( ofstream & os, const char s[] ) { 101 99 assert( s ); 102 strncpy( os.tupleSeparator$, s, sepSize - 1 );103 os.tupleSeparator$[ sepSize - 1] = '\0';100 strncpy( os.tupleSeparator$, s, ofstream_sepSize - 1 ); 101 os.tupleSeparator$[ofstream_sepSize - 1] = '\0'; 104 102 } // sepSet 105 103 … … 112 110 } // ends 113 111 114 intfail( ofstream & os ) {112 bool fail( ofstream & os ) { 115 113 return os.file$ == 0 || ferror( (FILE *)(os.file$) ); 116 114 } // fail … … 228 226 bool getANL( ifstream & os ) { return os.nlOnOff$; } 229 227 230 intfail( ifstream & is ) {228 bool fail( ifstream & is ) { 231 229 return is.file$ == 0p || ferror( (FILE *)(is.file$) ); 232 230 } // fail
Note: See TracChangeset
for help on using the changeset viewer.