]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Speed up "wc -m" and "wc -w" in multibyte case.
authorBruno Haible <bruno@clisp.org>
Thu, 8 May 2008 21:15:36 +0000 (23:15 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 8 May 2008 21:21:04 +0000 (23:21 +0200)
commitf0ad302ca9b8ec6b22bb3015aebdd4a1fd449ccf
tree420b7cc26e98c5dce80c7e06113b09b0012c0bfd
parent28c9d4ecff150942d46247076c8456dd79baf178
Speed up "wc -m" and "wc -w" in multibyte case.

* src/wc.c: Include mbchar.h.
(wc): New variable in_shift. Use it to avoid calling mbrtowc for most
ASCII characters.  Reported via Jan Engelhardt in
http://bugzilla.novell.com/381873 with discussion here
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13520
src/wc.c