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 | 41096: Don't assume null termination copying string. (diff) | |
| download | zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.gz zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.bz2 zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.lz zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.xz zsh-171e7fa4c1d9cbf0d8ff35ee795e1599913aa329.tar.zst 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
@@ -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. * |
