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:
parent
0ac87e3f59
commit
4bc554bb8b
6 changed files with 63 additions and 3 deletions
15
Src/compat.c
15
Src/compat.c
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue