[BZ #2766]
[glibc.git] / include / wchar.h
blob89e9a4f81ef19d8cfba1115b108254cdb4ce6856
1 #ifndef _WCHAR_H
2 #include <wcsmbs/wchar.h>
4 # ifdef _WCHAR_H
6 extern __typeof (wcscasecmp_l) __wcscasecmp_l;
7 extern __typeof (wcsncasecmp_l) __wcsncasecmp_l;
8 extern __typeof (wcscoll_l) __wcscoll_l;
9 extern __typeof (wcsxfrm_l) __wcsxfrm_l;
10 extern __typeof (wcstol_l) __wcstol_l;
11 extern __typeof (wcstoul_l) __wcstoul_l;
12 extern __typeof (wcstoll_l) __wcstoll_l;
13 extern __typeof (wcstoull_l) __wcstoull_l;
14 extern __typeof (wcstod_l) __wcstod_l;
15 extern __typeof (wcstof_l) __wcstof_l;
16 extern __typeof (wcstold_l) __wcstold_l;
17 extern __typeof (wcsftime_l) __wcsftime_l;
18 libc_hidden_proto (__wcsftime_l)
21 libc_hidden_proto (__wcstof_internal)
22 libc_hidden_proto (__wcstod_internal)
23 libc_hidden_proto (__wcstold_internal)
24 libc_hidden_proto (__wcstol_internal)
25 libc_hidden_proto (__wcstoll_internal)
26 libc_hidden_proto (__wcstoul_internal)
27 libc_hidden_proto (__wcstoull_internal)
29 libc_hidden_proto (__wcscasecmp_l)
30 libc_hidden_proto (__wcsncasecmp_l)
32 libc_hidden_proto (__wcscoll_l)
33 libc_hidden_proto (__wcsxfrm_l)
35 libc_hidden_proto (fputws_unlocked)
36 libc_hidden_proto (putwc_unlocked)
37 libc_hidden_proto (putwc)
39 libc_hidden_proto (vswscanf)
41 libc_hidden_proto (mbrtowc)
42 libc_hidden_proto (wcrtomb)
43 libc_hidden_proto (wcscmp)
44 libc_hidden_proto (wcsftime)
45 libc_hidden_proto (wcsspn)
46 libc_hidden_proto (wcschr)
47 libc_hidden_proto (wcscoll)
48 libc_hidden_proto (wcspbrk)
50 libc_hidden_proto (wmemchr)
51 libc_hidden_proto (wmemset)
53 /* Now define the internal interfaces. */
54 extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
55 __attribute_pure__;
56 extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
57 size_t __n)
58 __attribute_pure__;
59 extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
60 extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
61 __attribute_pure__;
62 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
63 extern wint_t __btowc (int __c);
64 extern int __mbsinit (__const __mbstate_t *__ps);
65 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
66 __const char *__restrict __s, size_t __n,
67 __mbstate_t *__restrict __p);
68 libc_hidden_proto (__mbrtowc)
69 libc_hidden_proto (__mbrlen)
70 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
71 __mbstate_t *__restrict __ps);
72 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
73 __const char **__restrict __src,
74 size_t __len, __mbstate_t *__restrict __ps);
75 extern size_t __wcsrtombs (char *__restrict __dst,
76 __const wchar_t **__restrict __src,
77 size_t __len, __mbstate_t *__restrict __ps);
78 extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
79 __const char **__restrict __src, size_t __nmc,
80 size_t __len, __mbstate_t *__restrict __ps);
81 extern size_t __wcsnrtombs (char *__restrict __dst,
82 __const wchar_t **__restrict __src,
83 size_t __nwc, size_t __len,
84 __mbstate_t *__restrict __ps);
85 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
86 __const wchar_t *__restrict __src, size_t __n);
87 extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src);
88 extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
89 size_t __n);
90 extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2,
91 size_t __n);
92 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
93 __const wchar_t *__restrict __s2,
94 size_t __n);
95 extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
96 size_t __n);
97 extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc)
98 __attribute_pure__;
100 extern int __vfwscanf (__FILE *__restrict __s,
101 __const wchar_t *__restrict __format,
102 __gnuc_va_list __arg)
103 /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
104 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
105 __const wchar_t *__restrict __format,
106 __gnuc_va_list __arg)
107 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
108 extern int __fwprintf (__FILE *__restrict __s,
109 __const wchar_t *__restrict __format, ...)
110 /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
111 extern int __vfwprintf (__FILE *__restrict __s,
112 __const wchar_t *__restrict __format,
113 __gnuc_va_list __arg)
114 /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
115 extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
116 const wchar_t *__restrict __format,
117 __gnuc_va_list __arg)
118 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
119 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
120 int __flag, size_t __s_len,
121 __const wchar_t *__restrict __format,
122 __gnuc_va_list __arg)
123 /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
124 libc_hidden_proto (__vfwprintf_chk)
125 libc_hidden_proto (__vswprintf_chk)
127 /* Internal functions. */
128 extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
129 mbstate_t *ps, __locale_t l) attribute_hidden;
131 /* Special version. We know that all uses of mbsinit inside the libc
132 have a non-NULL parameter. And certainly we can access the
133 internals of the data structure directly. */
134 # define mbsinit(state) ((state)->__count == 0)
135 # define __mbsinit(state) ((state)->__count == 0)
137 # endif
138 #endif