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

34636: replace broken isprint() on Mac OS X

This commit is contained in:
Jun-ichi Takimoto 2015-03-05 01:48:34 +09:00
parent 0ac87e3f59
commit 4bc554bb8b
6 changed files with 63 additions and 3 deletions

View file

@ -951,3 +951,18 @@ int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
/**/
#endif /* BROKEN_WCWIDTH && (__STDC_ISO_10646__ || __APPLE__) */
/**/
#if defined(__APPLE__) && defined(BROKEN_ISPRINT)
/**/
int
isprint_ascii(int c)
{
if (!strcmp(nl_langinfo(CODESET), "UTF-8"))
return (c >= 0x20 && c <= 0x7e);
else
return isprint(c);
}
/**/
#endif /* __APPLE__ && BROKEN_ISPRINT */