123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704 |
- #ifndef _WCHAR_H
- #ifndef __need_mbstate_t
- # define _WCHAR_H 1
- # include <features.h>
- #endif
- #ifndef __UCLIBC_HAS_WCHAR__
- #error Attempted to include wchar.h when uClibc built without wide char support.
- #endif
- #ifdef _WCHAR_H
- # define __need___FILE
- # ifdef __USE_UNIX98
- # define __need_FILE
- # endif
- # include <stdio.h>
- # define __need___va_list
- # include <stdarg.h>
- # define __need_size_t
- # define __need_wchar_t
- # define __need_NULL
- #endif
- #define __need_wint_t
- #include <stddef.h>
- #include <bits/wchar.h>
- #ifndef _WINT_T
- # define _WINT_T
- typedef unsigned int wint_t;
- #endif
- #ifndef __mbstate_t_defined
- # define __mbstate_t_defined 1
- #if 1
- typedef struct
- {
- wchar_t mask;
- wchar_t wc;
- } __mbstate_t;
- #else
- typedef struct
- {
- int __count;
- union
- {
- wint_t __wch;
- char __wchb[4];
- } __value;
- } __mbstate_t;
- #endif
- #endif
- #undef __need_mbstate_t
- #ifdef _WCHAR_H
- typedef __mbstate_t mbstate_t;
- #ifndef WCHAR_MIN
- # define WCHAR_MIN __WCHAR_MIN
- # define WCHAR_MAX __WCHAR_MAX
- #endif
- #ifndef WEOF
- # define WEOF (0xffffffffu)
- #endif
- #if defined __USE_XOPEN && !defined __USE_UNIX98
- # include <wctype.h>
- #endif
- struct tm;
- __BEGIN_DECLS
- extern wchar_t *wcscpy (wchar_t *__restrict __dest,
- __const wchar_t *__restrict __src) __THROW;
- extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
- __const wchar_t *__restrict __src, size_t __n)
- __THROW;
- extern wchar_t *wcscat (wchar_t *__restrict __dest,
- __const wchar_t *__restrict __src) __THROW;
- extern wchar_t *wcsncat (wchar_t *__restrict __dest,
- __const wchar_t *__restrict __src, size_t __n)
- __THROW;
- extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
- __THROW __attribute_pure__;
- extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
- __THROW __attribute_pure__;
- #ifdef __USE_GNU
- extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
- extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
- size_t __n) __THROW;
- #if 0
- # include <xlocale.h>
- extern int __wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
- __locale_t __loc) __THROW;
- extern int __wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
- #endif
- #endif
- extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
- extern size_t wcsxfrm (wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n) __THROW;
- #ifdef __USE_GNU
- #if 0
- extern int __wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
- __locale_t __loc) __THROW;
- extern size_t __wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
- #endif
- extern wchar_t *wcsdup (__const wchar_t *__s) __THROW __attribute_malloc__;
- #endif
- extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
- __THROW __attribute_pure__;
- extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
- __THROW __attribute_pure__;
- #ifdef __USE_GNU
- extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
- __THROW __attribute_pure__;
- #endif
- extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
- __THROW __attribute_pure__;
- extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
- __THROW __attribute_pure__;
- extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
- __THROW __attribute_pure__;
- extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
- __THROW __attribute_pure__;
- #ifdef __USE_XOPEN
- extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
- __THROW __attribute_pure__;
- #endif
- extern wchar_t *wcstok (wchar_t *__restrict __s,
- __const wchar_t *__restrict __delim,
- wchar_t **__restrict __ptr) __THROW;
- extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__;
- #ifdef __USE_GNU
- extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
- __THROW __attribute_pure__;
- #endif
- extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
- __THROW __attribute_pure__;
- extern int wmemcmp (__const wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n)
- __THROW __attribute_pure__;
- extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n) __THROW;
- extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
- __THROW;
- extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
- #ifdef __USE_GNU
- extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
- __const wchar_t *__restrict __s2, size_t __n)
- __THROW;
- #endif
- extern wint_t btowc (int __c) __THROW;
- extern int wctob (wint_t __c) __THROW;
- extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__;
- extern size_t mbrtowc (wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n,
- mbstate_t *__p) __THROW;
- extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
- mbstate_t *__restrict __ps) __THROW;
- extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) __THROW;
- extern size_t mbrlen (__const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) __THROW;
- #if 0
- extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
- mbstate_t *__restrict __ps) __THROW
- { return (__ps != NULL
- ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
- #endif
- extern size_t mbsrtowcs (wchar_t *__restrict __dst,
- __const char **__restrict __src, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- extern size_t wcsrtombs (char *__restrict __dst,
- __const wchar_t **__restrict __src, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- #ifdef __USE_GNU
- extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
- __const char **__restrict __src, size_t __nmc,
- size_t __len, mbstate_t *__restrict __ps) __THROW;
- extern size_t wcsnrtombs (char *__restrict __dst,
- __const wchar_t **__restrict __src,
- size_t __nwc, size_t __len,
- mbstate_t *__restrict __ps) __THROW;
- #endif
- #ifdef __USE_XOPEN
- extern int wcwidth (wchar_t __c) __THROW;
- extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW;
- #endif
- extern double wcstod (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
- #ifdef __USE_ISOC99
- extern float wcstof (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
- extern long double wcstold (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW;
- #endif
- extern long int wcstol (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base) __THROW;
- extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
- #if defined __GNUC__ && defined __USE_GNU
- __extension__
- extern long long int wcstoq (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
- __extension__
- extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW;
- #endif
- #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU)
- __extension__
- extern long long int wcstoll (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base)
- __THROW;
- __extension__
- extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW;
- #endif
- #if 0
- # include <xlocale.h>
- extern long int __wcstol_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
- extern unsigned long int __wcstoul_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
- __extension__
- extern long long int __wcstoll_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
- __extension__
- extern unsigned long long int __wcstoull_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW;
- extern double __wcstod_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
- __THROW;
- extern float __wcstof_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
- __THROW;
- extern long double __wcstold_l (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- __locale_t __loc) __THROW;
- #endif
- #if 0
- extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __group)
- __THROW;
- extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, int __group)
- __THROW;
- extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __group) __THROW;
- #ifndef __wcstol_internal_defined
- extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, int __group) __THROW;
- # define __wcstol_internal_defined 1
- #endif
- #ifndef __wcstoul_internal_defined
- extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
- wchar_t **__restrict __endptr,
- int __base, int __group) __THROW;
- # define __wcstoul_internal_defined 1
- #endif
- #ifndef __wcstoll_internal_defined
- __extension__
- extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, int __group) __THROW;
- # define __wcstoll_internal_defined 1
- #endif
- #ifndef __wcstoull_internal_defined
- __extension__
- extern unsigned long long int __wcstoull_internal (__const wchar_t *
- __restrict __nptr,
- wchar_t **
- __restrict __endptr,
- int __base,
- int __group) __THROW;
- # define __wcstoull_internal_defined 1
- #endif
- #if defined __OPTIMIZE__ && __GNUC__ >= 2
- extern __inline double wcstod (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW
- { return __wcstod_internal (__nptr, __endptr, 0); }
- extern __inline long int wcstol (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW
- { return __wcstol_internal (__nptr, __endptr, __base, 0); }
- extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW
- { return __wcstoul_internal (__nptr, __endptr, __base, 0); }
- # ifdef __USE_GNU
- extern __inline float wcstof (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW
- { return __wcstof_internal (__nptr, __endptr, 0); }
- extern __inline long double wcstold (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr) __THROW
- { return __wcstold_internal (__nptr, __endptr, 0); }
- __extension__
- extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW
- { return __wcstoll_internal (__nptr, __endptr, __base, 0); }
- __extension__
- extern __inline unsigned long long int wcstouq (__const wchar_t *
- __restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base) __THROW
- { return __wcstoull_internal (__nptr, __endptr, __base, 0); }
- # endif
- #endif
- #endif
- #ifdef __USE_GNU
- extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
- extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
- __THROW;
- #endif
- #if defined __USE_ISOC99 || defined __USE_UNIX98
- extern int fwide (__FILE *__fp, int __mode) __THROW;
- extern int fwprintf (__FILE *__restrict __stream,
- __const wchar_t *__restrict __format, ...)
- __THROW ;
- extern int wprintf (__const wchar_t *__restrict __format, ...)
- __THROW ;
- extern int swprintf (wchar_t *__restrict __s, size_t __n,
- __const wchar_t *__restrict __format, ...)
- __THROW ;
- extern int vfwprintf (__FILE *__restrict __s,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- extern int vwprintf (__const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- extern int vswprintf (wchar_t *__restrict __s, size_t __n,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- extern int fwscanf (__FILE *__restrict __stream,
- __const wchar_t *__restrict __format, ...)
- __THROW ;
- extern int wscanf (__const wchar_t *__restrict __format, ...)
- __THROW ;
- extern int swscanf (__const wchar_t *__restrict __s,
- __const wchar_t *__restrict __format, ...)
- __THROW ;
- #endif
- #ifdef __USE_ISOC99
- extern int vfwscanf (__FILE *__restrict __s,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- extern int vwscanf (__const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- extern int vswscanf (__const wchar_t *__restrict __s,
- __const wchar_t *__restrict __format,
- __gnuc_va_list __arg)
- __THROW ;
- #endif
- extern wint_t fgetwc (__FILE *__stream) __THROW;
- extern wint_t getwc (__FILE *__stream) __THROW;
- extern wint_t getwchar (void) __THROW;
- extern wint_t fputwc (wchar_t __wc, __FILE *__stream) __THROW;
- extern wint_t putwc (wchar_t __wc, __FILE *__stream) __THROW;
- extern wint_t putwchar (wchar_t __wc) __THROW;
- extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
- __FILE *__restrict __stream) __THROW;
- extern int fputws (__const wchar_t *__restrict __ws,
- __FILE *__restrict __stream) __THROW;
- extern wint_t ungetwc (wint_t __wc, __FILE *__stream) __THROW;
- #ifdef __USE_GNU
- extern wint_t getwc_unlocked (__FILE *__stream) __THROW;
- extern wint_t getwchar_unlocked (void) __THROW;
- extern wint_t fgetwc_unlocked (__FILE *__stream) __THROW;
- extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream) __THROW;
- extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream) __THROW;
- extern wint_t putwchar_unlocked (wchar_t __wc) __THROW;
- extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
- __FILE *__restrict __stream) __THROW;
- extern int fputws_unlocked (__const wchar_t *__restrict __ws,
- __FILE *__restrict __stream) __THROW;
- #endif
- extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
- __const wchar_t *__restrict __format,
- __const struct tm *__restrict __tp) __THROW;
- #if defined __USE_UNIX98 && !defined __USE_GNU
- # define __need_iswxxx
- # include <wctype.h>
- #endif
- __END_DECLS
- #endif
- #endif
|