diff options
Diffstat (limited to 'lib/wcwidth.h')
-rw-r--r-- | lib/wcwidth.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/wcwidth.h b/lib/wcwidth.h index 9af75e0a7..37b83cb82 100644 --- a/lib/wcwidth.h +++ b/lib/wcwidth.h @@ -36,7 +36,14 @@ # include <wctype.h> # endif # if !defined iswprint && !HAVE_ISWPRINT -# define iswprint(wc) 1 +static inline int +iswprint (wint_t wc) +{ + return (wc >= 0 && wc < 128 + ? wc >= ' ' && wc <= '~' + : 1); +} +# define iswprint iswprint # endif # ifndef HAVE_DECL_WCWIDTH |