Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r04396aa r61c7239  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iostream.cfa --
     7// iostream.c --
    88//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 12 15:00:31 2019
    13 // Update Count     : 819
     12// Last Modified On : Sun Jun  9 16:27:17 2019
     13// Update Count     : 803
    1414//
    1515
     
    740740        } // ?|?
    741741
    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 
    752742        // manipulators
    753743        istype & ?|?( istype & is, istype & (* manip)( istype & ) ) {
     
    777767        // skip xxx
    778768        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
    782771                return is;
    783772        } // if
     
    808797} // ?|?
    809798
    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 
    816799#define InputFMTImpl( T, CODE ) \
    817800forall( dtype istype | istream( istype ) ) \
     
    819802        enum { size = 16 }; \
    820803        char fmtstr[size]; \
    821         if ( f.wd == -1 ) { \
     804        if ( f.wd == -1 || strcmp( CODE, "c" ) == 0 ) { /* ignore width with "c" */     \
    822805                snprintf( fmtstr, size, "%%%s%s", f.ignore ? "*" : "", CODE ); \
    823806        } else { \
     
    829812} // ?|?
    830813
     814InputFMTImpl( char, "c" )
    831815InputFMTImpl( signed char, "hhi" )
    832816InputFMTImpl( unsigned char, "hhi" )
Note: See TracChangeset for help on using the changeset viewer.