Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mbctype.h « include « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dd57a7b5cd799c69fc266aba83a5dc62cebe5c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* 
 * mbctype.h
 *
 * Functions for testing multibyte character types and converting characters.
 *
 * This file is part of the Mingw32 package.
 *
 *
 *  THIS SOFTWARE IS NOT COPYRIGHTED
 *
 *  This source code is offered for use in the public domain. You may
 *  use, modify or distribute it freely.
 *
 *  This code is distributed in the hope that it will be useful but
 *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
 *  DISCLAIMED. This includes but is not limited to warranties of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 */

#ifndef _MBCTYPE_H_
#define _MBCTYPE_H_

/* All the headers include this file. */
#include <_mingw.h>

/* return values for _mbsbtype  and  _mbbtype in mbstring.h */
#define _MBC_SINGLE 0 
#define _MBC_LEAD 1  
#define _MBC_TRAIL 2
#define _MBC_ILLEGAL (-1)

/*  args for setmbcp (in lieu of actual codepage)  */
#define _MB_CP_SBCS 0
#define _MB_CP_OEM (-2)
#define _MB_CP_ANSI (-3)
#define _MB_CP_LOCALE (-4)

/* TODO: bit masks */
/*
#define _MS
#define _MP
#define _M1
#define _M2
#define _SBUP
#define _SBLOW
*/

#ifndef RC_INVOKED

#ifdef __cplusplus 
extern "C" {
#endif

#ifndef	__STRICT_ANSI__

_CRTIMP int __cdecl _setmbcp (int);
_CRTIMP int __cdecl _getmbcp (void);

/* byte classification  */
/* NB: Corresponding _ismbc* functions are in mbstring.h */

_CRTIMP int __cdecl _ismbbalpha (unsigned int);
_CRTIMP int __cdecl _ismbbalnum (unsigned int);
_CRTIMP int __cdecl _ismbbgraph (unsigned int);
_CRTIMP int __cdecl _ismbbprint (unsigned int);
_CRTIMP int __cdecl _ismbbpunct (unsigned int);

_CRTIMP int __cdecl _ismbbkana (unsigned int);
_CRTIMP int __cdecl _ismbbkalnum (unsigned int);
_CRTIMP int __cdecl _ismbbkprint (unsigned int);
_CRTIMP int __cdecl _ismbbkpunct (unsigned int);


/* these are also in mbstring.h */
_CRTIMP int __cdecl _ismbblead (unsigned int);
_CRTIMP int __cdecl _ismbbtrail (unsigned int);
_CRTIMP int __cdecl _ismbslead (const unsigned char*, const unsigned char*);
_CRTIMP int __cdecl _ismbstrail (const unsigned char*, const unsigned char*);

#ifdef __DECLSPEC_SUPPORTED
__MINGW_IMPORT unsigned char _mbctype[];
__MINGW_IMPORT unsigned char _mbcasemap[];
#endif

/* TODO : _MBCS_ mappings go in tchar.h */

#endif	/* Not strict ANSI */

#ifdef __cplusplus
}
#endif

#endif	/* Not RC_INVOKED */

#endif	/* Not _MCTYPE_H_ */