diff options
Diffstat (limited to 'extern/wcwidth/wcwidth.c')
-rw-r--r-- | extern/wcwidth/wcwidth.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/extern/wcwidth/wcwidth.c b/extern/wcwidth/wcwidth.c index 8cab81e32cd..8922ffe0842 100644 --- a/extern/wcwidth/wcwidth.c +++ b/extern/wcwidth/wcwidth.c @@ -59,8 +59,6 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ -#include <wchar.h> - #include "wcwidth.h" struct interval { @@ -69,7 +67,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(wchar_t ucs, const struct interval *table, int max) { +static int bisearch(char32_t ucs, const struct interval *table, int max) { int min = 0; int mid; @@ -121,7 +119,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max) { * in ISO 10646. */ -int mk_wcwidth(wchar_t ucs) +int mk_wcwidth(char32_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -206,7 +204,7 @@ int mk_wcwidth(wchar_t ucs) } -int mk_wcswidth(const wchar_t *pwcs, size_t n) +int mk_wcswidth(const char32_t *pwcs, size_t n) { int w, width = 0; @@ -229,7 +227,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n) * the traditional terminal character-width behaviour. It is not * otherwise recommended for general use. */ -int mk_wcwidth_cjk(wchar_t ucs) +int mk_wcwidth_cjk(char32_t ucs) { /* sorted list of non-overlapping intervals of East Asian Ambiguous * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ @@ -297,7 +295,7 @@ int mk_wcwidth_cjk(wchar_t ucs) } -int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) +int mk_wcswidth_cjk(const char32_t *pwcs, size_t n) { int w, width = 0; |