ReactOS 0.4.16-dev-2534-gdcd45a5
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 2247 of file wcs.c.

2248{
2249 return _iswctype_l( wc, _ALPHA | _DIGIT, locale );
2250}
#define _ALPHA
#define _DIGIT
INT CDECL _iswctype_l(wchar_t wc, wctype_t type, _locale_t locale)
Definition: wcs.c:2221

◆ _iswalpha_l()

_ACRTIMP int __cdecl _iswalpha_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2263 of file wcs.c.

2264{
2265 return _iswctype_l( wc, _ALPHA, locale );
2266}

◆ _iswblank_l()

_ACRTIMP int __cdecl _iswblank_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2423 of file wcs.c.

2424{
2425 return wc == '\t' || _iswctype_l( wc, _BLANK, locale );
2426}
#define _BLANK

◆ _iswcntrl_l()

_ACRTIMP int __cdecl _iswcntrl_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2279 of file wcs.c.

2280{
2281 return _iswctype_l( wc, _CONTROL, locale );
2282}
#define _CONTROL

◆ _iswctype_l()

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

Definition at line 2221 of file wcs.c.

2222{
2223 WORD ct;
2224
2225 if (wc == WEOF) return 0;
2226 if (wc < 256) return MSVCRT__pwctype[wc] & type;
2227
2228 if (!GetStringTypeW(CT_CTYPE1, &wc, 1, &ct))
2229 {
2230 ERR("GetStringTypeW failed for %x\n", wc);
2231 return 0;
2232 }
2233 return ct & type;
2234}
#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:255

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 2295 of file wcs.c.

2296{
2297 return _iswctype_l( wc, _DIGIT, locale );
2298}

◆ _iswgraph_l()

_ACRTIMP int __cdecl _iswgraph_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2311 of file wcs.c.

2312{
2313 return _iswctype_l( wc, _ALPHA | _DIGIT | _PUNCT, locale );
2314}
#define _PUNCT

◆ _iswlower_l()

_ACRTIMP int __cdecl _iswlower_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2327 of file wcs.c.

2328{
2329 return _iswctype_l( wc, _LOWER, locale );
2330}
#define _LOWER

◆ _iswprint_l()

_ACRTIMP int __cdecl _iswprint_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2343 of file wcs.c.

2344{
2345 return _iswctype_l( wc, _ALPHA | _BLANK | _DIGIT | _PUNCT, locale );
2346}

◆ _iswpunct_l()

_ACRTIMP int __cdecl _iswpunct_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2359 of file wcs.c.

2360{
2361 return _iswctype_l( wc, _PUNCT, locale );
2362}

◆ _iswspace_l()

_ACRTIMP int __cdecl _iswspace_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2375 of file wcs.c.

2376{
2377 return _iswctype_l( wc, _SPACE, locale );
2378}
#define _SPACE

◆ _iswupper_l()

_ACRTIMP int __cdecl _iswupper_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2391 of file wcs.c.

2392{
2393 return _iswctype_l( wc, _UPPER, locale );
2394}
#define _UPPER

◆ _iswxdigit_l()

_ACRTIMP int __cdecl _iswxdigit_l ( wint_t  wc,
_locale_t  locale 
)

Definition at line 2407 of file wcs.c.

2408{
2409 return _iswctype_l( wc, _HEX, locale );
2410}
#define _HEX

◆ _towlower_l()

_ACRTIMP wint_t __cdecl _towlower_l ( wint_t  c,
_locale_t  locale 
)

Definition at line 96 of file wcs.c.

97{
99 wchar_t ret;
100
101 if(!locale)
103 else
104 locinfo = locale->locinfo;
105
106 if(!locinfo->lc_handle[LC_CTYPE]) {
107 if(c >= 'A' && c <= 'Z')
108 return c + 'a' - 'A';
109 return c;
110 }
111
112 if(!LCMapStringW(locinfo->lc_handle[LC_CTYPE], LCMAP_LOWERCASE, &c, 1, &ret, 1))
113 return c;
114 return ret;
115}
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:197

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 2932 of file wcs.c.

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

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:165
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 2255 of file wcs.c.

