Changeset 1a7203d for libcfa/src


Ignore:
Timestamp:
Oct 13, 2024, 12:28:15 PM (3 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
c565d68
Parents:
1a8b17a
Message:

change CFA runtime libraries to use C designator syntax

Location:
libcfa/src
Files:
6 edited

Legend:

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

    r1a8b17a r1a7203d  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  6 07:49:52 2024
    13 // Update Count     : 130
     12// Last Modified On : Sun Oct 13 10:50:30 2024
     13// Update Count     : 131
    1414//
    1515
     
    8989
    9090static inline {
    91         _Ostream_Manip(string) bin( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'b', { .all : 0 } }; }
    92         _Ostream_Manip(string) oct( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'o', { .all : 0 } }; }
    93         _Ostream_Manip(string) hex( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'x', { .all : 0 } }; }
    94         _Ostream_Manip(string) wd( unsigned int w, string s ) { return (_Ostream_Manip(string))@{ s, w, 0, 's', { .all : 0 } }; }
    95         _Ostream_Manip(string) wd( unsigned int w, unsigned int pc, string s ) { return (_Ostream_Manip(string))@{ s, w, pc, 's', { .flags.pc : true } }; }
     91        _Ostream_Manip(string) bin( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'b', { .all = 0 } }; }
     92        _Ostream_Manip(string) oct( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'o', { .all = 0 } }; }
     93        _Ostream_Manip(string) hex( string s ) { return (_Ostream_Manip(string))@{ s, 1, 0, 'x', { .all = 0 } }; }
     94        _Ostream_Manip(string) wd( unsigned int w, string s ) { return (_Ostream_Manip(string))@{ s, w, 0, 's', { .all = 0 } }; }
     95        _Ostream_Manip(string) wd( unsigned int w, unsigned int pc, string s ) { return (_Ostream_Manip(string))@{ s, w, pc, 's', { .flags.pc = true } }; }
    9696        _Ostream_Manip(string) & wd( unsigned int w, _Ostream_Manip(string) & fmt ) { fmt.wd = w; return fmt; }
    9797        _Ostream_Manip(string) & wd( unsigned int w, unsigned int pc, _Ostream_Manip(string) & fmt ) { fmt.wd = w; fmt.pc = pc; fmt.flags.pc = true; return fmt; }
     
    119119static inline {
    120120        // read width does not include null terminator
    121         _Istream_Swidth wdi( unsigned int rwd, string & s ) { return (_Istream_Swidth)@{ .s : s, { {.scanset : 0p}, .wd : rwd, {.flags.rwd : true} } }; }
     121        _Istream_Swidth wdi( unsigned int rwd, string & s ) { return (_Istream_Swidth)@{ .s = s, { {.scanset = 0p}, .wd = rwd, {.flags.rwd = true} } }; }
    122122        _Istream_Sstr getline( string & s, const char delimiter = '\n' ) {
    123 //              return (_Istream_Sstr)@{ { .s : s, { {.delimiters : { delimiter, '\0' } }, .wd : -1, {.flags.delimiter : true} } } };
    124                 return (_Istream_Sstr)@{ .s : s, { {.delimiters : { delimiter, '\0' } }, .wd : -1, {.flags.delimiter : true} } };
     123//              return (_Istream_Sstr)@{ { .s = s, { {.delimiters = { delimiter, '\0' } }, .wd = -1, {.flags.delimiter = true} } } };
     124                return (_Istream_Sstr)@{ .s = s, { {.delimiters = { delimiter, '\0' } }, .wd = -1, {.flags.delimiter = true} } };
    125125        }
    126126        _Istream_Sstr & getline( _Istream_Swidth & f, const char delimiter = '\n' ) {
     
    128128        }
    129129        _Istream_Squoted quoted( string & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
    130                 return (_Istream_Squoted)@{ { .s : s, { {.delimiters : { Ldelimiter, Rdelimiter, '\0' }}, .wd : -1, {.flags.rwd : true} } } };
     130                return (_Istream_Squoted)@{ { .s = s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
    131131        }
    132132        _Istream_Squoted & quoted( _Istream_Swidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     
    134134                return (_Istream_Squoted &)f;
    135135        }
    136 //      _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s : s, { {.scanset : scanset}, .wd : -1, {.flags.inex : false} } } }; }
    137         _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ .s : s, { {.scanset : scanset}, .wd : -1, {.flags.inex : false} } }; }
     136//      _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } } }; }
     137        _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } }; }
    138138        _Istream_Sstr & incl( const char scanset[], _Istream_Swidth & f ) { f.scanset = scanset; f.flags.inex = false; return (_Istream_Sstr &)f; }
    139 //      _Istream_Sstr excl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s : s, { {.scanset : scanset}, .wd : -1, {.flags.inex : true} } } }; }
    140         _Istream_Sstr excl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ .s : s, { {.scanset : scanset}, .wd : -1, {.flags.inex : true} } }; }
     139//      _Istream_Sstr excl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = true} } } }; }
     140        _Istream_Sstr excl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = true} } }; }
    141141        _Istream_Sstr & excl( const char scanset[], _Istream_Swidth & f ) { f.scanset = scanset; f.flags.inex = true; return (_Istream_Sstr &)f; }
    142 //      _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ { .s : s, { {.scanset : 0p}, .wd : -1, {.flags.ignore : true} } } }; }
    143         _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ .s : s, { {.scanset : 0p}, .wd : -1, {.flags.ignore : true} } }; }
     142//      _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ { .s = s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } } }; }
     143        _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ .s = s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; }
    144144        _Istream_Sstr & ignore( _Istream_Swidth & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; }
    145145        _Istream_Squoted & ignore( _Istream_Squoted & f ) { f.sstr.flags.ignore = true; return (_Istream_Squoted &)f; }
  • libcfa/src/collections/string_res.hfa

    r1a8b17a r1a7203d  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb  7 21:24:40 2024
    13 // Update Count     : 59
     12// Last Modified On : Sun Oct 13 10:51:11 2024
     13// Update Count     : 60
    1414//
    1515
     
    143143static inline {
    144144        // read width does not include null terminator
    145         _Istream_Rwidth wdi( unsigned int rwd, string_res & s ) { return (_Istream_Rwidth)@{ .s : &s, { {.scanset : 0p}, .wd : rwd, {.flags.rwd : true} } }; }
     145        _Istream_Rwidth wdi( unsigned int rwd, string_res & s ) { return (_Istream_Rwidth)@{ .s = &s, { {.scanset = 0p}, .wd = rwd, {.flags.rwd = true} } }; }
    146146        _Istream_Rstr getline( string_res & s, const char delimiter = '\n' ) {
    147 //              return (_Istream_Rstr)@{ { .s : &s, { {.delimiters : { delimiter, '\0' } }, .wd : -1, {.flags.delimiter : true} } } };
    148                 return (_Istream_Rstr)@{ .s : &s, { {.delimiters : { delimiter, '\0' } }, .wd : -1, {.flags.delimiter : true} } };
     147//              return (_Istream_Rstr)@{ { .s = &s, { {.delimiters = { delimiter, '\0' } }, .wd = -1, {.flags.delimiter = true} } } };
     148                return (_Istream_Rstr)@{ .s = &s, { {.delimiters = { delimiter, '\0' } }, .wd = -1, {.flags.delimiter = true} } };
    149149        }
    150150        _Istream_Rstr & getline( _Istream_Rwidth & f, const char delimiter = '\n' ) {
     
    152152        }
    153153        _Istream_Rquoted quoted( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {
    154                 return (_Istream_Rquoted)@{ { .s : &s, { {.delimiters : { Ldelimiter, Rdelimiter, '\0' }}, .wd : -1, {.flags.rwd : true} } } };
     154                return (_Istream_Rquoted)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };
    155155        }
    156156        _Istream_Rquoted & quoted( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     
    158158                return (_Istream_Rquoted &)f;
    159159        }
    160         _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s : &s, { {.scanset : scanset}, .wd : -1, {.flags.inex : false} } }; }
     160        _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } }; }
    161161        _Istream_Rstr & incl( const char scanset[], _Istream_Rwidth & f ) { f.scanset = scanset; f.flags.inex = false; return (_Istream_Rstr &)f; }
    162         _Istream_Rstr excl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s : &s, { {.scanset : scanset}, .wd : -1, {.flags.inex : true} } }; }
     162        _Istream_Rstr excl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = scanset}, .wd = -1, {.flags.inex = true} } }; }
    163163        _Istream_Rstr & excl( const char scanset[], _Istream_Rwidth & f ) { f.scanset = scanset; f.flags.inex = true; return (_Istream_Rstr &)f; }
    164         _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ .s : &s, { {.scanset : 0p}, .wd : -1, {.flags.ignore : true} } }; }
     164        _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; }
    165165        _Istream_Rstr & ignore( _Istream_Rwidth & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; }
    166166        _Istream_Rquoted & ignore( _Istream_Rquoted & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquoted &)f; }
  • libcfa/src/concurrency/actor.hfa

    r1a8b17a r1a7203d  
    710710// Default messages to send to any actor to change status
    711711// assigned at creation to __base_msg_finished to avoid unused message warning
    712 message __base_msg_finished @= { .alloc : Finished };
     712message __base_msg_finished @= { .alloc = Finished };
    713713struct delete_msg_t { inline message; } delete_msg = __base_msg_finished;
    714714struct destroy_msg_t { inline message; } destroy_msg = __base_msg_finished;
     
    718718allocation receive( actor & this, destroy_msg_t & msg ) { return Destroy; }
    719719allocation receive( actor & this, finished_msg_t & msg ) { return Finished; }
     720
     721// Default messages used all the time.
     722//static struct startmsg_t { inline message; } start_msg; // start actor
     723//static struct stopmsg_t { inline message; } stop_msg; // terminate actor
  • libcfa/src/concurrency/kernel/startup.cfa

    r1a8b17a r1a7203d  
    132132// Global state
    133133__thread struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= {
    134         .this_thread : NULL,                                                            // cannot use 0p
    135         .this_processor : NULL,
    136         .sched_lock : false,
    137         .preemption_state : { .disable_count : 1, .enabled : false, .in_progress : false },
     134        .this_thread = NULL,                                                            // cannot use 0p
     135        .this_processor = NULL,
     136        .sched_lock = false,
     137        .preemption_state = { .disable_count = 1, .enabled = false, .in_progress = false },
    138138        // random_state uninitialized
    139         .ready_rng : { .fwd_seed : 0, .bck_seed : 0 },
    140         .this_stats : NULL,
     139        .ready_rng = { .fwd_seed = 0, .bck_seed = 0 },
     140        .this_stats = NULL,
    141141        #ifdef __CFA_WITH_VERIFY__
    142                 .in_sched_lock : false,
    143                 .sched_id : 0,
     142                .in_sched_lock = false,
     143                .sched_id = 0,
    144144        #endif
    145145};
  • libcfa/src/iostream.cfa

    r1a8b17a r1a7203d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Sep  4 11:30:12 2024
    13 // Update Count     : 2040
     12// Last Modified On : Sun Oct 13 10:53:09 2024
     13// Update Count     : 2041
    1414//
    1515
     
    236236                static const unsigned char mask[256] @= {               // 256 covers all Latin-1 characters
    237237                        // opening delimiters, no space after
    238                         ['('] : Open, ['['] : Open, ['{'] : Open,
    239                         ['='] : Open, ['$'] : Open, [(unsigned char)'£'] : Open, [(unsigned char)'¥'] : Open,
    240                         [(unsigned char)'¡'] : Open, [(unsigned char)'¿'] : Open, [(unsigned char)'«'] : Open,
     238                        ['('] = Open, ['['] = Open, ['{'] = Open,
     239                        ['='] = Open, ['$'] = Open, [(unsigned char)'£'] = Open, [(unsigned char)'¥'] = Open,
     240                        [(unsigned char)'¡'] = Open, [(unsigned char)'¿'] = Open, [(unsigned char)'«'] = Open,
    241241                        // closing delimiters, no space before
    242                         [','] : Close, ['.'] : Close, [';'] : Close, ['!'] : Close, ['?'] : Close,
    243                         ['%'] : Close, [(unsigned char)'¢'] : Close, [(unsigned char)'»'] : Close,
    244                         [')'] : Close, [']'] : Close, ['}'] : Close,
     242                        [','] = Close, ['.'] = Close, [';'] = Close, ['!'] = Close, ['?'] = Close,
     243                        ['%'] = Close, [(unsigned char)'¢'] = Close, [(unsigned char)'»'] = Close,
     244                        [')'] = Close, [']'] = Close, ['}'] = Close,
    245245                        // opening-closing delimiters, no space before or after
    246                         ['\''] : OpenClose, ['`'] : OpenClose, ['"'] : OpenClose, [':'] : OpenClose,
    247                         [' '] : OpenClose, ['\f'] : OpenClose, ['\n'] : OpenClose, ['\r'] : OpenClose, ['\t'] : OpenClose, ['\v'] : OpenClose, // isspace
     246                        ['\''] = OpenClose, ['`'] = OpenClose, ['"'] = OpenClose, [':'] = OpenClose,
     247                        [' '] = OpenClose, ['\f'] = OpenClose, ['\n'] = OpenClose, ['\r'] = OpenClose, ['\t'] = OpenClose, ['\v'] = OpenClose, // isspace
    248248                }; // mask
    249249
  • libcfa/src/iostream.hfa

    r1a8b17a r1a7203d  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 15 18:21:22 2024
    13 // Update Count     : 761
     12// Last Modified On : Sun Oct 13 10:49:40 2024
     13// Update Count     : 765
    1414//
    1515
     
    198198#define INTEGRAL_FMT_DECL( T, CODE ) \
    199199static inline { \
    200         _Ostream_Manip(T) bin( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'b', { .all : 0 } }; } \
    201         _Ostream_Manip(T) oct( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'o', { .all : 0 } }; } \
    202         _Ostream_Manip(T) hex( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'x', { .all : 0 } }; } \
    203         _Ostream_Manip(T) wd( unsigned int wd, T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : wd, .pc : 0, .base : CODE, { .all : 0 } }; } \
    204         _Ostream_Manip(T) wd( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : wd, .pc : pc, .base : CODE, { .flags.pc : true } }; } \
     200        _Ostream_Manip(T) bin( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'b', { .all = 0 } }; } \
     201        _Ostream_Manip(T) oct( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; } \
     202        _Ostream_Manip(T) hex( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; } \
     203        _Ostream_Manip(T) wd( unsigned int wd, T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = wd, .pc = 0, .base = CODE, { .all = 0 } }; } \
     204        _Ostream_Manip(T) wd( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = wd, .pc = pc, .base = CODE, { .flags.pc = true } }; } \
    205205        _Ostream_Manip(T) & wd( unsigned int wd, _Ostream_Manip(T) & fmt ) { fmt.wd = wd; return fmt; } \
    206206        _Ostream_Manip(T) & wd( unsigned int wd, unsigned int pc, _Ostream_Manip(T) & fmt ) { fmt.wd = wd; fmt.pc = pc; fmt.flags.pc = true; return fmt; } \
     
    209209        _Ostream_Manip(T) & nobase( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \
    210210        _Ostream_Manip(T) & pad0( _Ostream_Manip(T) & fmt ) { fmt.flags.pad0 = true; return fmt; } \
    211         _Ostream_Manip(T) sign( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : CODE, { .flags.sign : true } }; } \
     211        _Ostream_Manip(T) sign( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = CODE, { .flags.sign = true } }; } \
    212212        _Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \
    213213} /* distribution */ \
     
    237237#define FLOATING_POINT_FMT_DECL( T ) \
    238238static inline { \
    239         _Ostream_Manip(T) hex( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'a', { .all : 0 } }; } \
    240         _Ostream_Manip(T) sci( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'e', { .all : 0 } }; } \
    241         _Ostream_Manip(T) eng( T val ) { return (_Ostream_Manip(T))@{ .val : val, 1, -1, .base : 'g', { .flags.eng : true } }; } \
    242         _Ostream_Manip(T) wd( unsigned int wd, T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : wd, .pc : 0, .base : 'g', { .all : 0 } }; } \
    243         _Ostream_Manip(T) wd( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : wd, .pc : pc, .base : 'f', { .flags.pc : true } }; } \
    244         _Ostream_Manip(T) ws( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : wd, .pc : pc, .base : 'g', { .flags.pc : true } }; } \
     239        _Ostream_Manip(T) hex( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'a', { .all = 0 } }; } \
     240        _Ostream_Manip(T) sci( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'e', { .all = 0 } }; } \
     241        _Ostream_Manip(T) eng( T val ) { return (_Ostream_Manip(T))@{ .val = val, 1, -1, .base = 'g', { .flags.eng = true } }; } \
     242        _Ostream_Manip(T) wd( unsigned int wd, T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = wd, .pc = 0, .base = 'g', { .all = 0 } }; } \
     243        _Ostream_Manip(T) wd( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = wd, .pc = pc, .base = 'f', { .flags.pc = true } }; } \
     244        _Ostream_Manip(T) ws( unsigned int wd, unsigned int pc, T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = wd, .pc = pc, .base = 'g', { .flags.pc = true } }; } \
    245245        _Ostream_Manip(T) & wd( unsigned int wd, _Ostream_Manip(T) & fmt ) { if ( fmt.flags.eng ) fmt.base = 'f'; fmt.wd = wd; return fmt; } \
    246246        _Ostream_Manip(T) & wd( unsigned int wd, unsigned int pc, _Ostream_Manip(T) & fmt ) { \
     
    248248        _Ostream_Manip(T) & ws( unsigned int wd, unsigned int pc, _Ostream_Manip(T) & fmt ) { fmt.wd = wd; fmt.pc = pc; fmt.flags.pc = true; return fmt; } \
    249249        _Ostream_Manip(T) & left( _Ostream_Manip(T) & fmt ) { fmt.flags.left = true; return fmt; } \
    250         _Ostream_Manip(T) upcase( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'G', { .all : 0 } }; } \
     250        _Ostream_Manip(T) upcase( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'G', { .all = 0 } }; } \
    251251        _Ostream_Manip(T) & upcase( _Ostream_Manip(T) & fmt ) { fmt.base -= 32; /* upper case */ return fmt; } \
    252252        _Ostream_Manip(T) & pad0( _Ostream_Manip(T) & fmt ) { fmt.flags.pad0 = true; return fmt; } \
    253         _Ostream_Manip(T) sign( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'g', { .flags.sign : true } }; } \
     253        _Ostream_Manip(T) sign( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'g', { .flags.sign = true } }; } \
    254254        _Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \
    255         _Ostream_Manip(T) nodp( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'g', { .flags.nobsdp : true } }; } \
     255        _Ostream_Manip(T) nodp( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'g', { .flags.nobsdp = true } }; } \
    256256        _Ostream_Manip(T) & nodp( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \
    257         _Ostream_Manip(T) unit( T val ) { return (_Ostream_Manip(T))@{ .val : val, .wd : 1, .pc : 0, .base : 'g', { .flags.nobsdp : true } }; } \
     257        _Ostream_Manip(T) unit( T val ) { return (_Ostream_Manip(T))@{ .val = val, .wd = 1, .pc = 0, .base = 'g', { .flags.nobsdp = true } }; } \
    258258        _Ostream_Manip(T) & unit( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \
    259259} /* distribution */ \
     
    269269
    270270static inline {
    271         _Ostream_Manip(char) bin( char c ) { return (_Ostream_Manip(char))@{ .val : c, .wd : 1, .pc : 0, .base : 'b', { .all : 0 } }; }
    272         _Ostream_Manip(char) oct( char c ) { return (_Ostream_Manip(char))@{ .val : c, .wd : 1, .pc : 0, .base : 'o', { .all : 0 } }; }
    273         _Ostream_Manip(char) hex( char c ) { return (_Ostream_Manip(char))@{ .val : c, .wd : 1, .pc : 0, .base : 'x', { .all : 0 } }; }
    274         _Ostream_Manip(char) wd( unsigned int wd, char c ) { return (_Ostream_Manip(char))@{ c, wd, 0, .base : 'c', { .all : 0 } }; }
     271        _Ostream_Manip(char) bin( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'b', { .all = 0 } }; }
     272        _Ostream_Manip(char) oct( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; }
     273        _Ostream_Manip(char) hex( char c ) { return (_Ostream_Manip(char))@{ .val = c, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; }
     274        _Ostream_Manip(char) wd( unsigned int wd, char c ) { return (_Ostream_Manip(char))@{ c, wd, 0, .base = 'c', { .all = 0 } }; }
    275275        _Ostream_Manip(char) & wd( unsigned int wd, _Ostream_Manip(char) & fmt ) { fmt.wd = wd; return fmt; }
    276276        _Ostream_Manip(char) & left( _Ostream_Manip(char) & fmt ) { fmt.flags.left = true; return fmt; }
     
    286286
    287287static inline {
    288         _Ostream_Manip(const char *) bin( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val : s, .wd : 1, .pc : 0, .base : 'b', { .all : 0 } }; }
    289         _Ostream_Manip(const char *) oct( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val : s, .wd : 1, .pc : 0, .base : 'o', { .all : 0 } }; }
    290         _Ostream_Manip(const char *) hex( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val : s, .wd : 1, .pc : 0, .base : 'x', { .all : 0 } }; }
    291         _Ostream_Manip(const char *) wd( unsigned int wd, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, wd, 0, .base : 's', { .all : 0 } }; }
    292         _Ostream_Manip(const char *) wd( unsigned int wd, unsigned int pc, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, .wd : wd, .pc : pc, .base : 's', { .flags.pc : true } }; }
     288        _Ostream_Manip(const char *) bin( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 'b', { .all = 0 } }; }
     289        _Ostream_Manip(const char *) oct( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; }
     290        _Ostream_Manip(const char *) hex( const char s[] ) { return (_Ostream_Manip(const char *))@{ .val = s, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; }
     291        _Ostream_Manip(const char *) wd( unsigned int wd, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, wd, 0, .base = 's', { .all = 0 } }; }
     292        _Ostream_Manip(const char *) wd( unsigned int wd, unsigned int pc, const char s[] ) { return (_Ostream_Manip(const char *))@{ s, .wd = wd, .pc = pc, .base = 's', { .flags.pc = true } }; }
    293293        _Ostream_Manip(const char *) & wd( unsigned int wd, _Ostream_Manip(const char *) & fmt ) { fmt.wd = wd; return fmt; }
    294294        _Ostream_Manip(const char *) & wd( unsigned int wd, unsigned int pc, _Ostream_Manip(const char *) & fmt ) { fmt.wd = wd; fmt.pc = pc; fmt.flags.pc = true; return fmt; }
     
    388388
    389389static inline {
    390         _Istream_Cskip skip( const char scanset[] ) { return (_Istream_Cskip)@{ .scanset : scanset, .wd : 0 }; }
    391         _Istream_Cskip skip( unsigned int wd ) { return (_Istream_Cskip)@{ .scanset : 0p, .wd : wd }; }
     390        _Istream_Cskip skip( const char scanset[] ) { return (_Istream_Cskip)@{ .scanset = scanset, .wd = 0 }; }
     391        _Istream_Cskip skip( unsigned int wd ) { return (_Istream_Cskip)@{ .scanset = 0p, .wd = wd }; }
    392392} // distribution
    393393
     
    428428        _Istream_Cwidth wdi( unsigned int wd, char s[] ) {
    429429                if ( wd <= 1 ) throwResume ExceptionInst( cstring_length ); // minimum 1 character and null terminator
    430                 return (_Istream_Cwidth)@{ .s : s, { {.scanset : 0p}, .wd : wd, {.all : 0} } };
     430                return (_Istream_Cwidth)@{ .s = s, { {.scanset = 0p}, .wd = wd, {.all = 0} } };
    431431        }
    432432        _Istream_Cwidth wdi( unsigned int wd, unsigned int rwd, char s[] ) {
    433433                if ( wd <= 1 || wd <= rwd ) throwResume ExceptionInst( cstring_length ); // minimum 1 character, null terminator, plus subset
    434                 return (_Istream_Cwidth)@{ .s : s, { {.scanset : 0p}, .wd : rwd, {.flags.rwd : true} } };
     434                return (_Istream_Cwidth)@{ .s = s, { {.scanset = 0p}, .wd = rwd, {.flags.rwd = true} } };
    435435        }
    436436        _Istream_Cstr & getline( _Istream_Cwidth & f, const char delimiter = '\n' ) {
     
    438438        }
    439439        _Istream_Cquoted quoted( char & ch, const char Ldelimiter = '\'', const char Rdelimiter = '\0' ) {
    440                 return (_Istream_Cquoted)@{ { .s : &ch, { {.delimiters : { Ldelimiter, Rdelimiter, '\1' }}, .wd : 1, {.flags.rwd : true} } } };
     440                return (_Istream_Cquoted)@{ { .s = &ch, { {.delimiters = { Ldelimiter, Rdelimiter, '\1' }}, .wd = 1, {.flags.rwd = true} } } };
    441441        }
    442442        _Istream_Cquoted & quoted( _Istream_Cwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {
     
    446446        _Istream_Cstr & incl( const char scanset[], _Istream_Cwidth & f ) { f.scanset = scanset; f.flags.inex = false; return (_Istream_Cstr &)f; }
    447447        _Istream_Cstr & excl( const char scanset[], _Istream_Cwidth & f ) { f.scanset = scanset; f.flags.inex = true; return (_Istream_Cstr &)f; }
    448         _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ { .s : (char *)s, { {.scanset : 0p}, .wd : -1, {.flags.ignore : true} } } }; }
     448        _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ { .s = (char *)s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } } }; }
    449449        _Istream_Cstr & ignore( _Istream_Cwidth & f ) { f.flags.ignore = true; return (_Istream_Cstr &)f; }
    450450        _Istream_Cquoted & ignore( _Istream_Cquoted & f ) { f.cstr.flags.ignore = true; return (_Istream_Cquoted &)f; }
     
    468468#define INPUT_FMT_DECL( T ) \
    469469static inline { \
    470         _Istream_Manip(T) wdi( unsigned int wd, T & val ) { return (_Istream_Manip(T))@{ .val : val, .wd : wd, .ignore : false }; } \
    471         _Istream_Manip(T) ignore( const T & val ) { return (_Istream_Manip(T))@{ .val : (T &)val, .wd : -1, .ignore : true }; } \
     470        _Istream_Manip(T) wdi( unsigned int wd, T & val ) { return (_Istream_Manip(T))@{ .val = val, .wd = wd, .ignore = false }; } \
     471        _Istream_Manip(T) ignore( const T & val ) { return (_Istream_Manip(T))@{ .val = (T &)val, .wd = -1, .ignore = true }; } \
    472472        _Istream_Manip(T) & ignore( _Istream_Manip(T) & fmt ) { fmt.ignore = true; return fmt; } \
    473473} /* distribution */ \
Note: See TracChangeset for help on using the changeset viewer.