Changeset 86a8be5 for libcfa/src
- Timestamp:
- Jun 10, 2019, 9:36:03 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b326277
- Parents:
- 558d13b
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r558d13b r86a8be5 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jun 9 20:54:05201913 // Update Count : 80 412 // Last Modified On : Mon Jun 10 18:06:16 2019 13 // Update Count : 809 14 14 // 15 15 … … 797 797 } // ?|? 798 798 799 forall( dtype istype | istream( istype ) ) 800 istype & ?|?( istype & is, _Istream_Char f ) { 801 fmt( is, "%*c" ); // argument variable unused 802 return is; 803 } // ?|? 804 799 805 #define InputFMTImpl( T, CODE ) \ 800 806 forall( dtype istype | istream( istype ) ) \ … … 802 808 enum { size = 16 }; \ 803 809 char fmtstr[size]; \ 804 if ( f.wd == -1 || strcmp( CODE, "c" ) == 0 ) { /* ignore width with "c" */\810 if ( f.wd == -1 ) { \ 805 811 snprintf( fmtstr, size, "%%%s%s", f.ignore ? "*" : "", CODE ); \ 806 812 } else { \ … … 812 818 } // ?|? 813 819 814 InputFMTImpl( char, "c" )815 820 InputFMTImpl( signed char, "hhi" ) 816 821 InputFMTImpl( unsigned char, "hhi" ) -
libcfa/src/iostream.hfa
r558d13b r86a8be5 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jun 9 22:46:17201913 // Update Count : 3 1512 // Last Modified On : Mon Jun 10 18:05:13 2019 13 // Update Count : 320 14 14 // 15 15 … … 347 347 static inline _Istream_Cstr excl( const char * scanset, _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; } 348 348 static 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 } }; }349 static inline _Istream_Cstr ignore( const char * s ) { return (_Istream_Cstr)@{ 0p, 0p, -1, { .flags.ignore : true } }; } 350 350 static inline _Istream_Cstr ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; } 351 351 static inline _Istream_Cstr wd( unsigned int w, char * s ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; } 352 352 static 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 ); 353 forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f ); 354 355 struct _Istream_Char { 356 bool ignore; // do not change input argument 357 }; // _Istream_Char 358 359 static inline _Istream_Char ignore( const char c ) { return (_Istream_Char)@{ true }; } 360 static inline _Istream_Char ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; } 361 forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f ); 354 362 355 363 forall( otype T ) … … 368 376 } // ?|? 369 377 370 InputFMTDecl( char )371 378 InputFMTDecl( signed char ) 372 379 InputFMTDecl( unsigned char )
Note: See TracChangeset
for help on using the changeset viewer.