ReactOS 0.4.17-dev-609-gc4517f4
corecrt_wctype.h File Reference
#include <corecrt.h>
Include dependency graph for corecrt_wctype.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _UPPER   0x0001 /* C1_UPPER */
 
#define _LOWER   0x0002 /* C1_LOWER */
 
#define _DIGIT   0x0004 /* C1_DIGIT */
 
#define _SPACE   0x0008 /* C1_SPACE */
 
#define _PUNCT   0x0010 /* C1_PUNCT */
 
#define _CONTROL   0x0020 /* C1_CNTRL */
 
#define _BLANK   0x0040 /* C1_BLANK */
 
#define _HEX   0x0080 /* C1_XDIGIT */
 
#define _LEADBYTE   0x8000
 
#define _ALPHA   (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
 

Functions

_ACRTIMP const unsigned short *__cdecl __pctype_func (void)
 
_ACRTIMP int __cdecl _isleadbyte_l (int, _locale_t)
 
_ACRTIMP int __cdecl _iswalnum_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswalpha_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswblank_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswcntrl_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswctype_l (wint_t, wctype_t, _locale_t)
 
_ACRTIMP int __cdecl _iswdigit_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswgraph_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswlower_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswprint_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswpunct_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswspace_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswupper_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl _iswxdigit_l (wint_t, _locale_t)
 
_ACRTIMP wint_t __cdecl _towlower_l (wint_t, _locale_t)
 
_ACRTIMP wint_t __cdecl _towupper_l (wint_t, _locale_t)
 
_ACRTIMP int __cdecl is_wctype (wint_t, wctype_t)
 
_ACRTIMP int __cdecl isleadbyte (int)
 
_ACRTIMP int __cdecl iswalnum (wint_t)
 
_ACRTIMP int __cdecl iswalpha (wint_t)
 
_ACRTIMP int __cdecl iswascii (wint_t)
 
_ACRTIMP int __cdecl iswblank (wint_t)
 
_ACRTIMP int __cdecl iswcntrl (wint_t)
 
_ACRTIMP int __cdecl iswctype (wint_t, wctype_t)
 
_ACRTIMP int __cdecl iswdigit (wint_t)
 
_ACRTIMP int __cdecl iswgraph (wint_t)
 
_ACRTIMP int __cdecl iswlower (wint_t)
 
_ACRTIMP int __cdecl iswprint (wint_t)
 
_ACRTIMP int __cdecl iswpunct (wint_t)
 
_ACRTIMP int __cdecl iswspace (wint_t)
 
_ACRTIMP int __cdecl iswupper (wint_t)
 
_ACRTIMP int __cdecl iswxdigit (wint_t)
 
_ACRTIMP wint_t __cdecl towlower (wint_t)
 
_ACRTIMP wint_t __cdecl towupper (wint_t)
 

Macro Definition Documentation

◆ _ALPHA

#define _ALPHA   (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */

Definition at line 25 of file corecrt_wctype.h.

◆ _BLANK

#define _BLANK   0x0040 /* C1_BLANK */

Definition at line 22 of file corecrt_wctype.h.

◆ _CONTROL

#define _CONTROL   0x0020 /* C1_CNTRL */

Definition at line 21 of file corecrt_wctype.h.

◆ _DIGIT

#define _DIGIT   0x0004 /* C1_DIGIT */

Definition at line 18 of file corecrt_wctype.h.

◆ _HEX

#define _HEX   0x0080 /* C1_XDIGIT */

Definition at line 23 of file corecrt_wctype.h.

◆ _LEADBYTE

#define _LEADBYTE   0x8000

Definition at line 24 of file corecrt_wctype.h.

◆ _LOWER

#define _LOWER   0x0002 /* C1_LOWER */

Definition at line 17 of file corecrt_wctype.h.

◆ _PUNCT

#define _PUNCT   0x0010 /* C1_PUNCT */

Definition at line 20 of file corecrt_wctype.h.

◆ _SPACE

#define _SPACE   0x0008 /* C1_SPACE */

Definition at line 19 of file corecrt_wctype.h.

◆ _UPPER

