Changes in libcfa/src/fstream.cfa [b431515:6c5d92f]
- File:
-
- 1 edited
-
libcfa/src/fstream.cfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
rb431515 r6c5d92f 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 24 09:05:16 202113 // Update Count : 42 612 // Last Modified On : Tue Apr 20 19:04:46 2021 13 // Update Count : 425 14 14 // 15 15 … … 19 19 #include <stdlib.h> // exit 20 20 #include <stdarg.h> // varargs 21 #include <string.h> // strncpy, strerror 21 #include <string.h> // strlen 22 #include <float.h> // DBL_DIG, LDBL_DIG 23 #include <complex.h> // creal, cimag 22 24 #include <assert.h> 23 25 #include <errno.h> // errno … … 91 93 void sepSet( ofstream & os, const char s[] ) { 92 94 assert( s ); 93 strncpy( os.separator$, s, ofstream_sepSize - 1 );94 os.separator$[ ofstream_sepSize - 1] = '\0';95 strncpy( os.separator$, s, sepSize - 1 ); 96 os.separator$[sepSize - 1] = '\0'; 95 97 } // sepSet 96 98 … … 98 100 void sepSetTuple( ofstream & os, const char s[] ) { 99 101 assert( s ); 100 strncpy( os.tupleSeparator$, s, ofstream_sepSize - 1 );101 os.tupleSeparator$[ ofstream_sepSize - 1] = '\0';102 strncpy( os.tupleSeparator$, s, sepSize - 1 ); 103 os.tupleSeparator$[sepSize - 1] = '\0'; 102 104 } // sepSet 103 105 … … 110 112 } // ends 111 113 112 boolfail( ofstream & os ) {114 int fail( ofstream & os ) { 113 115 return os.file$ == 0 || ferror( (FILE *)(os.file$) ); 114 116 } // fail … … 226 228 bool getANL( ifstream & os ) { return os.nlOnOff$; } 227 229 228 boolfail( ifstream & is ) {230 int fail( ifstream & is ) { 229 231 return is.file$ == 0p || ferror( (FILE *)(is.file$) ); 230 232 } // fail
Note:
See TracChangeset
for help on using the changeset viewer.