]> git.saurik.com Git - apple/libc.git/blame - include/xlocale/_wctype.h
Libc-1439.100.3.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
e07eda1a
A
27#include <__wctype.h>
28#include <_types/_wctrans_t.h>
29#include <xlocale/_ctype.h>
30
224c7076
A
31#if !defined(_DONT_USE_CTYPE_INLINE_) && \
32 (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
33
6465356a 34__DARWIN_WCTYPE_TOP_inline int
224c7076
A
35iswblank_l(wint_t _wc, locale_t _l)
36{
37 return (__istype_l(_wc, _CTYPE_B, _l));
38}
39
6465356a 40__DARWIN_WCTYPE_TOP_inline int
224c7076
A
41iswhexnumber_l(wint_t _wc, locale_t _l)
42{
43 return (__istype_l(_wc, _CTYPE_X, _l));
44}
45
6465356a 46__DARWIN_WCTYPE_TOP_inline int
224c7076
A
47iswideogram_l(wint_t _wc, locale_t _l)
48{
49 return (__istype_l(_wc, _CTYPE_I, _l));
50}
51
6465356a 52__DARWIN_WCTYPE_TOP_inline int
224c7076
A
53iswnumber_l(wint_t _wc, locale_t _l)
54{
55 return (__istype_l(_wc, _CTYPE_D, _l));
56}
57
6465356a 58__DARWIN_WCTYPE_TOP_inline int
224c7076
A
59iswphonogram_l(wint_t _wc, locale_t _l)
60{
61 return (__istype_l(_wc, _CTYPE_Q, _l));
62}
63
6465356a 64__DARWIN_WCTYPE_TOP_inline int
224c7076
A
65iswrune_l(wint_t _wc, locale_t _l)
66{
67 return (__istype_l(_wc, 0xFFFFFFF0L, _l));
68}
69
6465356a 70__DARWIN_WCTYPE_TOP_inline int
224c7076
A
71iswspecial_l(wint_t _wc, locale_t _l)
72{
73 return (__istype_l(_wc, _CTYPE_T, _l));
74}
75
76#else /* not using inlines */
77
3d9156a7
A
78__BEGIN_DECLS
79int iswblank_l(wint_t, locale_t);
80wint_t iswhexnumber_l(wint_t, locale_t);
81wint_t iswideogram_l(wint_t, locale_t);
82wint_t iswnumber_l(wint_t, locale_t);
83wint_t iswphonogram_l(wint_t, locale_t);
84wint_t iswrune_l(wint_t, locale_t);
85wint_t iswspecial_l(wint_t, locale_t);
224c7076
A
86__END_DECLS
87
88#endif /* using inlines */
89
90__BEGIN_DECLS
3d9156a7
A
91wint_t nextwctype_l(wint_t, wctype_t, locale_t);
92wint_t towctrans_l(wint_t, wctrans_t, locale_t);
93wctrans_t
94 wctrans_l(const char *, locale_t);
95__END_DECLS
96
3d9156a7 97#endif /* _XLOCALE__WCTYPE_H_ */