- Timestamp:
- Apr 14, 2025, 9:05:58 PM (5 months ago)
- Branches:
- master
- Children:
- 0d41e600
- Parents:
- 10ef475
- git-author:
- Peter A. Buhr <pabuhr@…> (04/14/25 20:59:04)
- git-committer:
- Peter A. Buhr <pabuhr@…> (04/14/25 21:05:58)
- Location:
- libcfa/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string_res.cfa
r10ef475 r768d091 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 11 18:18:42202513 // Update Count : 1 2912 // Last Modified On : Mon Apr 14 20:45:39 2025 13 // Update Count : 130 14 14 // 15 15 … … 269 269 if ( ! flags.ignore && s != 0p && args == 0 ) s[0] = '\0'; 270 270 if ( args == 1 && eof( is ) ) { // data but scan ended at EOF 271 clear ( is ); // => reset EOF => detect again on next read271 clearerr( is ); // => reset EOF => detect again on next read 272 272 } // if 273 273 return is; -
libcfa/src/fstream.cfa
r10ef475 r768d091 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Oct 1 20:59:45 202413 // Update Count : 58 212 // Last Modified On : Mon Apr 14 20:41:51 2025 13 // Update Count : 583 14 14 // 15 15 … … 109 109 110 110 bool fail( ofstream & os ) { return os.file$ == 0 || ferror( (FILE *)(os.file$) ); } 111 void clear ( ofstream & os ) { clearerr( (FILE *)(os.file$) ); }111 void clearerr( ofstream & os ) { clearerr( (FILE *)(os.file$) ); } 112 112 int flush( ofstream & os ) { return fflush( (FILE *)(os.file$) ); } 113 113 … … 225 225 226 226 bool fail( ifstream & is ) { return is.file$ == 0p || ferror( (FILE *)(is.file$) ); } 227 void clear ( ifstream & is ) { clearerr( (FILE *)(is.file$) ); }227 void clearerr( ifstream & is ) { clearerr( (FILE *)(is.file$) ); } 228 228 229 229 void nlOn( ifstream & os ) { os.nlOnOff$ = true; } -
libcfa/src/fstream.hfa
r10ef475 r768d091 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 12 05:45:50 202413 // Update Count : 27 512 // Last Modified On : Mon Apr 14 20:42:01 2025 13 // Update Count : 276 14 14 // 15 15 … … 74 74 75 75 bool fail( ofstream & ); 76 void clear ( ofstream & );76 void clearerr( ofstream & ); 77 77 int flush( ofstream & ); 78 78 void open( ofstream &, const char name[], const char mode[] ); // FIX ME: use default = "w" … … 122 122 123 123 bool fail( ifstream & is ); 124 void clear ( ifstream & );124 void clearerr( ifstream & ); 125 125 void open( ifstream & is, const char name[], const char mode[] ); // FIX ME: use default = "r" 126 126 void open( ifstream & is, const char name[] ); -
libcfa/src/iostream.cfa
r10ef475 r768d091 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 11 18:19:09202513 // Update Count : 208 012 // Last Modified On : Mon Apr 14 20:43:14 2025 13 // Update Count : 2081 14 14 // 15 15 … … 1026 1026 if ( ! flags.ignore && s != 0p && args == 0 ) s[0] = '\0'; 1027 1027 if ( args == 1 && eof( is ) ) { // data but scan ended at EOF 1028 clear ( is ); // => reset EOF => detect again on next read1028 clearerr( is ); // => reset EOF => detect again on next read 1029 1029 } // if 1030 1030 return is; … … 1131 1131 } // if 1132 1132 if ( args == 1 && eof( is ) ) { // data but scan ended at EOF 1133 clear ( is ); // => reset EOF => detect again on next read1133 clearerr( is ); // => reset EOF => detect again on next read 1134 1134 } // if 1135 1135 return is; … … 1226 1226 if ( eof( is ) ) { 1227 1227 if ( c == 0 ) return is; // no characters read ? 1228 clear ( is ); // => read something => reset EOF => detect again on next read1228 clearerr( is ); // => read something => reset EOF => detect again on next read 1229 1229 break; 1230 1230 } // if -
libcfa/src/iostream.hfa
r10ef475 r768d091 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 11 18:11:25202513 // Update Count : 76 612 // Last Modified On : Mon Apr 14 20:42:53 2025 13 // Update Count : 767 14 14 // 15 15 … … 55 55 trait ostream { 56 56 bool fail( ostype & ); // operation failed? 57 void clear ( ostype & );57 void clearerr( ostype & ); 58 58 int flush( ostype & ); 59 59 void open( ostype &, const char name[], const char mode[] ); … … 318 318 istype & ungetc( char, istype & ); 319 319 bool eof( istype & ); 320 void clear ( istype & );320 void clearerr( istype & ); 321 321 }; // basic_istream 322 322 -
libcfa/src/strstream.cfa
r10ef475 r768d091 10 10 // Created On : Thu Apr 22 22:24:35 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 12 05:45:47 202413 // Update Count : 11 312 // Last Modified On : Mon Apr 14 20:45:00 2025 13 // Update Count : 116 14 14 // 15 15 … … 145 145 void nlOff( istrstream & is ) { is.nlOnOff$ = false; } 146 146 147 void ends( istrstream & is ) {}148 bool eof( istrstream & is ) { return false; }149 150 147 int fmt( istrstream & is, const char format[], ... ) with(is) { 151 148 va_list args; … … 173 170 } // ungetc 174 171 172 bool eof( istrstream & is ) { return false; } 173 void clearerr( istrstream & ) {} // no error flags to clear 174 void ends( istrstream & is ) {} 175 175 176 // Local Variables: // 176 177 // tab-width: 4 // -
libcfa/src/strstream.hfa
r10ef475 r768d091 10 10 // Created On : Thu Apr 22 22:20:59 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 12 05:45:48 202413 // Update Count : 5612 // Last Modified On : Mon Apr 14 20:57:15 2025 13 // Update Count : 61 14 14 // 15 15 … … 78 78 79 79 80 // Currently, this is a placeholder because vsscanf returns number of values read versus buffer position scanned. 81 // This issue makes it impossible to know where in the buffer the last read stopped. 82 80 83 struct istrstream { 81 84 char * buf$; … … 83 86 bool nlOnOff$; 84 87 }; // istrstream 88 89 void ?{}( istrstream &, char buf[] ); 85 90 86 91 // Satisfies basic_istream … … 93 98 void nlOn( istrstream & ); 94 99 void nlOff( istrstream & ); 95 void ends( istrstream & );96 97 100 int fmt( istrstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) )); 98 101 istrstream & ungetc( char, istrstream & ); 99 102 bool eof( istrstream & ); 100 101 void ?{}( istrstream &, char buf[]);103 void clearerr( istrstream & ); 104 void ends( istrstream & ); 102 105 103 106 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.