Changeset b826e6b for src/libcfa/iostream
- Timestamp:
- Jul 19, 2017, 11:49:33 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 9cc0472
- Parents:
- fea3faa (diff), a57cb58 (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/iostream
rfea3faa rb826e6b 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 15 18:08:44201713 // Update Count : 1 0512 // Last Modified On : Fri Jul 7 08:35:59 2017 13 // Update Count : 118 14 14 // 15 15 16 #ifndef __IOSTREAM_H__ 17 #define __IOSTREAM_H__ 16 #pragma once 18 17 19 18 #include "iterator" … … 26 25 const char * sepGetCur( ostype * ); // get current separator string 27 26 void sepSetCur( ostype *, const char * ); // set current separator string 27 _Bool getNL( ostype * ); // check newline 28 void setNL( ostype *, _Bool ); // saw newline 28 29 // public 29 30 void sepOn( ostype * ); // turn separator state on … … 43 44 ostype * write( ostype *, const char *, unsigned long int ); 44 45 int fmt( ostype *, const char fmt[], ... ); 45 }; 46 }; // ostream 46 47 47 48 trait writeable( otype T ) { 48 49 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T ); 49 }; 50 }; // writeable 50 51 51 52 // implement writable for intrinsic types … … 81 82 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, ostype * (*)( ostype * ) ); 82 83 forall( dtype ostype | ostream( ostype ) ) ostype * endl( ostype * ); 84 forall( dtype ostype | ostream( ostype ) ) ostype * sep( ostype * ); 85 forall( dtype ostype | ostream( ostype ) ) ostype * sepTuple( ostype * ); 83 86 forall( dtype ostype | ostream( ostype ) ) ostype * sepOn( ostype * ); 84 87 forall( dtype ostype | ostream( ostype ) ) ostype * sepOff( ostype * ); … … 103 106 istype * ungetc( istype *, char ); 104 107 int fmt( istype *, const char fmt[], ... ); 105 }; 108 }; // istream 106 109 107 110 trait readable( otype T ) { 108 111 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, T ); 109 }; 112 }; // readable 110 113 111 114 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, char * ); … … 136 139 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, _Istream_cstrC ); 137 140 138 #endif // __IOSTREAM_H139 140 141 // Local Variables: // 141 142 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.