diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-02-26 10:31:21 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2014-02-26 10:31:21 -0500 |
commit | 7628b745a813aac53586b640da056a975f1c443e (patch) | |
tree | f27689da65e9873cd0a77f64f334814989ef5478 /rlmbutil.h | |
parent | 3fede80c7ae9d396a98137ec8e7188a27c327e96 (diff) | |
download | readline-7628b745a813aac53586b640da056a975f1c443e.tar.gz |
Readline-6.3 distribution sources and documentationreadline-6.3
Diffstat (limited to 'rlmbutil.h')
-rw-r--r-- | rlmbutil.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -123,6 +123,15 @@ extern int _rl_walphabetic PARAMS((wchar_t)); #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) #define MB_NULLWCH(x) ((x) == 0) +/* Unicode combining characters range from U+0300 to U+036F */ +#define UNICODE_COMBINING_CHAR(x) ((x) >= 768 && (x) <= 879) + +#if defined (WCWIDTH_BROKEN) +# define WCWIDTH(wc) ((_rl_utf8locale && UNICODE_COMBINING_CHAR(wc)) ? 0 : wcwidth(wc)) +#else +# define WCWIDTH(wc) wcwidth(wc) +#endif + #else /* !HANDLE_MULTIBYTE */ #undef MB_LEN_MAX |