ReactOS  0.4.14-dev-317-g96040ec
wctype.h
Go to the documentation of this file.
1 
6 #ifndef _INC_WCTYPE
7 #define _INC_WCTYPE
8 
9 #ifndef _WIN32
10 #error Only Win32 target is supported!
11 #endif
12 
13 #include <crtdefs.h>
14 
15 #pragma pack(push,_CRT_PACKING)
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #ifndef WEOF
22 #define WEOF (wint_t)(0xFFFF)
23 #endif
24 
25 #ifndef _CRT_CTYPEDATA_DEFINED
26 #define _CRT_CTYPEDATA_DEFINED
27 #ifndef _CTYPE_DISABLE_MACROS
28 
29 #ifndef __PCTYPE_FUNC
30 #define __PCTYPE_FUNC __pctype_func()
31 #ifdef _MSVCRT_
32 #define __pctype_func() (_pctype)
33 #else
34 #define __pctype_func() (*_imp___pctype)
35 #endif
36 #endif
37 
38 #ifndef _pctype
39 #ifdef _MSVCRT_
40  extern unsigned short *_pctype;
41 #else
42  extern unsigned short **_imp___pctype;
43 #define _pctype (*_imp___pctype)
44 #endif
45 #endif
46 
47 #endif
48 #endif
49 
50 #ifndef _CRT_WCTYPEDATA_DEFINED
51 #define _CRT_WCTYPEDATA_DEFINED
52 #ifndef _CTYPE_DISABLE_MACROS
53 #ifndef _wctype
54 #ifdef _MSVCRT_
55  extern unsigned short *_wctype;
56 #else
57  extern unsigned short **_imp___wctype;
58 #define _wctype (*_imp___wctype)
59 #endif
60 #endif
61 
62 #ifndef _pwctype
63 #ifdef _MSVCRT_
64  extern unsigned short *_pwctype;
65 #else
66  extern unsigned short **_imp___pwctype;
67 #define _pwctype (*_imp___pwctype)
68 #define __pwctype_func() (*_imp___pwctype)
69 #endif
70 #endif
71 #endif
72 #endif
73 
74 #define _UPPER 0x1
75 #define _LOWER 0x2
76 #define _DIGIT 0x4
77 #define _SPACE 0x8
78 
79 #define _PUNCT 0x10
80 #define _CONTROL 0x20
81 #define _BLANK 0x40
82 #define _HEX 0x80
83 
84 #define _LEADBYTE 0x8000
85 #define _ALPHA (0x0100|_UPPER|_LOWER)
86 
87 #ifndef _WCTYPE_DEFINED
88 #define _WCTYPE_DEFINED
89 
90  int __cdecl iswalpha(wint_t);
91  int __cdecl iswupper(wint_t);
92  int __cdecl iswlower(wint_t);
93  int __cdecl iswdigit(wint_t);
95  int __cdecl iswspace(wint_t);
96  int __cdecl iswpunct(wint_t);
97  int __cdecl iswalnum(wint_t);
98  int __cdecl iswprint(wint_t);
99  int __cdecl iswgraph(wint_t);
100  int __cdecl iswcntrl(wint_t);
101  int __cdecl iswascii(wint_t);
102  int __cdecl isleadbyte(int);
109 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
110  _CRTIMP int __cdecl iswblank(wint_t _C);
111 #endif
112 #endif
113 
114 #ifndef _WCTYPE_INLINE_DEFINED
115 #define _WCTYPE_INLINE_DEFINED
116 #ifndef __cplusplus
117 #define iswalpha(_c) (iswctype(_c,_ALPHA))
118 #define iswupper(_c) (iswctype(_c,_UPPER))
119 #define iswlower(_c) (iswctype(_c,_LOWER))
120 #define iswdigit(_c) (iswctype(_c,_DIGIT))
121 #define iswxdigit(_c) (iswctype(_c,_HEX))
122 #define iswspace(_c) (iswctype(_c,_SPACE))
123 #define iswpunct(_c) (iswctype(_c,_PUNCT))
124 #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
125 #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
126 #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
127 #define iswcntrl(_c) (iswctype(_c,_CONTROL))
128 #define iswascii(_c) ((unsigned)(_c) < 0x80)
129 #define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
130 #else
131  __CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); }
132  __CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); }
133  __CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); }
134  __CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); }
135  __CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); }
136  __CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); }
137  __CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); }
138  __CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); }
139  __CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); }
140  __CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); }
141  __CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); }
142  __CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); }
143  __CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); }
144 #endif
145 #endif
146 
147  typedef wchar_t wctrans_t;
149  wctrans_t __cdecl wctrans(const char *);
150  wctype_t __cdecl wctype(const char *);
151 
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #pragma pack(pop)
157 #endif
#define _ALPHA
Definition: wctype.h:85
#define iswspace(_c)
Definition: wctype.h:122
unsigned short ** _imp___wctype
#define __cdecl
Definition: accygwin.h:79
#define iswprint(_c)
Definition: wctype.h:125
#define _CRTIMP
Definition: crtdefs.h:60
_CRTIMP int __cdecl __iswcsym(wint_t)
#define _LEADBYTE
Definition: wctype.h:84
#define iswlower(_c)
Definition: wctype.h:119
unsigned short wctype_t
Definition: crtdefs.h:331
#define iswpunct(_c)
Definition: wctype.h:123
#define _pctype
Definition: wctype.h:43
#define _pwctype
Definition: wctype.h:67
#define isleadbyte(c)
Definition: wctype.h:129
wctrans_t __cdecl wctrans(const char *)
int wint_t
Definition: _apple.h:38
#define _HEX
Definition: wctype.h:82
#define iswalpha(_c)
Definition: wctype.h:117
#define _DIGIT
Definition: wctype.h:76
unsigned short ** _imp___pwctype
#define iswalnum(_c)
Definition: wctype.h:124
#define _UPPER
Definition: wctype.h:74
#define _SPACE
Definition: wctype.h:77
wint_t __cdecl towlower(wint_t)
Definition: ctype.c:891
int __cdecl iswctype(wint_t, wctype_t)
Definition: freeldr.c:97
#define _CONTROL
Definition: wctype.h:80
#define iswgraph(_c)
Definition: wctype.h:126
#define iswupper(_c)
Definition: wctype.h:118
#define iswascii(_c)
Definition: wctype.h:128
unsigned short ** _imp___pctype
#define _PUNCT
Definition: wctype.h:79
#define iswdigit(_c)
Definition: wctype.h:120
#define _BLANK
Definition: wctype.h:81
wctype_t __cdecl wctype(const char *)
wint_t __cdecl towctrans(wint_t, wctrans_t)
wint_t __cdecl towupper(wint_t)
Definition: ctype.c:901
#define iswcntrl(_c)
Definition: wctype.h:127
#define __pctype_func()
Definition: wctype.h:34
int __cdecl is_wctype(wint_t, wctype_t)
Definition: is_wctype.c:10
#define iswxdigit(_c)
Definition: wctype.h:121
#define _LOWER
Definition: wctype.h:75
#define _wctype
Definition: wctype.h:58
_CRTIMP int __cdecl __iswcsymf(wint_t)
_CRTIMP int __cdecl iswblank(wint_t _C)
Definition: iswblank.c:4
wchar_t wctrans_t
Definition: wctype.h:147