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