summaryrefslogtreecommitdiffstats
path: root/private/crt32/convert/_ctype.c
blob: 7e65d82b5c7e6bac55d4597c278d5ba11bdc6f59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/***
*_ctype.c - function versions of ctype macros
*
*	Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
*	This files provides function versions of the character
*	classification and conversion macros in ctype.h.
*
*Revision History:
*	06-05-89  PHG	Module created
*	03-05-90  GJF	Fixed calling type, #include <cruntime.h>, fixed
*			copyright.
*	09-27-90  GJF	New-style function declarators.
*	01-16-91  GJF	ANSI naming.
*	02-03-92  GJF	Got rid of #undef/#include-s, the MIPS compiler didn't
*			like 'em.
*	08-07-92  GJF	Fixed function calling type macros.
*
*******************************************************************************/

/***
*ctype - Function versions of ctype macros
*
*Purpose:
*	Function versions of the macros in ctype.h.  In order to define
*	these, we use a trick -- we undefine the macro so we can use the
*	name in the function declaration, then re-include the file so
*	we can use the macro in the definition part.
*
*	Functions defined:
*	    isalpha	isupper     islower
*	    isdigit	isxdigit    isspace
*	    ispunct	isalnum     isprint
*	    isgraph	isctrl	    __isascii
*	    __toascii	__iscsym    __iscsymf
*
*Entry:
*	int c = character to be tested
*Exit:
*	returns non-zero = character is of the requested type
*		   0 = character is NOT of the requested type
*
*Exceptions:
*	None.
*
*******************************************************************************/

#include <cruntime.h>
#define __STDC__ 1
#include <ctype.h>

int (_CRTAPI1 isalpha) (
	int c
	)
{
	return isalpha(c);
}

int (_CRTAPI1 isupper) (
	int c
	)
{
	return isupper(c);
}

int (_CRTAPI1 islower) (
	int c
	)
{
	return islower(c);
}

int (_CRTAPI1 isdigit) (
	int c
	)
{
	return isdigit(c);
}

int (_CRTAPI1 isxdigit) (
	int c
	)
{
	return isxdigit(c);
}

int (_CRTAPI1 isspace) (
	int c
	)
{
	return isspace(c);
}

int (_CRTAPI1 ispunct) (
	int c
	)
{
	return ispunct(c);
}

int (_CRTAPI1 isalnum) (
	int c
	)
{
	return isalnum(c);
}

int (_CRTAPI1 isprint) (
	int c
	)
{
	return isprint(c);
}

int (_CRTAPI1 isgraph) (
	int c
	)
{
	return isgraph(c);
}

int (_CRTAPI1 iscntrl) (
	int c
	)
{
	return iscntrl(c);
}

int (_CRTAPI1 __isascii) (
	int c
	)
{
	return __isascii(c);
}

int (_CRTAPI1 __toascii) (
	int c
	)
{
	return __toascii(c);
}

int (_CRTAPI1 __iscsymf) (
	int c
	)
{
	return __iscsymf(c);
}

int (_CRTAPI1 __iscsym) (
	int c
	)
{
	return __iscsym(c);
}