Changeset 666483d for libcfa/src/strstream.hfa
- Timestamp:
- Apr 27, 2021, 10:13:14 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- bbbd2c4
- Parents:
- f451177
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/strstream.hfa
rf451177 r666483d 10 10 // Created On : Thu Apr 22 22:20:59 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 24 11:17:33202113 // Update Count : 3712 // Last Modified On : Tue Apr 27 20:58:50 2021 13 // Update Count : 41 14 14 // 15 15 … … 20 20 21 21 22 // *********************************** strstream ***********************************22 // *********************************** ostrstream *********************************** 23 23 24 24 25 enum { strstream_sepSize = 16 };26 struct strstream { // satisfied basic_ostream25 enum { ostrstream_sepSize = 16 }; 26 struct ostrstream { // satisfied basic_ostream 27 27 char * buf$; 28 28 size_t size$; … … 34 34 bool sawNL$; 35 35 const char * sepCur$; 36 char separator$[ strstream_sepSize];37 char tupleSeparator$[ strstream_sepSize];38 }; // strstream36 char separator$[ostrstream_sepSize]; 37 char tupleSeparator$[ostrstream_sepSize]; 38 }; // ostrstream 39 39 40 40 // Satisfies basic_ostream 41 41 42 42 // private 43 bool sepPrt$( strstream & );44 void sepReset$( strstream & );45 void sepReset$( strstream &, bool );46 const char * sepGetCur$( strstream & );47 void sepSetCur$( strstream &, const char [] );48 bool getNL$( strstream & );49 void setNL$( strstream &, bool );50 bool getANL$( strstream & );51 bool getPrt$( strstream & );52 void setPrt$( strstream &, bool );43 bool sepPrt$( ostrstream & ); 44 void sepReset$( ostrstream & ); 45 void sepReset$( ostrstream &, bool ); 46 const char * sepGetCur$( ostrstream & ); 47 void sepSetCur$( ostrstream &, const char [] ); 48 bool getNL$( ostrstream & ); 49 void setNL$( ostrstream &, bool ); 50 bool getANL$( ostrstream & ); 51 bool getPrt$( ostrstream & ); 52 void setPrt$( ostrstream &, bool ); 53 53 54 54 // public 55 void sepOn( strstream & );56 void sepOff( strstream & );57 bool sepDisable( strstream & );58 bool sepEnable( strstream & );59 void nlOn( strstream & );60 void nlOff( strstream & );55 void sepOn( ostrstream & ); 56 void sepOff( ostrstream & ); 57 bool sepDisable( ostrstream & ); 58 bool sepEnable( ostrstream & ); 59 void nlOn( ostrstream & ); 60 void nlOff( ostrstream & ); 61 61 62 const char * sepGet( strstream & );63 void sepSet( strstream &, const char [] );64 const char * sepGetTuple( strstream & );65 void sepSetTuple( strstream &, const char [] );62 const char * sepGet( ostrstream & ); 63 void sepSet( ostrstream &, const char [] ); 64 const char * sepGetTuple( ostrstream & ); 65 void sepSetTuple( ostrstream &, const char [] ); 66 66 67 void ends( strstream & ); 68 int fmt( strstream &, const char format[], ... ) __attribute__(( format(printf, 2, 3) )); 69 int flush( strstream & ); 67 void ends( ostrstream & ); 68 int fmt( ostrstream &, const char format[], ... ) __attribute__(( format(printf, 2, 3) )); 70 69 71 strstream & write( strstream & os ); // use stdout, default value not working 72 strstream & write( strstream & os, FILE * stream = stdout);70 ostrstream & write( ostrstream & os, FILE * stream ); // FIX ME: use default = stdout 71 ostrstream & write( ostrstream & os ); 73 72 74 void ?{}( strstream &, char buf[], size_t size );73 void ?{}( ostrstream &, char buf[], size_t size ); 75 74 76 extern strstream & sstr; 75 76 // *********************************** istrstream *********************************** 77 78 79 struct istrstream { 80 char * buf$; 81 size_t cursor$; 82 bool nlOnOff$; 83 }; // istrstream 84 85 // Satisfies basic_istream 86 87 // public 88 bool getANL( istrstream & ); 89 void nlOn( istrstream & ); 90 void nlOff( istrstream & ); 91 void ends( istrstream & ); 92 int fmt( istrstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) )); 93 istrstream & ungetc( istrstream & is, char c ); 94 int eof( istrstream & is ); 95 96 void ?{}( istrstream & is, char buf[] ); 77 97 78 98 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.