Updated to fedora-glibc-20070804T2027
[glibc.git] / include / wchar.h
blobb3cf373d9ee2a7b786a8b679de4e1209d9ddff0c
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 extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
22 wchar_t **__restrict __endptr, int __group)
23 __THROW;
24 extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
25 wchar_t **__restrict __endptr, int __group)
26 __THROW;
27 extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
28 wchar_t **__restrict __endptr,
29 int __group) __THROW;
30 extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
31 wchar_t **__restrict __endptr,
32 int __base, int __group) __THROW;
33 extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
34 wchar_t **__restrict __endptr,
35 int __base, int __group) __THROW;
36 __extension__
37 extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
38 wchar_t **__restrict __endptr,
39 int __base, int __group) __THROW;
40 __extension__
41 extern unsigned long long int __wcstoull_internal (__const wchar_t *
42 __restrict __nptr,
43 wchar_t **
44 __restrict __endptr,
45 int __base,
46 int __group) __THROW;
47 libc_hidden_proto (__wcstof_internal)
48 libc_hidden_proto (__wcstod_internal)
49 libc_hidden_proto (__wcstold_internal)
50 libc_hidden_proto (__wcstol_internal)
51 libc_hidden_proto (__wcstoll_internal)
52 libc_hidden_proto (__wcstoul_internal)
53 libc_hidden_proto (__wcstoull_internal)
55 libc_hidden_proto (__wcscasecmp_l)
56 libc_hidden_proto (__wcsncasecmp_l)
58 libc_hidden_proto (__wcscoll_l)
59 libc_hidden_proto (__wcsxfrm_l)
61 libc_hidden_proto (fputws_unlocked)
62 libc_hidden_proto (putwc_unlocked)
63 libc_hidden_proto (putwc)
65 libc_hidden_proto (vswscanf)
67 libc_hidden_proto (mbrtowc)
68 libc_hidden_proto (wcrtomb)
69 libc_hidden_proto (wcscmp)
70 libc_hidden_proto (wcsftime)
71 libc_hidden_proto (wcsspn)
72 libc_hidden_proto (wcschr)
73 libc_hidden_proto (wcscoll)
74 libc_hidden_proto (wcspbrk)
76 libc_hidden_proto (wmemchr)
77 libc_hidden_proto (wmemset)
79 /* Now define the internal interfaces. */
80 extern int __wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2)
81 __attribute_pure__;
82 extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
83 size_t __n)
84 __attribute_pure__;
85 extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
86 extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
87 __attribute_pure__;
88 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
89 extern wint_t __btowc (int __c);
90 extern int __mbsinit (__const __mbstate_t *__ps);
91 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
92 __const char *__restrict __s, size_t __n,
93 __mbstate_t *__restrict __p);
94 libc_hidden_proto (__mbrtowc)
95 libc_hidden_proto (__mbrlen)
96 extern size_t __wcrtomb (char *__restrict __s, wchar_t __wc,
97 __mbstate_t *__restrict __ps);
98 extern size_t __mbsrtowcs (wchar_t *__restrict __dst,
99 __const char **__restrict __src,
100 size_t __len, __mbstate_t *__restrict __ps);
101 extern size_t __wcsrtombs (char *__restrict __dst,
102 __const wchar_t **__restrict __src,
103 size_t __len, __mbstate_t *__restrict __ps);
104 extern size_t __mbsnrtowcs (wchar_t *__restrict __dst,
105 __const char **__restrict __src, size_t __nmc,
106 size_t __len, __mbstate_t *__restrict __ps);
107 extern size_t __wcsnrtombs (char *__restrict __dst,
108 __const wchar_t **__restrict __src,
109 size_t __nwc, size_t __len,
110 __mbstate_t *__restrict __ps);
111 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
112 __const wchar_t *__restrict __src, size_t __n);
113 extern wchar_t *__wcpcpy (wchar_t *__dest, __const wchar_t *__src);
114 extern wchar_t *__wcpncpy (wchar_t *__dest, __const wchar_t *__src,
115 size_t __n);
116 extern wchar_t *__wmemcpy (wchar_t *__s1, __const wchar_t *s2,
117 size_t __n);
118 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
119 __const wchar_t *__restrict __s2,
120 size_t __n);
121 extern wchar_t *__wmemmove (wchar_t *__s1, __const wchar_t *__s2,
122 size_t __n);
123 extern wchar_t *__wcschrnul (__const wchar_t *__s, wchar_t __wc)
124 __attribute_pure__;
126 extern int __vfwscanf (__FILE *__restrict __s,
127 __const wchar_t *__restrict __format,
128 __gnuc_va_list __arg)
129 /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */;
130 extern int __vswprintf (wchar_t *__restrict __s, size_t __n,
131 __const wchar_t *__restrict __format,
132 __gnuc_va_list __arg)
133 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
134 extern int __fwprintf (__FILE *__restrict __s,
135 __const wchar_t *__restrict __format, ...)
136 /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
137 extern int __vfwprintf (__FILE *__restrict __s,
138 __const wchar_t *__restrict __format,
139 __gnuc_va_list __arg)
140 /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
141 extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
142 const wchar_t *__restrict __format,
143 __gnuc_va_list __arg)
144 /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
145 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
146 int __flag, size_t __s_len,
147 __const wchar_t *__restrict __format,
148 __gnuc_va_list __arg)
149 /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
150 libc_hidden_proto (__vfwprintf_chk)
151 libc_hidden_proto (__vswprintf_chk)
153 /* Internal functions. */
154 extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
155 mbstate_t *ps, __locale_t l) attribute_hidden;
157 /* Special version. We know that all uses of mbsinit inside the libc
158 have a non-NULL parameter. And certainly we can access the
159 internals of the data structure directly. */
160 # define mbsinit(state) ((state)->__count == 0)
161 # define __mbsinit(state) ((state)->__count == 0)
163 # endif
164 #endif