[CRT/INTRIN] Use the gcc intrinsic equivalents when compiling with clang-cl and skip...
[reactos.git] / sdk / include / crt / mbctype.h
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _INC_MBCTYPE
7 #define _INC_MBCTYPE
8
9 #include <crtdefs.h>
10 #include <ctype.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /* CRT stuff */
17 #if 1
18 #if defined (_DLL) && defined (_M_IX86)
19 /* Retained for compatibility with VC++ 5.0 and earlier versions */
20 _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbctype(void);
21 _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbcasemap(void);
22 #endif /* defined (_DLL) && defined (_M_IX86) */
23 #endif
24 #ifndef _mbctype
25 #ifdef _MSVCRT_
26 extern unsigned char _mbctype[257];
27 #else
28 #define _mbctype (*_imp___mbctype)
29 extern unsigned char **_imp___mbctype;
30 #endif
31 #endif
32 #ifndef _mbcasemap
33 #ifdef _MSVCRT_
34 extern unsigned char *_mbcasemap;
35 #else
36 #define _mbcasemap (*_imp___mbcasemap)
37 extern unsigned char **_imp___mbcasemap;
38 #endif
39 #endif
40
41 /* CRT stuff */
42 #if 1
43 extern pthreadmbcinfo __ptmbcinfo;
44 extern int __globallocalestatus;
45 extern int __locale_changed;
46 extern struct threadmbcinfostruct __initialmbcinfo;
47 pthreadmbcinfo __cdecl __updatetmbcinfo(void);
48 #endif
49
50 #define _MS 0x01
51 #define _MP 0x02
52 #define _M1 0x04
53 #define _M2 0x08
54
55 #define _SBUP 0x10
56 #define _SBLOW 0x20
57
58 #define _MBC_SINGLE 0
59 #define _MBC_LEAD 1
60 #define _MBC_TRAIL 2
61 #define _MBC_ILLEGAL (-1)
62
63 #define _KANJI_CP 932
64
65 #define _MB_CP_SBCS 0
66 #define _MB_CP_OEM -2
67 #define _MB_CP_ANSI -3
68 #define _MB_CP_LOCALE -4
69
70 #ifndef _MBCTYPE_DEFINED
71 #define _MBCTYPE_DEFINED
72
73 _CRTIMP
74 int
75 __cdecl
76 _setmbcp(
77 _In_ int _CodePage);
78
79 _CRTIMP
80 int
81 __cdecl
82 _getmbcp(void);
83
84 _Check_return_
85 _CRTIMP
86 int
87 __cdecl
88 _ismbbkalnum(
89 _In_ unsigned int _C);
90
91 _Check_return_
92 _CRTIMP
93 int
94 __cdecl
95 _ismbbkalnum_l(
96 _In_ unsigned int _C,
97 _In_opt_ _locale_t _Locale);
98
99 _Check_return_
100 _CRTIMP
101 int
102 __cdecl
103 _ismbbkana(
104 _In_ unsigned int _C);
105
106 _Check_return_
107 _CRTIMP
108 int
109 __cdecl
110 _ismbbkana_l(
111 _In_ unsigned int _C,
112 _In_opt_ _locale_t _Locale);
113
114 _Check_return_
115 _CRTIMP
116 int
117 __cdecl
118 _ismbbkpunct(
119 _In_ unsigned int _C);
120
121 _Check_return_
122 _CRTIMP
123 int
124 __cdecl
125 _ismbbkpunct_l(
126 _In_ unsigned int _C,
127 _In_opt_ _locale_t _Locale);
128
129 _Check_return_
130 _CRTIMP
131 int
132 __cdecl
133 _ismbbkprint(
134 _In_ unsigned int _C);
135
136 _Check_return_
137 _CRTIMP
138 int
139 __cdecl
140 _ismbbkprint_l(
141 _In_ unsigned int _C,
142 _In_opt_ _locale_t _Locale);
143
144 _Check_return_
145 _CRTIMP
146 int
147 __cdecl
148 _ismbbalpha(
149 _In_ unsigned int _C);
150
151 _Check_return_
152 _CRTIMP
153 int
154 __cdecl
155 _ismbbalpha_l(
156 _In_ unsigned int _C,
157 _In_opt_ _locale_t _Locale);
158
159 _Check_return_
160 _CRTIMP
161 int
162 __cdecl
163 _ismbbpunct(
164 _In_ unsigned int _C);
165
166 _Check_return_
167 _CRTIMP
168 int
169 __cdecl
170 _ismbbpunct_l(
171 _In_ unsigned int _C,
172 _In_opt_ _locale_t _Locale);
173
174 _Check_return_
175 _CRTIMP
176 int
177 __cdecl
178 _ismbbalnum(
179 _In_ unsigned int _C);
180
181 _Check_return_
182 _CRTIMP
183 int
184 __cdecl
185 _ismbbalnum_l(
186 _In_ unsigned int _C,
187 _In_opt_ _locale_t _Locale);
188
189 _Check_return_
190 _CRTIMP
191 int
192 __cdecl
193 _ismbbprint(
194 _In_ unsigned int _C);
195
196 _Check_return_
197 _CRTIMP
198 int
199 __cdecl
200 _ismbbprint_l(
201 _In_ unsigned int _C,
202 _In_opt_ _locale_t _Locale);
203
204 _Check_return_
205 _CRTIMP
206 int
207 __cdecl
208 _ismbbgraph(
209 _In_ unsigned int _C);
210
211 _Check_return_
212 _CRTIMP
213 int
214 __cdecl
215 _ismbbgraph_l(
216 _In_ unsigned int _C,
217 _In_opt_ _locale_t _Locale);
218
219 #ifndef _MBLEADTRAIL_DEFINED
220 #define _MBLEADTRAIL_DEFINED
221
222 _Check_return_
223 _CRTIMP
224 int
225 __cdecl
226 _ismbblead(
227 _In_ unsigned int _C);
228
229 _Check_return_
230 _CRTIMP
231 int
232 __cdecl
233 _ismbblead_l(
234 _In_ unsigned int _C,
235 _In_opt_ _locale_t _Locale);
236
237 _Check_return_
238 _CRTIMP
239 int
240 __cdecl
241 _ismbbtrail(
242 _In_ unsigned int _C);
243
244 _Check_return_
245 _CRTIMP
246 int
247 __cdecl
248 _ismbbtrail_l(
249 _In_ unsigned int _C,
250 _In_opt_ _locale_t _Locale);
251
252 _Check_return_
253 _CRTIMP
254 int
255 __cdecl
256 _ismbslead(
257 _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
258 _In_z_ const unsigned char *_Pos);
259
260 _Check_return_
261 _CRTIMP
262 int
263 __cdecl
264 _ismbslead_l(
265 _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
266 _In_z_ const unsigned char *_Pos,
267 _In_opt_ _locale_t _Locale);
268
269 _Check_return_
270 _CRTIMP
271 int
272 __cdecl
273 _ismbstrail(
274 _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
275 _In_z_ const unsigned char *_Pos);
276
277 _Check_return_
278 _CRTIMP
279 int
280 __cdecl
281 _ismbstrail_l(
282 _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str,
283 _In_z_ const unsigned char *_Pos,
284 _In_opt_ _locale_t _Locale);
285
286 #endif /* _MBLEADTRAIL_DEFINED */
287
288 #endif /* _MBCTYPE_DEFINED */
289
290 #ifdef __cplusplus
291 }
292 #endif
293
294 #endif /* _INC_MBCTYPE */