ReactOS  0.4.15-dev-1039-gb9754fa
ismbtrl.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS system libraries
4  * FILE: lib/sdk/crt/mbstring/ismbtrl.c
5  * PURPOSE: Checks for a trailing byte
6  * PROGRAMERS:
7  * Copyright 1999 Ariadne
8  * Copyright 1999 Alexandre Julliard
9  * Copyright 2000 Jon Griffths
10  *
11  */
12 
13 #include <precomp.h>
14 #include <mbctype.h>
15 
16 size_t _mbclen2(const unsigned int s);
17 
18 // iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC)
19 
20 /*
21  * @implemented
22  */
23 int _ismbbtrail(unsigned int c)
24 {
25  return (get_mbcinfo()->mbctype[(c&0xff) + 1] & _M2) != 0;
26 }
27 
28 
29 /*
30  * @implemented
31  */
32 int _ismbstrail( const unsigned char *start, const unsigned char *str)
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 }
int _ismbbtrail(unsigned int c)
Definition: ismbtrl.c:23
#define _M2
Definition: msvcrt.h:818
const WCHAR * str
int _ismbstrail(const unsigned char *start, const unsigned char *str)
Definition: ismbtrl.c:32
const GLubyte * c
Definition: glext.h:8905
GLdouble s
Definition: gl.h:2039
MSVCRT_pthreadmbcinfo get_mbcinfo(void)
Definition: locale.c:364
GLuint start
Definition: gl.h:1545
size_t _mbclen2(const unsigned int s)
Definition: mbclen.c:23
_Check_return_ _CRTIMP int __cdecl _ismbslead(_In_reads_z_(_Pos - _Str+1) const unsigned char *_Str, _In_z_ const unsigned char *_Pos)