Ignore:
Timestamp:
Feb 10, 2024, 5:59:21 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
9d4628b
Parents:
956299b
Message:

more cleanup, changes related to detection of missing values during input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/string_res.cfa

    r956299b r714e206  
    1010// Created On       : Fri Sep 03 11:00:00 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb  7 22:21:33 2024
    13 // Update Count     : 81
     12// Last Modified On : Sat Feb 10 17:47:22 2024
     13// Update Count     : 83
    1414//
    1515
     
    252252
    253253ifstream & ?|?( ifstream & is, _Istream_Rquoted f ) with( f.rstr ) {
     254        if ( eof( is ) ) throwResume ExceptionInst( missing_data );
    254255        int args;
    255256  fini: {
    256                 args = fmt( is, "%*[ \f\n\r\t\v]" );                    // remove leading whitespace
    257           if ( eof( is ) ) break fini;
    258                 char rfmt[4] = { delimiters[0], '%', 'n', '\0' };
    259                 int len = 0;                                                                    // may not be set in fmt
    260                 args = fmt( is, rfmt, &len );                                   // remove leading quote
    261           if ( len == 0 || eof( is ) ) break fini;
     257                char rfmt[5] = { ' ', delimiters[0], '%', 'n', '\0' };
     258                int len = -1;                                                                   // may not be set in fmt
     259                args = fmt( is, rfmt, &len );                                   // remove leading whitespace and quote
     260          if ( eof( is ) || len == -1 ) break fini;
    262261
    263262                // Change the remainder of the read into a getline by reseting the closing delimiter.
Note: See TracChangeset for help on using the changeset viewer.