Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / ctype / iswpunct_l.c
blob4adc1ed830578238a32bce48f9d08773eba27a82
1 /* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
2 #include <_ansi.h>
3 #include <ctype.h>
4 #include <wctype.h>
5 #include "local.h"
6 #include "categories.h"
8 int
9 iswpunct_l (wint_t c, struct __locale_t *locale)
11 #ifdef _MB_CAPABLE
12 //return !iswalnum (c) && iswgraph (c);
13 c = _jp2uc_l (c, locale);
14 enum category cat = category (c);
15 return cat == CAT_Pc || cat == CAT_Pd || cat == CAT_Pe || cat == CAT_Pf || cat == CAT_Pi || cat == CAT_Po || cat == CAT_Ps
16 || cat == CAT_Sm // Math Symbols
17 // the following are included for backwards consistency:
18 || cat == CAT_Sc // Currency Symbols
19 || cat == CAT_Sk // Modifier_Symbol
20 || cat == CAT_So // Other_Symbol
21 || cat == CAT_No // Other_Number
23 #else
24 return c < (wint_t)0x100 ? ispunct (c) : 0;
25 #endif /* _MB_CAPABLE */