]> git.saurik.com Git - apple/libc.git/blame - include/xlocale/__wctype.h
Libc-498.1.5.tar.gz
[apple/libc.git] / include / xlocale / __wctype.h
CommitLineData
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
30__DARWIN_WCTYPE_TOP_static_inline int
31iswalnum_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
37iswalpha_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
43iswcntrl_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
49iswctype_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
55iswdigit_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
61iswgraph_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
67iswlower_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
73iswprint_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
79iswpunct_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
85iswspace_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
91iswupper_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
97iswxdigit_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
103towlower_l(wint_t _wc, locale_t _l)
104{
105 return (__tolower_l(_wc, _l));
106}
107
108__DARWIN_WCTYPE_TOP_static_inline wint_t
109towupper_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
117int iswalnum_l(wint_t, locale_t);
118int iswalpha_l(wint_t, locale_t);
119int iswcntrl_l(wint_t, locale_t);
120int iswctype_l(wint_t, wctype_t, locale_t);
121int iswdigit_l(wint_t, locale_t);
122int iswgraph_l(wint_t, locale_t);
123int iswlower_l(wint_t, locale_t);
124int iswprint_l(wint_t, locale_t);
125int iswpunct_l(wint_t, locale_t);
126int iswspace_l(wint_t, locale_t);
127int iswupper_l(wint_t, locale_t);
128int iswxdigit_l(wint_t, locale_t);
129wint_t towlower_l(wint_t, locale_t);
130wint_t towupper_l(wint_t, locale_t);
224c7076
A
131__END_DECLS
132
133#endif /* using inlines */
134
135__BEGIN_DECLS
3d9156a7
A
136wctype_t
137 wctype_l(const char *, locale_t);
138__END_DECLS
139
3d9156a7 140#endif /* _XLOCALE___WCTYPE_H_ */