Mercurial > hg > toybox
diff toys.h @ 686:9414be56b1db
wc -m only cares about counting characters. Attached is a try on implementing it and some test cases for it. The test cases are only for UTF-8 locales.
author | Felix Janda <felix.janda@posteo.de> |
---|---|
date | Thu, 08 Nov 2012 11:19:07 -0600 |
parents | 7e846e281e38 |
children | 786841fdb1e0 |
line wrap: on
line diff
--- a/toys.h Sat Nov 03 19:21:59 2012 -0500 +++ b/toys.h Thu Nov 08 11:19:07 2012 -0600 @@ -16,6 +16,7 @@ #include <inttypes.h> #include <limits.h> #include <libgen.h> +#include <locale.h> #include <math.h> #include <pty.h> #include <pwd.h> @@ -46,6 +47,8 @@ #include <unistd.h> #include <utime.h> #include <utmpx.h> +#include <wchar.h> +#include <wctype.h> #include "lib/lib.h" #include "toys/e2fs.h"