Ignore:
Timestamp:
Oct 23, 2023, 11:58:10 AM (7 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
edc4813
Parents:
2ad5e1d5 (diff), abb04a4 (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    r2ad5e1d5 r7b84d3e  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct  8 12:02:55 2023
    13 // Update Count     : 568
     12// Last Modified On : Wed Oct 18 21:21:20 2023
     13// Update Count     : 583
    1414//
    1515
     
    306306// *********************************** istream ***********************************
    307307
    308 #define ISTYPE_VOID( T ) void ?|?( istype &, T )
    309 #define ISTYPE_VOID_IMPL( T ) \
    310         void ?|?( istype & is, T t ) { \
    311                 (istype &)(is | t); ends( is ); \
    312         } // ?|?
    313 
    314308forall( istype & )
    315309trait basic_istream {
     
    320314        void nlOn( istype & );                                                          // read newline
    321315        void nlOff( istype & );                                                         // scan newline
    322         void ends( istype & os );                                                       // end of output statement
    323316        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    324317        istype & ungetc( istype &, char );
    325318        bool eof( istype & );
     319        void clear( istype & );
    326320}; // basic_istream
    327321
     
    329323trait istream {
    330324        bool fail( istype & );
    331         void clear( istype & );
     325        void open( istype & is, const char name[], const char mode[] );
    332326        void open( istype & is, const char name[] );
    333327        void close( istype & is );
     
    342336forall( istype & | basic_istream( istype ) ) {
    343337        istype & ?|?( istype &, bool & );
    344         ISTYPE_VOID( bool & );
    345338
    346339        istype & ?|?( istype &, char & );
    347         ISTYPE_VOID( char & );
    348340        istype & ?|?( istype &, signed char & );
    349         ISTYPE_VOID( signed char & );
    350341        istype & ?|?( istype &, unsigned char & );
    351         ISTYPE_VOID( unsigned char & );
    352342
    353343        istype & ?|?( istype &, short int & );
    354         ISTYPE_VOID( short int & );
    355344        istype & ?|?( istype &, unsigned short int & );
    356         ISTYPE_VOID( unsigned short int & );
    357345        istype & ?|?( istype &, int & );
    358         ISTYPE_VOID( int & );
    359346        istype & ?|?( istype &, unsigned int & );
    360         ISTYPE_VOID( unsigned int & );
    361347        istype & ?|?( istype &, long int & );
    362         ISTYPE_VOID( long int & );
    363348        istype & ?|?( istype &, unsigned long int & );
    364         ISTYPE_VOID( unsigned long int & );
    365349        istype & ?|?( istype &, long long int & );
    366         ISTYPE_VOID( long long int & );
    367350        istype & ?|?( istype &, unsigned long long int & );
    368         ISTYPE_VOID( unsigned long long int & );
    369351        #if defined( __SIZEOF_INT128__ )
    370352        istype & ?|?( istype &, int128 & );
    371         ISTYPE_VOID( int128 & );
    372353        istype & ?|?( istype &, unsigned int128 & );
    373         ISTYPE_VOID( unsigned int128 & );
    374354        #endif // __SIZEOF_INT128__
    375355
    376356        istype & ?|?( istype &, float & );
    377         ISTYPE_VOID( float & );
    378357        istype & ?|?( istype &, double & );
    379         ISTYPE_VOID( double & );
    380358        istype & ?|?( istype &, long double & );
    381         ISTYPE_VOID( long double & );
    382359
    383360        istype & ?|?( istype &, float _Complex & );
    384         ISTYPE_VOID( float _Complex & );
    385361        istype & ?|?( istype &, double _Complex & );
    386         ISTYPE_VOID( double _Complex & );
    387362        istype & ?|?( istype &, long double _Complex & );
    388         ISTYPE_VOID( long double _Complex & );
    389363
    390364        istype & ?|?( istype &, const char [] );
    391         ISTYPE_VOID( const char [] );
    392365
    393366        // manipulators
    394367        istype & ?|?( istype &, istype & (*)( istype & ) );
    395         ISTYPE_VOID( istype & (*)( istype & ) );
    396368        istype & nl( istype & is );
    397369        istype & nlOn( istype & );
     
    402374
    403375ExceptionDecl( cstring_length );
     376ExceptionDecl( missing_data );
    404377
    405378// *********************************** manipulators ***********************************
    406379
     380// skip does not compose with other C string manipulators.
    407381struct _Istream_Cskip {
    408382        const char * scanset;
     
    416390forall( istype & | basic_istream( istype ) ) {
    417391        istype & ?|?( istype & is, _Istream_Cskip f );
    418         ISTYPE_VOID( _Istream_Cskip );
    419392}
    420393
     
    458431forall( istype & | basic_istream( istype ) ) {
    459432        istype & ?|?( istype & is, _Istream_Cstr f );
    460         ISTYPE_VOID( _Istream_Cstr );
    461433}
    462434
     
    471443forall( istype & | basic_istream( istype ) ) {
    472444        istype & ?|?( istype & is, _Istream_Char f );
    473         ISTYPE_VOID( _Istream_Char );
    474445}
    475446
     
    490461forall( istype & | basic_istream( istype ) ) { \
    491462        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
    492         ISTYPE_VOID( _Istream_Manip(T) ); \
    493463} // ?|?
    494464
Note: See TracChangeset for help on using the changeset viewer.