]>
Commit | Line | Data |
---|---|---|
3d9156a7 A |
1 | /* |
2 | * Copyright (c) 1989, 1993 | |
3 | * The Regents of the University of California. All rights reserved. | |
4 | * (c) UNIX System Laboratories, Inc. | |
5 | * All or some portions of this file are derived from material licensed | |
6 | * to the University of California by American Telephone and Telegraph | |
7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | |
8 | * the permission of UNIX System Laboratories, Inc. | |
9 | * | |
10 | * This code is derived from software contributed to Berkeley by | |
11 | * Paul Borman at Krystal Technologies. | |
12 | * | |
13 | * Redistribution and use in source and binary forms, with or without | |
14 | * modification, are permitted provided that the following conditions | |
15 | * are met: | |
16 | * 1. Redistributions of source code must retain the above copyright | |
17 | * notice, this list of conditions and the following disclaimer. | |
18 | * 2. Redistributions in binary form must reproduce the above copyright | |
19 | * notice, this list of conditions and the following disclaimer in the | |
20 | * documentation and/or other materials provided with the distribution. | |
21 | * 3. All advertising materials mentioning features or use of this software | |
22 | * must display the following acknowledgement: | |
23 | * This product includes software developed by the University of | |
24 | * California, Berkeley and its contributors. | |
25 | * 4. Neither the name of the University nor the names of its contributors | |
26 | * may be used to endorse or promote products derived from this software | |
27 | * without specific prior written permission. | |
28 | * | |
29 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
30 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
31 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
32 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
33 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
34 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
35 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
36 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
37 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
38 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
39 | * SUCH DAMAGE. | |
40 | */ | |
41 | ||
42 | #if defined(LIBC_SCCS) && !defined(lint) | |
43 | static char sccsid[] = "@(#)isctype.c 8.3 (Berkeley) 2/24/94"; | |
44 | #endif /* LIBC_SCCS and not lint */ | |
45 | #include <sys/cdefs.h> | |
46 | __FBSDID("$FreeBSD: src/lib/libc/locale/isctype.c,v 1.9 2002/08/17 20:03:44 ache Exp $"); | |
47 | ||
48 | #include "xlocale_private.h" | |
49 | #include <ctype.h> | |
50 | ||
51 | #undef digittoint_l | |
52 | int | |
53 | digittoint_l(c, l) | |
54 | int c; | |
55 | locale_t l; | |
56 | { | |
57 | return (__maskrune_l(c, 0xFF, l)); | |
58 | } | |
59 | ||
60 | #undef isalnum_l | |
61 | int | |
62 | isalnum_l(c, l) | |
63 | int c; | |
64 | locale_t l; | |
65 | { | |
66 | return (__istype_l(c, _CTYPE_A|_CTYPE_D, l)); | |
67 | } | |
68 | ||
69 | #undef isalpha_l | |
70 | int | |
71 | isalpha_l(c, l) | |
72 | int c; | |
73 | locale_t l; | |
74 | { | |
75 | return (__istype_l(c, _CTYPE_A, l)); | |
76 | } | |
77 | ||
78 | #undef isblank_l | |
79 | int | |
80 | isblank_l(c, l) | |
81 | int c; | |
82 | locale_t l; | |
83 | { | |
84 | return (__istype_l(c, _CTYPE_B, l)); | |
85 | } | |
86 | ||
87 | #undef iscntrl_l | |
88 | int | |
89 | iscntrl_l(c, l) | |
90 | int c; | |
91 | locale_t l; | |
92 | { | |
93 | return (__istype_l(c, _CTYPE_C, l)); | |
94 | } | |
95 | ||
96 | #undef isdigit_l | |
97 | int | |
98 | isdigit_l(c, l) | |
99 | int c; | |
100 | locale_t l; | |
101 | { | |
102 | return (__istype_l(c, _CTYPE_D, l)); | |
103 | } | |
104 | ||
105 | #undef isgraph_l | |
106 | int | |
107 | isgraph_l(c, l) | |
108 | int c; | |
109 | locale_t l; | |
110 | { | |
111 | return (__istype_l(c, _CTYPE_G, l)); | |
112 | } | |
113 | ||
114 | #undef ishexnumber_l | |
115 | int | |
116 | ishexnumber_l(c, l) | |
117 | int c; | |
118 | locale_t l; | |
119 | { | |
120 | return (__istype_l(c, _CTYPE_X, l)); | |
121 | } | |
122 | ||
123 | #undef isideogram_l | |
124 | int | |
125 | isideogram_l(c, l) | |
126 | int c; | |
127 | locale_t l; | |
128 | { | |
129 | return (__istype_l(c, _CTYPE_I, l)); | |
130 | } | |
131 | ||
132 | #undef islower_l | |
133 | int | |
134 | islower_l(c, l) | |
135 | int c; | |
136 | locale_t l; | |
137 | { | |
138 | return (__istype_l(c, _CTYPE_L, l)); | |
139 | } | |
140 | ||
141 | #undef isnumber_l | |
142 | int | |
143 | isnumber_l(c, l) | |
144 | int c; | |
145 | locale_t l; | |
146 | { | |
147 | return (__istype_l(c, _CTYPE_D, l)); | |
148 | } | |
149 | ||
150 | #undef isphonogram_l | |
151 | int | |
152 | isphonogram_l(c, l) | |
153 | int c; | |
154 | locale_t l; | |
155 | { | |
156 | return (__istype_l(c, _CTYPE_Q, l)); | |
157 | } | |
158 | ||
159 | #undef isprint_l | |
160 | int | |
161 | isprint_l(c, l) | |
162 | int c; | |
163 | locale_t l; | |
164 | { | |
165 | return (__istype_l(c, _CTYPE_R, l)); | |
166 | } | |
167 | ||
168 | #undef ispunct_l | |
169 | int | |
170 | ispunct_l(c, l) | |
171 | int c; | |
172 | locale_t l; | |
173 | { | |
174 | return (__istype_l(c, _CTYPE_P, l)); | |
175 | } | |
176 | ||
177 | #undef isrune_l | |
178 | int | |
179 | isrune_l(c, l) | |
180 | int c; | |
181 | locale_t l; | |
182 | { | |
183 | return (__istype_l(c, 0xFFFFFF00L, l)); | |
184 | } | |
185 | ||
186 | #undef isspace_l | |
187 | int | |
188 | isspace_l(c, l) | |
189 | int c; | |
190 | locale_t l; | |
191 | { | |
192 | return (__istype_l(c, _CTYPE_S, l)); | |
193 | } | |
194 | ||
195 | #undef isspecial_l | |
196 | int | |
197 | isspecial_l(c, l) | |
198 | int c; | |
199 | locale_t l; | |
200 | { | |
201 | return (__istype_l(c, _CTYPE_T, l)); | |
202 | } | |
203 | ||
204 | #undef isupper_l | |
205 | int | |
206 | isupper_l(c, l) | |
207 | int c; | |
208 | locale_t l; | |
209 | { | |
210 | return (__istype_l(c, _CTYPE_U, l)); | |
211 | } | |
212 | ||
213 | #undef isxdigit_l | |
214 | int | |
215 | isxdigit_l(c, l) | |
216 | int c; | |
217 | locale_t l; | |
218 | { | |
219 | return (__istype_l(c, _CTYPE_X, l)); | |
220 | } | |
221 | ||
222 | #undef tolower_l | |
223 | int | |
224 | tolower_l(c, l) | |
225 | int c; | |
226 | locale_t l; | |
227 | { | |
228 | return (__tolower_l(c, l)); | |
229 | } | |
230 | ||
231 | #undef toupper_l | |
232 | int | |
233 | toupper_l(c, l) | |
234 | int c; | |
235 | locale_t l; | |
236 | { | |
237 | return (__toupper_l(c, l)); | |
238 | } | |
239 |