ffc9a3771f9e1d35331eb220a78d5ec74d35eb91
[reactos.git] / reactos / include / crt / mbctype.h
1 /*
2 * mbctype.h
3 *
4 * Functions for testing multibyte character types and converting characters.
5 *
6 * This file is part of the Mingw32 package.
7 *
8 *
9 * THIS SOFTWARE IS NOT COPYRIGHTED
10 *
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
13 *
14 * This code is distributed in the hope that it will be useful but
15 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16 * DISCLAIMED. This includes but is not limited to warranties of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 */
20
21 #ifndef _MBCTYPE_H_
22 #define _MBCTYPE_H_
23
24 /* All the headers include this file. */
25 #include <_mingw.h>
26
27 /* return values for _mbsbtype and _mbbtype in mbstring.h */
28 #define _MBC_SINGLE 0
29 #define _MBC_LEAD 1
30 #define _MBC_TRAIL 2
31 #define _MBC_ILLEGAL (-1)
32
33 /* args for setmbcp (in lieu of actual codepage) */
34 #define _MB_CP_SBCS 0
35 #define _MB_CP_OEM (-2)
36 #define _MB_CP_ANSI (-3)
37 #define _MB_CP_LOCALE (-4)
38
39 #define _MS 0x01
40 #define _MP 0x02
41 #define _M1 0x04
42 #define _M2 0x08
43
44 #define _SBUP 0x10
45 #define _SBLOW 0x20
46
47
48 #ifndef RC_INVOKED
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #ifndef __STRICT_ANSI__
55
56 _CRTIMP int __cdecl __MINGW_NOTHROW _setmbcp (int);
57 _CRTIMP int __cdecl __MINGW_NOTHROW _getmbcp (void);
58
59 /* byte classification */
60 /* NB: Corresponding _ismbc* functions are in mbstring.h */
61
62 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalpha (unsigned int);
63 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalnum (unsigned int);
64 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbgraph (unsigned int);
65 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbprint (unsigned int);
66 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbpunct (unsigned int);
67
68 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkana (unsigned int);
69 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkalnum (unsigned int);
70 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkprint (unsigned int);
71 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkpunct (unsigned int);
72
73
74 /* these are also in mbstring.h */
75 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int);
76 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int);
77 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead (const unsigned char*, const unsigned char*);
78 _CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail (const unsigned char*, const unsigned char*);
79
80 #ifdef __DECLSPEC_SUPPORTED
81 __MINGW_IMPORT unsigned char _mbctype[];
82 __MINGW_IMPORT unsigned char _mbcasemap[];
83 #endif
84
85 /* TODO : _MBCS_ mappings go in tchar.h */
86
87 #endif /* Not strict ANSI */
88
89 #ifdef __cplusplus
90 }
91 #endif
92
93 #endif /* Not RC_INVOKED */
94
95 #endif /* Not _MCTYPE_H_ */
96
97