Changeset f5d9c37 for libcfa/src/fstream.cfa
- Timestamp:
- Jun 29, 2023, 12:07:50 PM (14 months ago)
- Branches:
- master
- Children:
- 7d25f44
- Parents:
- 70e47fec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/fstream.cfa
r70e47fec rf5d9c37 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 17 08:51:12 202313 // Update Count : 5 2812 // Last Modified On : Thu Jun 29 11:09:52 2023 13 // Update Count : 533 14 14 // 15 15 … … 43 43 } // ?{} 44 44 45 inline bool getNL$( ofstream & os ) { return os.sawNL$; } 46 inline void setNL$( ofstream & os, bool state ) { os.sawNL$ = state; } 47 inline bool getANL$( ofstream & os ) { return os.nlOnOff$; } 48 45 49 inline bool sepPrt$( ofstream & os ) { setNL$( os, false ); return os.sepOnOff$; } 46 50 inline void sepReset$( ofstream & os ) { os.sepOnOff$ = os.sepDefault$; } … … 48 52 inline const char * sepGetCur$( ofstream & os ) { return os.sepCur$; } 49 53 inline void sepSetCur$( ofstream & os, const char sepCur[] ) { os.sepCur$ = sepCur; } 50 inline bool getNL$( ofstream & os ) { return os.sawNL$; } 51 inline void setNL$( ofstream & os, bool state ) { os.sawNL$ = state; } 52 inline bool getANL$( ofstream & os ) { return os.nlOnOff$; } 54 53 55 inline bool getPrt$( ofstream & os ) { return os.prt$; } 54 56 inline void setPrt$( ofstream & os, bool state ) { os.prt$ = state; } … … 63 65 void ^?{}( ofstream & os ) { close( os ); } 64 66 65 void sepOn( ofstream & os ) { os.sepOnOff$ = ! getNL$( os ); } 66 void sepOff( ofstream & os ) { os.sepOnOff$ = false; } 67 68 bool sepDisable( ofstream & os ) { 67 void nlOn( ofstream & os ) { os.nlOnOff$ = true; } 68 void nlOff( ofstream & os ) { os.nlOnOff$ = false; } 69 70 void sep( ofstream & os ) { os.sepOnOff$ = ! getNL$( os ); } 71 void nosep( ofstream & os ) { os.sepOnOff$ = false; } 72 73 bool sepOn( ofstream & os ) { 74 bool temp = os.sepDefault$; 75 os.sepDefault$ = true; 76 if ( os.sepOnOff$ ) sepReset$( os ); // start of line ? 77 return temp; 78 } // sepOn 79 80 bool sepOff( ofstream & os ) { 69 81 bool temp = os.sepDefault$; 70 82 os.sepDefault$ = false; 71 83 sepReset$( os ); 72 84 return temp; 73 } // sepDisable 74 75 bool sepEnable( ofstream & os ) { 76 bool temp = os.sepDefault$; 77 os.sepDefault$ = true; 78 if ( os.sepOnOff$ ) sepReset$( os ); // start of line ? 79 return temp; 80 } // sepEnable 81 82 void nlOn( ofstream & os ) { os.nlOnOff$ = true; } 83 void nlOff( ofstream & os ) { os.nlOnOff$ = false; } 85 } // sepOff 84 86 85 87 const char * sepGet( ofstream & os ) { return os.separator$; }
Note: See TracChangeset
for help on using the changeset viewer.