1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

41090: Replace iswprint() if unicode9 is enabled.

If wcwidth() or iswprint() is broken, force enable unicode9.
This commit is contained in:
Jun-ichi Takimoto 2017-05-12 12:10:13 +09:00
parent 4bb81eefbd
commit 171e7fa4c1
9 changed files with 56 additions and 351 deletions

View file

@ -629,7 +629,7 @@ wcs_nicechar_sel(wchar_t c, size_t *widthp, char **swidep, int quotable)
}
s = buf;
if (!iswprint(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) {
if (!WC_ISPRINT(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) {
if (c == 0x7f) {
if (quotable) {
*s++ = '\\';
@ -734,7 +734,7 @@ wcs_nicechar(wchar_t c, size_t *widthp, char **swidep)
/**/
mod_export int is_wcs_nicechar(wchar_t c)
{
if (!iswprint(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) {
if (!WC_ISPRINT(c) && (c < 0x80 || !isset(PRINTEIGHTBIT))) {
if (c == 0x7f || c == L'\n' || c == L'\t' || c < 0x20)
return 1;
if (c >= 0x80) {