#define _UPPER   0x0001 /* C1_UPPER */

This file has no copyright assigned and is placed in the Public Domain. This file is part of the Wine project.

Definition at line 16 of file corecrt_wctype.h.

Function Documentation

◆ __pctype_func()

_ACRTIMP const unsigned short *__cdecl __pctype_func ( void  )

Definition at line 141 of file ctype.c.

142{
143 return get_locinfo()->pctype;
144}
#define get_locinfo()
Definition: winesup.h:25

◆ _isleadbyte_l()

_ACRTIMP int __cdecl _isleadbyte_l ( int  c,
_locale_t  locale 
)

Definition at line 286 of file ctype.c.

287{
288 return _isctype_l( c, _LEADBYTE, locale );
289}
Definition: _locale.h:75
int CDECL _isctype_l(int c, int type, _locale_t locale)
Definition: ctype.c:165
#define _LEADBYTE
const GLubyte * c
Definition: glext.h:8905

◆ _iswalnum_l()

_ACRTIMP int __cdecl _iswalnum_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2252 of file wcs.c.

2253{
2254 return _iswctype_l( wc, _ALPHA | _DIGIT, locale );
2255}
#define _ALPHA
#define _DIGIT
INT CDECL _iswctype_l(wchar_t wc, wctype_t type, _locale_t locale)
Definition: wcs.c:2226

◆ _iswalpha_l()

_ACRTIMP int __cdecl _iswalpha_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2268 of file wcs.c.

2269{
2270 return _iswctype_l( wc, _ALPHA, locale );
2271}

◆ _iswblank_l()

_ACRTIMP int __cdecl _iswblank_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2428 of file wcs.c.

2429{
2430 return wc == '\t' || _iswctype_l( wc, _BLANK, locale );
2431}
#define _BLANK

◆ _iswcntrl_l()

_ACRTIMP int __cdecl _iswcntrl_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2284 of file wcs.c.

2285{
2286 return _iswctype_l( wc, _CONTROL, locale );
2287}
#define _CONTROL

◆ _iswctype_l()

_ACRTIMP int __cdecl _iswctype_l ( wint_t  wc,
wctype_t  type,
_locale_t  locale 
)

Definition at line 2226 of file wcs.c.

2227{
2228 WORD ct;
2229
2230 if (wc == WEOF) return 0;
2231 if (wc < 256) return MSVCRT__pwctype[wc] & type;
2232
2233 if (!GetStringTypeW(CT_CTYPE1, &wc, 1, &ct))
2234 {
2235 ERR("GetStringTypeW failed for %x\n", wc);
2236 return 0;
2237 }
2238 return ct & type;
2239}
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
Definition: locale.c:3098
WORD * MSVCRT__pwctype
Definition: ctype.c:128
#define WEOF
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define CT_CTYPE1
Definition: winnls.h:265

Referenced by _iswalnum_l(), _iswalpha_l(), _iswblank_l(), _iswcntrl_l(), _iswdigit_l(), _iswgraph_l(), _iswlower_l(), _iswprint_l(), _iswpunct_l(), _iswspace_l(), _iswupper_l(), _iswxdigit_l(), iswblank(), iswctype(), and test_isblank().

◆ _iswdigit_l()

_ACRTIMP int __cdecl _iswdigit_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2300 of file wcs.c.

2301{
2302 return _iswctype_l( wc, _DIGIT, locale );
2303}

◆ _iswgraph_l()

_ACRTIMP int __cdecl _iswgraph_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2316 of file wcs.c.

2317{
2318 return _iswctype_l( wc, _ALPHA | _DIGIT | _PUNCT, locale );
2319}
#define _PUNCT

◆ _iswlower_l()

_ACRTIMP int __cdecl _iswlower_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2332 of file wcs.c.

2333{
2334 return _iswctype_l( wc, _LOWER, locale );
2335}
#define _LOWER

◆ _iswprint_l()

_ACRTIMP int __cdecl _iswprint_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2348 of file wcs.c.

2349{
2350 return _iswctype_l( wc, _ALPHA | _BLANK | _DIGIT | _PUNCT, locale );
2351}

