Changeset 7b93027e for libcfa


Ignore:
Timestamp:
Feb 11, 2024, 3:04:17 PM (3 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
75e2286
Parents:
0b6089f
Message:

remove unnecessary code, start missing values for C strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r0b6089f r7b93027e  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Feb 10 09:28:32 2024
    13 // Update Count     : 1946
     12// Last Modified On : Sun Feb 11 09:16:19 2024
     13// Update Count     : 1965
    1414//
    1515
     
    10581058                        if ( flags.ignore ) args = fmt( is, fmtstr, &len ); // no string argument for '*'
    10591059                        else args = fmt( is, fmtstr, s, &len );
    1060                         // fprintf( stderr, "cstr %s %d %d %d %s\n", fmtstr, args, len, wd, s );
     1060                        // fprintf( stderr, "cstr %s %d %d %d\n", fmtstr, args, len, f.cstr.wd );
    10611061                        if ( check && len >= rwd && ! eof( is ) ) {     // might not fit
    10621062                                char peek;
     
    10691069                        } // if
    10701070                        // FIX ME: CFA strings need to be modified to NOT change the argument for this case, then this can be removed.
    1071                         if ( ! flags.ignore && args == 0 ) s[0]= '\0'; // read failed => no pattern match => set string to null
     1071                        //fprintf( stderr, "cstr %d %d %d %d '%s'\n", flags.ignore, args, len, eof( is ), s );
     1072                        //if ( ! flags.ignore && args == 0 ) s[0]= '\0'; // read failed => no pattern match => set string to null
    10721073                } else {
    10731074                        if ( flags.delimiter ) {                                        // getline
     
    10801081                                if ( flags.ignore ) args = fmt( is, fmtstr, &len ); // no string argument for '*'
    10811082                                else args = fmt( is, fmtstr, s, &len );
    1082 
    1083                                 // cannot have empty character constant ''
    1084                                 if ( delimiters[2] != '\0' && len != 1 ) throwResume ExceptionInst( missing_data );
    10851083
    10861084                                if ( check && len == rwd && ! eof( is ) ) {     // might not fit
Note: See TracChangeset for help on using the changeset viewer.