Changeset 21300d7 for libcfa/src/iostream.cfa
- Timestamp:
- Jun 12, 2019, 4:06:37 PM (5 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:
- 462a7c7, d60780c
- Parents:
- aaeacf4 (diff), 6625727 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
raaeacf4 r21300d7 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // iostream.c --7 // iostream.cfa -- 8 8 // 9 9 // Author : Peter A. Buhr 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 16:27:17201913 // Update Count : 8 0312 // Last Modified On : Wed Jun 12 15:00:31 2019 13 // Update Count : 819 14 14 // 15 15 … … 740 740 } // ?|? 741 741 742 istype & ?|?( istype & is, const char * fmt ) { 743 fmt( is, fmt, "" ); 744 return is; 745 } // ?|? 746 747 istype & ?|?( istype & is, char * s ) { 748 fmt( is, "%s", s ); 749 return is; 750 } // ?|? 751 742 752 // manipulators 743 753 istype & ?|?( istype & is, istype & (* manip)( istype & ) ) { … … 767 777 // skip xxx 768 778 if ( ! f.s ) { 769 // printf( "skip %s\n", f.scanset ); 770 fmt( is, f.scanset, "" ); // no input arguments 779 //printf( "skip %s %d\n", f.scanset, f.wd ); 780 if ( f.wd != -1 ) for ( f.wd ) fmt( is, "%*c" ); // no input arguments 781 else fmt( is, f.scanset, "" ); 771 782 return is; 772 783 } // if … … 797 808 } // ?|? 798 809 810 forall( dtype istype | istream( istype ) ) 811 istype & ?|?( istype & is, _Istream_Char f ) { 812 fmt( is, "%*c" ); // argument variable unused 813 return is; 814 } // ?|? 815 799 816 #define InputFMTImpl( T, CODE ) \ 800 817 forall( dtype istype | istream( istype ) ) \ … … 802 819 enum { size = 16 }; \ 803 820 char fmtstr[size]; \ 804 if ( f.wd == -1 || strcmp( CODE, "c" ) == 0 ) { /* ignore width with "c" */\821 if ( f.wd == -1 ) { \ 805 822 snprintf( fmtstr, size, "%%%s%s", f.ignore ? "*" : "", CODE ); \ 806 823 } else { \ … … 812 829 } // ?|? 813 830 814 InputFMTImpl( char, "c" )815 831 InputFMTImpl( signed char, "hhi" ) 816 832 InputFMTImpl( unsigned char, "hhi" )
Note: See TracChangeset
for help on using the changeset viewer.