◆ _iswpunct_l()

_ACRTIMP int __cdecl _iswpunct_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2364 of file wcs.c.

2365{
2366 return _iswctype_l( wc, _PUNCT, locale );
2367}

◆ _iswspace_l()

_ACRTIMP int __cdecl _iswspace_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2380 of file wcs.c.

2381{
2382 return _iswctype_l( wc, _SPACE, locale );
2383}
#define _SPACE

◆ _iswupper_l()

_ACRTIMP int __cdecl _iswupper_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2396 of file wcs.c.

2397{
2398 return _iswctype_l( wc, _UPPER, locale );
2399}
#define _UPPER

◆ _iswxdigit_l()

_ACRTIMP int __cdecl _iswxdigit_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2412 of file wcs.c.

2413{
2414 return _iswctype_l( wc, _HEX, locale );
2415}
#define _HEX

◆ _towlower_l()

_ACRTIMP wint_t __cdecl _towlower_l ( wint_t  c,
_locale_t  locale 
)

Definition at line 101 of file wcs.c.

102{
104 wchar_t ret;
105
106 if(!locale)
108 else
109 locinfo = locale->locinfo;
110
111 if(!locinfo->lc_handle[LC_CTYPE]) {
112 if(c >= 'A' && c <= 'Z')
113 return c + 'a' - 'A';
114 return c;
115 }
116
117 if(!LCMapStringW(locinfo->lc_handle[LC_CTYPE], LCMAP_LOWERCASE, &c, 1, &ret, 1))
118 return c;
119 return ret;
120}
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
Definition: locale.c:3808
#define LC_CTYPE
Definition: locale.h:27
else locinfo
Definition: scanf.h:225
return ret
Definition: mutex.c:146
#define c
Definition: ke_i.h:80
#define LCMAP_LOWERCASE
Definition: winnls.h:201

Referenced by _towlower_internal(), _wcsicmp_l(), _wcslwr_s_l(), _wcsnicmp_l(), test_C_locale(), test_SpecialCasing(), towctrans(), and towlower().

◆ _towupper_l()

_ACRTIMP wint_t __cdecl _towupper_l ( wint_t  c,
_locale_t  locale 
)

Definition at line 2937 of file wcs.c.

2938{
2940 wchar_t ret;
2941
2942 if(!locale)
2943 locinfo = get_locinfo();
2944 else
2945 locinfo = locale->locinfo;
2946
2947 if(!locinfo->lc_handle[LC_CTYPE]) {
2948 if(c >= 'a' && c <= 'z')
2949 return c + 'A' - 'a';
2950 return c;
2951 }
2952
2953 if(!LCMapStringW(locinfo->lc_handle[LC_CTYPE], LCMAP_UPPERCASE, &c, 1, &ret, 1))
2954 return c;
2955 return ret;
2956}
#define LCMAP_UPPERCASE
Definition: winnls.h:202

Referenced by _towupper_internal(), _wcsupr_s_l(), test_C_locale(), test_SpecialCasing(), towctrans(), and towupper().

◆ is_wctype()

_ACRTIMP int __cdecl is_wctype ( wint_t  c,
wctype_t  mask 
)

Definition at line 33 of file is_wctype.cpp.

37{
38 return iswctype(c, mask);
39}
int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)
Definition: freeldr.c:166
GLenum GLint GLuint mask
Definition: glext.h:6028

◆ isleadbyte()

_ACRTIMP int __cdecl isleadbyte ( int  c)

Definition at line 294 of file ctype.c.

295{
296 return _isctype( c, _LEADBYTE );
297}
int CDECL _isctype(int c, int type)
Definition: ctype.c:198

◆ iswalnum()

_ACRTIMP int __cdecl iswalnum ( wint_t  wc)

Definition at line 2260 of file wcs.c.

2261{
2262 return _iswalnum_l( wc, NULL );
2263}
#define NULL
Definition: types.h:112
#define _iswalnum_l(_c, _p)
Definition: ctype.h:683

◆ iswalpha()

_ACRTIMP int __cdecl iswalpha ( wint_t  wc)

Definition at line 2276 of file wcs.c.

