Changeset 0f9e4403 for src/libcfa/fstream
- Timestamp:
- Apr 15, 2016, 12:03:11 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
- 29ad0ac
- Parents:
- c5833e8 (diff), 37f0da8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/fstream
rc5833e8 r0f9e4403 7 7 // fstream -- 8 8 // 9 // Author : Richard C. Bilson9 // Author : Peter A. Buhr 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 17 14:02:01201613 // Update Count : 2212 // Last Modified On : Tue Apr 5 22:37:12 2016 13 // Update Count : 82 14 14 // 15 15 … … 19 19 #include "iostream" 20 20 21 // implement context ostream 22 struct ofstream; 21 enum { separateSize = 16 }; 22 struct ofstream { 23 void *file; 24 _Bool sepDefault; 25 _Bool sepOnOff; 26 char separator[separateSize]; 27 }; // ofstream 23 28 24 int fail( ofstream * os ); 25 int flush( ofstream * os ); 26 void open( ofstream ** os, const char * name, const char * mode ); 27 void close( ofstream * os ); 28 ofstream * write( ofstream * os, const char * data, streamsize_type size ); 29 _Bool sepPrt( ofstream * ); 30 void sepOn( ofstream * ); 31 void sepOff( ofstream * ); 32 void sepReset( ofstream * ); 33 void sepReset( ofstream *, _Bool ); 34 void sepSet( ofstream *, const char * ); 35 const char * sepGet( ofstream * ); 36 _Bool sepDisable( ofstream * ); 37 _Bool sepEnable( ofstream * ); 38 int fail( ofstream * ); 39 int flush( ofstream * ); 40 void open( ofstream *, const char * name, const char * mode ); 41 void close( ofstream * ); 42 ofstream * write( ofstream *, const char * data, unsigned long int size ); 43 int prtfmt( ofstream *, const char fmt[], ... ); 29 44 30 45 extern ofstream * sout, * serr; 31 46 32 47 // implement context istream 33 struct ifstream; 48 struct ifstream { 49 void *file; 50 }; // ifstream 34 51 35 52 int fail( ifstream * is ); 36 53 int eof( ifstream * is ); 37 void open( ifstream * *is, const char * name, const char * mode );54 void open( ifstream * is, const char * name, const char * mode ); 38 55 void close( ifstream * is ); 39 ifstream * get( ifstream * is, int * data ); 40 ifstream * read( ifstream * is, char * data, streamsize_type size ); 56 ifstream * read( ifstream * is, char * data, unsigned long int size ); 41 57 ifstream * ungetc( ifstream * is, char c ); 58 int scanfmt( ifstream *, const char fmt[], ... ); 42 59 43 60 extern ifstream *sin; … … 49 66 // tab-width: 4 // 50 67 // End: // 68
Note:
See TracChangeset
for help on using the changeset viewer.