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/zsh.h | |
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/zsh.h')
-rw-r--r-- | Src/zsh.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index 10931512d..22f73f806 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -3158,9 +3158,7 @@ typedef wint_t convchar_t; * works on MacOS which doesn't define that. */ #ifdef ENABLE_UNICODE9 -#define WCWIDTH(wc) mk_wcwidth(wc) -#elif defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || defined(__APPLE__)) -#define WCWIDTH(wc) mk_wcwidth(wc) +#define WCWIDTH(wc) u9_wcwidth(wc) #else #define WCWIDTH(wc) wcwidth(wc) #endif @@ -3205,15 +3203,7 @@ typedef wint_t convchar_t; * sense throughout the shell. I am not aware of a way of * detecting the Unicode trait in standard libraries. */ -#ifdef BROKEN_WCWIDTH -/* - * We can't be quite sure the wcwidth we've provided is entirely - * in agreement with the system's, so be extra safe. - */ -#define IS_COMBINING(wc) (wc != 0 && WCWIDTH(wc) == 0 && !iswcntrl(wc)) -#else #define IS_COMBINING(wc) (wc != 0 && WCWIDTH(wc) == 0) -#endif /* * Test for the base of a combining character. * |