2277{
2278 return _iswalpha_l( wc, NULL );
2279}
#define _iswalpha_l(_c, _p)
Definition: ctype.h:676

◆ iswascii()

_ACRTIMP int __cdecl iswascii ( wint_t  c)

Definition at line 434 of file ctype.c.

435{
436 return ((unsigned)c < 0x80);
437}

◆ iswblank()

_ACRTIMP int __cdecl iswblank ( wint_t  wc)

Definition at line 2436 of file wcs.c.

2437{
2438 return wc == '\t' || _iswctype_l( wc, _BLANK, NULL );
2439}

◆ iswcntrl()

_ACRTIMP int __cdecl iswcntrl ( wint_t  wc)

Definition at line 2292 of file wcs.c.

2293{
2294 return _iswcntrl_l( wc, NULL );
2295}
#define _iswcntrl_l(_c, _p)
Definition: ctype.h:686

◆ iswctype()

_ACRTIMP int __cdecl iswctype ( wint_t  wc,
wctype_t  wctypeFlags 
)

Definition at line 166 of file freeldr.c.

167{
168 return _isctype((char)wc, wctypeFlags);
169}

◆ iswdigit()

_ACRTIMP int __cdecl iswdigit ( wint_t  wc)

Definition at line 2308 of file wcs.c.

2309{
2310 return _iswdigit_l( wc, NULL );
2311}
#define _iswdigit_l(_c, _p)
Definition: ctype.h:679

◆ iswgraph()

_ACRTIMP int __cdecl iswgraph ( wint_t  wc)

Definition at line 2324 of file wcs.c.

2325{
2326 return _iswgraph_l( wc, NULL );
2327}
#define _iswgraph_l(_c, _p)
Definition: ctype.h:685

◆ iswlower()

_ACRTIMP int __cdecl iswlower ( wint_t  wc)

Definition at line 2340 of file wcs.c.

2341{
2342 return _iswlower_l( wc, NULL );
2343}
#define _iswlower_l(_c, _p)
Definition: ctype.h:678

◆ iswprint()

_ACRTIMP int __cdecl iswprint ( wint_t  wc)

Definition at line 2356 of file wcs.c.

2357{
2358 return _iswprint_l( wc, NULL );
2359}
#define _iswprint_l(_c, _p)
Definition: ctype.h:684

◆ iswpunct()

_ACRTIMP int __cdecl iswpunct ( wint_t  wc)

Definition at line 2372 of file wcs.c.

2373{
2374 return _iswpunct_l( wc, NULL );
2375}
#define _iswpunct_l(_c, _p)
Definition: ctype.h:682

◆ iswspace()

_ACRTIMP int __cdecl iswspace ( wint_t  wc)

Definition at line 2388 of file wcs.c.

2389{
2390 return _iswspace_l( wc, NULL );
2391}
#define _iswspace_l(_c, _p)
Definition: ctype.h:681

◆ iswupper()

_ACRTIMP int __cdecl iswupper ( wint_t  wc)

Definition at line 2404 of file wcs.c.

2405{
2406 return _iswupper_l( wc, NULL );
2407}
#define _iswupper_l(_c, _p)
Definition: ctype.h:677

◆ iswxdigit()

_ACRTIMP int __cdecl iswxdigit ( wint_t  wc)

Definition at line 2420 of file wcs.c.

2421{
2422 return _iswxdigit_l( wc, NULL );
2423}
#define _iswxdigit_l(_c, _p)
Definition: ctype.h:680

◆ towlower()

_ACRTIMP wint_t __cdecl towlower ( wint_t  c)

Definition at line 125 of file wcs.c.

126{
127 return _towlower_l(c, NULL);
128}
wint_t CDECL _towlower_l(wint_t c, _locale_t locale)
Definition: wcs.c:101

◆ towupper()

_ACRTIMP wint_t __cdecl towupper ( wint_t  c)

Definition at line 2961 of file wcs.c.

2962{
2963 return _towupper_l(c, NULL);
2964}
wint_t CDECL _towupper_l(wint_t c, _locale_t locale)
Definition: wcs.c:2937