Changeset 5d125e4 for src/libcfa
- Timestamp:
- Jul 15, 2016, 10:16:47 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 873ffb7
- Parents:
- 5ed9061
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/fstream.c
r5ed9061 r5d125e4 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed May 27 17:56:53 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon May 02 15:14:52201613 // Update Count : 18 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 15 13:35:29 2016 13 // Update Count : 188 14 14 // 15 15 … … 92 92 93 93 int prtfmt( ofstream * os, const char fmt[], ... ) { 94 95 96 94 va_list args; 95 va_start( args, fmt ); 96 int len = vfprintf( (FILE *)(os->file), fmt, args ); 97 97 if ( len == EOF ) { 98 98 if ( ferror( (FILE *)(os->file) ) ) { … … 101 101 } // if 102 102 } // if 103 103 va_end( args ); 104 104 105 105 sepReset( os ); // reset separator … … 170 170 171 171 int scanfmt( ifstream * is, const char fmt[], ... ) { 172 172 va_list args; 173 173 174 175 174 va_start( args, fmt ); 175 int len = vfscanf( (FILE *)(is->file), fmt, args ); 176 176 if ( len == EOF ) { 177 177 if ( ferror( (FILE *)(is->file) ) ) { … … 180 180 } // if 181 181 } // if 182 182 va_end( args ); 183 183 return len; 184 184 } // prtfmt
Note: See TracChangeset
for help on using the changeset viewer.