]>
Commit | Line | Data |
---|---|---|
6796bc80 | 1 | #ifndef _WCHAR_H |
199fc19d | 2 | # include <wcsmbs/wchar.h> |
31341567 | 3 | # ifndef _ISOMAC |
509d1b68 | 4 | |
45f39d45 PM |
5 | #include <bits/floatn.h> |
6 | ||
da4cfe38 RM |
7 | extern __typeof (wcscasecmp_l) __wcscasecmp_l; |
8 | extern __typeof (wcsncasecmp_l) __wcsncasecmp_l; | |
9 | extern __typeof (wcscoll_l) __wcscoll_l; | |
10 | extern __typeof (wcsxfrm_l) __wcsxfrm_l; | |
11 | extern __typeof (wcstol_l) __wcstol_l; | |
12 | extern __typeof (wcstoul_l) __wcstoul_l; | |
13 | extern __typeof (wcstoll_l) __wcstoll_l; | |
14 | extern __typeof (wcstoull_l) __wcstoull_l; | |
15 | extern __typeof (wcstod_l) __wcstod_l; | |
16 | extern __typeof (wcstof_l) __wcstof_l; | |
17 | extern __typeof (wcstold_l) __wcstold_l; | |
18 | extern __typeof (wcsftime_l) __wcsftime_l; | |
773e305e RM |
19 | libc_hidden_proto (__wcstol_l) |
20 | libc_hidden_proto (__wcstoul_l) | |
21 | libc_hidden_proto (__wcstoll_l) | |
22 | libc_hidden_proto (__wcstoull_l) | |
23 | libc_hidden_proto (__wcstod_l) | |
24 | libc_hidden_proto (__wcstof_l) | |
25 | libc_hidden_proto (__wcstold_l) | |
ee2a5ae8 | 26 | libc_hidden_proto (__wcsftime_l) |
da4cfe38 RM |
27 | |
28 | ||
a784e502 | 29 | extern double __wcstod_internal (const wchar_t *__restrict __nptr, |
9b2e9577 UD |
30 | wchar_t **__restrict __endptr, int __group) |
31 | __THROW; | |
a784e502 | 32 | extern float __wcstof_internal (const wchar_t *__restrict __nptr, |
9b2e9577 UD |
33 | wchar_t **__restrict __endptr, int __group) |
34 | __THROW; | |
a784e502 | 35 | extern long double __wcstold_internal (const wchar_t *__restrict __nptr, |
9b2e9577 UD |
36 | wchar_t **__restrict __endptr, |
37 | int __group) __THROW; | |
a784e502 | 38 | extern long int __wcstol_internal (const wchar_t *__restrict __nptr, |
9b2e9577 UD |
39 | wchar_t **__restrict __endptr, |
40 | int __base, int __group) __THROW; | |
a784e502 | 41 | extern unsigned long int __wcstoul_internal (const wchar_t *__restrict __npt, |
9b2e9577 UD |
42 | wchar_t **__restrict __endptr, |
43 | int __base, int __group) __THROW; | |
44 | __extension__ | |
a784e502 | 45 | extern long long int __wcstoll_internal (const wchar_t *__restrict __nptr, |
9b2e9577 UD |
46 | wchar_t **__restrict __endptr, |
47 | int __base, int __group) __THROW; | |
48 | __extension__ | |
a784e502 | 49 | extern unsigned long long int __wcstoull_internal (const wchar_t * |
9b2e9577 UD |
50 | __restrict __nptr, |
51 | wchar_t ** | |
52 | __restrict __endptr, | |
53 | int __base, | |
54 | int __group) __THROW; | |
e02cabec JM |
55 | extern unsigned long long int ____wcstoull_l_internal (const wchar_t *, |
56 | wchar_t **, int, int, | |
af85385f | 57 | locale_t); |
509d1b68 RM |
58 | libc_hidden_proto (__wcstof_internal) |
59 | libc_hidden_proto (__wcstod_internal) | |
60 | libc_hidden_proto (__wcstold_internal) | |
61 | libc_hidden_proto (__wcstol_internal) | |
62 | libc_hidden_proto (__wcstoll_internal) | |
63 | libc_hidden_proto (__wcstoul_internal) | |
64 | libc_hidden_proto (__wcstoull_internal) | |
773e305e RM |
65 | libc_hidden_proto (wcstof) |
66 | libc_hidden_proto (wcstod) | |
67 | libc_hidden_proto (wcstold) | |
68 | libc_hidden_proto (wcstol) | |
69 | libc_hidden_proto (wcstoll) | |
70 | libc_hidden_proto (wcstoul) | |
71 | libc_hidden_proto (wcstoull) | |
509d1b68 | 72 | |
c26dd7c6 L |
73 | extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int, |
74 | locale_t) attribute_hidden; | |
75 | extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int, | |
76 | locale_t) attribute_hidden; | |
77 | extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **, | |
78 | int, locale_t) attribute_hidden; | |
79 | extern long int ____wcstol_l_internal (const wchar_t *, wchar_t **, int, | |
80 | int, locale_t) attribute_hidden; | |
81 | extern unsigned long int ____wcstoul_l_internal (const wchar_t *, | |
82 | wchar_t **, | |
83 | int, int, locale_t) | |
84 | attribute_hidden; | |
85 | extern long long int ____wcstoll_l_internal (const wchar_t *, wchar_t **, | |
86 | int, int, locale_t) | |
87 | attribute_hidden; | |
88 | extern unsigned long long int ____wcstoull_l_internal (const wchar_t *, | |
89 | wchar_t **, int, int, | |
90 | locale_t) | |
91 | attribute_hidden; | |
92 | ||
45f39d45 PM |
93 | #if __HAVE_DISTINCT_FLOAT128 |
94 | extern __typeof (wcstof128_l) __wcstof128_l; | |
95 | libc_hidden_proto (__wcstof128_l) | |
96 | extern _Float128 __wcstof128_internal (const wchar_t *__restrict __nptr, | |
97 | wchar_t **__restrict __endptr, | |
98 | int __group) __THROW; | |
99 | ||
c26dd7c6 L |
100 | extern _Float128 ____wcstof128_l_internal (const wchar_t *, wchar_t **, int, |
101 | locale_t) attribute_hidden; | |
102 | ||
45f39d45 PM |
103 | libc_hidden_proto (__wcstof128_internal) |
104 | libc_hidden_proto (wcstof128) | |
105 | #endif | |
106 | ||
509d1b68 RM |
107 | libc_hidden_proto (__wcscasecmp_l) |
108 | libc_hidden_proto (__wcsncasecmp_l) | |
109 | ||
ccadf7b5 UD |
110 | libc_hidden_proto (__wcscoll_l) |
111 | libc_hidden_proto (__wcsxfrm_l) | |
112 | ||
3ba06713 UD |
113 | libc_hidden_proto (fputws_unlocked) |
114 | libc_hidden_proto (putwc_unlocked) | |
b9b91868 | 115 | libc_hidden_proto (putwc) |
3ba06713 UD |
116 | |
117 | libc_hidden_proto (vswscanf) | |
118 | ||
9b0b40d3 | 119 | libc_hidden_proto (mbrtowc) |
8784cc18 | 120 | libc_hidden_proto (wcrtomb) |
2f44ee08 JM |
121 | extern int __wcscmp (const wchar_t *__s1, const wchar_t *__s2) |
122 | __THROW __attribute_pure__; | |
123 | libc_hidden_proto (__wcscmp) | |
8784cc18 RM |
124 | libc_hidden_proto (wcsftime) |
125 | libc_hidden_proto (wcsspn) | |
126 | libc_hidden_proto (wcschr) | |
2cfbdb9a JM |
127 | /* The C++ overloading of wcschr means we have to repeat the type to |
128 | declare __wcschr instead of using typeof, to avoid errors in C++ | |
2f44ee08 JM |
129 | tests; in addition, __THROW cannot be used with a function type |
130 | from typeof in C++. The same applies to __wmemchr and, as regards | |
131 | __THROW, to __wcscmp and __wcscoll. */ | |
2cfbdb9a JM |
132 | extern wchar_t *__wcschr (const wchar_t *__wcs, wchar_t __wc) |
133 | __THROW __attribute_pure__; | |
134 | libc_hidden_proto (__wcschr) | |
2f44ee08 JM |
135 | extern int __wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; |
136 | libc_hidden_proto (__wcscoll) | |
8784cc18 | 137 | libc_hidden_proto (wcspbrk) |
509d1b68 | 138 | |
6b4a158e | 139 | extern __typeof (wmemset) __wmemset; |
aca6ea65 JM |
140 | extern wchar_t *__wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) |
141 | __THROW __attribute_pure__; | |
9b0b40d3 | 142 | libc_hidden_proto (wmemchr) |
aca6ea65 | 143 | libc_hidden_proto (__wmemchr) |
9b0b40d3 | 144 | libc_hidden_proto (wmemset) |
01cad84e | 145 | libc_hidden_proto (__wmemset) |
65f7767a AS |
146 | extern int __wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) |
147 | __THROW __attribute_pure__; | |
9b0b40d3 | 148 | |
bdbf022d | 149 | /* Now define the internal interfaces. */ |
a784e502 | 150 | extern int __wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) |
fb4dfa0c | 151 | __attribute_pure__; |
a784e502 | 152 | extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, |
fb4dfa0c AJ |
153 | size_t __n) |
154 | __attribute_pure__; | |
a784e502 UD |
155 | extern size_t __wcslen (const wchar_t *__s) __attribute_pure__; |
156 | extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen) | |
80eb52e3 SL |
157 | __attribute_pure__; |
158 | extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src); | |
44af8a32 | 159 | extern wint_t __btowc (int __c) attribute_hidden; |
a784e502 | 160 | extern int __mbsinit (const __mbstate_t *__ps); |
fe559c5e | 161 | extern size_t __mbrtowc (wchar_t *__restrict __pwc, |
a784e502 | 162 | const char *__restrict __s, size_t __n, |
c19559b0 | 163 | __mbstate_t *__restrict __p); |
37ba7d66 UD |
164 | libc_hidden_proto (__mbrtowc) |
165 | libc_hidden_proto (__mbrlen) | |
fe559c5e | 166 | extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc, |
44af8a32 | 167 | __mbstate_t *__restrict __ps) attribute_hidden; |
fe559c5e | 168 | extern size_t __mbsrtowcs (wchar_t *__restrict __dst, |
a784e502 | 169 | const char **__restrict __src, |
44af8a32 L |
170 | size_t __len, __mbstate_t *__restrict __ps) |
171 | attribute_hidden; | |
fe559c5e | 172 | extern size_t __wcsrtombs (char *__restrict __dst, |
a784e502 | 173 | const wchar_t **__restrict __src, |
44af8a32 L |
174 | size_t __len, __mbstate_t *__restrict __ps) |
175 | attribute_hidden; | |
fe559c5e | 176 | extern size_t __mbsnrtowcs (wchar_t *__restrict __dst, |
a784e502 | 177 | const char **__restrict __src, size_t __nmc, |
44af8a32 L |
178 | size_t __len, __mbstate_t *__restrict __ps) |
179 | attribute_hidden; | |
fe559c5e | 180 | extern size_t __wcsnrtombs (char *__restrict __dst, |
a784e502 | 181 | const wchar_t **__restrict __src, |
fe559c5e | 182 | size_t __nwc, size_t __len, |
44af8a32 L |
183 | __mbstate_t *__restrict __ps) |
184 | attribute_hidden; | |
81a14439 AZ |
185 | extern wchar_t *__wcscpy (wchar_t *__restrict __dest, |
186 | const wchar_t *__restrict __src) | |
187 | attribute_hidden __nonnull ((1, 2)); | |
188 | libc_hidden_proto (__wcscpy) | |
8215c9ec | 189 | extern wchar_t *__wcsncpy (wchar_t *__restrict __dest, |
80eb52e3 | 190 | const wchar_t *__restrict __src, size_t __n); |
a784e502 UD |
191 | extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src); |
192 | extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src, | |
80eb52e3 | 193 | size_t __n); |
a784e502 | 194 | extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2, |
44af8a32 | 195 | size_t __n) attribute_hidden; |
fe559c5e | 196 | extern wchar_t *__wmempcpy (wchar_t *__restrict __s1, |
a784e502 | 197 | const wchar_t *__restrict __s2, |
44af8a32 | 198 | size_t __n) attribute_hidden; |
a784e502 | 199 | extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2, |
44af8a32 | 200 | size_t __n) attribute_hidden; |
a784e502 | 201 | extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc) |
80eb52e3 | 202 | __attribute_pure__; |
d64b6ad0 | 203 | |
ef9c4cb6 L |
204 | extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, |
205 | size_t __ns) __THROW; | |
206 | ||
d1646309 | 207 | extern int __vfwscanf (__FILE *__restrict __s, |
a784e502 | 208 | const wchar_t *__restrict __format, |
c19559b0 | 209 | __gnuc_va_list __arg) |
44af8a32 | 210 | attribute_hidden |
c19559b0 | 211 | /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */; |
51028f34 | 212 | extern int __fwprintf (__FILE *__restrict __s, |
a784e502 | 213 | const wchar_t *__restrict __format, ...) |
44af8a32 | 214 | attribute_hidden |
c6251f03 | 215 | /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; |
c6251f03 RM |
216 | extern int __vfwprintf_chk (FILE *__restrict __s, int __flag, |
217 | const wchar_t *__restrict __format, | |
218 | __gnuc_va_list __arg) | |
51028f34 | 219 | /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; |
8215c9ec UD |
220 | extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, |
221 | int __flag, size_t __s_len, | |
a784e502 | 222 | const wchar_t *__restrict __format, |
8215c9ec UD |
223 | __gnuc_va_list __arg) |
224 | /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */; | |
8215c9ec | 225 | |
874aa523 | 226 | extern int __isoc99_fwscanf (__FILE *__restrict __stream, |
a784e502 UD |
227 | const wchar_t *__restrict __format, ...); |
228 | extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); | |
229 | extern int __isoc99_swscanf (const wchar_t *__restrict __s, | |
230 | const wchar_t *__restrict __format, ...) | |
874aa523 UD |
231 | __THROW; |
232 | extern int __isoc99_vfwscanf (__FILE *__restrict __s, | |
a784e502 | 233 | const wchar_t *__restrict __format, |
874aa523 | 234 | __gnuc_va_list __arg); |
a784e502 | 235 | extern int __isoc99_vwscanf (const wchar_t *__restrict __format, |
874aa523 | 236 | __gnuc_va_list __arg); |
a784e502 UD |
237 | extern int __isoc99_vswscanf (const wchar_t *__restrict __s, |
238 | const wchar_t *__restrict __format, | |
874aa523 | 239 | __gnuc_va_list __arg) __THROW; |
45dcd79f JM |
240 | extern int __vswscanf (const wchar_t *__restrict __s, |
241 | const wchar_t *__restrict __format, | |
242 | __gnuc_va_list __arg) __THROW; | |
874aa523 | 243 | libc_hidden_proto (__isoc99_vswscanf) |
45dcd79f | 244 | libc_hidden_proto (__vswscanf) |
874aa523 UD |
245 | libc_hidden_proto (__isoc99_vfwscanf) |
246 | ||
01beb5b9 UD |
247 | /* Internal functions. */ |
248 | extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, | |
af85385f | 249 | mbstate_t *ps, locale_t l) attribute_hidden; |
2def8764 UD |
250 | |
251 | /* Special version. We know that all uses of mbsinit inside the libc | |
252 | have a non-NULL parameter. And certainly we can access the | |
253 | internals of the data structure directly. */ | |
254 | # define mbsinit(state) ((state)->__count == 0) | |
255 | # define __mbsinit(state) ((state)->__count == 0) | |
256 | ||
d64b6ad0 | 257 | # endif |
6796bc80 | 258 | #endif |