+ * for which 'wc -c' should output '0'.
+ */
+//config:config WC
+//config: bool "wc"
+//config: default y
+//config: help
+//config: wc is used to print the number of bytes, words, and lines,
+//config: in specified files.
+//config:
+//config:config FEATURE_WC_LARGE
+//config: bool "Support very large counts"
+//config: default y
+//config: depends on WC
+//config: help
+//config: Use "unsigned long long" for counter variables.
+
+//applet:IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_WC) += wc.o
+
+/* BB_AUDIT SUSv3 compliant. */
+/* http://www.opengroup.org/onlinepubs/007904975/utilities/wc.html */
+
+#include "libbb.h"
+#include "unicode.h"
+
+#if !ENABLE_LOCALE_SUPPORT
+# undef isprint
+# undef isspace
+# define isprint(c) ((unsigned)((c) - 0x20) <= (0x7e - 0x20))
+# define isspace(c) ((c) == ' ')
+#endif
+
+#if ENABLE_FEATURE_WC_LARGE
+# define COUNT_T unsigned long long
+# define COUNT_FMT "llu"
+#else
+# define COUNT_T unsigned
+# define COUNT_FMT "u"
+#endif
+
+/* We support -m even when UNICODE_SUPPORT is off,
+ * we just don't advertise it in help text,
+ * since it is the same as -c in this case.
+ */
+
+//usage:#define wc_trivial_usage
+//usage: "[-c"IF_UNICODE_SUPPORT("m")"lwL] [FILE]..."
+//usage:
+//usage:#define wc_full_usage "\n\n"
+//usage: "Count lines, words, and bytes for each FILE (or stdin)\n"
+//usage: "\n -c Count bytes"
+//usage: IF_UNICODE_SUPPORT(
+//usage: "\n -m Count characters"
+//usage: )
+//usage: "\n -l Count newlines"
+//usage: "\n -w Count words"
+//usage: "\n -L Print longest line length"
+//usage:
+//usage:#define wc_example_usage
+//usage: "$ wc /etc/passwd\n"
+//usage: " 31 46 1365 /etc/passwd\n"
+
+/* Order is important if we want to be compatible with
+ * column order in "wc -cmlwL" output: