2 #include <wcsmbs/wchar.h>
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;
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)
26 libc_hidden_proto (__wcsftime_l)
29 extern double __wcstod_internal (const wchar_t *__restrict __nptr,
30 wchar_t **__restrict __endptr, int __group)
32 extern float __wcstof_internal (const wchar_t *__restrict __nptr,
33 wchar_t **__restrict __endptr, int __group)
35 extern long double __wcstold_internal (const wchar_t *__restrict __nptr,
36 wchar_t **__restrict __endptr,
38 extern long int __wcstol_internal (const wchar_t *__restrict __nptr,
39 wchar_t **__restrict __endptr,
40 int __base, int __group) __THROW;
41 extern unsigned long int __wcstoul_internal (const wchar_t *__restrict __npt,
42 wchar_t **__restrict __endptr,
43 int __base, int __group) __THROW;
45 extern long long int __wcstoll_internal (const wchar_t *__restrict __nptr,
46 wchar_t **__restrict __endptr,
47 int __base, int __group) __THROW;
49 extern unsigned long long int __wcstoull_internal (const wchar_t *
55 libc_hidden_proto (__wcstof_internal)
56 libc_hidden_proto (__wcstod_internal)
57 libc_hidden_proto (__wcstold_internal)
58 libc_hidden_proto (__wcstol_internal)
59 libc_hidden_proto (__wcstoll_internal)
60 libc_hidden_proto (__wcstoul_internal)
61 libc_hidden_proto (__wcstoull_internal)
62 libc_hidden_proto (wcstof)
63 libc_hidden_proto (wcstod)
64 libc_hidden_proto (wcstold)
65 libc_hidden_proto (wcstol)
66 libc_hidden_proto (wcstoll)
67 libc_hidden_proto (wcstoul)
68 libc_hidden_proto (wcstoull)
70 libc_hidden_proto (__wcscasecmp_l)
71 libc_hidden_proto (__wcsncasecmp_l)
73 libc_hidden_proto (__wcscoll_l)
74 libc_hidden_proto (__wcsxfrm_l)
76 libc_hidden_proto (fputws_unlocked)
77 libc_hidden_proto (putwc_unlocked)
78 libc_hidden_proto (putwc)
80 libc_hidden_proto (vswscanf)
82 libc_hidden_proto (mbrtowc)
83 libc_hidden_proto (wcrtomb)
84 libc_hidden_proto (wcscmp)
85 libc_hidden_proto (wcsftime)
86 libc_hidden_proto (wcsspn)
87 libc_hidden_proto (wcschr)
88 libc_hidden_proto (wcscoll)
89 libc_hidden_proto (wcspbrk)
91 extern typeof (wmemset) __wmemset;
92 libc_hidden_proto (wmemchr)
93 libc_hidden_proto (wmemset)
94 libc_hidden_proto (__wmemset)
96 /* Now define the internal interfaces. */
97 extern int __wcscasecmp (const wchar_t *__s1, const wchar_t *__s2)
99 extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
102 extern size_t __wcslen (const wchar_t *__s) __attribute_pure__;
103 extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen)
105 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
106 extern wint_t __btowc (int __c);
107 extern int __mbsinit (const __mbstate_t *__ps);
108 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
109 const char *__restrict __s, size_t __n,
110 __mbstate_t *__restrict __p);
111 libc_hidden_proto (__mbrtowc)
112 libc_hidden_proto (__mbrlen)
113 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
114 __mbstate_t *__restrict __ps);
115 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
116 const char **__restrict __src,
117 size_t __len, __mbstate_t *__restrict __ps);
118 extern size_t __wcsrtombs (char *__restrict __dst,
119 const wchar_t **__restrict __src,
120 size_t __len, __mbstate_t *__restrict __ps);
121 extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
122 const char **__restrict __src, size_t __nmc,
123 size_t __len, __mbstate_t *__restrict __ps);
124 extern size_t __wcsnrtombs (char *__restrict __dst,
125 const wchar_t **__restrict __src,
126 size_t __nwc, size_t __len,
127 __mbstate_t *__restrict __ps);
128 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
129 const wchar_t *__restrict __src, size_t __n);
130 extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src);
131 extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src,
133 extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2,
135 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
136 const wchar_t *__restrict __s2,
138 extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2,
140 extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
143 extern int __vfwscanf (__FILE *__restrict __s,
144 const wchar_t *__restrict __format,
145 __gnuc_va_list __arg)
146 /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
147 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
148 const wchar_t *__restrict __format,
149 __gnuc_va_list __arg)
150 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
151 extern int __fwprintf (__FILE *__restrict __s,
152 const wchar_t *__restrict __format, ...)
153 /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
154 extern int __vfwprintf (__FILE *__restrict __s,
155 const wchar_t *__restrict __format,
156 __gnuc_va_list __arg)
157 /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
159 extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
160 const wchar_t *__restrict __format,
161 __gnuc_va_list __arg)
162 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
163 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
164 int __flag, size_t __s_len,
165 const wchar_t *__restrict __format,
166 __gnuc_va_list __arg)
167 /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
168 libc_hidden_proto (__vfwprintf_chk)
169 libc_hidden_proto (__vswprintf_chk)
172 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
173 const wchar_t *__restrict __format, ...);
174 extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...);
175 extern int __isoc99_swscanf (const wchar_t *__restrict __s,
176 const wchar_t *__restrict __format, ...)
178 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
179 const wchar_t *__restrict __format,
180 __gnuc_va_list __arg);
181 extern int __isoc99_vwscanf (const wchar_t *__restrict __format,
182 __gnuc_va_list __arg);
183 extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
184 const wchar_t *__restrict __format,
185 __gnuc_va_list __arg) __THROW;
186 libc_hidden_proto (__isoc99_vswscanf)
187 libc_hidden_proto (__isoc99_vfwscanf)
189 /* Internal functions. */
190 extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
191 mbstate_t *ps, __locale_t l) attribute_hidden;
193 /* Special version. We know that all uses of mbsinit inside the libc
194 have a non-NULL parameter. And certainly we can access the
195 internals of the data structure directly. */
196 # define mbsinit(state) ((state)->__count == 0)
197 # define __mbsinit(state) ((state)->__count == 0)
203 /* Undefine all __need_* constants in case we are included to get those
204 constants but the whole file was already read. */
205 #undef __need_mbstate_t