Ignore:
Timestamp:
Oct 17, 2023, 12:12:00 PM (9 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
5e0bba5
Parents:
1b41219
Message:

Change string-read semantics so that reading nothing leaves the original value unmodified.

Logically revert #8cffa4f21, and apply the change onto work done since.

At cstring layer, libcfa change is a simplification, and test suite change is merely a different expectation.

At var-len-string layer, libcfa change is a patch to enable detecting the nothing-read case,
and test sute change (shows the different expectation but also) puts a similar patch into its "stop trying if nothing read" loop exits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r1b41219 r37ceccb  
    10211021                int check = f.wd - 2;
    10221022                if (! f.flags.ignore ) {
    1023                         f.s[0] = '\0';
    10241023                        if ( ! f.flags.rwd ) f.s[check] = '\0';         // insert sentinel
    10251024                }
Note: See TracChangeset for help on using the changeset viewer.