Ignore:
Timestamp:
Aug 18, 2023, 12:12:22 PM (11 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

File:
1 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$ ); }
Note: See TracChangeset for help on using the changeset viewer.