Update the address of the Free Software Foundation.
[wine] / include / msvcrt / wctype.h
1 /*
2  * Unicode definitions
3  *
4  * Copyright 2000 Francois Gouget.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 #ifndef __WINE_WCTYPE_H
21 #define __WINE_WCTYPE_H
22 #ifndef __WINE_USE_MSVCRT
23 #define __WINE_USE_MSVCRT
24 #endif
25
26 #ifndef _WCHAR_T_DEFINED
27 #define _WCHAR_T_DEFINED
28 #ifndef __cplusplus
29 typedef unsigned short wchar_t;
30 #endif
31 #endif
32
33 /* ASCII char classification table - binary compatible */
34 #define _UPPER        0x0001  /* C1_UPPER */
35 #define _LOWER        0x0002  /* C1_LOWER */
36 #define _DIGIT        0x0004  /* C1_DIGIT */
37 #define _SPACE        0x0008  /* C1_SPACE */
38 #define _PUNCT        0x0010  /* C1_PUNCT */
39 #define _CONTROL      0x0020  /* C1_CNTRL */
40 #define _BLANK        0x0040  /* C1_BLANK */
41 #define _HEX          0x0080  /* C1_XDIGIT */
42 #define _LEADBYTE     0x8000
43 #define _ALPHA       (0x0100|_UPPER|_LOWER)  /* (C1_ALPHA|_UPPER|_LOWER) */
44
45 #ifndef WEOF
46 #define WEOF        (wint_t)(0xFFFF)
47 #endif
48
49 #ifndef _WCTYPE_T_DEFINED
50 typedef unsigned short  wint_t;
51 typedef unsigned short  wctype_t;
52 #define _WCTYPE_T_DEFINED
53 #endif
54
55 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
56
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 #ifndef _WCTYPE_DEFINED
63 #define _WCTYPE_DEFINED
64 int is_wctype(wint_t,wctype_t);
65 int isleadbyte(int);
66 int iswalnum(wint_t);
67 int iswalpha(wint_t);
68 int iswascii(wint_t);
69 int iswcntrl(wint_t);
70 int iswctype(wint_t,wctype_t);
71 int iswdigit(wint_t);
72 int iswgraph(wint_t);
73 int iswlower(wint_t);
74 int iswprint(wint_t);
75 int iswpunct(wint_t);
76 int iswspace(wint_t);
77 int iswupper(wint_t);
78 int iswxdigit(wint_t);
79 wchar_t towlower(wchar_t);
80 wchar_t towupper(wchar_t);
81 #endif /* _WCTYPE_DEFINED */
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87 #endif /* __WINE_WCTYPE_H */