ReactOS 0.4.16-dev-959-g2ec3a19
mbbtype.cpp File Reference
#include <corecrt_internal_mbstring.h>
#include <locale.h>
Include dependency graph for mbbtype.cpp:

Go to the source code of this file.

Functions

int __cdecl _mbbtype_l (unsigned char const c, int const ctype, _locale_t const locale)
 
int __cdecl _mbbtype (unsigned char const c, int const ctype)
 

Function Documentation

◆ _mbbtype()

int __cdecl _mbbtype ( unsigned char const  c,
int const  ctype 
)

Definition at line 78 of file mbbtype.cpp.

79{
80 return _mbbtype_l(c, ctype, nullptr);
81}
Definition: _ctype.h:58
const GLubyte * c
Definition: glext.h:8905
int __cdecl _mbbtype_l(unsigned char const c, int const ctype, _locale_t const locale)
Definition: mbbtype.cpp:46

◆ _mbbtype_l()

int __cdecl _mbbtype_l ( unsigned char const  c,
int const  ctype,
_locale_t const  locale 
)

Definition at line 46 of file mbbtype.cpp.

51{
52 _LocaleUpdate locale_update(locale);
53
54 switch(ctype)
55 {
56 case _MBC_LEAD:
57 if (_ismbbtrail_l(c, locale_update.GetLocaleT()))
58 return _MBC_TRAIL;
59
60 else
61 return _MBC_ILLEGAL;
62
63 case _MBC_TRAIL:
64 case _MBC_SINGLE:
65 case _MBC_ILLEGAL:
66 default:
67 if (_ismbblead_l(c, locale_update.GetLocaleT()))
68 return _MBC_LEAD;
69
70 else if (_ismbbprint_l(c, locale_update.GetLocaleT()))
71 return _MBC_SINGLE;
72
73 else
74 return _MBC_ILLEGAL;
75 }
76}
Definition: _locale.h:75
#define _ismbbprint_l(_c, pt)
#define _ismbblead_l(_c, p)
#define _ismbbtrail_l(_c, p)
#define _MBC_TRAIL
Definition: msvcrt.h:825
#define _MBC_SINGLE
Definition: msvcrt.h:823
#define _MBC_LEAD
Definition: msvcrt.h:824
#define _MBC_ILLEGAL
Definition: msvcrt.h:826

Referenced by _mbbtype().