Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    r424dfc4 r00e9be9  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Apr 25 11:22:03 2021
    13 // Update Count     : 397
     12// Last Modified On : Wed Apr 28 20:37:56 2021
     13// Update Count     : 401
    1414//
    1515
     
    4949        void ends( ostype & );                                                          // end of output statement
    5050        int fmt( ostype &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
    51         int flush( ostype & );
    5251}; // basic_ostream
    5352       
    5453trait ostream( ostype & | basic_ostream( ostype ) ) {
    5554        bool fail( ostype & );                                                          // operation failed?
     55        void clear( ostype & );
     56        int flush( ostype & );
    5657        void open( ostype &, const char name[], const char mode[] );
    5758        void close( ostype & );
     
    9798        ostype & ?|?( ostype &, unsigned long long int );
    9899        void ?|?( ostype &, unsigned long long int );
    99 #if defined( __SIZEOF_INT128__ )
     100        #if defined( __SIZEOF_INT128__ )
    100101        ostype & ?|?( ostype &, int128 );
    101102        void ?|?( ostype &, int128 );
    102103        ostype & ?|?( ostype &, unsigned int128 );
    103104        void ?|?( ostype &, unsigned int128 );
    104 #endif // __SIZEOF_INT128__
     105        #endif // __SIZEOF_INT128__
    105106
    106107        ostype & ?|?( ostype &, float );
     
    121122        void ?|?( ostype &, const char [] );
    122123        // ostype & ?|?( ostype &, const char16_t * );
    123 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
     124        #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
    124125        // ostype & ?|?( ostype &, const char32_t * );
    125 #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )
     126        #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )
    126127        // ostype & ?|?( ostype &, const wchar_t * );
    127128        ostype & ?|?( ostype &, const void * );
     
    294295
    295296
    296 trait istream( istype & ) {
     297trait basic_istream( istype & ) {
     298        bool getANL( istype & );                                                        // get scan newline (on/off)
    297299        void nlOn( istype & );                                                          // read newline
    298300        void nlOff( istype & );                                                         // scan newline
    299         bool getANL( istype & );                                                        // get scan newline (on/off)
    300301
    301302        void ends( istype & os );                                                       // end of output statement
     303        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
     304        istype & ungetc( istype &, char );
     305        bool eof( istype & );
     306}; // basic_istream
     307
     308trait istream( istype & | basic_istream( istype ) ) {
    302309        bool fail( istype & );
    303         int eof( istype & );
     310        void clear( istype & );
    304311        void open( istype & is, const char name[] );
    305312        void close( istype & is );
    306         istype & read( istype &, char *, size_t );
    307         istype & ungetc( istype &, char );
    308         int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    309         void acquire( istype & );
     313        istype & read( istype &, char [], size_t );
     314        void acquire( istype & );                                                       // concurrent access
    310315}; // istream
    311316
     
    314319}; // readable
    315320
    316 forall( istype & | istream( istype ) ) {
     321forall( istype & | basic_istream( istype ) ) {
    317322        istype & ?|?( istype &, bool & );
    318323        void ?|?( istype &, bool & );
     
    341346        istype & ?|?( istype &, unsigned long long int & );
    342347        void ?|?( istype &, unsigned long long int & );
    343 #if defined( __SIZEOF_INT128__ )
     348        #if defined( __SIZEOF_INT128__ )
    344349        istype & ?|?( istype &, int128 & );
    345350        void ?|?( istype &, int128 & );
    346351        istype & ?|?( istype &, unsigned int128 & );
    347352        void ?|?( istype &, unsigned int128 & );
    348 #endif // __SIZEOF_INT128__
     353        #endif // __SIZEOF_INT128__
    349354
    350355        istype & ?|?( istype &, float & );
     
    372377        istype & nlOn( istype & );
    373378        istype & nlOff( istype & );
     379} // distribution
     380
     381forall( istype & | istream( istype ) ) {
    374382        istype & acquire( istype & );
    375383} // distribution
     
    402410        _Istream_Cstr & wdi( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
    403411} // distribution
    404 forall( istype & | istream( istype ) ) {
     412forall( istype & | basic_istream( istype ) ) {
    405413        istype & ?|?( istype & is, _Istream_Cstr f );
    406414        void ?|?( istype & is, _Istream_Cstr f );
     
    415423        _Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
    416424} // distribution
    417 forall( istype & | istream( istype ) ) {
     425forall( istype & | basic_istream( istype ) ) {
    418426        istype & ?|?( istype & is, _Istream_Char f );
    419427        void ?|?( istype & is, _Istream_Char f );
     
    434442        _Istream_Manip(T) & wdi( unsigned int w, _Istream_Manip(T) & fmt ) { fmt.wd = w; return fmt; } \
    435443} /* distribution */ \
    436 forall( istype & | istream( istype ) ) { \
     444forall( istype & | basic_istream( istype ) ) { \
    437445        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
    438446        void ?|?( istype & is, _Istream_Manip(T) f ); \
Note: See TracChangeset for help on using the changeset viewer.