]> diplodocus.org Git - nmh/commit
In cpstripped() and cptrimmed(), if a multibyte character is
authorDavid Levine <levinedl@acm.org>
Fri, 4 Jan 2013 03:59:44 +0000 (21:59 -0600)
committerDavid Levine <levinedl@acm.org>
Fri, 4 Jan 2013 03:59:44 +0000 (21:59 -0600)
commit71eaed755250fdd6ac66d1139e59a2cc7ad3980e
tree1c95654b1b7f993d289fc51b8dea8466bb059825
parent6f985b2ab74d38becc2e2ecc4829ca7c1f87e88c
In cpstripped() and cptrimmed(), if a multibyte character is
found, only count it as taking up one character in the
destination buffer (if it has enought room).  This way,
scan(1)'s output won't be jagged if there are any subjects,
for example, that have multibyte characters.

Added a test for this to test-scan-multibyte, and moved the
test for an invalid multibyte sequence from test-scan to it.
sbr/fmt_scan.c
test/scan/test-scan
test/scan/test-scan-multibyte