diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2017-05-12 12:10:13 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2017-05-12 12:10:13 +0900 |
commit | 171e7fa4c1d9cbf0d8ff35ee795e1599913aa329 (patch) | |
tree | ded7e4f9df81e95c9d62ed93ef45cc6c9afcee76 /Src/utils.c | |
parent | 4bb81eefbd2a0093d0d3c1b9f4aa1de027512834 (diff) | |
download | zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.gz zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.xz zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.zip |
41090: Replace iswprint() if unicode9 is enabled.
If wcwidth() or iswprint() is broken, force enable unicode9.
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c index 5eb936bed..acb891d82 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -629,7 +629,7 @@ wcs_nicechar_sel(wchar_t c, size_t *widthp, char **swidep, int quotable) } s = buf; - if (!iswprint(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) { + if (!WC_ISPRINT(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) { if (c == 0x7f) { if (quotable) { *s++ = '\\'; @@ -734,7 +734,7 @@ wcs_nicechar(wchar_t c, size_t *widthp, char **swidep) /**/ mod_export int is_wcs_nicechar(wchar_t c) { - if (!iswprint(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) { + if (!WC_ISPRINT(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) { if (c == 0x7f || c == L'\n' || c == L'\t' || c < 0x20) return 1; if (c >= 0x80) { |