ReactOS
0.4.16-dev-732-g2d1144a
wctype.cpp
Go to the documentation of this file.
1
//
2
// wctype.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Implementations of the wctype function.
7
//
8
#include <corecrt.h>
9
#include <string.h>
10
#include <wctype.h>
11
12
13
14
static
struct
wctab
15
{
16
char
const
*
s
;
17
wctype_t
value
;
18
}
19
const
tab
[] =
20
{
21
{
"alnum"
,
_ALPHA
|
_DIGIT
},
22
{
"alpha"
,
_ALPHA
},
23
{
"cntrl"
,
_CONTROL
},
24
{
"digit"
,
_DIGIT
},
25
{
"graph"
,
_PUNCT
|
_ALPHA
|
_DIGIT
},
26
{
"lower"
,
_LOWER
},
27
{
"print"
,
_BLANK
|
_PUNCT
|
_ALPHA
|
_DIGIT
},
28
{
"punct"
,
_PUNCT
},
29
{
"blank"
,
_BLANK
},
30
{
"space"
,
_SPACE
},
31
{
"upper"
,
_UPPER
},
32
{
"xdigit"
,
_HEX
},
33
{
nullptr
, 0 }
34
};
35
36
37
38
#pragma warning(push)
39
#pragma warning(disable: 4273)
40
41
extern
"C"
wctype_t
__cdecl
wctype
(
char
const
*
const
name
)
42
{
43
for
(
unsigned
n
= 0;
tab
[
n
].s != 0; ++
n
)
44
{
45
if
(
strcmp
(
tab
[
n
].
s
,
name
) == 0)
46
return
tab
[
n
].value;
47
}
48
49
return
0;
50
}
51
52
#pragma warning(pop)
53
54
/*
55
* Copyright (c) 1992-2007 by P.J. Plauger. ALL RIGHTS RESERVED.
56
* Consult your license regarding permissions and restrictions.
57
V5.03:0009 */
strcmp
int strcmp(const char *String1, const char *String2)
Definition:
utclib.c:469
__cdecl
#define __cdecl
Definition:
accygwin.h:79
s
GLdouble s
Definition:
gl.h:2039
n
GLdouble n
Definition:
glext.h:7729
_BLANK
#define _BLANK
Definition:
ctype.h:72
_PUNCT
#define _PUNCT
Definition:
ctype.h:70
_CONTROL
#define _CONTROL
Definition:
ctype.h:71
_LOWER
#define _LOWER
Definition:
ctype.h:66
_SPACE
#define _SPACE
Definition:
ctype.h:68
_ALPHA
#define _ALPHA
Definition:
ctype.h:76
_UPPER
#define _UPPER
Definition:
ctype.h:65
_HEX
#define _HEX
Definition:
ctype.h:73
_DIGIT
#define _DIGIT
Definition:
ctype.h:67
name
Definition:
name.c:39
wctab
Definition:
wctrans.cpp:20
wctab::value
wctype_t value
Definition:
wctrans.cpp:22
wctab::s
char const * s
Definition:
wctrans.cpp:21
wctype_t
unsigned short wctype_t
Definition:
corecrt.h:617
wctype
wctype_t __cdecl wctype(char const *const name)
Definition:
wctype.cpp:41
tab
static struct wctab tab[]
sdk
lib
ucrt
convert
wctype.cpp
Generated on Sat Feb 8 2025 06:14:37 for ReactOS by
1.9.6