branch update for HEAD-2003021201
[reactos.git] / include / msvcrt / 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
25 /* return values for _mbsbtype  and  _mbbtype in mbstring.h */
26 #define _MBC_SINGLE   0
27 #define _MBC_LEAD     1
28 #define _MBC_TRAIL    2
29 #define _MBC_ILLEGAL (-1)
30
31 /*  args for setmbcp (in lieu of actual codepage)  */
32 #define _MB_CP_SBCS      0
33 #define _MB_CP_OEM      (-2)
34 #define _MB_CP_ANSI     (-3)
35 #define _MB_CP_LOCALE   (-4)
36
37 /* TODO: bit masks */
38 /*
39 //#define _MS   0x01
40 //#define _MP   0x02
41 //#define _M1   0x04
42 //#define _M2   0x08
43 #define _SBUP
44 #define _SBLOW
45 */
46
47 #define _KNJ_M  ((char)0x01)    /* Non-punctuation of Kana-set */
48 #define _KNJ_P  ((char)0x02)    /* Punctuation of Kana-set */
49 #define _KNJ_1  ((char)0x04)    /* Legal 1st byte of double byte stream */
50 #define _KNJ_2  ((char)0x08)    /* Legal 2nd btye of double byte stream */
51
52
53 #define ___     0
54 #define _1_     _KNJ_1 /* Legal 1st byte of double byte code */
55 #define __2     _KNJ_2 /* Legal 2nd byte of double byte code */
56 #define _M_     _KNJ_M /* Non-puntuation in Kana-set */
57 #define _P_     _KNJ_P /* Punctuation of Kana-set */
58 #define _12     (_1_|__2)
59 #define _M2     (_M_|__2)
60 #define _P2     (_P_|__2)
61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65
66 extern char _jctype[257];
67
68
69 int _ismbbkana(unsigned char);
70 int _ismbbkalnum(unsigned int);
71
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif  /* Not _MCTYPE_H_ */
78