Changes in / [221c542e:64c4b4d]


Ignore:
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r221c542e r64c4b4d  
    10761076                        } // if
    10771077                        // FIX ME: CFA strings need to be modified to NOT change the argument for this case, then this can be removed.
    1078                         if ( rwd > 0 && args == 0 ) f.s[0]= '\0';       // read failed => no pattern match => set string to null
     1078                        if ( ! f.flags.ignore && rwd > 0 && args == 0 ) f.s[0]= '\0';   // read failed => no pattern match => set string to null
    10791079                } else {
    10801080                        if ( f.flags.delimiter ) {                                      // getline
     
    11141114                                } // if
    11151115                        } // if
    1116                         if ( rwd > 0 && args == 0 ) f.s[0]= '\0';       // read failed => no pattern match => set string to null
     1116                        if ( ! f.flags.ignore && rwd > 0 && args == 0 ) f.s[0]= '\0';   // read failed => no pattern match => set string to null
    11171117                } // if
    11181118                if ( args == 1 && eof( is ) ) {                                 // data but scan ended at EOF
  • tests/collections/.expect/string-istream-manip.txt

    r221c542e r64c4b4d  
    686812 wwwwwwww
    696913 wwwwwwww
    70 14 cccc
     7014
    717115
    72721 yyyyyyyyyyyyyyyyyyyy
     
    838312 wwwwwwww
    848413 wwwwwwww
    85 14 cccc
     8514
    868615
  • tests/collections/.in/string-istream-manip.txt

    r221c542e r64c4b4d  
    3636abcxxx
    3737abcyyy
    38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    39 uuuuuccccuuuuu
     38aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     39uuuuu
    4040abc
    4141cccccb
     
    4343abcxxx
    4444abcyyy
    45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    46 uuuuuccccuuuuu
     45aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     46uuuuu
  • tests/collections/string-istream-manip.cfa

    r221c542e r64c4b4d  
    165165        sin | ignore( incl( "abc", wdi( 8, s ) ) );     sout | "12" | s;
    166166        sin | ignore( excl( "abc", wdi( 8, s ) ) );     sout | "13" | s;
     167                sin | "\n";
    167168
    168169                s = "q";
     
    191192        sin | ignore( incl( "abc", wdi( 8, s ) ) );     sout | "12" | s;
    192193        sin | ignore( excl( "abc", wdi( 8, s ) ) );     sout | "13" | s;
     194                sin | "\n";
    193195
    194196                s = "q";
  • tests/io/.expect/manipulatorsInput.arm64.txt

    r221c542e r64c4b4d  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
     
    32323 abcxxx
    33334 aaaaaaaa
    34 5
     345 aaaaaaaa
    35356 aabbccbb
    36367 dddwww
    37 8
    38 9
     378 dddwww
     389 dddwww
    393910 aaaaaaaa
    404011 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4112 wwwwwwww
     4213 wwwwwwww
     4314
    444415
    454516 get this line
  • tests/io/.expect/manipulatorsInput.x64.txt

    r221c542e r64c4b4d  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
     
    32323 abcxxx
    33334 aaaaaaaa
    34 5
     345 aaaaaaaa
    35356 aabbccbb
    36367 dddwww
    37 8
    38 9
     378 dddwww
     389 dddwww
    393910 aaaaaaaa
    404011 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4112 wwwwwwww
     4213 wwwwwwww
     4314
    444415
    454516 get this line
  • tests/io/.expect/manipulatorsInput.x86.txt

    r221c542e r64c4b4d  
    181812 wwwwwwww
    191913 wwwwwwww
    20 14 rc=1, cccc
     2014 rc=0, q
    212115 rc=0, q
    222216 get this line
     
    32323 abcxxx
    33334 aaaaaaaa
    34 5
     345 aaaaaaaa
    35356 aabbccbb
    36367 dddwww
    37 8
    38 9
     378 dddwww
     389 dddwww
    393910 aaaaaaaa
    404011 wwwwwwww
    41 12
    42 13
    43 14 cccc
     4112 wwwwwwww
     4213 wwwwwwww
     4314
    444415
    454516 get this line
  • tests/io/.in/manipulatorsInput.txt

    r221c542e r64c4b4d  
    88abcxxx
    99abcyyy
    10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    11 uuuuuccccuuuuu
     10aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     11uuuuu
    1212get this line
    1313@# this line 1)-{}%
     
    2323abcxxx
    2424abcyyy
    25 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww
    26 uuuuuccccuuuuu
     25aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww
     26uuuuu
    2727get this line
    2828@# this line 1)-{}%
  • tests/io/manipulatorsInput.cfa

    r221c542e r64c4b4d  
    5555        }
    5656        {
    57                 char s[] = "yyyyyyyyyyyyyyyyyyyy";
     57                char s[] = "yyyyyyyyyyyyyyyyyyyy";                                                     // Input characters consumed:
    5858                const char sk_fmt[] = "%*[abc]";
    59                 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );
    60                 scanf( "%s", s );                                                               printf( "2 %s\n", s );
    61                 scanf( "%*s" );                                                                 printf( "3 %s\n", s );
    62                 scanf( "%8s", s );                                                              printf( "4 %s\n", s );
    63                 scanf( "%*8s" );                                                                printf( "5 %s\n", s );
    64 
    65                 scanf( "%[abc]", s );                                                   printf( "6 %s\n", s );
    66                 scanf( "%[^abc]", s );                                                  printf( "7 %s\n", s );
    67                 scanf( "%*[abc]" );                                                             printf( "8 %s\n", s );
    68                 scanf( "%*[^abc]" );                                                    printf( "9 %s\n", s );
    69                 scanf( "%8[abc]", s );                                                  printf( "10 %s\n", s );
    70                 scanf( "%8[^abc]", s );                                                 printf( "11 %s\n", s );
    71                 scanf( "%*8[abc]" );                                                    printf( "12 %s\n", s );
    72                 scanf( "%*8[^abc]" );                                                   printf( "13 %s\n", s );
     59                scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );     // |abc |\ncccccb| \nxx\n|
     60                scanf( "%s", s );                                                               printf( "2 %s\n", s );                 // |abcxxx|
     61                scanf( "%*s" );                                                                 printf( "3 %s\n", s );                 // |\nabcyyy|
     62                scanf( "%8s", s );                                                              printf( "4 %s\n", s );                 // |\naaaaaaaa|
     63                scanf( "%*8s" );                                                                printf( "5 %s\n", s );                 // |xxxxxxxx|
     64
     65                scanf( "%[abc]", s );                                                   printf( "6 %s\n", s );                 // |aabbccbb|
     66                scanf( "%[^abc]", s );                                                  printf( "7 %s\n", s );                 // |dddwww|
     67                scanf( "%*[abc]" );                                                             printf( "8 %s\n", s );                 // |bbbbbbbb|
     68                scanf( "%*[^abc]" );                                                    printf( "9 %s\n", s );                 // |wwwwwwww|
     69                scanf( "%8[abc]", s );                                                  printf( "10 %s\n", s );                // |aaaaaaaa|
     70                scanf( "%8[^abc]", s );                                                 printf( "11 %s\n", s );                // |wwwwwwww|
     71                scanf( "%*8[abc]" );                                                    printf( "12 %s\n", s );                // |aaaaaaaa|
     72                scanf( "%*8[^abc]" );                                                   printf( "13 %s\n", s );                // |wwwwwwww|
     73                scanf( "\n" );                                                                  // must start next line                // |\n|
    7374
    7475                int rc;
    7576                s[0] = 'q'; s[1] = '\0'; rc = 99;
    76                 rc = scanf( "%[abc]", s );                                              printf( "14 rc=%d, %s\n", rc, s );
     77                rc = scanf( "%[abc]", s );                                              printf( "14 rc=%d, %s\n", rc, s );     // ||
    7778                s[0] = 'q'; s[1] = '\0'; rc = 99;
    78                 rc = scanf( "%[^u]", s );                                               printf( "15 rc=%d, %s\n", rc, s );
    79                 scanf( "%*[u]\n" );
    80                 scanf( "%[^\n]\n", s );                                                 printf( "16 %s\n", s );
    81                 scanf( "%[^%%]%%\n", s );                                               printf( "17 %s\n", s );
    82 
    83                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    84                 scanf( "\"%[^\"]\"", s );                                               printf( "18 %s\n", s );
    85                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    86                 scanf( "'%[^']'", s );                                                  printf( "19 %s\n", s );
    87                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    88                 scanf( "{%[^}]}", s );                                                  printf( "20 %s\n", s );
    89                 scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace
    90                 scanf( "X%[^Y]Y", s );                                                  printf( "21 %s\n", s );
    91                 scanf( "\n" );                                                                  // must start next line
     79                rc = scanf( "%[^u]", s );                                               printf( "15 rc=%d, %s\n", rc, s );     // ||
     80                scanf( "%*[u]\n" );                                                                    // |uuuuu\n|
     81                scanf( "%[^\n]\n", s );                                                 printf( "16 %s\n", s );                // |get this line\n|
     82                scanf( "%[^%%]%%\n", s );                                               printf( "17 %s\n", s );                // |@# this line 1)-{}%\n|
     83
     84                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                   // ||
     85                scanf( "\"%[^\"]\"", s );                                               printf( "18 %s\n", s );                // |"abc"|
     86                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                   // |\n|
     87                scanf( "'%[^']'", s );                                                  printf( "19 %s\n", s );                // |'abc  '|
     88                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                   // |\n|
     89                scanf( "{%[^}]}", s );                                                  printf( "20 %s\n", s );                // |{ d d\n\nd }|
     90                scanf( "%*[ \f\n\r\t\v]" );                                             // ignore whitespace                   // |\n|
     91                scanf( "X%[^Y]Y", s );                                                  printf( "21 %s\n", s );                // |X            ZC44%Y|
     92                scanf( "\n" );                                                                  // must start next line                // |\n|
    9293        }
    9394        {
     
    108109                sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s;
    109110                sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s;
     111                sin | "\n";
    110112
    111113                s[0] = 'q'; s[1] = '\0';
Note: See TracChangeset for help on using the changeset viewer.