Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    r0f107e4 r686912c  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep  2 14:42:13 2023
    13 // Update Count     : 567
     12// Last Modified On : Thu Aug 31 10:55:35 2023
     13// Update Count     : 544
    1414//
    1515
     
    388388        ISTYPE_VOID( long double _Complex & );
    389389
    390         istype & ?|?( istype &, const char [] );
    391         ISTYPE_VOID( const char [] );
     390//      istype & ?|?( istype &, const char [] );
     391//      istype & ?|?( istype &, char [] );
     392//      ISTYPE_VOID( char [] );
    392393
    393394        // manipulators
     
    405406// *********************************** manipulators ***********************************
    406407
    407 struct _Istream_Cskip {
    408         const char * scanset;
    409         unsigned wd;                                                                            // scan width
    410 }; // _Istream_Cskip
    411 
    412 static inline {
    413         _Istream_Cskip skip( const char scanset[] ) { return (_Istream_Cskip)@{ scanset, 0 }; }
    414         _Istream_Cskip skip( unsigned int wd ) { return (_Istream_Cskip)@{ 0p, wd }; }
    415 } // distribution
    416 forall( istype & | basic_istream( istype ) ) {
    417         istype & ?|?( istype & is, _Istream_Cskip f );
    418         ISTYPE_VOID( _Istream_Cskip );
    419 }
    420 
    421408struct _Istream_str_base {
    422409        union {
    423410                const char * scanset;
    424                 char delimiter[2];
     411                char delimit[2];
    425412        };
    426413        int wd;                                                                                         // width
     
    430417                        unsigned char ignore:1;                                         // do not change input argument
    431418                        unsigned char inex:1;                                           // include/exclude characters in scanset
    432                         unsigned char delimiter:1;                                      // delimit character
     419                        unsigned char delimit:1;                                        // delimit character
    433420                        unsigned char rwd:1;                                            // read width
    434421                } flags;
     
    449436                return (_Istream_Cstr)@{ s, { {0p}, rwd, {.flags.rwd : true} } };
    450437        }
    451         _Istream_Cstr & getline( _Istream_Cstr & fmt, const char delimiter = '\n' ) {
    452                 fmt.delimiter[0] = delimiter; fmt.delimiter[1] = '\0'; fmt.flags.delimiter = true; fmt.flags.inex = true; return fmt; }
     438        _Istream_Cstr skip( const char scanset[] ) { return (_Istream_Cstr)@{ 0p, { {scanset}, -1, {.all : 0} } }; }
     439        _Istream_Cstr skip( unsigned int wd ) { return (_Istream_Cstr)@{ 0p, { {0p}, wd, {.all : 0} } }; }
     440        _Istream_Cstr & getline( _Istream_Cstr & fmt, const char delimit = '\n' ) {
     441                fmt.delimit[0] = delimit; fmt.delimit[1] = '\0'; fmt.flags.delimit = true; fmt.flags.inex = true; return fmt; }
    453442        _Istream_Cstr & incl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = false; return fmt; }
    454443        _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
Note: See TracChangeset for help on using the changeset viewer.