Changeset d0cfcbe1


Ignore:
Timestamp:
Aug 18, 2023, 12:12:22 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
5ad2c6c7
Parents:
18ebc28
Message:

change setter routines in basic_i/ostream to return previous state

Location:
libcfa/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    r18ebc28 rd0cfcbe1  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 14 18:24:21 2023
    13 // Update Count     : 534
     12// Last Modified On : Fri Aug 18 10:41:17 2023
     13// Update Count     : 541
    1414//
    1515
     
    4545
    4646inline bool getNL$( ofstream & os ) { return os.sawNL$; }
    47 inline void setNL$( ofstream & os, bool state ) { os.sawNL$ = state; }
     47inline bool setNL$( ofstream & os, bool state ) { bool temp = os.sawNL$; os.sawNL$ = state; return temp; }
    4848inline bool getANL$( ofstream & os ) { return os.nlOnOff$; }
     49inline bool setANL$( ofstream & os, bool state ) { bool temp = os.nlOnOff$; os.nlOnOff$ = state; return temp; }
    4950
    5051inline bool sepPrt$( ofstream & os ) { setNL$( os, false ); return os.sepOnOff$; }
     
    5556
    5657inline bool getPrt$( ofstream & os ) { return os.prt$; }
    57 inline void setPrt$( ofstream & os, bool state ) { os.prt$ = state; }
     58inline bool setPrt$( ofstream & os, bool state ) { bool temp = os.prt$; os.prt$ = state; return temp; }
    5859
    5960inline void lock( ofstream & os ) with( os ) { lock( os.lock$ ); }
     
    212213
    213214bool getANL$( ifstream & os ) { return os.nlOnOff$; }
     215bool setANL$( ifstream & os, bool state ) { bool temp = os.nlOnOff$; os.nlOnOff$ = state; return temp; }
    214216
    215217inline void lock( ifstream & os ) with( os ) { lock( os.lock$ ); }
  • libcfa/src/fstream.hfa

    r18ebc28 rd0cfcbe1  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug  5 11:42:40 2023
    13 // Update Count     : 254
     12// Last Modified On : Fri Aug 18 10:41:15 2023
     13// Update Count     : 258
    1414//
    1515
     
    4141// private
    4242bool getNL$( ofstream & );
    43 void setNL$( ofstream &, bool );
     43bool setNL$( ofstream &, bool );
    4444bool getANL$( ofstream & );
     45bool setANL$( ofstream &, bool );
    4546
    4647bool sepPrt$( ofstream & );
     
    5152
    5253bool getPrt$( ofstream & );
    53 void setPrt$( ofstream &, bool );
     54bool setPrt$( ofstream &, bool );
    5455
    5556void lock( ofstream & );
     
    108109// private
    109110bool getANL$( ifstream & );
     111bool setANL$( ifstream &, bool );
    110112
    111113void lock( ifstream & );
  • libcfa/src/iostream.hfa

    r18ebc28 rd0cfcbe1  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 14 17:35:40 2023
    13 // Update Count     : 508
     12// Last Modified On : Fri Aug 18 10:44:50 2023
     13// Update Count     : 512
    1414//
    1515
     
    3131        const char * sepGetCur$( ostype & );                            // get current separator string
    3232        void sepSetCur$( ostype &, const char [] );                     // set current separator string
    33         bool getNL$( ostype & );                                                        // check newline
    34         void setNL$( ostype &, bool );                                          // saw newline
     33        bool getNL$( ostype & );                                                        // get newline
     34        bool setNL$( ostype &, bool );                                          // set newline
    3535        bool getANL$( ostype & );                                                       // get auto newline (on/off)
     36        bool setANL$( ostype &, bool );                                         // set auto newline (on/off), and return previous state
    3637        bool getPrt$( ostype & );                                                       // get fmt called in output cascade
    37         void setPrt$( ostype &, bool );                                         // set fmt called in output cascade
     38        bool setPrt$( ostype &, bool );                                         // set fmt called in output cascade
    3839        // public
    3940        void nlOn( ostype & );                                                          // turn auto-newline state on
     
    319320        // private
    320321        bool getANL$( istype & );                                                       // get scan newline (on/off)
     322        bool setANL$( istype &, bool );                                         // set scan newline (on/off)
    321323        // public
    322324        void nlOn( istype & );                                                          // read newline
  • libcfa/src/strstream.cfa

    r18ebc28 rd0cfcbe1  
    1010// Created On       : Thu Apr 22 22:24:35 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 29 10:59:00 2023
    13 // Update Count     : 105
     12// Last Modified On : Fri Aug 18 10:42:49 2023
     13// Update Count     : 112
    1414//
    1515
     
    3333// private
    3434inline bool getNL$( ostrstream & os ) { return os.sawNL$; }
    35 inline void setNL$( ostrstream & os, bool state ) { os.sawNL$ = state; }
     35inline bool setNL$( ostrstream & os, bool state ) { bool temp = os.sawNL$; os.sawNL$ = state; return temp; }
    3636inline bool getANL$( ostrstream & os ) { return os.nlOnOff$; }
     37inline bool setANL$( ostrstream & os, bool state ) { bool temp = os.nlOnOff$; os.nlOnOff$ = state; return temp; }
    3738inline bool sepPrt$( ostrstream & os ) { setNL$( os, false ); return os.sepOnOff$; }
    3839inline void sepReset$( ostrstream & os ) { os.sepOnOff$ = os.sepDefault$; }
     
    4142inline void sepSetCur$( ostrstream & os, const char sepCur[] ) { os.sepCur$ = sepCur; }
    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
     
    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
  • libcfa/src/strstream.hfa

    r18ebc28 rd0cfcbe1  
    1010// Created On       : Thu Apr 22 22:20:59 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 29 10:58:58 2023
    13 // Update Count     : 51
     12// Last Modified On : Fri Aug 18 10:41:14 2023
     13// Update Count     : 55
    1414//
    1515
     
    4747void sepSetCur$( ostrstream &, const char [] );
    4848bool getNL$( ostrstream & );
    49 void setNL$( ostrstream &, bool );
     49bool setNL$( ostrstream &, bool );
    5050bool getANL$( ostrstream & );
     51bool setANL$( ostrstream &, bool );
    5152bool getPrt$( ostrstream & );
    52 void setPrt$( ostrstream &, bool );
     53bool setPrt$( ostrstream &, bool );
    5354
    5455// public
     
    8788// private
    8889bool getANL$( istrstream & );
     90bool setANL$( istrstream &, bool );
    8991
    9092// public
Note: See TracChangeset for help on using the changeset viewer.