Changes in / [396037d:6ad19fd]


Ignore:
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r396037d r6ad19fd  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jun  9 20:54:05 2019
    13 // Update Count     : 804
     12// Last Modified On : Mon Jun 10 18:06:16 2019
     13// Update Count     : 809
    1414//
    1515
     
    797797} // ?|?
    798798
     799forall( dtype istype | istream( istype ) )
     800istype & ?|?( istype & is, _Istream_Char f ) {
     801        fmt( is, "%*c" );                                                                       // argument variable unused
     802        return is;
     803} // ?|?
     804
    799805#define InputFMTImpl( T, CODE ) \
    800806forall( dtype istype | istream( istype ) ) \
     
    802808        enum { size = 16 }; \
    803809        char fmtstr[size]; \
    804         if ( f.wd == -1 || strcmp( CODE, "c" ) == 0 ) { /* ignore width with "c" */     \
     810        if ( f.wd == -1 ) { \
    805811                snprintf( fmtstr, size, "%%%s%s", f.ignore ? "*" : "", CODE ); \
    806812        } else { \
     
    812818} // ?|?
    813819
    814 InputFMTImpl( char, "c" )
    815820InputFMTImpl( signed char, "hhi" )
    816821InputFMTImpl( unsigned char, "hhi" )
  • libcfa/src/iostream.hfa

    r396037d r6ad19fd  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jun  9 22:46:17 2019
    13 // Update Count     : 315
     12// Last Modified On : Mon Jun 10 18:05:13 2019
     13// Update Count     : 320
    1414//
    1515
     
    347347static inline _Istream_Cstr excl( const char * scanset, _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
    348348static inline _Istream_Cstr cstr( char * s ) { return (_Istream_Cstr){ s, 0p, -1, { .all : 0 } }; }
    349 static inline _Istream_Cstr ignore( const char * s ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }
     349static inline _Istream_Cstr ignore( const char * s ) { return (_Istream_Cstr)@{ 0p, 0p, -1, { .flags.ignore : true } }; }
    350350static inline _Istream_Cstr ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; }
    351351static inline _Istream_Cstr wd( unsigned int w, char * s ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; }
    352352static inline _Istream_Cstr wd( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
    353 forall( dtype istype | istream( istype ) ) istype & ?|?( istype &, _Istream_Cstr );
     353forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f );
     354
     355struct _Istream_Char {
     356        bool ignore;                                                                            // do not change input argument
     357}; // _Istream_Char
     358
     359static inline _Istream_Char ignore( const char c ) { return (_Istream_Char)@{ true }; }
     360static inline _Istream_Char ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
     361forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f );
    354362
    355363forall( otype T )
     
    368376} // ?|?
    369377
    370 InputFMTDecl( char )
    371378InputFMTDecl( signed char )
    372379InputFMTDecl( unsigned char )
  • tests/.expect/manipulatorsInput.txt

    r396037d r6ad19fd  
    262613 wwwwwwww
    2727a
    28 b
    29 b
    30 b
     28a
    3129-1
    323015
  • tests/.in/manipulatorsInput.txt

    r396037d r6ad19fd  
    77abcyyy
    88aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    9 abcd
     9ab
    10100xff 017 15-15
    11110xff 017 15-15
  • tests/manipulatorsInput.cfa

    r396037d r6ad19fd  
    77// Created On       : Sat Jun  8 17:58:54 2019
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Mon Jun 10 08:11:03 2019
    10 // Update Count     : 7
     9// Last Modified On : Mon Jun 10 18:38:35 2019
     10// Update Count     : 8
    1111//
    1212
     
    5252                char c;
    5353                sin | c;                                                        sout | c;
    54                 sin | wdi( 3, c );                                      sout | c;
    5554                sin | ignore( c );                                      sout | c;
    56                 sin | ignore( wdi( 3, c ) );            sout | c;
    5755
    5856                signed char sc;
  • tests/sum.cfa

    r396037d r6ad19fd  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun May 19 11:21:02 2019
    14 // Update Count     : 330
     13// Last Modified On : Thu Jun  6 16:18:22 2019
     14// Update Count     : 333
    1515//
    1616
     
    111111        };
    112112        GS(int) gs;
    113         gs.x = anew( size );                                                            // create array storage for field
     113        // FIX ME, resolution problem with anew not picking up the LH type
     114        gs.x = (typeof(gs.x))anew( size );                                      // create array storage for field
    114115        s = 0; v = low;
    115116        for ( int i = 0; i < size; i += 1, v += 1 ) {
Note: See TracChangeset for help on using the changeset viewer.