]>
Commit | Line | Data |
---|---|---|
6796bc80 | 1 | #ifndef _WCHAR_H |
30de3b18 | 2 | #include <wcsmbs/wchar.h> |
bdbf022d | 3 | |
31341567 | 4 | # ifndef _ISOMAC |
d64b6ad0 | 5 | # ifdef _WCHAR_H |
509d1b68 | 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, | |
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 RM |
72 | |
73 | libc_hidden_proto (__wcscasecmp_l) | |
74 | libc_hidden_proto (__wcsncasecmp_l) | |
75 | ||
ccadf7b5 UD |
76 | libc_hidden_proto (__wcscoll_l) |
77 | libc_hidden_proto (__wcsxfrm_l) | |
78 | ||
3ba06713 UD |
79 | libc_hidden_proto (fputws_unlocked) |
80 | libc_hidden_proto (putwc_unlocked) | |
b9b91868 | 81 | libc_hidden_proto (putwc) |
3ba06713 UD |
82 | |
83 | libc_hidden_proto (vswscanf) | |
84 | ||
9b0b40d3 | 85 | libc_hidden_proto (mbrtowc) |
8784cc18 | 86 | libc_hidden_proto (wcrtomb) |
2f44ee08 JM |
87 | extern int __wcscmp (const wchar_t *__s1, const wchar_t *__s2) |
88 | __THROW __attribute_pure__; | |
89 | libc_hidden_proto (__wcscmp) | |
8784cc18 RM |
90 | libc_hidden_proto (wcsftime) |
91 | libc_hidden_proto (wcsspn) | |
92 | libc_hidden_proto (wcschr) | |
2cfbdb9a JM |
93 | /* The C++ overloading of wcschr means we have to repeat the type to |
94 | declare __wcschr instead of using typeof, to avoid errors in C++ | |
2f44ee08 JM |
95 | tests; in addition, __THROW cannot be used with a function type |
96 | from typeof in C++. The same applies to __wmemchr and, as regards | |
97 | __THROW, to __wcscmp and __wcscoll. */ | |
2cfbdb9a JM |
98 | extern wchar_t *__wcschr (const wchar_t *__wcs, wchar_t __wc) |
99 | __THROW __attribute_pure__; | |
100 | libc_hidden_proto (__wcschr) | |
2f44ee08 JM |
101 | extern int __wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; |
102 | libc_hidden_proto (__wcscoll) | |
8784cc18 | 103 | libc_hidden_proto (wcspbrk) |
509d1b68 | 104 | |
6b4a158e | 105 | extern __typeof (wmemset) __wmemset; |
aca6ea65 JM |
106 | extern wchar_t *__wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) |
107 | __THROW __attribute_pure__; | |
9b0b40d3 | 108 | libc_hidden_proto (wmemchr) |
aca6ea65 | 109 | libc_hidden_proto (__wmemchr) |
9b0b40d3 | 110 | libc_hidden_proto (wmemset) |
01cad84e | 111 | libc_hidden_proto (__wmemset) |
9b0b40d3 | 112 | |
bdbf022d | 113 | /* Now define the internal interfaces. */ |
a784e502 | 114 | extern int __wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) |
fb4dfa0c | 115 | __attribute_pure__; |
a784e502 | 116 | extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, |
fb4dfa0c AJ |
117 | size_t __n) |
118 | __attribute_pure__; | |
a784e502 UD |
119 | extern size_t __wcslen (const wchar_t *__s) __attribute_pure__; |
120 | extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen) | |
fb4dfa0c | 121 | __attribute_pure__; |
821a6bb4 | 122 | extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src); |
c19559b0 | 123 | extern wint_t __btowc (int __c); |
a784e502 | 124 | extern int __mbsinit (const __mbstate_t *__ps); |
fe559c5e | 125 | extern size_t __mbrtowc (wchar_t *__restrict __pwc, |
a784e502 | 126 | const char *__restrict __s, size_t __n, |
c19559b0 | 127 | __mbstate_t *__restrict __p); |
37ba7d66 UD |
128 | libc_hidden_proto (__mbrtowc) |
129 | libc_hidden_proto (__mbrlen) | |
fe559c5e | 130 | extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc, |
c19559b0 | 131 | __mbstate_t *__restrict __ps); |
fe559c5e | 132 | extern size_t __mbsrtowcs (wchar_t *__restrict __dst, |
a784e502 | 133 | const char **__restrict __src, |
c19559b0 | 134 | size_t __len, __mbstate_t *__restrict __ps); |
fe559c5e | 135 | extern size_t __wcsrtombs (char *__restrict __dst, |
a784e502 | 136 | const wchar_t **__restrict __src, |
c19559b0 | 137 | size_t __len, __mbstate_t *__restrict __ps); |
fe559c5e | 138 | extern size_t __mbsnrtowcs (wchar_t *__restrict __dst, |
a784e502 | 139 | const char **__restrict __src, size_t __nmc, |
c19559b0 | 140 | size_t __len, __mbstate_t *__restrict __ps); |
fe559c5e | 141 | extern size_t __wcsnrtombs (char *__restrict __dst, |
a784e502 | 142 | const wchar_t **__restrict __src, |
fe559c5e | 143 | size_t __nwc, size_t __len, |
c19559b0 | 144 | __mbstate_t *__restrict __ps); |
8215c9ec | 145 | extern wchar_t *__wcsncpy (wchar_t *__restrict __dest, |
a784e502 UD |
146 | const wchar_t *__restrict __src, size_t __n); |
147 | extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src); | |
148 | extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src, | |
c19559b0 | 149 | size_t __n); |
a784e502 | 150 | extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2, |
c19559b0 | 151 | size_t __n); |
fe559c5e | 152 | extern wchar_t *__wmempcpy (wchar_t *__restrict __s1, |
a784e502 | 153 | const wchar_t *__restrict __s2, |
c19559b0 | 154 | size_t __n); |
a784e502 | 155 | extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2, |
c19559b0 | 156 | size_t __n); |
a784e502 | 157 | extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc) |
fb4dfa0c | 158 | __attribute_pure__; |
d64b6ad0 | 159 | |
d1646309 | 160 | extern int __vfwscanf (__FILE *__restrict __s, |
a784e502 | 161 | const wchar_t *__restrict __format, |
c19559b0 UD |
162 | __gnuc_va_list __arg) |
163 | /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */; | |
d4b0774f | 164 | extern int __vswprintf (wchar_t *__restrict __s, size_t __n, |
a784e502 | 165 | const wchar_t *__restrict __format, |
d4b0774f AJ |
166 | __gnuc_va_list __arg) |
167 | /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; | |
51028f34 | 168 | extern int __fwprintf (__FILE *__restrict __s, |
a784e502 | 169 | const wchar_t *__restrict __format, ...) |
c6251f03 | 170 | /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; |
51028f34 | 171 | extern int __vfwprintf (__FILE *__restrict __s, |
a784e502 | 172 | const wchar_t *__restrict __format, |
51028f34 | 173 | __gnuc_va_list __arg) |
c6251f03 | 174 | /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; |
de1c3ebb | 175 | #ifndef __cplusplus |
c6251f03 RM |
176 | extern int __vfwprintf_chk (FILE *__restrict __s, int __flag, |
177 | const wchar_t *__restrict __format, | |
178 | __gnuc_va_list __arg) | |
51028f34 | 179 | /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; |
8215c9ec UD |
180 | extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, |
181 | int __flag, size_t __s_len, | |
a784e502 | 182 | const wchar_t *__restrict __format, |
8215c9ec UD |
183 | __gnuc_va_list __arg) |
184 | /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */; | |
c6251f03 | 185 | libc_hidden_proto (__vfwprintf_chk) |
8215c9ec | 186 | libc_hidden_proto (__vswprintf_chk) |
de1c3ebb | 187 | #endif |
8215c9ec | 188 | |
874aa523 | 189 | extern int __isoc99_fwscanf (__FILE *__restrict __stream, |
a784e502 UD |
190 | const wchar_t *__restrict __format, ...); |
191 | extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); | |
192 | extern int __isoc99_swscanf (const wchar_t *__restrict __s, | |
193 | const wchar_t *__restrict __format, ...) | |
874aa523 UD |
194 | __THROW; |
195 | extern int __isoc99_vfwscanf (__FILE *__restrict __s, | |
a784e502 | 196 | const wchar_t *__restrict __format, |
874aa523 | 197 | __gnuc_va_list __arg); |
a784e502 | 198 | extern int __isoc99_vwscanf (const wchar_t *__restrict __format, |
874aa523 | 199 | __gnuc_va_list __arg); |
a784e502 UD |
200 | extern int __isoc99_vswscanf (const wchar_t *__restrict __s, |
201 | const wchar_t *__restrict __format, | |
874aa523 | 202 | __gnuc_va_list __arg) __THROW; |
45dcd79f JM |
203 | extern int __vswscanf (const wchar_t *__restrict __s, |
204 | const wchar_t *__restrict __format, | |
205 | __gnuc_va_list __arg) __THROW; | |
874aa523 | 206 | libc_hidden_proto (__isoc99_vswscanf) |
45dcd79f | 207 | libc_hidden_proto (__vswscanf) |
874aa523 UD |
208 | libc_hidden_proto (__isoc99_vfwscanf) |
209 | ||
01beb5b9 UD |
210 | /* Internal functions. */ |
211 | extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, | |
212 | mbstate_t *ps, __locale_t l) attribute_hidden; | |
2def8764 UD |
213 | |
214 | /* Special version. We know that all uses of mbsinit inside the libc | |
215 | have a non-NULL parameter. And certainly we can access the | |
216 | internals of the data structure directly. */ | |
217 | # define mbsinit(state) ((state)->__count == 0) | |
218 | # define __mbsinit(state) ((state)->__count == 0) | |
219 | ||
31341567 | 220 | # endif |
d64b6ad0 | 221 | # endif |
6796bc80 | 222 | #endif |
b9ea2dd0 UD |
223 | |
224 | /* Undefine all __need_* constants in case we are included to get those | |
225 | constants but the whole file was already read. */ | |
226 | #undef __need_mbstate_t | |
227 | #undef __need_wint_t |