wc: fix word count bug
commit31076e86898ab5b6e7975ca905b9a9b15122ecc6
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 22 Sep 2023 18:13:51 +0000 (22 11:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Sep 2023 07:28:27 +0000 (23 00:28 -0700)
treee14848de64fafe86196a210a654c50dcdd2cd6fe
parenta6648d4102f6fea171dcf3598c412b3842f2b84b
wc: fix word count bug

* bootstrap.conf (gnulib_modules): Remove c32isprint.
* src/wc.c (wc): Consider all non-white-space characters
to be word constituents, even if they are not printable.
POSIX requires this, and it is what BSD does.
Partly do this by simplifying the check for a word,
by counting word starts rather than word ends.
* tests/wc/wc.pl: Test for the bug.
NEWS
bootstrap.conf
doc/coreutils.texi
src/wc.c
tests/wc/wc.pl