]> git.saurik.com Git - apple/libc.git/blame - include/xlocale.h
Libc-1353.11.2.tar.gz
[apple/libc.git] / include / xlocale.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_H_
25#define _XLOCALE_H_
26
27#include <sys/cdefs.h>
28
29#ifndef _USE_EXTENDED_LOCALES_
30#define _USE_EXTENDED_LOCALES_
31#endif /* _USE_EXTENDED_LOCALES_ */
32
3d9156a7
A
33#include <_locale.h>
34#include <_xlocale.h>
35
36#define LC_ALL_MASK ( LC_COLLATE_MASK \
37 | LC_CTYPE_MASK \
38 | LC_MESSAGES_MASK \
39 | LC_MONETARY_MASK \
40 | LC_NUMERIC_MASK \
41 | LC_TIME_MASK )
42#define LC_COLLATE_MASK (1 << 0)
43#define LC_CTYPE_MASK (1 << 1)
44#define LC_MESSAGES_MASK (1 << 2)
45#define LC_MONETARY_MASK (1 << 3)
46#define LC_NUMERIC_MASK (1 << 4)
47#define LC_TIME_MASK (1 << 5)
48
34e8f829
A
49#define _LC_NUM_MASK 6
50#define _LC_LAST_MASK (1 << (_LC_NUM_MASK - 1))
3d9156a7
A
51
52#define LC_GLOBAL_LOCALE ((locale_t)-1)
507116e3 53#define LC_C_LOCALE ((locale_t)NULL)
3d9156a7
A
54
55#ifdef MB_CUR_MAX
56#undef MB_CUR_MAX
57#define MB_CUR_MAX (___mb_cur_max())
58#ifndef MB_CUR_MAX_L
59#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
60#endif /* !MB_CUR_MAX_L */
61#endif /* MB_CUR_MAX */
62
63__BEGIN_DECLS
64extern const locale_t _c_locale;
65
66locale_t duplocale(locale_t);
67int freelocale(locale_t);
68struct lconv * localeconv_l(locale_t);
69locale_t newlocale(int, __const char *, locale_t);
70__const char * querylocale(int, locale_t);
71locale_t uselocale(locale_t);
72__END_DECLS
73
224c7076
A
74//Begin-Libc
75#ifndef __DARWIN_XLOCALE_PRIVATE
76//End-Libc
3d9156a7
A
77#ifdef _CTYPE_H_
78#include <xlocale/_ctype.h>
79#endif /* _CTYPE_H_ */
224c7076
A
80#ifdef __WCTYPE_H_
81#include <xlocale/__wctype.h>
82#endif /* __WCTYPE_H_ */
3d9156a7
A
83#ifdef _INTTYPES_H_
84#include <xlocale/_inttypes.h>
85#endif /* _INTTYPES_H_ */
86#ifdef _LANGINFO_H_
87#include <xlocale/_langinfo.h>
88#endif /* _LANGINFO_H_ */
89#ifdef _MONETARY_H_
90#include <xlocale/_monetary.h>
91#endif /* _MONETARY_H_ */
ad3c9f2a
A
92#ifdef _REGEX_H_
93#include <xlocale/_regex.h>
94#endif /* _REGEX_H_ */
3d9156a7
A
95#ifdef _STDIO_H_
96#include <xlocale/_stdio.h>
97#endif /* _STDIO_H_ */
98#ifdef _STDLIB_H_
99#include <xlocale/_stdlib.h>
100#endif /* _STDLIB_H_ */
101#ifdef _STRING_H_
102#include <xlocale/_string.h>
103#endif /*STRING_CTYPE_H_ */
104#ifdef _TIME_H_
105#include <xlocale/_time.h>
106#endif /* _TIME_H_ */
107#ifdef _WCHAR_H_
108#include <xlocale/_wchar.h>
109#endif /*WCHAR_CTYPE_H_ */
110#ifdef _WCTYPE_H_
111#include <xlocale/_wctype.h>
112#endif /* _WCTYPE_H_ */
224c7076
A
113//Begin-Libc
114#endif /* __DARWIN_XLOCALE_PRIVATE */
115//End-Libc
3d9156a7
A
116
117#endif /* _XLOCALE_H_ */