From 8fb779954829f923ee2935d81cd4446973aaa01f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 20 Jul 2014 16:34:36 -0500 Subject: Add utf8 support to ls -C. Use wcwidth() instead of strlen(), and extend the -q substitution to also whiteout nonprintable characters that are nonparseable utf8 snippets. --- lib/portability.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/portability.h b/lib/portability.h index 1d540acf..b5fc0aca 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -60,6 +60,11 @@ // http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html char *crypt(const char *key, const char *salt); +// According to posix, #include header, get a function definition. But glibc... +// http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcwidth.html +#include +int wcwidth(wchar_t wc); + // see http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html #include char *strptime(const char *buf, const char *format, struct tm *tm); -- cgit v1.2.3