Changes in / [221c542e:64c4b4d]
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r221c542e r64c4b4d 1076 1076 } // if 1077 1077 // 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 null1078 if ( ! f.flags.ignore && rwd > 0 && args == 0 ) f.s[0]= '\0'; // read failed => no pattern match => set string to null 1079 1079 } else { 1080 1080 if ( f.flags.delimiter ) { // getline … … 1114 1114 } // if 1115 1115 } // if 1116 if ( rwd > 0 && args == 0 ) f.s[0]= '\0'; // read failed => no pattern match => set string to null1116 if ( ! f.flags.ignore && rwd > 0 && args == 0 ) f.s[0]= '\0'; // read failed => no pattern match => set string to null 1117 1117 } // if 1118 1118 if ( args == 1 && eof( is ) ) { // data but scan ended at EOF -
tests/collections/.expect/string-istream-manip.txt
r221c542e r64c4b4d 68 68 12 wwwwwwww 69 69 13 wwwwwwww 70 14 cccc70 14 71 71 15 72 72 1 yyyyyyyyyyyyyyyyyyyy … … 83 83 12 wwwwwwww 84 84 13 wwwwwwww 85 14 cccc85 14 86 86 15 -
tests/collections/.in/string-istream-manip.txt
r221c542e r64c4b4d 36 36 abcxxx 37 37 abcyyy 38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 39 uuuuu ccccuuuuu38 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 39 uuuuu 40 40 abc 41 41 cccccb … … 43 43 abcxxx 44 44 abcyyy 45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 46 uuuuu ccccuuuuu45 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 46 uuuuu -
tests/collections/string-istream-manip.cfa
r221c542e r64c4b4d 165 165 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 166 166 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 167 sin | "\n"; 167 168 168 169 s = "q"; … … 191 192 sin | ignore( incl( "abc", wdi( 8, s ) ) ); sout | "12" | s; 192 193 sin | ignore( excl( "abc", wdi( 8, s ) ) ); sout | "13" | s; 194 sin | "\n"; 193 195 194 196 s = "q"; -
tests/io/.expect/manipulatorsInput.arm64.txt
r221c542e r64c4b4d 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line … … 32 32 3 abcxxx 33 33 4 aaaaaaaa 34 5 34 5 aaaaaaaa 35 35 6 aabbccbb 36 36 7 dddwww 37 8 38 9 37 8 dddwww 38 9 dddwww 39 39 10 aaaaaaaa 40 40 11 wwwwwwww 41 12 42 13 43 14 cccc41 12 wwwwwwww 42 13 wwwwwwww 43 14 44 44 15 45 45 16 get this line -
tests/io/.expect/manipulatorsInput.x64.txt
r221c542e r64c4b4d 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line … … 32 32 3 abcxxx 33 33 4 aaaaaaaa 34 5 34 5 aaaaaaaa 35 35 6 aabbccbb 36 36 7 dddwww 37 8 38 9 37 8 dddwww 38 9 dddwww 39 39 10 aaaaaaaa 40 40 11 wwwwwwww 41 12 42 13 43 14 cccc41 12 wwwwwwww 42 13 wwwwwwww 43 14 44 44 15 45 45 16 get this line -
tests/io/.expect/manipulatorsInput.x86.txt
r221c542e r64c4b4d 18 18 12 wwwwwwww 19 19 13 wwwwwwww 20 14 rc= 1, cccc20 14 rc=0, q 21 21 15 rc=0, q 22 22 16 get this line … … 32 32 3 abcxxx 33 33 4 aaaaaaaa 34 5 34 5 aaaaaaaa 35 35 6 aabbccbb 36 36 7 dddwww 37 8 38 9 37 8 dddwww 38 9 dddwww 39 39 10 aaaaaaaa 40 40 11 wwwwwwww 41 12 42 13 43 14 cccc41 12 wwwwwwww 42 13 wwwwwwww 43 14 44 44 15 45 45 16 get this line -
tests/io/.in/manipulatorsInput.txt
r221c542e r64c4b4d 8 8 abcxxx 9 9 abcyyy 10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 11 uuuuu ccccuuuuu10 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 11 uuuuu 12 12 get this line 13 13 @# this line 1)-{}% … … 23 23 abcxxx 24 24 abcyyy 25 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 26 uuuuu ccccuuuuu25 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwwwaaaaaaaawwwwwwww 26 uuuuu 27 27 get this line 28 28 @# this line 1)-{}% -
tests/io/manipulatorsInput.cfa
r221c542e r64c4b4d 55 55 } 56 56 { 57 char s[] = "yyyyyyyyyyyyyyyyyyyy"; 57 char s[] = "yyyyyyyyyyyyyyyyyyyy"; // Input characters consumed: 58 58 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| 73 74 74 75 int rc; 75 76 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 ); // || 77 78 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| 92 93 } 93 94 { … … 108 109 sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s; 109 110 sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s; 111 sin | "\n"; 110 112 111 113 s[0] = 'q'; s[1] = '\0';
Note: See TracChangeset
for help on using the changeset viewer.