Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    r00e9be9 r424dfc4  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr 28 20:37:56 2021
    13 // Update Count     : 401
     12// Last Modified On : Sun Apr 25 11:22:03 2021
     13// Update Count     : 397
    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 & );
    5152}; // basic_ostream
    5253       
    5354trait ostream( ostype & | basic_ostream( ostype ) ) {
    5455        bool fail( ostype & );                                                          // operation failed?
    55         void clear( ostype & );
    56         int flush( ostype & );
    5756        void open( ostype &, const char name[], const char mode[] );
    5857        void close( ostype & );
     
    9897        ostype & ?|?( ostype &, unsigned long long int );
    9998        void ?|?( ostype &, unsigned long long int );
    100         #if defined( __SIZEOF_INT128__ )
     99#if defined( __SIZEOF_INT128__ )
    101100        ostype & ?|?( ostype &, int128 );
    102101        void ?|?( ostype &, int128 );
    103102        ostype & ?|?( ostype &, unsigned int128 );
    104103        void ?|?( ostype &, unsigned int128 );
    105         #endif // __SIZEOF_INT128__
     104#endif // __SIZEOF_INT128__
    106105
    107106        ostype & ?|?( ostype &, float );
     
    122121        void ?|?( ostype &, const char [] );
    123122        // ostype & ?|?( ostype &, const char16_t * );
    124         #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
     123#if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous
    125124        // ostype & ?|?( ostype &, const char32_t * );
    126         #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )
     125#endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 )
    127126        // ostype & ?|?( ostype &, const wchar_t * );
    128127        ostype & ?|?( ostype &, const void * );
     
    295294
    296295
    297 trait basic_istream( istype & ) {
    298         bool getANL( istype & );                                                        // get scan newline (on/off)
     296trait istream( istype & ) {
    299297        void nlOn( istype & );                                                          // read newline
    300298        void nlOff( istype & );                                                         // scan newline
     299        bool getANL( istype & );                                                        // get scan newline (on/off)
    301300
    302301        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 
    308 trait istream( istype & | basic_istream( istype ) ) {
    309302        bool fail( istype & );
    310         void clear( istype & );
     303        int eof( istype & );
    311304        void open( istype & is, const char name[] );
    312305        void close( istype & is );
    313         istype & read( istype &, char [], size_t );
    314         void acquire( istype & );                                                       // concurrent access
     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 & );
    315310}; // istream
    316311
     
    319314}; // readable
    320315
    321 forall( istype & | basic_istream( istype ) ) {
     316forall( istype & | istream( istype ) ) {
    322317        istype & ?|?( istype &, bool & );
    323318        void ?|?( istype &, bool & );
     
    346341        istype & ?|?( istype &, unsigned long long int & );
    347342        void ?|?( istype &, unsigned long long int & );
    348         #if defined( __SIZEOF_INT128__ )
     343#if defined( __SIZEOF_INT128__ )
    349344        istype & ?|?( istype &, int128 & );
    350345        void ?|?( istype &, int128 & );
    351346        istype & ?|?( istype &, unsigned int128 & );
    352347        void ?|?( istype &, unsigned int128 & );
    353         #endif // __SIZEOF_INT128__
     348#endif // __SIZEOF_INT128__
    354349
    355350        istype & ?|?( istype &, float & );
     
    377372        istype & nlOn( istype & );
    378373        istype & nlOff( istype & );
    379 } // distribution
    380 
    381 forall( istype & | istream( istype ) ) {
    382374        istype & acquire( istype & );
    383375} // distribution
     
    410402        _Istream_Cstr & wdi( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
    411403} // distribution
    412 forall( istype & | basic_istream( istype ) ) {
     404forall( istype & | istream( istype ) ) {
    413405        istype & ?|?( istype & is, _Istream_Cstr f );
    414406        void ?|?( istype & is, _Istream_Cstr f );
     
    423415        _Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
    424416} // distribution
    425 forall( istype & | basic_istream( istype ) ) {
     417forall( istype & | istream( istype ) ) {
    426418        istype & ?|?( istype & is, _Istream_Char f );
    427419        void ?|?( istype & is, _Istream_Char f );
     
    442434        _Istream_Manip(T) & wdi( unsigned int w, _Istream_Manip(T) & fmt ) { fmt.wd = w; return fmt; } \
    443435} /* distribution */ \
    444 forall( istype & | basic_istream( istype ) ) { \
     436forall( istype & | istream( istype ) ) { \
    445437        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
    446438        void ?|?( istype & is, _Istream_Manip(T) f ); \
Note: See TracChangeset for help on using the changeset viewer.