Changeset 90c3b1c for src/libcfa/fstream
- Timestamp:
- Mar 2, 2016, 4:59:19 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, string, with_gc
- Children:
- bdad1679
- Parents:
- ac1ed49
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/fstream
rac1ed49 r90c3b1c 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 : Wed Mar 2 15:08:14 2016 13 // Update Count : 78 14 14 // 15 15 … … 19 19 #include "iostream" 20 20 21 // implement context ostream 22 struct ofstream ;21 enum { separateSize = 16 }; 22 struct ofstream { void *file; int separate; char separator[separateSize]; }; 23 23 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 ); 24 _Bool sepPrt( ofstream * ); 25 void sepOn( ofstream * ); 26 void sepOff( ofstream * ); 27 void sepSet( ofstream *, const char * ); 28 const char * sepGet( ofstream * ); 29 void sepDisable( ofstream * ); 30 void sepEnable( ofstream * ); 31 int fail( ofstream * ); 32 int flush( ofstream * ); 33 void open( ofstream *, const char * name, const char * mode ); 34 void close( ofstream * ); 35 ofstream * write( ofstream *, const char * data, unsigned long int size ); 36 int prtfmt( ofstream *, const char fmt[], ... ); 29 37 30 38 extern ofstream * sout, * serr; 31 39 32 40 // implement context istream 33 struct ifstream ;41 struct ifstream { void *file; }; 34 42 35 43 int fail( ifstream * is ); 36 44 int eof( ifstream * is ); 37 void open( ifstream * *is, const char * name, const char * mode );45 void open( ifstream * is, const char * name, const char * mode ); 38 46 void close( ifstream * is ); 39 ifstream * get( ifstream * is, int * data ); 40 ifstream * read( ifstream * is, char * data, streamsize_type size ); 47 ifstream * read( ifstream * is, char * data, unsigned long int size ); 41 48 ifstream * ungetc( ifstream * is, char c ); 49 int scanfmt( ifstream *, const char fmt[], ... ); 42 50 43 51 extern ifstream *sin; … … 49 57 // tab-width: 4 // 50 58 // End: // 59
Note: See TracChangeset
for help on using the changeset viewer.