| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef _MBCS
|
| #error This file should only be compiled with _MBCS defined
|
| #endif
|
|
|
| #include <corecrt_internal_mbstring.h>
|
| #include <locale.h>
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
| |
| |
|
|
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| static int __cdecl x_ismbbtype_l(_locale_t plocinfo, unsigned int, int, int) throw();
|
|
|
|
|
|
|
|
|
| extern "C" int (__cdecl _ismbbkalnum_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,0,_MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkalnum) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,0,_MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkprint_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,0,(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkprint) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,0,(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkpunct_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,0,_MP);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkpunct) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,0,_MP);
|
| }
|
|
|
|
|
|
|
|
|
| extern "C" int (__cdecl _ismbbalnum_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,(_ALPHA | _DIGIT), _MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbalnum) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,(_ALPHA | _DIGIT), _MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbalpha_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,_ALPHA, _MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbalpha) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,_ALPHA, _MS);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbgraph_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,(_PUNCT | _ALPHA | _DIGIT),(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbgraph) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,(_PUNCT | _ALPHA | _DIGIT),(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbprint_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,(_BLANK | _PUNCT | _ALPHA | _DIGIT),(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbprint) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,(_BLANK | _PUNCT | _ALPHA | _DIGIT),(_MS | _MP));
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbpunct_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,_PUNCT, _MP);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbpunct) (unsigned int tst)
|
| {
|
| return x_ismbbtype_l(nullptr,tst,_PUNCT, _MP);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbblank_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| return (tst == '\t') ? _BLANK : x_ismbbtype_l(plocinfo,tst,_BLANK, _MP);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbblank) (unsigned int tst)
|
| {
|
| return (tst == '\t') ? _BLANK : x_ismbbtype_l(nullptr,tst,_BLANK, _MP);
|
| }
|
|
|
|
|
|
|
|
|
|
|
| extern "C" int (__cdecl _ismbblead_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
|
|
| return x_ismbbtype_l(plocinfo,tst,0,_M1);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbblead) (unsigned int tst)
|
| {
|
|
|
| return x_ismbbtype_l(nullptr, tst, 0, _M1);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbtrail_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
|
|
| return x_ismbbtype_l(plocinfo,tst,0,_M2);
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbtrail) (unsigned int tst)
|
| {
|
|
|
| return x_ismbbtype_l(nullptr, tst, 0, _M2);
|
| }
|
|
|
|
|
|
|
|
|
| extern "C" int (__cdecl _ismbbkana_l) (unsigned int tst, _locale_t plocinfo)
|
| {
|
| _LocaleUpdate _loc_update(plocinfo);
|
| if(_loc_update.GetLocaleT()->mbcinfo &&
|
| _loc_update.GetLocaleT()->mbcinfo->mbcodepage == _KANJI_CP)
|
| {
|
| return x_ismbbtype_l(plocinfo,tst,0,(_MS | _MP));
|
| }
|
| return FALSE;
|
| }
|
|
|
| extern "C" int (__cdecl _ismbbkana) (unsigned int tst)
|
| {
|
| return _ismbbkana_l(tst, nullptr);
|
| }
|
|
|
| |
| |
| |
| |
| |
| |
|
|
|
|
| static int __cdecl x_ismbbtype_l (_locale_t plocinfo, unsigned int tst, int cmask, int kmask) throw()
|
| {
|
| _LocaleUpdate _loc_update(plocinfo);
|
|
|
| |
| |
|
|
| tst = (unsigned int)(unsigned char)tst;
|
|
|
| return ((*(_loc_update.GetLocaleT()->mbcinfo->mbctype+1+tst)) & kmask) ||
|
| ((cmask) ? ((*(_loc_update.GetLocaleT()->locinfo->_public._locale_pctype + tst)) & cmask) : 0);
|
| }
|
|
|