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 /* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get
26 * there but WCHAR is not defined.
28 /* Some systems might have wchar_t, but we really need 16 bit characters */
29 #ifndef WINE_WCHAR_DEFINED
30 #ifdef WINE_UNICODE_NATIVE
31 typedef wchar_t WCHAR
, *PWCHAR
;
33 typedef unsigned short WCHAR
, *PWCHAR
;
35 #define WINE_WCHAR_DEFINED
38 #ifdef USE_MSVCRT_PREFIX
39 #define MSVCRT(x) MSVCRT_##x
45 /* ASCII char classification table - binary compatible */
46 #define _UPPER C1_UPPER
47 #define _LOWER C1_LOWER
48 #define _DIGIT C1_DIGIT
49 #define _SPACE C1_SPACE
50 #define _PUNCT C1_PUNCT
51 #define _CONTROL C1_CNTRL
52 #define _BLANK C1_BLANK
53 #define _HEX C1_XDIGIT
54 #define _LEADBYTE 0x8000
55 #define _ALPHA (C1_ALPHA|_UPPER|_LOWER)
57 #ifndef USE_MSVCRT_PREFIX
59 # define WEOF (WCHAR)(0xFFFF)
63 # define MSVCRT_WEOF (WCHAR)(0xFFFF)
65 #endif /* USE_MSVCRT_PREFIX */
67 typedef WCHAR
MSVCRT(wctype_t);
68 typedef WCHAR
MSVCRT(wint_t);
70 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
77 int MSVCRT(is_wctype
)(MSVCRT(wint_t),MSVCRT(wctype_t));
78 int MSVCRT(isleadbyte
)(int);
79 int MSVCRT(iswalnum
)(MSVCRT(wint_t));
80 int MSVCRT(iswalpha
)(MSVCRT(wint_t));
81 int MSVCRT(iswascii
)(MSVCRT(wint_t));
82 int MSVCRT(iswcntrl
)(MSVCRT(wint_t));
83 int MSVCRT(iswctype
)(MSVCRT(wint_t),MSVCRT(wctype_t));
84 int MSVCRT(iswdigit
)(MSVCRT(wint_t));
85 int MSVCRT(iswgraph
)(MSVCRT(wint_t));
86 int MSVCRT(iswlower
)(MSVCRT(wint_t));
87 int MSVCRT(iswprint
)(MSVCRT(wint_t));
88 int MSVCRT(iswpunct
)(MSVCRT(wint_t));
89 int MSVCRT(iswspace
)(MSVCRT(wint_t));
90 int MSVCRT(iswupper
)(MSVCRT(wint_t));
91 int MSVCRT(iswxdigit
)(MSVCRT(wint_t));
92 WCHAR
MSVCRT(towlower
)(WCHAR
);
93 WCHAR
MSVCRT(towupper
)(WCHAR
);
99 #endif /* __WINE_WCTYPE_H */