Fixed some issues found by winapi_check.
[wine] / include / msvcrt / wctype.h
1 /*
2  * Unicode definitions
3  *
4  * Copyright 2000 Francois Gouget.
5  */
6 #ifndef __WINE_WCTYPE_H
7 #define __WINE_WCTYPE_H
8
9 /* FIXME: winnt.h includes 'ctype.h' which includes 'wctype.h'. So we get 
10  * there but WCHAR is not defined.
11  */
12 /* Some systems might have wchar_t, but we really need 16 bit characters */
13 #ifndef WINE_WCHAR_DEFINED
14 #ifdef WINE_UNICODE_NATIVE
15 typedef wchar_t         WCHAR,      *PWCHAR;
16 #else
17 typedef unsigned short  WCHAR,      *PWCHAR;
18 #endif
19 #define WINE_WCHAR_DEFINED
20 #endif
21
22 #ifdef USE_MSVCRT_PREFIX
23 #define MSVCRT(x)    MSVCRT_##x
24 #else
25 #define MSVCRT(x)    x
26 #endif
27
28
29 /* ASCII char classification table - binary compatible */
30 #define _UPPER        C1_UPPER
31 #define _LOWER        C1_LOWER
32 #define _DIGIT        C1_DIGIT
33 #define _SPACE        C1_SPACE
34 #define _PUNCT        C1_PUNCT
35 #define _CONTROL      C1_CNTRL
36 #define _BLANK        C1_BLANK
37 #define _HEX          C1_XDIGIT
38 #define _LEADBYTE     0x8000
39 #define _ALPHA       (C1_ALPHA|_UPPER|_LOWER)
40
41 #ifndef USE_MSVCRT_PREFIX
42 # ifndef WEOF
43 #  define WEOF        (WCHAR)(0xFFFF)
44 # endif
45 #else
46 # ifndef MSVCRT_WEOF
47 #  define MSVCRT_WEOF (WCHAR)(0xFFFF)
48 # endif
49 #endif /* USE_MSVCRT_PREFIX */
50
51 typedef WCHAR MSVCRT(wctype_t);
52 typedef WCHAR MSVCRT(wint_t);
53
54 /* FIXME: there's something to do with __p__pctype and __p__pwctype */
55
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 int MSVCRT(is_wctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
62 int MSVCRT(isleadbyte)(int);
63 int MSVCRT(iswalnum)(MSVCRT(wint_t));
64 int MSVCRT(iswalpha)(MSVCRT(wint_t));
65 int MSVCRT(iswascii)(MSVCRT(wint_t));
66 int MSVCRT(iswcntrl)(MSVCRT(wint_t));
67 int MSVCRT(iswctype)(MSVCRT(wint_t),MSVCRT(wctype_t));
68 int MSVCRT(iswdigit)(MSVCRT(wint_t));
69 int MSVCRT(iswgraph)(MSVCRT(wint_t));
70 int MSVCRT(iswlower)(MSVCRT(wint_t));
71 int MSVCRT(iswprint)(MSVCRT(wint_t));
72 int MSVCRT(iswpunct)(MSVCRT(wint_t));
73 int MSVCRT(iswspace)(MSVCRT(wint_t));
74 int MSVCRT(iswupper)(MSVCRT(wint_t));
75 int MSVCRT(iswxdigit)(MSVCRT(wint_t));
76 WCHAR MSVCRT(towlower)(WCHAR);
77 WCHAR MSVCRT(towupper)(WCHAR);
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif /* __WINE_WCTYPE_H */