Finish up wc(1)

Use size_t for all counts, fix the manpage and refactor the code.
Here's yet another place where GNU coreutils fail:

sbase:
$ echo "GNU/Turd sucks" | wc -cm
    15

coreutils:
$ echo "GNU/Turd sucks" | wc -cm
     15      15

Take a bloody guess which behaviour is correct[0].

[0]: http://pubs.opengroup.org/onlinepubs/009604499/utilities/wc.html
This commit is contained in:
FRIGN
2015-02-01 03:01:11 +01:00
parent d75cc2e556
commit 8ab096d2a4
3 changed files with 66 additions and 68 deletions

2
README
View File

@@ -82,7 +82,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
= sha1sum non-posix none
= sha256sum non-posix none
= sha512sum non-posix none
wc yes none
#* wc yes none
= xargs no -I, -L, -p, -s, -t, -x
=* yes non-posix none