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 #define __WINE_USE_MSVCRT
25 # ifdef USE_MSVCRT_PREFIX
26 # define MSVCRT(x) MSVCRT_##x
32 #ifndef MSVCRT_WCHAR_T_DEFINED
33 #define MSVCRT_WCHAR_T_DEFINED
35 typedef unsigned short MSVCRT(wchar_t);
39 /* ASCII char classification table - binary compatible */
40 #define _UPPER 0x0001 /* C1_UPPER */
41 #define _LOWER 0x0002 /* C1_LOWER */
42 #define _DIGIT 0x0004 /* C1_DIGIT */
43 #define _SPACE 0x0008 /* C1_SPACE */
44 #define _PUNCT 0x0010 /* C1_PUNCT */
45 #define _CONTROL 0x0020 /* C1_CNTRL */
46 #define _BLANK 0x0040 /* C1_BLANK */
47 #define _HEX 0x0080 /* C1_XDIGIT */
48 #define _LEADBYTE 0x8000
49 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
51 #ifndef USE_MSVCRT_PREFIX
53 # define WEOF (wint_t)(0xFFFF)
57 # define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
59 #endif /* USE_MSVCRT_PREFIX */
61 #ifndef MSVCRT_WCTYPE_T_DEFINED
62 typedef MSVCRT(wchar_t) MSVCRT(wint_t);
63 typedef MSVCRT(wchar_t) MSVCRT(wctype_t);
64 #define MSVCRT_WCTYPE_T_DEFINED
67 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
74 #ifndef MSVCRT_WCTYPE_DEFINED
75 #define MSVCRT_WCTYPE_DEFINED
76 int MSVCRT(is_wctype
)(MSVCRT(wint_t),MSVCRT(wctype_t));
77 int MSVCRT(isleadbyte
)(int);
78 int MSVCRT(iswalnum
)(MSVCRT(wint_t));
79 int MSVCRT(iswalpha
)(MSVCRT(wint_t));
80 int MSVCRT(iswascii
)(MSVCRT(wint_t));
81 int MSVCRT(iswcntrl
)(MSVCRT(wint_t));
82 int MSVCRT(iswctype
)(MSVCRT(wint_t),MSVCRT(wctype_t));
83 int MSVCRT(iswdigit
)(MSVCRT(wint_t));
84 int MSVCRT(iswgraph
)(MSVCRT(wint_t));
85 int MSVCRT(iswlower
)(MSVCRT(wint_t));
86 int MSVCRT(iswprint
)(MSVCRT(wint_t));
87 int MSVCRT(iswpunct
)(MSVCRT(wint_t));
88 int MSVCRT(iswspace
)(MSVCRT(wint_t));
89 int MSVCRT(iswupper
)(MSVCRT(wint_t));
90 int MSVCRT(iswxdigit
)(MSVCRT(wint_t));
91 MSVCRT(wchar_t) MSVCRT(towlower
)(MSVCRT(wchar_t));
92 MSVCRT(wchar_t) MSVCRT(towupper
)(MSVCRT(wchar_t));
93 #endif /* MSVCRT_WCTYPE_DEFINED */
99 #endif /* __WINE_WCTYPE_H */