ReactOS 0.4.15-dev-7942-gd23573b
ismbc.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/ismbc.c
5 * PURPOSE:
6 * PROGRAMER:
7 * UPDATE HISTORY:
8 * 05/30/08: Samuel Serapion adapted from PROJECT C Library
9 *
10 */
11
12
13#include <precomp.h>
14#include <mbstring.h>
15#include <mbctype.h>
16
17/*
18 * @implemented
19 */
20int _ismbcalnum( unsigned int c )
21{
22 if ((c & 0xFF00) != 0) {
23 // true multibyte character
24 return 0;
25 }
26 else
27 return _ismbbalnum(c);
28
29 return 0;
30}
31
32/*
33 * @implemented
34 */
35int _ismbcalpha( unsigned int c )
36{
37 return (_ismbcupper (c) || _ismbclower (c));
38}
39
40/*
41 * @implemented
42 */
43int _ismbcdigit( unsigned int c )
44{
45 return ((c) >= 0x824f && (c) <= 0x8258);
46}
47
48/*
49 * @implemented
50 */
51int _ismbcprint( unsigned int c )
52{
53 return (_MBHMASK (c) ? _ismbclegal (c) : (isprint (c) || _ismbbkana (c)));
54}
55
56/*
57 * @implemented
58 */
59int _ismbcsymbol( unsigned int c )
60{
61 return (c >= 0x8141 && c <= 0x817e) || (c >= 0x8180 && c <= 0x81ac);
62}
63
64/*
65 * @implemented
66 */
67int _ismbcspace( unsigned int c )
68{
69 return ((c) == 0x8140);
70}
71/*
72 * @implemented
73 */
74int _ismbclegal(unsigned int c)
75{
76 return (_ismbblead (_MBGETH (c)) && _ismbbtrail (_MBGETL (c)));
77}
78
79/*
80 * @implemented
81 */
82int _ismbcl0(unsigned int c)
83{
84 return (c >= 0x8140 && c <= 0x889e);
85}
86
87/*
88 * @implemented
89 */
90int _ismbcl1(unsigned int c)
91{
92 return (c >= 0x889f && c <= 0x9872);
93}
94
95/*
96 * @implemented
97 */
98int _ismbcl2(unsigned int c)
99{
100 return (c >= 0x989f && c <= 0xea9e);
101}
102
103/*
104 * @unimplemented
105 */
106int _ismbcgraph(unsigned int ch)
107{
108 //wchar_t wch = msvcrt_mbc_to_wc( ch );
109 //return (get_char_typeW( wch ) & (C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA));
110 return 0;
111}
112
113/*
114 * @unimplemented
115 */
116int _ismbcpunct(unsigned int ch)
117{
118 //wchar_t wch = msvcrt_mbc_to_wc( ch );
119 //return (get_char_typeW( wch ) & C1_PUNCT);
120 return 0;
121}
#define isprint(c)
Definition: acclib.h:73
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP int __cdecl _ismbcupper(_In_ unsigned int _Ch)
_Check_return_ _CRTIMP int __cdecl _ismbclower(_In_ unsigned int _Ch)
int _ismbcl0(unsigned int c)
Definition: ismbc.c:82
int _ismbcspace(unsigned int c)
Definition: ismbc.c:67
int _ismbcl2(unsigned int c)
Definition: ismbc.c:98
int _ismbcsymbol(unsigned int c)
Definition: ismbc.c:59
int _ismbclegal(unsigned int c)
Definition: ismbc.c:74
int _ismbcgraph(unsigned int ch)
Definition: ismbc.c:106
int _ismbcalnum(unsigned int c)
Definition: ismbc.c:20
int _ismbcalpha(unsigned int c)
Definition: ismbc.c:35
int _ismbcl1(unsigned int c)
Definition: ismbc.c:90
int _ismbcdigit(unsigned int c)
Definition: ismbc.c:43
int _ismbcprint(unsigned int c)
Definition: ismbc.c:51
int _ismbcpunct(unsigned int ch)
Definition: ismbc.c:116
#define _MBGETH(c)
Definition: mbstring.h:23
#define _MBHMASK(c)
Definition: mbstring.h:21
#define _MBGETL(c)
Definition: mbstring.h:22
_Check_return_ _CRTIMP int __cdecl _ismbbtrail(_In_ unsigned int _C)
_Check_return_ _CRTIMP int __cdecl _ismbbkana(_In_ unsigned int _C)
_Check_return_ _CRTIMP int __cdecl _ismbbalnum(_In_ unsigned int _C)
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20