source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wctype.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.2 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
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
18extern "C" {
19#endif
20
21#ifndef _CRTIMP
22#define _CRTIMP __declspec(dllimport)
23#endif
24
25#ifndef _WCHAR_T_DEFINED
26#define _WCHAR_T_DEFINED
27#ifndef __cplusplus
28 typedef unsigned short wchar_t;
29#endif /* C++ */
30#endif /* _WCHAR_T_DEFINED */
31
32#ifndef _WCTYPE_T_DEFINED
33#define _WCTYPE_T_DEFINED
34 typedef unsigned short wint_t;
35 typedef unsigned short wctype_t;
36#endif /* _WCTYPE_T_DEFINED */
37
38#ifndef WEOF
39#define WEOF (wint_t)(0xFFFF)
40#endif
41
42#ifndef _CRT_CTYPEDATA_DEFINED
43#define _CRT_CTYPEDATA_DEFINED
44#ifndef _CTYPE_DISABLE_MACROS
45
46#ifndef __PCTYPE_FUNC
47#define __PCTYPE_FUNC __pctype_func()
48#ifdef _MSVCRT_
49#define __pctype_func() (_pctype)
50#else
51#ifdef _UCRT
52 _CRTIMP unsigned short* __pctype_func(void);
53#else
54#define __pctype_func() (* __MINGW_IMP_SYMBOL(_pctype))
55#endif
56#endif
57#endif
58
59#ifndef _pctype
60#ifdef _MSVCRT_
61 extern unsigned short *_pctype;
62#else
63#ifdef _UCRT
64#define _pctype (__pctype_func())
65#else
66 extern unsigned short ** __MINGW_IMP_SYMBOL(_pctype);
67#define _pctype (* __MINGW_IMP_SYMBOL(_pctype))
68#endif
69#endif
70#endif
71
72#endif
73#endif
74
75#ifndef _CRT_WCTYPEDATA_DEFINED
76#define _CRT_WCTYPEDATA_DEFINED
77#ifndef _CTYPE_DISABLE_MACROS
78#if !defined(_wctype) && defined(_CRT_USE_WINAPI_FAMILY_DESKTOP_APP)
79#ifdef _MSVCRT_
80 extern unsigned short *_wctype;
81#else
82 extern unsigned short ** __MINGW_IMP_SYMBOL(_wctype);
83#define _wctype (* __MINGW_IMP_SYMBOL(_wctype))
84#endif
85#endif
86
87#ifndef _pwctype
88#ifdef _MSVCRT_
89 extern unsigned short *_pwctype;
90#else
91 extern unsigned short ** __MINGW_IMP_SYMBOL(_pwctype);
92#define _pwctype (* __MINGW_IMP_SYMBOL(_pwctype))
93#define __pwctype_func() (* __MINGW_IMP_SYMBOL(_pwctype))
94#endif
95#endif
96#endif
97#endif
98
99#define _UPPER 0x1
100#define _LOWER 0x2
101#define _DIGIT 0x4
102#define _SPACE 0x8
103
104#define _PUNCT 0x10
105#define _CONTROL 0x20
106#define _BLANK 0x40
107#define _HEX 0x80
108
109#define _LEADBYTE 0x8000
110#define _ALPHA (0x0100|_UPPER|_LOWER)
111
112#ifndef _WCTYPE_DEFINED
113#define _WCTYPE_DEFINED
114
115 int __cdecl iswalpha(wint_t);
116 int __cdecl iswupper(wint_t);
117 int __cdecl iswlower(wint_t);
118 int __cdecl iswdigit(wint_t);
119 int __cdecl iswxdigit(wint_t);
120 int __cdecl iswspace(wint_t);
121 int __cdecl iswpunct(wint_t);
122 int __cdecl iswalnum(wint_t);
123 int __cdecl iswprint(wint_t);
124 int __cdecl iswgraph(wint_t);
125 int __cdecl iswcntrl(wint_t);
126 int __cdecl iswascii(wint_t);
127 int __cdecl isleadbyte(int);
128 wint_t __cdecl towupper(wint_t);
129 wint_t __cdecl towlower(wint_t);
130 int __cdecl iswctype(wint_t,wctype_t);
131#if __MSVCRT_VERSION__ >= 0x800
132 _CRTIMP int __cdecl __iswcsymf(wint_t);
133 _CRTIMP int __cdecl __iswcsym(wint_t);
134#endif
135 int __cdecl is_wctype(wint_t,wctype_t);
136#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES) || defined (__cplusplus)
137int __cdecl iswblank(wint_t _C);
138#endif
139#endif
140
141#ifndef _WCTYPE_INLINE_DEFINED
142#define _WCTYPE_INLINE_DEFINED
143#ifndef __cplusplus
144#define iswalpha(_c) (iswctype(_c,_ALPHA))
145#define iswupper(_c) (iswctype(_c,_UPPER))
146#define iswlower(_c) (iswctype(_c,_LOWER))
147#define iswdigit(_c) (iswctype(_c,_DIGIT))
148#define iswxdigit(_c) (iswctype(_c,_HEX))
149#define iswspace(_c) (iswctype(_c,_SPACE))
150#define iswpunct(_c) (iswctype(_c,_PUNCT))
151#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
152#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
153#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
154#define iswcntrl(_c) (iswctype(_c,_CONTROL))
155#define iswascii(_c) ((unsigned)(_c) < 0x80)
156#define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
157#else
158#ifndef __CRT__NO_INLINE
159 __CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); }
160 __CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); }
161 __CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); }
162 __CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); }
163 __CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); }
164 __CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); }
165 __CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); }
166 __CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); }
167 __CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); }
168 __CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); }
169 __CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); }
170 __CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); }
171 __CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); }
172#endif /* !__CRT__NO_INLINE */
173#endif /* __cplusplus */
174#endif
175
176 typedef wchar_t wctrans_t;
177 wint_t __cdecl towctrans(wint_t,wctrans_t);
178 wctrans_t __cdecl wctrans(const char *);
179 wctype_t __cdecl wctype(const char *);
180
181#ifdef __cplusplus
182}
183#endif
184
185#pragma pack(pop)
186#endif
Note: See TracBrowser for help on using the repository browser.