1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-31 06:00:54 +01:00

40037: Unicode 9 character width support.

Enable with --enable-unicode9.
This commit is contained in:
Joshua Rubin 2016-11-29 00:42:28 -07:00 committed by Peter Stephenson
parent 110ffae9fe
commit 596ba302e6
5 changed files with 1351 additions and 2 deletions

View file

@ -635,7 +635,18 @@ strtoul(nptr, endptr, base)
#endif /* HAVE_STRTOUL */
/**/
#if defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || defined(__APPLE__))
#ifdef ENABLE_UNICODE9
#include "./wcwidth9.h"
int
mk_wcwidth(wchar_t ucs)
{
int w = wcwidth9(ucs);
if (w < -1)
return 1;
return w;
}
#elif defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || defined(__APPLE__))
/*
* This is an implementation of wcwidth() and wcswidth() (defined in