]>
Commit | Line | Data |
---|---|---|
3d9156a7 A |
1 | /* |
2 | * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * This file contains Original Code and/or Modifications of Original Code | |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | ||
24 | #ifndef _XLOCALE___WCTYPE_H_ | |
25 | #define _XLOCALE___WCTYPE_H_ | |
26 | ||
224c7076 A |
27 | #if !defined(_DONT_USE_CTYPE_INLINE_) && \ |
28 | (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus)) | |
29 | ||
6465356a | 30 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
31 | iswalnum_l(wint_t _wc, locale_t _l) |
32 | { | |
33 | return (__istype_l(_wc, _CTYPE_A|_CTYPE_D, _l)); | |
34 | } | |
35 | ||
6465356a | 36 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
37 | iswalpha_l(wint_t _wc, locale_t _l) |
38 | { | |
39 | return (__istype_l(_wc, _CTYPE_A, _l)); | |
40 | } | |
41 | ||
6465356a | 42 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
43 | iswcntrl_l(wint_t _wc, locale_t _l) |
44 | { | |
45 | return (__istype_l(_wc, _CTYPE_C, _l)); | |
46 | } | |
47 | ||
6465356a | 48 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
49 | iswctype_l(wint_t _wc, wctype_t _charclass, locale_t _l) |
50 | { | |
51 | return (__istype_l(_wc, _charclass, _l)); | |
52 | } | |
53 | ||
6465356a | 54 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
55 | iswdigit_l(wint_t _wc, locale_t _l) |
56 | { | |
57 | return (__istype_l(_wc, _CTYPE_D, _l)); | |
58 | } | |
59 | ||
6465356a | 60 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
61 | iswgraph_l(wint_t _wc, locale_t _l) |
62 | { | |
63 | return (__istype_l(_wc, _CTYPE_G, _l)); | |
64 | } | |
65 | ||
6465356a | 66 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
67 | iswlower_l(wint_t _wc, locale_t _l) |
68 | { | |
69 | return (__istype_l(_wc, _CTYPE_L, _l)); | |
70 | } | |
71 | ||
6465356a | 72 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
73 | iswprint_l(wint_t _wc, locale_t _l) |
74 | { | |
75 | return (__istype_l(_wc, _CTYPE_R, _l)); | |
76 | } | |
77 | ||
6465356a | 78 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
79 | iswpunct_l(wint_t _wc, locale_t _l) |
80 | { | |
81 | return (__istype_l(_wc, _CTYPE_P, _l)); | |
82 | } | |
83 | ||
6465356a | 84 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
85 | iswspace_l(wint_t _wc, locale_t _l) |
86 | { | |
87 | return (__istype_l(_wc, _CTYPE_S, _l)); | |
88 | } | |
89 | ||
6465356a | 90 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
91 | iswupper_l(wint_t _wc, locale_t _l) |
92 | { | |
93 | return (__istype_l(_wc, _CTYPE_U, _l)); | |
94 | } | |
95 | ||
6465356a | 96 | __DARWIN_WCTYPE_TOP_inline int |
224c7076 A |
97 | iswxdigit_l(wint_t _wc, locale_t _l) |
98 | { | |
99 | return (__istype_l(_wc, _CTYPE_X, _l)); | |
100 | } | |
101 | ||
6465356a | 102 | __DARWIN_WCTYPE_TOP_inline wint_t |
224c7076 A |
103 | towlower_l(wint_t _wc, locale_t _l) |
104 | { | |
105 | return (__tolower_l(_wc, _l)); | |
106 | } | |
107 | ||
6465356a | 108 | __DARWIN_WCTYPE_TOP_inline wint_t |
224c7076 A |
109 | towupper_l(wint_t _wc, locale_t _l) |
110 | { | |
111 | return (__toupper_l(_wc, _l)); | |
112 | } | |
113 | ||
114 | #else /* not using inlines */ | |
115 | ||
3d9156a7 A |
116 | __BEGIN_DECLS |
117 | int iswalnum_l(wint_t, locale_t); | |
118 | int iswalpha_l(wint_t, locale_t); | |
119 | int iswcntrl_l(wint_t, locale_t); | |
120 | int iswctype_l(wint_t, wctype_t, locale_t); | |
121 | int iswdigit_l(wint_t, locale_t); | |
122 | int iswgraph_l(wint_t, locale_t); | |
123 | int iswlower_l(wint_t, locale_t); | |
124 | int iswprint_l(wint_t, locale_t); | |
125 | int iswpunct_l(wint_t, locale_t); | |
126 | int iswspace_l(wint_t, locale_t); | |
127 | int iswupper_l(wint_t, locale_t); | |
128 | int iswxdigit_l(wint_t, locale_t); | |
129 | wint_t towlower_l(wint_t, locale_t); | |
130 | wint_t towupper_l(wint_t, locale_t); | |
224c7076 A |
131 | __END_DECLS |
132 | ||
133 | #endif /* using inlines */ | |
134 | ||
135 | __BEGIN_DECLS | |
3d9156a7 A |
136 | wctype_t |
137 | wctype_l(const char *, locale_t); | |
138 | __END_DECLS | |
139 | ||
3d9156a7 | 140 | #endif /* _XLOCALE___WCTYPE_H_ */ |