Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (2 years ago)
Author:
JiadaL <j82liang@…>
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.
Message:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/strstream.cfa

    r92355883 r2a301ff  
    1010// Created On       : Thu Apr 22 22:24:35 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct 10 16:13:20 2021
    13 // Update Count     : 101
     12// Last Modified On : Fri Aug 18 10:42:49 2023
     13// Update Count     : 112
    1414//
    1515
     
    3232
    3333// private
     34inline bool getNL$( ostrstream & os ) { return os.sawNL$; }
     35inline bool setNL$( ostrstream & os, bool state ) { bool temp = os.sawNL$; os.sawNL$ = state; return temp; }
     36inline bool getANL$( ostrstream & os ) { return os.nlOnOff$; }
     37inline bool setANL$( ostrstream & os, bool state ) { bool temp = os.nlOnOff$; os.nlOnOff$ = state; return temp; }
    3438inline bool sepPrt$( ostrstream & os ) { setNL$( os, false ); return os.sepOnOff$; }
    3539inline void sepReset$( ostrstream & os ) { os.sepOnOff$ = os.sepDefault$; }
     
    3741inline const char * sepGetCur$( ostrstream & os ) { return os.sepCur$; }
    3842inline 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$; }
    4243inline bool getPrt$( ostrstream & os ) { return os.prt$; }
    43 inline void setPrt$( ostrstream & os, bool state ) { os.prt$ = state; }
     44inline bool setPrt$( ostrstream & os, bool state ) { bool temp = os.prt$; os.prt$ = state; return temp; }
    4445
    4546// public
     47void nlOn( ostrstream & os ) { os.nlOnOff$ = true; }
     48void nlOff( ostrstream & os ) { os.nlOnOff$ = false; }
     49
    4650void ?{}( ostrstream & os, char buf[], size_t size ) {
    4751        os.buf$ = buf;
     
    5862} // ?{}
    5963
    60 void sepOn( ostrstream & os ) { os.sepOnOff$ = ! getNL$( os ); }
    61 void sepOff( ostrstream & os ) { os.sepOnOff$ = false; }
     64void sep( ostrstream & os ) { os.sepOnOff$ = ! getNL$( os ); }
     65void nosep( ostrstream & os ) { os.sepOnOff$ = false; }
    6266
    63 bool sepDisable( ostrstream & os ) {
     67bool 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
     74bool sepOff( ostrstream & os ) {
    6475        bool temp = os.sepDefault$;
    6576        os.sepDefault$ = false;
    6677        sepReset$( os );
    6778        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
    7980
    8081const char * sepGet( ostrstream & os ) { return os.separator$; }
     
    132133// private
    133134bool getANL$( istrstream & is ) { return is.nlOnOff$; }
     135bool setANL$( istrstream & is, bool state ) { bool temp = is.nlOnOff$; is.nlOnOff$ = state; return temp;  }
    134136
    135137// public
Note: See TracChangeset for help on using the changeset viewer.