projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Assume an ASCII compatible wide character encoding.
[pspp]
/
lib
/
wcwidth.h
diff --git
a/lib/wcwidth.h
b/lib/wcwidth.h
index 9af75e0a775841d38a455f232a5bd0429fa8d2bb..1c95d0e11b562901469ceaf6635f6b62aac2ce06 100644
(file)
--- a/
lib/wcwidth.h
+++ b/
lib/wcwidth.h
@@
-36,7
+36,13
@@
# 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