2018-03-09 13:30:33 +01:00
|
|
|
/* Modified (m) 2017 Thomas Wolff: revise Unicode and locale/wchar handling */
|
2016-07-24 15:44:43 +02:00
|
|
|
#include <_ansi.h>
|
|
|
|
#include <wctype.h>
|
2018-03-09 13:30:33 +01:00
|
|
|
#include "local.h"
|
2016-07-24 15:44:43 +02:00
|
|
|
|
|
|
|
int
|
|
|
|
iswctype_l (wint_t c, wctype_t desc, struct __locale_t *locale)
|
|
|
|
{
|
2018-03-09 13:30:33 +01:00
|
|
|
switch (desc)
|
|
|
|
{
|
|
|
|
case WC_ALNUM:
|
|
|
|
return iswalnum_l (c, locale);
|
|
|
|
case WC_ALPHA:
|
|
|
|
return iswalpha_l (c, locale);
|
|
|
|
case WC_BLANK:
|
|
|
|
return iswblank_l (c, locale);
|
|
|
|
case WC_CNTRL:
|
|
|
|
return iswcntrl_l (c, locale);
|
|
|
|
case WC_DIGIT:
|
|
|
|
return iswdigit_l (c, locale);
|
|
|
|
case WC_GRAPH:
|
|
|
|
return iswgraph_l (c, locale);
|
|
|
|
case WC_LOWER:
|
|
|
|
return iswlower_l (c, locale);
|
|
|
|
case WC_PRINT:
|
|
|
|
return iswprint_l (c, locale);
|
|
|
|
case WC_PUNCT:
|
|
|
|
return iswpunct_l (c, locale);
|
|
|
|
case WC_SPACE:
|
|
|
|
return iswspace_l (c, locale);
|
|
|
|
case WC_UPPER:
|
|
|
|
return iswupper_l (c, locale);
|
|
|
|
case WC_XDIGIT:
|
|
|
|
return iswxdigit_l (c, locale);
|
|
|
|
default:
|
|
|
|
return 0; /* eliminate warning */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* otherwise unknown */
|
|
|
|
return 0;
|
2016-07-24 15:44:43 +02:00
|
|
|
}
|