2256{
2257 return _iswalnum_l( wc, NULL );
2258}
#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 2271 of file wcs.c.

2272{
2273 return _iswalpha_l( wc, NULL );
2274}
#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 2431 of file wcs.c.

2432{
2433 return wc == '\t' || _iswctype_l( wc, _BLANK, NULL );
2434}

◆ iswcntrl()

_ACRTIMP int __cdecl iswcntrl ( wint_t  wc)

Definition at line 2287 of file wcs.c.

2288{
2289 return _iswcntrl_l( wc, NULL );
2290}
#define _iswcntrl_l(_c, _p)
Definition: ctype.h:686

◆ iswctype()

_ACRTIMP int __cdecl iswctype ( wint_t  wc,
wctype_t  wctypeFlags 
)

Definition at line 165 of file freeldr.c.

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

◆ iswdigit()

_ACRTIMP int __cdecl iswdigit ( wint_t  wc)

Definition at line 2303 of file wcs.c.

2304{
2305 return _iswdigit_l( wc, NULL );
2306}
#define _iswdigit_l(_c, _p)
Definition: ctype.h:679

◆ iswgraph()

_ACRTIMP int __cdecl iswgraph ( wint_t  wc)

Definition at line 2319 of file wcs.c.

2320{
2321 return _iswgraph_l( wc, NULL );
2322}
#define _iswgraph_l(_c, _p)
Definition: ctype.h:685

◆ iswlower()

_ACRTIMP int __cdecl iswlower ( wint_t  wc)

Definition at line 2335 of file wcs.c.

2336{
2337 return _iswlower_l( wc, NULL );
2338}
#define _iswlower_l(_c, _p)
Definition: ctype.h:678

◆ iswprint()

_ACRTIMP int __cdecl iswprint ( wint_t  wc)

Definition at line 2351 of file wcs.c.

2352{
2353 return _iswprint_l( wc, NULL );
2354}
#define _iswprint_l(_c, _p)
Definition: ctype.h:684

◆ iswpunct()

_ACRTIMP int __cdecl iswpunct ( wint_t  wc)

Definition at line 2367 of file wcs.c.

2368{
2369 return _iswpunct_l( wc, NULL );
2370}
#define _iswpunct_l(_c, _p)
Definition: ctype.h:682

◆ iswspace()

_ACRTIMP int __cdecl iswspace ( wint_t  wc)

Definition at line 2383 of file wcs.c.

2384{
2385 return _iswspace_l( wc, NULL );
2386}
#define _iswspace_l(_c, _p)
Definition: ctype.h:681

◆ iswupper()

_ACRTIMP int __cdecl iswupper ( wint_t  wc)

Definition at line 2399 of file wcs.c.

2400{
2401 return _iswupper_l( wc, NULL );
2402}
#define _iswupper_l(_c, _p)
Definition: ctype.h:677

◆ iswxdigit()

_ACRTIMP int __cdecl iswxdigit ( wint_t  wc)

Definition at line 2415 of file wcs.c.

2416{
2417 return _iswxdigit_l( wc, NULL );
2418}
#define _iswxdigit_l(_c, _p)
Definition: ctype.h:680

◆ towlower()

_ACRTIMP wint_t __cdecl towlower ( wint_t  c)

Definition at line 120 of file wcs.c.

121{
122 return _towlower_l(c, NULL);
123}
wint_t CDECL _towlower_l(wint_t c, _locale_t locale)
Definition: wcs.c:96

◆ towupper()

_ACRTIMP wint_t __cdecl towupper ( wint_t  c)

Definition at line 2956 of file wcs.c.

2957{
2958 return _towupper_l(c, NULL);
2959}
wint_t CDECL _towupper_l(wint_t c, _locale_t locale)
Definition: wcs.c:2932