summaryrefslogtreecommitdiff
path: root/lib/wcwidth.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-09 23:42:26 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-09 23:42:26 +0000
commit93f90065f31c35780e2dc3d6b7c987677d9bc14e (patch)
treeba198c539d289ba716e4de9f420e58a61e214a84 /lib/wcwidth.h
parentd24265f9659d21c8e89f1f21cf3b774c7c120afe (diff)
downloadcoreutils-93f90065f31c35780e2dc3d6b7c987677d9bc14e.tar.xz
Sync from gnulib.
Diffstat (limited to 'lib/wcwidth.h')
-rw-r--r--lib/wcwidth.h9
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