Changeset 2a301ff for libcfa/src/strstream.cfa
- Timestamp:
- Aug 31, 2023, 11:31:15 PM (2 years ago)
- Branches:
- master
- Children:
- 950c58e
- Parents:
- 92355883 (diff), 686912c (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
-
libcfa/src/strstream.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/strstream.cfa
r92355883 r2a301ff 10 10 // Created On : Thu Apr 22 22:24:35 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Oct 10 16:13:20 202113 // Update Count : 1 0112 // Last Modified On : Fri Aug 18 10:42:49 2023 13 // Update Count : 112 14 14 // 15 15 … … 32 32 33 33 // private 34 inline bool getNL$( ostrstream & os ) { return os.sawNL$; } 35 inline bool setNL$( ostrstream & os, bool state ) { bool temp = os.sawNL$; os.sawNL$ = state; return temp; } 36 inline bool getANL$( ostrstream & os ) { return os.nlOnOff$; } 37 inline bool setANL$( ostrstream & os, bool state ) { bool temp = os.nlOnOff$; os.nlOnOff$ = state; return temp; } 34 38 inline bool sepPrt$( ostrstream & os ) { setNL$( os, false ); return os.sepOnOff$; } 35 39 inline void sepReset$( ostrstream & os ) { os.sepOnOff$ = os.sepDefault$; } … … 37 41 inline const char * sepGetCur$( ostrstream & os ) { return os.sepCur$; } 38 42 inline void sepSetCur$( ostrstream & os, const char sepCur[] ) { os.sepCur$ = sepCur; } 39 inline bool getNL$( ostrstream & os ) { return os.sawNL$; }40 inline void setNL$( ostrstream & os, bool state ) { os.sawNL$ = state; }41 inline bool getANL$( ostrstream & os ) { return os.nlOnOff$; }42 43 inline bool getPrt$( ostrstream & os ) { return os.prt$; } 43 inline void setPrt$( ostrstream & os, bool state ) { os.prt$ = state; }44 inline bool setPrt$( ostrstream & os, bool state ) { bool temp = os.prt$; os.prt$ = state; return temp; } 44 45 45 46 // public 47 void nlOn( ostrstream & os ) { os.nlOnOff$ = true; } 48 void nlOff( ostrstream & os ) { os.nlOnOff$ = false; } 49 46 50 void ?{}( ostrstream & os, char buf[], size_t size ) { 47 51 os.buf$ = buf; … … 58 62 } // ?{} 59 63 60 void sep On( ostrstream & os ) { os.sepOnOff$ = ! getNL$( os ); }61 void sepOff( ostrstream & os ) { os.sepOnOff$ = false; }64 void sep( ostrstream & os ) { os.sepOnOff$ = ! getNL$( os ); } 65 void nosep( ostrstream & os ) { os.sepOnOff$ = false; } 62 66 63 bool sepDisable( ostrstream & os ) { 67 bool sepOn( ostrstream & os ) { 68 bool temp = os.sepDefault$; 69 os.sepDefault$ = true; 70 if ( os.sepOnOff$ ) sepReset$( os ); // start of line ? 71 return temp; 72 } // sepOn 73 74 bool sepOff( ostrstream & os ) { 64 75 bool temp = os.sepDefault$; 65 76 os.sepDefault$ = false; 66 77 sepReset$( os ); 67 78 return temp; 68 } // sepDisable 69 70 bool sepEnable( ostrstream & os ) { 71 bool temp = os.sepDefault$; 72 os.sepDefault$ = true; 73 if ( os.sepOnOff$ ) sepReset$( os ); // start of line ? 74 return temp; 75 } // sepEnable 76 77 void nlOn( ostrstream & os ) { os.nlOnOff$ = true; } 78 void nlOff( ostrstream & os ) { os.nlOnOff$ = false; } 79 } // sepOff 79 80 80 81 const char * sepGet( ostrstream & os ) { return os.separator$; } … … 132 133 // private 133 134 bool getANL$( istrstream & is ) { return is.nlOnOff$; } 135 bool setANL$( istrstream & is, bool state ) { bool temp = is.nlOnOff$; is.nlOnOff$ = state; return temp; } 134 136 135 137 // public
Note:
See TracChangeset
for help on using the changeset viewer.