Fix the _WCTYPE_T_DEFINED sentry for compatibility.
[wine/wine-gecko.git] / include / msvcrt / wctype.h
blobde4fe23bc79bf0f5083b51b4d309b7547e2d5074
1 /*
2 * Unicode definitions
4 * Copyright 2000 Francois Gouget.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef __WINE_WCTYPE_H
21 #define __WINE_WCTYPE_H
22 #ifndef __WINE_USE_MSVCRT
23 #define __WINE_USE_MSVCRT
24 #endif
26 #ifndef MSVCRT
27 # ifdef USE_MSVCRT_PREFIX
28 # define MSVCRT(x) MSVCRT_##x
29 # else
30 # define MSVCRT(x) x
31 # endif
32 #endif
34 #ifndef MSVCRT_WCHAR_T_DEFINED
35 #define MSVCRT_WCHAR_T_DEFINED
36 #ifndef __cplusplus
37 typedef unsigned short MSVCRT(wchar_t);
38 #endif
39 #endif
41 /* ASCII char classification table - binary compatible */
42 #define _UPPER 0x0001 /* C1_UPPER */
43 #define _LOWER 0x0002 /* C1_LOWER */
44 #define _DIGIT 0x0004 /* C1_DIGIT */
45 #define _SPACE 0x0008 /* C1_SPACE */
46 #define _PUNCT 0x0010 /* C1_PUNCT */
47 #define _CONTROL 0x0020 /* C1_CNTRL */
48 #define _BLANK 0x0040 /* C1_BLANK */
49 #define _HEX 0x0080 /* C1_XDIGIT */
50 #define _LEADBYTE 0x8000
51 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
53 #ifndef USE_MSVCRT_PREFIX
54 # ifndef WEOF
55 # define WEOF (wint_t)(0xFFFF)
56 # endif
57 #else
58 # ifndef MSVCRT_WEOF
59 # define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
60 # endif
61 #endif /* USE_MSVCRT_PREFIX */
63 #ifndef _WCTYPE_T_DEFINED
64 typedef unsigned short MSVCRT(wint_t);
65 typedef unsigned short MSVCRT(wctype_t);
66 #define _WCTYPE_T_DEFINED
67 #endif
69 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
76 #ifndef MSVCRT_WCTYPE_DEFINED
77 #define MSVCRT_WCTYPE_DEFINED
78 int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
79 int MSVCRT(isleadbyte)(int);
80 int MSVCRT(iswalnum)(MSVCRT(wint_t));
81 int MSVCRT(iswalpha)(MSVCRT(wint_t));
82 int MSVCRT(iswascii)(MSVCRT(wint_t));
83 int MSVCRT(iswcntrl)(MSVCRT(wint_t));
84 int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
85 int MSVCRT(iswdigit)(MSVCRT(wint_t));
86 int MSVCRT(iswgraph)(MSVCRT(wint_t));
87 int MSVCRT(iswlower)(MSVCRT(wint_t));
88 int MSVCRT(iswprint)(MSVCRT(wint_t));
89 int MSVCRT(iswpunct)(MSVCRT(wint_t));
90 int MSVCRT(iswspace)(MSVCRT(wint_t));
91 int MSVCRT(iswupper)(MSVCRT(wint_t));
92 int MSVCRT(iswxdigit)(MSVCRT(wint_t));
93 MSVCRT(wchar_t) MSVCRT(towlower)(MSVCRT(wchar_t));
94 MSVCRT(wchar_t) MSVCRT(towupper)(MSVCRT(wchar_t));
95 #endif /* MSVCRT_WCTYPE_DEFINED */
97 #ifdef __cplusplus
99 #endif
101 #endif /* __WINE_WCTYPE_H */