Changeset c8371b5


Ignore:
Timestamp:
Oct 10, 2021, 5:02:46 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
321a1b15
Parents:
fe8c31e
git-author:
Peter A. Buhr <pabuhr@…> (10/10/21 16:59:59)
git-committer:
Peter A. Buhr <pabuhr@…> (10/10/21 17:02:46)
Message:

change getANL to getANL$ (private)

Location:
libcfa/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/fstream.cfa

    rfe8c31e rc8371b5  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct  6 18:39:13 2021
    13 // Update Count     : 508
     12// Last Modified On : Sun Oct 10 11:23:05 2021
     13// Update Count     : 512
    1414//
    1515
     
    206206} // ?{}
    207207
     208bool getANL$( ifstream & os ) { return os.nlOnOff$; }
     209
    208210inline void lock( ifstream & os ) with( os ) { lock( os.lock$ ); }
    209211inline void unlock( ifstream & os ) { unlock( os.lock$ ); }
     
    215217void ^?{}( ifstream & is ) { close( is ); }
    216218
     219bool fail( ifstream & is ) { return is.file$ == 0p || ferror( (FILE *)(is.file$) ); }
     220void clear( ifstream & is ) { clearerr( (FILE *)(is.file$) ); }
     221
    217222void nlOn( ifstream & os ) { os.nlOnOff$ = true; }
    218223void nlOff( ifstream & os ) { os.nlOnOff$ = false; }
    219 bool getANL( ifstream & os ) { return os.nlOnOff$; }
    220 
    221 bool fail( ifstream & is ) { return is.file$ == 0p || ferror( (FILE *)(is.file$) ); }
    222 void clear( ifstream & is ) { clearerr( (FILE *)(is.file$) ); }
    223 
    224 void ends( ifstream & is ) {
    225 } // ends
    226 
    227 bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ); }
     224
     225void ends( ifstream & is ) {}
     226
     227bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ) != 0; }
    228228
    229229void open( ifstream & is, const char name[], const char mode[] ) {
  • libcfa/src/fstream.hfa

    rfe8c31e rc8371b5  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct  6 18:45:49 2021
    13 // Update Count     : 240
     12// Last Modified On : Sun Oct 10 09:37:32 2021
     13// Update Count     : 243
    1414//
    1515
     
    7777void open( ofstream &, const char name[] );
    7878void close( ofstream & );
     79
    7980ofstream & write( ofstream &, const char data[], size_t size );
    8081
     
    105106
    106107// private
     108bool getANL$( ifstream & );
     109
    107110void lock( ifstream & );
    108111void unlock( ifstream & );
     
    111114void nlOn( ifstream & );
    112115void nlOff( ifstream & );
    113 bool getANL( ifstream & );
    114116void ends( ifstream & );
    115117int fmt( ifstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
     
    121123void open( ifstream & is, const char name[] );
    122124void close( ifstream & is );
     125
    123126ifstream & read( ifstream & is, char data[], size_t size );
    124127ifstream & ungetc( ifstream & is, char c );
  • libcfa/src/iostream.cfa

    rfe8c31e rc8371b5  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct  6 18:55:03 2021
    13 // Update Count     : 1344
     12// Last Modified On : Sun Oct 10 09:28:17 2021
     13// Update Count     : 1345
    1414//
    1515
     
    822822                        fmt( is, "%c", &temp );                                         // must pass pointer through varg to fmt
    823823                        // do not overwrite parameter with newline unless appropriate
    824                         if ( temp != '\n' || getANL( is ) ) { c = temp; break; }
     824                        if ( temp != '\n' || getANL$( is ) ) { c = temp; break; }
    825825                        if ( eof( is ) ) break;
    826826                } // for
  • libcfa/src/iostream.hfa

    rfe8c31e rc8371b5  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct  6 18:54:59 2021
    13 // Update Count     : 404
     12// Last Modified On : Sun Oct 10 10:02:07 2021
     13// Update Count     : 407
    1414//
    1515
     
    291291
    292292trait basic_istream( istype & ) {
    293         bool getANL( istype & );                                                        // get scan newline (on/off)
     293        // private
     294        bool getANL$( istype & );                                                       // get scan newline (on/off)
     295        // public
    294296        void nlOn( istype & );                                                          // read newline
    295297        void nlOff( istype & );                                                         // scan newline
    296 
    297298        void ends( istype & os );                                                       // end of output statement
    298299        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
Note: See TracChangeset for help on using the changeset viewer.