Changeset bf1cbde
- Timestamp:
- Oct 5, 2023, 1:50:35 PM (14 months ago)
- Branches:
- master
- Children:
- 8cffa4f
- Parents:
- 04db9f6
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r04db9f6 rbf1cbde 960 960 istype & ?|?( istype & is, _Istream_Cskip f ) { 961 961 // printf( "skip %s %d\n", f.scanset, f.wd ); 962 if ( f.scanset ) fmt( is, f.scanset, "" ); // no input arguments 962 if ( f.scanset ) { 963 int nscanset = strlen(f.scanset); 964 char fmtstr[ sizeof("%*[]") + nscanset ]; 965 int pos = 0; 966 fmtstr[pos] = '%'; pos += 1; 967 fmtstr[pos] = '*'; pos += 1; 968 fmtstr[pos] = '['; pos += 1; 969 strcpy( &fmtstr[pos], f.scanset ); pos += nscanset; 970 fmtstr[pos] = ']'; pos += 1; 971 fmtstr[pos] = '\0'; 972 fmt( is, fmtstr, (void*)0 ); // last arg is dummy: suppress gcc warning 973 } 963 974 else for ( f.wd ) fmt( is, "%*c" ); 964 975 return is; -
tests/collections/.in/string-istream-manip.txt
r04db9f6 rbf1cbde 1 1 abc 2 abc2 cccccb 3 3 xx 4 4 abcxxx … … 6 6 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 7 7 abc 8 abc8 cccccb 9 9 xx 10 10 abcxxx -
tests/io/.in/manipulatorsInput.txt
r04db9f6 rbf1cbde 2 2 123456789 3 3 abc 4 abc4 cccccb 5 5 xx 6 6 abcxxx … … 8 8 aaaaaaaaxxxxxxxxaabbccbbdddwwwbbbbbbbbwwwwwwwwaaaaaaaawwwwwwww 9 9 abc 10 abc10 cccccb 11 11 xx 12 12 abcxxx -
tests/io/manipulatorsInput.cfa
r04db9f6 rbf1cbde 52 52 { 53 53 char s[] = "yyyyyyyyyyyyyyyyyyyy"; 54 const char sk [] = "abc";55 scanf( "abc " ); scanf( sk ); for ( 5 ) scanf( "%*c" );printf( "1 %s\n", s );54 const char sk_fmt[] = "%*[abc]"; 55 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s ); 56 56 scanf( "%s", s ); printf( "2 %s\n", s ); 57 57 scanf( "%*s" ); printf( "3 %s\n", s );
Note: See TracChangeset
for help on using the changeset viewer.