OSDN Git Service

The previous wc -m didn't handle multibyte characters that crossed a buffer boundary...
authorRob Landley <rob@landley.net>
Wed, 28 Nov 2012 09:12:02 +0000 (03:12 -0600)
committerRob Landley <rob@landley.net>
Wed, 28 Nov 2012 09:12:02 +0000 (03:12 -0600)
commita9464f41539f4800744b4185c6a4d4c5e38eeadf
tree89cec6fdf3ac51f7dc3ffb1011daf277a88a9141
parenta03f3e120c96ed58e6913dae3d21bdea59390c2b
The previous wc -m didn't handle multibyte characters that crossed a buffer boundary, so take a guess at making that work. (I haven't got a test case for this. I also don't know how to handle invalid sequences so just don't count them.)
toys/posix/wc.c