Ignore:
Timestamp:
Sep 1, 2023, 3:54:42 PM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
4b30318b
Parents:
4269d1b (diff), 4c0fa03 (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

    r4269d1b r8a9a3ab  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 25 14:55:06 2023
    13 // Update Count     : 535
     12// Last Modified On : Thu Aug 31 10:55:35 2023
     13// Update Count     : 544
    1414//
    1515
     
    406406// *********************************** manipulators ***********************************
    407407
    408 struct _Istream_Cstr {
    409         char * s;
     408struct _Istream_str_base {
    410409        union {
    411410                const char * scanset;
     
    422421                } flags;
    423422        };
     423}; // _Istream_str_base
     424
     425struct _Istream_Cstr {
     426        char * s;
     427        inline _Istream_str_base;
    424428}; // _Istream_Cstr
    425429
    426430static inline {
    427431        // width must include room for null terminator
    428         _Istream_Cstr wdi( unsigned int wd, char s[] ) { return (_Istream_Cstr)@{ s, {0p}, wd, {.all : 0} }; }
     432        _Istream_Cstr wdi( unsigned int wd, char s[] ) { return (_Istream_Cstr)@{ s, { {0p}, wd, {.all : 0} } }; }
    429433        // read width does not include null terminator
    430434        _Istream_Cstr wdi( unsigned int wd, unsigned int rwd, char s[] ) {
    431435                if ( wd <= rwd ) throw (cstring_length){ &cstring_length_vt };
    432                 return (_Istream_Cstr)@{ s, {0p}, rwd, {.flags.rwd : true} };
     436                return (_Istream_Cstr)@{ s, { {0p}, rwd, {.flags.rwd : true} } };
    433437        }
    434         _Istream_Cstr skip( const char scanset[] ) { return (_Istream_Cstr)@{ 0p, {scanset}, -1, {.all : 0} }; }
    435         _Istream_Cstr skip( unsigned int wd ) { return (_Istream_Cstr)@{ 0p, {0p}, wd, {.all : 0} }; }
     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} } }; }
    436440        _Istream_Cstr & getline( _Istream_Cstr & fmt, const char delimit = '\n' ) {
    437441                fmt.delimit[0] = delimit; fmt.delimit[1] = '\0'; fmt.flags.delimit = true; fmt.flags.inex = true; return fmt; }
    438442        _Istream_Cstr & incl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = false; return fmt; }
    439443        _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
    440         _Istream_Cstr ignore( char s[] ) { return (_Istream_Cstr)@{ s, {0p}, -1, {.flags.ignore : true} }; }
     444        _Istream_Cstr ignore( char s[] ) { return (_Istream_Cstr)@{ s, { {0p}, -1, {.flags.ignore : true} } }; }
    441445        _Istream_Cstr & ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; }
    442446} // distribution
Note: See TracChangeset for help on using the changeset viewer.