ReactOS 0.4.16-dev-300-g2aadf2e
ismbtrl.c File Reference
#include <precomp.h>
#include <mbctype.h>
Include dependency graph for ismbtrl.c:

Go to the source code of this file.

Functions

size_t _mbclen2 (const unsigned int s)
 
int _ismbbtrail (unsigned int c)
 
int _ismbstrail (const unsigned char *start, const unsigned char *str)
 

Function Documentation

◆ _ismbbtrail()

int _ismbbtrail ( unsigned int  c)

Definition at line 23 of file ismbtrl.c.

24{
25 return (get_mbcinfo()->mbctype[(c&0xff) + 1] & _M2) != 0;
26}
const GLubyte * c
Definition: glext.h:8905
#define _M2
Definition: msvcrt.h:818
MSVCRT_pthreadmbcinfo get_mbcinfo(void)
Definition: locale.c:366

◆ _ismbstrail()

int _ismbstrail ( const unsigned char start,
const unsigned char str 
)

Definition at line 32 of file ismbtrl.c.

33{
34 /* Note: this function doesn't check _ismbbtrail */
35 if ((str > start) && _ismbslead(start, str-1))
36 return -1;
37 else
38 return 0;
39}
GLuint start
Definition: gl.h:1545
_Check_return_ _CRTIMP int __cdecl _ismbslead(_In_reads_z_(_Pos - _Str+1) const unsigned char *_Str, _In_z_ const unsigned char *_Pos)
const WCHAR * str

Referenced by test_mbcp().

◆ _mbclen2()

size_t _mbclen2 ( const unsigned int  s)

Definition at line 23 of file mbclen.c.

24{
25 return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1;
26}
GLdouble s
Definition: gl.h:2039
_Check_return_ _CRTIMP int __cdecl _ismbbtrail(_In_ unsigned int _C)
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20