Changes in / [1b0184b:2d7cb19]


Ignore:
Location:
libcfa/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string.cfa

    r1b0184b r2d7cb19  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 21:52:09 2023
    13 // Update Count     : 208
     12// Last Modified On : Sat Sep  2 12:05:57 2023
     13// Update Count     : 206
    1414//
    1515
     
    138138
    139139void ?|?( ifstream & in, _Istream_Sstr f ) {
    140     (ifstream &)(in | f);
     140    (ifstream &)(in | f); ends( in );
    141141}
    142142
  • libcfa/src/collections/string_res.cfa

    r1b0184b r2d7cb19  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 21:54:54 2023
    13 // Update Count     : 15
     12// Last Modified On : Mon Aug 14 18:06:01 2023
     13// Update Count     : 12
    1414//
    1515
     
    253253
    254254void ?|?( ifstream & in, string_res & this ) {
    255     (ifstream &)(in | this);
     255    (ifstream &)(in | this); ends( in );
    256256}
    257257
     
    297297
    298298void ?|?( ifstream & in, _Istream_Rstr f ) {
    299     (ifstream &)(in | f);
     299    (ifstream &)(in | f); ends( in );
    300300}
    301301
  • libcfa/src/fstream.cfa

    r1b0184b r2d7cb19  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 22:05:54 2023
    13 // Update Count     : 549
     12// Last Modified On : Tue Oct 17 08:38:49 2023
     13// Update Count     : 544
    1414//
    1515
     
    230230void nlOff( ifstream & os ) { os.nlOnOff$ = false; }
    231231
     232void ends( ifstream & is ) {}
     233
    232234bool eof( ifstream & is ) { return feof( (FILE *)(is.file$) ) != 0; }
    233235
  • libcfa/src/fstream.hfa

    r1b0184b r2d7cb19  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 20:30:12 2023
    13 // Update Count     : 261
     12// Last Modified On : Fri Oct 13 13:55:21 2023
     13// Update Count     : 260
    1414//
    1515
     
    117117void nlOn( ifstream & );
    118118void nlOff( ifstream & );
     119void ends( ifstream & );
    119120int fmt( ifstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    120121ifstream & ungetc( ifstream & is, char c );
  • libcfa/src/iostream.cfa

    r1b0184b r2d7cb19  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Oct 19 21:10:10 2023
    13 // Update Count     : 1801
     12// Last Modified On : Tue Oct 17 20:57:05 2023
     13// Update Count     : 1795
    1414//
    1515
     
    784784                return is;
    785785        } // ?|?
     786        ISTYPE_VOID_IMPL( bool & )
    786787
    787788        istype & ?|?( istype & is, char & c ) {
     
    795796                return is;
    796797        } // ?|?
     798        ISTYPE_VOID_IMPL( char & )
    797799
    798800        istype & ?|?( istype & is, signed char & sc ) {
     
    800802                return is;
    801803        } // ?|?
     804        ISTYPE_VOID_IMPL( signed char & )
    802805
    803806        istype & ?|?( istype & is, unsigned char & usc ) {
     
    805808                return is;
    806809        } // ?|?
     810        ISTYPE_VOID_IMPL( unsigned char & )
    807811
    808812        istype & ?|?( istype & is, short int & si ) {
     
    810814                return is;
    811815        } // ?|?
     816        ISTYPE_VOID_IMPL( short int & )
    812817
    813818        istype & ?|?( istype & is, unsigned short int & usi ) {
     
    815820                return is;
    816821        } // ?|?
     822        ISTYPE_VOID_IMPL( unsigned short int & )
    817823
    818824        istype & ?|?( istype & is, int & i ) {
     
    820826                return is;
    821827        } // ?|?
     828        ISTYPE_VOID_IMPL( int & )
    822829
    823830        istype & ?|?( istype & is, unsigned int & ui ) {
     
    825832                return is;
    826833        } // ?|?
     834        ISTYPE_VOID_IMPL( unsigned int & )
    827835
    828836        istype & ?|?( istype & is, long int & li ) {
     
    830838                return is;
    831839        } // ?|?
     840        ISTYPE_VOID_IMPL( long int & )
    832841
    833842        istype & ?|?( istype & is, unsigned long int & ulli ) {
     
    835844                return is;
    836845        } // ?|?
     846        ISTYPE_VOID_IMPL( unsigned long int & )
    837847
    838848        istype & ?|?( istype & is, long long int & lli ) {
     
    840850                return is;
    841851        } // ?|?
     852        ISTYPE_VOID_IMPL( long long int & )
    842853
    843854        istype & ?|?( istype & is, unsigned long long int & ulli ) {
     
    845856                return is;
    846857        } // ?|?
     858        ISTYPE_VOID_IMPL( unsigned long long int & )
    847859
    848860        #if defined( __SIZEOF_INT128__ )
     
    850862                return (istype &)(is | (unsigned int128 &)llli);
    851863        } // ?|?
     864        ISTYPE_VOID_IMPL( int128 & )
    852865
    853866        istype & ?|?( istype & is, unsigned int128 & ullli ) {
     
    866879                return is;
    867880        } // ?|?
     881        ISTYPE_VOID_IMPL( unsigned int128 & )
    868882        #endif // __SIZEOF_INT128__
    869883
     
    872886                return is;
    873887        } // ?|?
     888        ISTYPE_VOID_IMPL( float & )
    874889
    875890        istype & ?|?( istype & is, double & d ) {
     
    877892                return is;
    878893        } // ?|?
     894        ISTYPE_VOID_IMPL( double & )
    879895
    880896        istype & ?|?( istype & is, long double & ld ) {
     
    882898                return is;
    883899        } // ?|?
     900        ISTYPE_VOID_IMPL( long double & )
    884901
    885902        istype & ?|?( istype & is, float _Complex & fc ) {
     
    889906                return is;
    890907        } // ?|?
     908        ISTYPE_VOID_IMPL( float _Complex & )
    891909
    892910        istype & ?|?( istype & is, double _Complex & dc ) {
     
    896914                return is;
    897915        } // ?|?
     916        ISTYPE_VOID_IMPL( double _Complex & )
    898917
    899918        istype & ?|?( istype & is, long double _Complex & ldc ) {
     
    903922                return is;
    904923        } // ?|?
     924        ISTYPE_VOID_IMPL( long double _Complex & )
    905925
    906926        istype & ?|?( istype & is, const char fmt[] ) {
     
    908928                return is;
    909929        } // ?|?
     930        ISTYPE_VOID_IMPL( const char * )
    910931
    911932        // manipulators
     
    915936
    916937        void ?|?( istype & is, istype & (* manip)( istype & ) ) {
    917                 manip( is );
     938                manip( is ); ends( is );
    918939        } // ?|?
    919940
     
    959980                return is;
    960981        }
     982        ISTYPE_VOID_IMPL( _Istream_Cskip )
    961983
    962984        istype & ?|?( istype & is, _Istream_Cstr f ) {
     
    10481070                return is;
    10491071        } // ?|?
     1072        ISTYPE_VOID_IMPL( _Istream_Cstr )
    10501073
    10511074        istype & ?|?( istype & is, _Istream_Char f ) {
     
    10531076                return is;
    10541077        } // ?|?
     1078        ISTYPE_VOID_IMPL( _Istream_Char )
    10551079} // distribution
    10561080
     
    10691093                return is; \
    10701094        } /* ?|? */ \
     1095        ISTYPE_VOID_IMPL( _Istream_Manip(T) ) \
    10711096} // distribution
    10721097
     
    10961121                return is;
    10971122        } // ?|?
     1123        ISTYPE_VOID_IMPL( _Istream_Manip(float _Complex) )
    10981124
    10991125        istype & ?|?( istype & is, _Istream_Manip(double _Complex) dc ) {
     
    11061132                return is;
    11071133        } // ?|?
     1134        ISTYPE_VOID_IMPL( _Istream_Manip(double _Complex) )
    11081135
    11091136        istype & ?|?( istype & is, _Istream_Manip(long double _Complex) ldc ) {
     
    11161143                return is;
    11171144        } // ?|?
     1145        ISTYPE_VOID_IMPL( _Istream_Manip(long double _Complex) )
    11181146} // distribution
    11191147
  • libcfa/src/iostream.hfa

    r1b0184b r2d7cb19  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 21:21:20 2023
    13 // Update Count     : 583
     12// Last Modified On : Mon Oct 16 21:12:01 2023
     13// Update Count     : 573
    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
    308314forall( istype & )
    309315trait basic_istream {
     
    314320        void nlOn( istype & );                                                          // read newline
    315321        void nlOff( istype & );                                                         // scan newline
     322        void ends( istype & os );                                                       // end of output statement
    316323        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    317324        istype & ungetc( istype &, char );
     
    336343forall( istype & | basic_istream( istype ) ) {
    337344        istype & ?|?( istype &, bool & );
     345        ISTYPE_VOID( bool & );
    338346
    339347        istype & ?|?( istype &, char & );
     348        ISTYPE_VOID( char & );
    340349        istype & ?|?( istype &, signed char & );
     350        ISTYPE_VOID( signed char & );
    341351        istype & ?|?( istype &, unsigned char & );
     352        ISTYPE_VOID( unsigned char & );
    342353
    343354        istype & ?|?( istype &, short int & );
     355        ISTYPE_VOID( short int & );
    344356        istype & ?|?( istype &, unsigned short int & );
     357        ISTYPE_VOID( unsigned short int & );
    345358        istype & ?|?( istype &, int & );
     359        ISTYPE_VOID( int & );
    346360        istype & ?|?( istype &, unsigned int & );
     361        ISTYPE_VOID( unsigned int & );
    347362        istype & ?|?( istype &, long int & );
     363        ISTYPE_VOID( long int & );
    348364        istype & ?|?( istype &, unsigned long int & );
     365        ISTYPE_VOID( unsigned long int & );
    349366        istype & ?|?( istype &, long long int & );
     367        ISTYPE_VOID( long long int & );
    350368        istype & ?|?( istype &, unsigned long long int & );
     369        ISTYPE_VOID( unsigned long long int & );
    351370        #if defined( __SIZEOF_INT128__ )
    352371        istype & ?|?( istype &, int128 & );
     372        ISTYPE_VOID( int128 & );
    353373        istype & ?|?( istype &, unsigned int128 & );
     374        ISTYPE_VOID( unsigned int128 & );
    354375        #endif // __SIZEOF_INT128__
    355376
    356377        istype & ?|?( istype &, float & );
     378        ISTYPE_VOID( float & );
    357379        istype & ?|?( istype &, double & );
     380        ISTYPE_VOID( double & );
    358381        istype & ?|?( istype &, long double & );
     382        ISTYPE_VOID( long double & );
    359383
    360384        istype & ?|?( istype &, float _Complex & );
     385        ISTYPE_VOID( float _Complex & );
    361386        istype & ?|?( istype &, double _Complex & );
     387        ISTYPE_VOID( double _Complex & );
    362388        istype & ?|?( istype &, long double _Complex & );
     389        ISTYPE_VOID( long double _Complex & );
    363390
    364391        istype & ?|?( istype &, const char [] );
     392        ISTYPE_VOID( const char [] );
    365393
    366394        // manipulators
    367395        istype & ?|?( istype &, istype & (*)( istype & ) );
     396        ISTYPE_VOID( istype & (*)( istype & ) );
    368397        istype & nl( istype & is );
    369398        istype & nlOn( istype & );
     
    390419forall( istype & | basic_istream( istype ) ) {
    391420        istype & ?|?( istype & is, _Istream_Cskip f );
     421        ISTYPE_VOID( _Istream_Cskip );
    392422}
    393423
     
    431461forall( istype & | basic_istream( istype ) ) {
    432462        istype & ?|?( istype & is, _Istream_Cstr f );
     463        ISTYPE_VOID( _Istream_Cstr );
    433464}
    434465
     
    443474forall( istype & | basic_istream( istype ) ) {
    444475        istype & ?|?( istype & is, _Istream_Char f );
     476        ISTYPE_VOID( _Istream_Char );
    445477}
    446478
     
    461493forall( istype & | basic_istream( istype ) ) { \
    462494        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
     495        ISTYPE_VOID( _Istream_Manip(T) ); \
    463496} // ?|?
    464497
Note: See TracChangeset for help on using the changeset viewer.