Changes in libcfa/src/iostream.cfa [04396aa:61c7239]
- File:
-
- 1 edited
-
libcfa/src/iostream.cfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.cfa
r04396aa r61c7239 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // iostream.c fa--7 // iostream.c -- 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 : Wed Jun 12 15:00:31201913 // Update Count : 8 1912 // Last Modified On : Sun Jun 9 16:27:17 2019 13 // Update Count : 803 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 752 742 // manipulators 753 743 istype & ?|?( istype & is, istype & (* manip)( istype & ) ) { … … 777 767 // skip xxx 778 768 if ( ! f.s ) { 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, "" ); 769 // printf( "skip %s\n", f.scanset ); 770 fmt( is, f.scanset, "" ); // no input arguments 782 771 return is; 783 772 } // if … … 808 797 } // ?|? 809 798 810 forall( dtype istype | istream( istype ) )811 istype & ?|?( istype & is, _Istream_Char f ) {812 fmt( is, "%*c" ); // argument variable unused813 return is;814 } // ?|?815 816 799 #define InputFMTImpl( T, CODE ) \ 817 800 forall( dtype istype | istream( istype ) ) \ … … 819 802 enum { size = 16 }; \ 820 803 char fmtstr[size]; \ 821 if ( f.wd == -1 ) {\804 if ( f.wd == -1 || strcmp( CODE, "c" ) == 0 ) { /* ignore width with "c" */ \ 822 805 snprintf( fmtstr, size, "%%%s%s", f.ignore ? "*" : "", CODE ); \ 823 806 } else { \ … … 829 812 } // ?|? 830 813 814 InputFMTImpl( char, "c" ) 831 815 InputFMTImpl( signed char, "hhi" ) 832 816 InputFMTImpl( unsigned char, "hhi" )
Note:
See TracChangeset
for help on using the changeset viewer.