Changeset e7a8f65 for libcfa/src/iostream.cfa
- Timestamp:
- Aug 9, 2023, 5:34:21 PM (11 months ago)
- Branches:
- master
- Children:
- 74c6748
- Parents:
- 3318dff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r3318dff re7a8f65 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 7 08:59:29202313 // Update Count : 14 0712 // Last Modified On : Wed Aug 9 10:10:56 2023 13 // Update Count : 1432 14 14 // 15 15 … … 271 271 OSTYPE_VOID_IMPL( const char * ) 272 272 273 // ostype & ?|?( ostype & os, const char16_t * s) {273 // ostype & ?|?( ostype & os, const char16_t s[] ) { 274 274 // if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); 275 275 // fmt( os, "%ls", s ); … … 278 278 279 279 // #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous 280 // ostype & ?|?( ostype & os, const char32_t * s) {280 // ostype & ?|?( ostype & os, const char32_t s[] ) { 281 281 // if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); 282 282 // fmt( os, "%ls", s ); … … 285 285 // #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) 286 286 287 // ostype & ?|?( ostype & os, const wchar_t * s) {287 // ostype & ?|?( ostype & os, const wchar_t s[] ) { 288 288 // if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); 289 289 // fmt( os, "%ls", s ); … … 917 917 // } // ?|? 918 918 919 istype & ?|?( istype & is, char s[] ) {920 fmt( is, "%s", s );921 return is;922 } // ?|?923 ISTYPE_VOID_IMPL( char * )919 // istype & ?|?( istype & is, char s[] ) { 920 // fmt( is, "%s", s ); 921 // return is; 922 // } // ?|? 923 // ISTYPE_VOID_IMPL( char * ) 924 924 925 925 // manipulators … … 934 934 istype & nl( istype & is ) { 935 935 fmt( is, "%*[^\n]" ); // ignore characters to newline 936 if ( ! eof( is ) && getANL$( is ) ) fmt( is, "%*c" ); // read newline 936 937 return is; 937 938 } // nl … … 952 953 forall( istype & | basic_istream( istype ) ) { 953 954 istype & ?|?( istype & is, _Istream_Cstr f ) { 954 // skip xxx955 // skip 955 956 if ( ! f.s ) { 956 957 // printf( "skip %s %d\n", f.scanset, f.wd ); 957 if ( f.wd == -1 ) fmt( is, f.scanset, "" ); 958 if ( f.wd == -1 ) fmt( is, f.scanset, "" ); // no input arguments 958 959 else for ( f.wd ) fmt( is, "%*c" ); 959 960 return is; 960 961 } // if 962 963 // getline 964 if ( f.flags.delimit ) { 965 char fmtstr[] = "%[^ ]s"; // delimit inserted into space 966 fmtstr[3] = f.delimit; 967 fmt( is, fmtstr, f.s ); // read upto delimiter 968 fmt( is, "%*c" ); // ignore delimiter 969 return is; 970 } // if 971 972 // incl/excl 961 973 size_t len = 0; 962 974 if ( f.scanset ) len = strlen( f.scanset ); … … 977 989 fmtstr[start] = '['; start += 1; 978 990 if ( f.flags.inex ) { fmtstr[start] = '^'; start += 1; } 979 strcpy( &fmtstr[start], f.scanset ); 991 strcpy( &fmtstr[start], f.scanset ); // copy includes '\0' 980 992 len += start; 981 993 fmtstr[len] = ']'; fmtstr[len + 1] = '\0'; … … 987 999 988 1000 istype & ?|?( istype & is, _Istream_Char f ) { 989 fmt( is, "%*c" ); 1001 fmt( is, "%*c" ); // argument variable unused 990 1002 return is; 991 1003 } // ?|?
Note: See TracChangeset
for help on using the changeset viewer.