Assume an ASCII compatible wide character encoding.
[pspp] / lib / wcwidth.h
index 9af75e0a775841d38a455f232a5bd0429fa8d2bb..1c95d0e11b562901469ceaf6635f6b62aac2ce06 100644 (file)
 #  include <wctype.h>
 # endif
 # if !defined iswprint && !HAVE_ISWPRINT
-#  define iswprint(wc) 1
+ststic inline int
+iswprint (wint_t wc)
+{
+  return (wc >= 0 && wc < 128
+         ? wc >= ' ' && wc <= '~'
+         : 1);
+}
 # endif
 
 # ifndef HAVE_DECL_WCWIDTH