]> git.saurik.com Git - apple/libc.git/blame - include/xlocale/_wchar.h
Libc-1158.1.2.tar.gz
[apple/libc.git] / include / xlocale / _wchar.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__WCHAR_H_
25#define _XLOCALE__WCHAR_H_
26
1f2f436a 27/* Initially added in Issue 4 */
3d9156a7
A
28__BEGIN_DECLS
29wint_t btowc_l(int, locale_t);
30wint_t fgetwc_l(FILE *, locale_t);
31wchar_t *fgetws_l(wchar_t * __restrict, int, FILE * __restrict, locale_t);
32wint_t fputwc_l(wchar_t, FILE *, locale_t);
33int fputws_l(const wchar_t * __restrict, FILE * __restrict, locale_t);
ad3c9f2a
A
34int fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...);
35int fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...);
3d9156a7
A
36wint_t getwc_l(FILE *, locale_t);
37wint_t getwchar_l(locale_t);
38size_t mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict,
39 locale_t);
40size_t mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t,
41 mbstate_t * __restrict, locale_t);
42int mbsinit_l(const mbstate_t *, locale_t);
3d9156a7
A
43size_t mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t,
44 mbstate_t * __restrict, locale_t);
45wint_t putwc_l(wchar_t, FILE *, locale_t);
46wint_t putwchar_l(wchar_t, locale_t);
47int swprintf_l(wchar_t * __restrict, size_t n, locale_t,
ad3c9f2a 48 const wchar_t * __restrict, ...);
3d9156a7 49int swscanf_l(const wchar_t * __restrict, locale_t,
ad3c9f2a 50 const wchar_t * __restrict, ...);
3d9156a7
A
51wint_t ungetwc_l(wint_t, FILE *, locale_t);
52int vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict,
ad3c9f2a 53 __darwin_va_list);
3d9156a7 54int vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
ad3c9f2a
A
55 const wchar_t * __restrict, __darwin_va_list);
56int vwprintf_l(locale_t, const wchar_t * __restrict, __darwin_va_list);
3d9156a7
A
57size_t wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict,
58 locale_t);
59int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
224c7076
A
60//Begin-Libc
61#ifndef LIBC_ALIAS_WCSFTIME_L
62//End-Libc
3d9156a7 63size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict,
224c7076
A
64 const struct tm * __restrict, locale_t)
65 __DARWIN_ALIAS(wcsftime_l);
66//Begin-Libc
67#else /* LIBC_ALIAS_WCSFTIME_L */
68size_t wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict,
69 const struct tm * __restrict, locale_t)
70 LIBC_ALIAS(wcsftime_l);
71#endif /* !LIBC_ALIAS_WCSFTIME_L */
72//End-Libc
3d9156a7
A
73size_t wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t,
74 mbstate_t * __restrict, locale_t);
75double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
3d9156a7
A
76long wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
77 locale_t);
3d9156a7
A
78unsigned long
79 wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
80 locale_t);
3d9156a7
A
81int wcswidth_l(const wchar_t *, size_t, locale_t);
82size_t wcsxfrm_l(wchar_t * __restrict, const wchar_t * __restrict, size_t,
83 locale_t);
84int wctob_l(wint_t, locale_t);
85int wcwidth_l(wchar_t, locale_t);
ad3c9f2a
A
86int wprintf_l(locale_t, const wchar_t * __restrict, ...);
87int wscanf_l(locale_t, const wchar_t * __restrict, ...);
1f2f436a
A
88__END_DECLS
89
90
91
92/* Additional functionality provided by:
93 * POSIX.1-2001
94 */
95
96#if __DARWIN_C_LEVEL >= 200112L
97__BEGIN_DECLS
98int vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict,
ad3c9f2a 99 __darwin_va_list);
1f2f436a 100int vswscanf_l(const wchar_t * __restrict, locale_t,
ad3c9f2a
A
101 const wchar_t * __restrict, __darwin_va_list);
102int vwscanf_l(locale_t, const wchar_t * __restrict, __darwin_va_list);
1f2f436a
A
103float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
104long double
ad3c9f2a 105 wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
1f2f436a
A
106#if !__DARWIN_NO_LONG_LONG
107long long
108 wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
109 locale_t);
110unsigned long long
111 wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int,
112 locale_t);
113#endif /* !__DARWIN_NO_LONG_LONG */
114__END_DECLS
115#endif /* __DARWIN_C_LEVEL >= 200112L */
116
117
118
119/* Additional functionality provided by:
120 * POSIX.1-2008
121 */
122
123#if __DARWIN_C_LEVEL >= 200809L
124__BEGIN_DECLS
125size_t mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t,
126 size_t, mbstate_t * __restrict, locale_t);
127int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
128int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t n, locale_t) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
129size_t wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t,
130 size_t, mbstate_t * __restrict, locale_t);
131__END_DECLS
132#endif /* __DARWIN_C_LEVEL >= 200809L */
133
134
135
136/* Darwin extensions */
137
138#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
139__BEGIN_DECLS
140wchar_t *fgetwln_l(FILE * __restrict, size_t *, locale_t) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
141__END_DECLS
142#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */
143
144
224c7076
A
145
146/* Poison the following routines if -fshort-wchar is set */
147#if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU
1f2f436a 148#pragma GCC poison fgetwln_l fgetws_l fputwc_l fputws_l fwprintf_l fwscanf_l mbrtowc_l mbsnrtowcs_l mbsrtowcs_l putwc_l putwchar_l swprintf_l swscanf_l vfwprintf_l vfwscanf_l vswprintf_l vswscanf_l vwprintf_l vwscanf_l wcrtomb_l wcscoll_l wcsftime_l wcsftime_l wcsnrtombs_l wcsrtombs_l wcstod_l wcstof_l wcstol_l wcstold_l wcstoll_l wcstoul_l wcstoull_l wcswidth_l wcsxfrm_l wcwidth_l wprintf_l wscanf_l
224c7076 149#endif
3d9156a7
A
150
151#endif /* _XLOCALE__WCHAR_H_ */