2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _XLOCALE___WCTYPE_H_
25 #define _XLOCALE___WCTYPE_H_
27 #if !defined(_DONT_USE_CTYPE_INLINE_) && \
28 (defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
30 __DARWIN_WCTYPE_TOP_static_inline
int
31 iswalnum_l(wint_t _wc
, locale_t _l
)
33 return (__istype_l(_wc
, _CTYPE_A
|_CTYPE_D
, _l
));
36 __DARWIN_WCTYPE_TOP_static_inline
int
37 iswalpha_l(wint_t _wc
, locale_t _l
)
39 return (__istype_l(_wc
, _CTYPE_A
, _l
));
42 __DARWIN_WCTYPE_TOP_static_inline
int
43 iswcntrl_l(wint_t _wc
, locale_t _l
)
45 return (__istype_l(_wc
, _CTYPE_C
, _l
));
48 __DARWIN_WCTYPE_TOP_static_inline
int
49 iswctype_l(wint_t _wc
, wctype_t _charclass
, locale_t _l
)
51 return (__istype_l(_wc
, _charclass
, _l
));
54 __DARWIN_WCTYPE_TOP_static_inline
int
55 iswdigit_l(wint_t _wc
, locale_t _l
)
57 return (__istype_l(_wc
, _CTYPE_D
, _l
));
60 __DARWIN_WCTYPE_TOP_static_inline
int
61 iswgraph_l(wint_t _wc
, locale_t _l
)
63 return (__istype_l(_wc
, _CTYPE_G
, _l
));
66 __DARWIN_WCTYPE_TOP_static_inline
int
67 iswlower_l(wint_t _wc
, locale_t _l
)
69 return (__istype_l(_wc
, _CTYPE_L
, _l
));
72 __DARWIN_WCTYPE_TOP_static_inline
int
73 iswprint_l(wint_t _wc
, locale_t _l
)
75 return (__istype_l(_wc
, _CTYPE_R
, _l
));
78 __DARWIN_WCTYPE_TOP_static_inline
int
79 iswpunct_l(wint_t _wc
, locale_t _l
)
81 return (__istype_l(_wc
, _CTYPE_P
, _l
));
84 __DARWIN_WCTYPE_TOP_static_inline
int
85 iswspace_l(wint_t _wc
, locale_t _l
)
87 return (__istype_l(_wc
, _CTYPE_S
, _l
));
90 __DARWIN_WCTYPE_TOP_static_inline
int
91 iswupper_l(wint_t _wc
, locale_t _l
)
93 return (__istype_l(_wc
, _CTYPE_U
, _l
));
96 __DARWIN_WCTYPE_TOP_static_inline
int
97 iswxdigit_l(wint_t _wc
, locale_t _l
)
99 return (__istype_l(_wc
, _CTYPE_X
, _l
));
102 __DARWIN_WCTYPE_TOP_static_inline
wint_t
103 towlower_l(wint_t _wc
, locale_t _l
)
105 return (__tolower_l(_wc
, _l
));
108 __DARWIN_WCTYPE_TOP_static_inline
wint_t
109 towupper_l(wint_t _wc
, locale_t _l
)
111 return (__toupper_l(_wc
, _l
));
114 #else /* not using inlines */
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
);
133 #endif /* using inlines */
137 wctype_l(const char *, locale_t
);
140 #endif /* _XLOCALE___WCTYPE_H_ */