]> diplodocus.org Git - nmh/commitdiff
cpstripped(): Rewrite multi-byte version.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 6 Aug 2017 17:15:41 +0000 (18:15 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 6 Aug 2017 17:15:41 +0000 (18:15 +0100)
Removes the assert(3) failure reported on the list for 1.7-RC1 when a
non-space, non-cntrl, rune has a wcwidth(3) of -1; output L'?' in its
place.  The old code also didn't reset mbtowc(3)'s state before trying
to parse "?";  that's handled differently now so isn't an issue.  Pad
with the multi-byte encoding of L" ", having ensured the wcwidth(1) of
L' ' is one, rather than with a non-wchar_t ' '.  Point out padding only
occurs in one particular case, and not the other two;  quite odd.


No differences found