]> git.saurik.com Git - apple/libc.git/blob - include/xlocale/__wctype.h
Libc-825.40.1.tar.gz
[apple/libc.git] / include / xlocale / __wctype.h
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
27 #if !defined(_DONT_USE_CTYPE_INLINE_) && \
28 (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
29
30 __DARWIN_WCTYPE_TOP_static_inline int
31 iswalnum_l(wint_t _wc, locale_t _l)
32 {
33 return (__istype_l(_wc, _CTYPE_A|_CTYPE_D, _l));
34 }
35
36 __DARWIN_WCTYPE_TOP_static_inline int
37 iswalpha_l(wint_t _wc, locale_t _l)
38 {
39 return (__istype_l(_wc, _CTYPE_A, _l));
40 }
41
42 __DARWIN_WCTYPE_TOP_static_inline int
43 iswcntrl_l(wint_t _wc, locale_t _l)
44 {
45 return (__istype_l(_wc, _CTYPE_C, _l));
46 }
47
48 __DARWIN_WCTYPE_TOP_static_inline int
49 iswctype_l(wint_t _wc, wctype_t _charclass, locale_t _l)
50 {
51 return (__istype_l(_wc, _charclass, _l));
52 }
53
54 __DARWIN_WCTYPE_TOP_static_inline int
55 iswdigit_l(wint_t _wc, locale_t _l)
56 {
57 return (__istype_l(_wc, _CTYPE_D, _l));
58 }
59
60 __DARWIN_WCTYPE_TOP_static_inline int
61 iswgraph_l(wint_t _wc, locale_t _l)
62 {
63 return (__istype_l(_wc, _CTYPE_G, _l));
64 }
65
66 __DARWIN_WCTYPE_TOP_static_inline int
67 iswlower_l(wint_t _wc, locale_t _l)
68 {
69 return (__istype_l(_wc, _CTYPE_L, _l));
70 }
71
72 __DARWIN_WCTYPE_TOP_static_inline int
73 iswprint_l(wint_t _wc, locale_t _l)
74 {
75 return (__istype_l(_wc, _CTYPE_R, _l));
76 }
77
78 __DARWIN_WCTYPE_TOP_static_inline int
79 iswpunct_l(wint_t _wc, locale_t _l)
80 {
81 return (__istype_l(_wc, _CTYPE_P, _l));
82 }
83
84 __DARWIN_WCTYPE_TOP_static_inline int
85 iswspace_l(wint_t _wc, locale_t _l)
86 {
87 return (__istype_l(_wc, _CTYPE_S, _l));
88 }
89
90 __DARWIN_WCTYPE_TOP_static_inline int
91 iswupper_l(wint_t _wc, locale_t _l)
92 {
93 return (__istype_l(_wc, _CTYPE_U, _l));
94 }
95
96 __DARWIN_WCTYPE_TOP_static_inline int
97 iswxdigit_l(wint_t _wc, locale_t _l)
98 {
99 return (__istype_l(_wc, _CTYPE_X, _l));
100 }
101
102 __DARWIN_WCTYPE_TOP_static_inline wint_t
103 towlower_l(wint_t _wc, locale_t _l)
104 {
105 return (__tolower_l(_wc, _l));
106 }
107
108 __DARWIN_WCTYPE_TOP_static_inline wint_t
109 towupper_l(wint_t _wc, locale_t _l)
110 {
111 return (__toupper_l(_wc, _l));
112 }
113
114 #else /* not using inlines */
115
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);
131 __END_DECLS
132
133 #endif /* using inlines */
134
135 __BEGIN_DECLS
136 wctype_t
137 wctype_l(const char *, locale_t);
138 __END_DECLS
139
140 #endif /* _XLOCALE___WCTYPE_H_ */