| OLD | NEW |
| 1 #ifndef _WCHAR_H | 1 #ifndef _WCHAR_H |
| 2 #define _WCHAR_H | 2 #define _WCHAR_H |
| 3 | 3 |
| 4 #ifdef __cplusplus | 4 #ifdef __cplusplus |
| 5 extern "C" { | 5 extern "C" { |
| 6 #endif | 6 #endif |
| 7 | 7 |
| 8 #include <features.h> | 8 #include <features.h> |
| 9 | 9 |
| 10 #define __NEED_FILE | 10 #define __NEED_FILE |
| 11 #define __NEED___isoc_va_list | 11 #define __NEED___isoc_va_list |
| 12 #define __NEED_size_t | 12 #define __NEED_size_t |
| 13 #define __NEED_wchar_t | 13 #define __NEED_wchar_t |
| 14 #define __NEED_wint_t | 14 #define __NEED_wint_t |
| 15 #define __NEED_mbstate_t | 15 #define __NEED_mbstate_t |
| 16 | 16 |
| 17 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ | 17 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ |
| 18 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 18 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 19 #define __NEED_locale_t | 19 #define __NEED_locale_t |
| 20 #define __NEED_va_list | 20 #define __NEED_va_list |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 23 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 24 #define __NEED_wctype_t | 24 #define __NEED_wctype_t |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #include <bits/alltypes.h> | 27 #include <bits/alltypes.h> |
| 28 | 28 |
| 29 #if L'\0'-1 > 0 | 29 #if L'\0' - 1 > 0 |
| 30 #define WCHAR_MAX (0xffffffffu+L'\0') | 30 #define WCHAR_MAX (0xffffffffu + L'\0') |
| 31 #define WCHAR_MIN (0+L'\0') | 31 #define WCHAR_MIN (0 + L'\0') |
| 32 #else | 32 #else |
| 33 #define WCHAR_MAX (0x7fffffff+L'\0') | 33 #define WCHAR_MAX (0x7fffffff + L'\0') |
| 34 #define WCHAR_MIN (-1-0x7fffffff+L'\0') | 34 #define WCHAR_MIN (-1 - 0x7fffffff + L'\0') |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 #ifdef __cplusplus | 37 #ifdef __cplusplus |
| 38 #define NULL 0L | 38 #define NULL 0L |
| 39 #else | 39 #else |
| 40 #define NULL ((void*)0) | 40 #define NULL ((void*)0) |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #undef WEOF | 43 #undef WEOF |
| 44 #define WEOF 0xffffffffU | 44 #define WEOF 0xffffffffU |
| 45 | 45 |
| 46 wchar_t *wcscpy (wchar_t *__restrict, const wchar_t *__restrict); | 46 wchar_t* wcscpy(wchar_t* __restrict, const wchar_t* __restrict); |
| 47 wchar_t *wcsncpy (wchar_t *__restrict, const wchar_t *__restrict, size_t); | 47 wchar_t* wcsncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t); |
| 48 | 48 |
| 49 wchar_t *wcscat (wchar_t *__restrict, const wchar_t *__restrict); | 49 wchar_t* wcscat(wchar_t* __restrict, const wchar_t* __restrict); |
| 50 wchar_t *wcsncat (wchar_t *__restrict, const wchar_t *__restrict, size_t); | 50 wchar_t* wcsncat(wchar_t* __restrict, const wchar_t* __restrict, size_t); |
| 51 | 51 |
| 52 int wcscmp (const wchar_t *, const wchar_t *); | 52 int wcscmp(const wchar_t*, const wchar_t*); |
| 53 int wcsncmp (const wchar_t *, const wchar_t *, size_t); | 53 int wcsncmp(const wchar_t*, const wchar_t*, size_t); |
| 54 | 54 |
| 55 int wcscoll(const wchar_t *, const wchar_t *); | 55 int wcscoll(const wchar_t*, const wchar_t*); |
| 56 size_t wcsxfrm (wchar_t *__restrict, const wchar_t *__restrict, size_t n); | 56 size_t wcsxfrm(wchar_t* __restrict, const wchar_t* __restrict, size_t n); |
| 57 | 57 |
| 58 wchar_t *wcschr (const wchar_t *, wchar_t); | 58 wchar_t* wcschr(const wchar_t*, wchar_t); |
| 59 wchar_t *wcsrchr (const wchar_t *, wchar_t); | 59 wchar_t* wcsrchr(const wchar_t*, wchar_t); |
| 60 | 60 |
| 61 size_t wcscspn (const wchar_t *, const wchar_t *); | 61 size_t wcscspn(const wchar_t*, const wchar_t*); |
| 62 size_t wcsspn (const wchar_t *, const wchar_t *); | 62 size_t wcsspn(const wchar_t*, const wchar_t*); |
| 63 wchar_t *wcspbrk (const wchar_t *, const wchar_t *); | 63 wchar_t* wcspbrk(const wchar_t*, const wchar_t*); |
| 64 | 64 |
| 65 wchar_t *wcstok (wchar_t *__restrict, const wchar_t *__restrict, wchar_t **__res
trict); | 65 wchar_t* wcstok(wchar_t* __restrict, |
| 66 const wchar_t* __restrict, |
| 67 wchar_t** __restrict); |
| 66 | 68 |
| 67 size_t wcslen (const wchar_t *); | 69 size_t wcslen(const wchar_t*); |
| 68 | 70 |
| 69 wchar_t *wcsstr (const wchar_t *__restrict, const wchar_t *__restrict); | 71 wchar_t* wcsstr(const wchar_t* __restrict, const wchar_t* __restrict); |
| 70 wchar_t *wcswcs (const wchar_t *, const wchar_t *); | 72 wchar_t* wcswcs(const wchar_t*, const wchar_t*); |
| 71 | 73 |
| 72 wchar_t *wmemchr (const wchar_t *, wchar_t, size_t); | 74 wchar_t* wmemchr(const wchar_t*, wchar_t, size_t); |
| 73 int wmemcmp (const wchar_t *, const wchar_t *, size_t); | 75 int wmemcmp(const wchar_t*, const wchar_t*, size_t); |
| 74 wchar_t *wmemcpy (wchar_t *__restrict, const wchar_t *__restrict, size_t); | 76 wchar_t* wmemcpy(wchar_t* __restrict, const wchar_t* __restrict, size_t); |
| 75 wchar_t *wmemmove (wchar_t *, const wchar_t *, size_t); | 77 wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t); |
| 76 wchar_t *wmemset (wchar_t *, wchar_t, size_t); | 78 wchar_t* wmemset(wchar_t*, wchar_t, size_t); |
| 77 | 79 |
| 78 wint_t btowc (int); | 80 wint_t btowc(int); |
| 79 int wctob (wint_t); | 81 int wctob(wint_t); |
| 80 | 82 |
| 81 int mbsinit (const mbstate_t *); | 83 int mbsinit(const mbstate_t*); |
| 82 size_t mbrtowc (wchar_t *__restrict, const char *__restrict, size_t, mbstate_t *
__restrict); | 84 size_t mbrtowc(wchar_t* __restrict, |
| 83 size_t wcrtomb (char *__restrict, wchar_t, mbstate_t *__restrict); | 85 const char* __restrict, |
| 86 size_t, |
| 87 mbstate_t* __restrict); |
| 88 size_t wcrtomb(char* __restrict, wchar_t, mbstate_t* __restrict); |
| 84 | 89 |
| 85 size_t mbrlen (const char *__restrict, size_t, mbstate_t *__restrict); | 90 size_t mbrlen(const char* __restrict, size_t, mbstate_t* __restrict); |
| 86 | 91 |
| 87 size_t mbsrtowcs (wchar_t *__restrict, const char **__restrict, size_t, mbstate_
t *__restrict); | 92 size_t mbsrtowcs(wchar_t* __restrict, |
| 88 size_t wcsrtombs (char *__restrict, const wchar_t **__restrict, size_t, mbstate_
t *__restrict); | 93 const char** __restrict, |
| 94 size_t, |
| 95 mbstate_t* __restrict); |
| 96 size_t wcsrtombs(char* __restrict, |
| 97 const wchar_t** __restrict, |
| 98 size_t, |
| 99 mbstate_t* __restrict); |
| 89 | 100 |
| 90 float wcstof (const wchar_t *__restrict, wchar_t **__restrict); | 101 float wcstof(const wchar_t* __restrict, wchar_t** __restrict); |
| 91 double wcstod (const wchar_t *__restrict, wchar_t **__restrict); | 102 double wcstod(const wchar_t* __restrict, wchar_t** __restrict); |
| 92 long double wcstold (const wchar_t *__restrict, wchar_t **__restrict); | 103 long double wcstold(const wchar_t* __restrict, wchar_t** __restrict); |
| 93 | 104 |
| 94 long wcstol (const wchar_t *__restrict, wchar_t **__restrict, int); | 105 long wcstol(const wchar_t* __restrict, wchar_t** __restrict, int); |
| 95 unsigned long wcstoul (const wchar_t *__restrict, wchar_t **__restrict, int); | 106 unsigned long wcstoul(const wchar_t* __restrict, wchar_t** __restrict, int); |
| 96 | 107 |
| 97 long long wcstoll (const wchar_t *__restrict, wchar_t **__restrict, int); | 108 long long wcstoll(const wchar_t* __restrict, wchar_t** __restrict, int); |
| 98 unsigned long long wcstoull (const wchar_t *__restrict, wchar_t **__restrict, in
t); | 109 unsigned long long wcstoull(const wchar_t* __restrict, |
| 110 wchar_t** __restrict, |
| 111 int); |
| 99 | 112 |
| 113 int fwide(FILE*, int); |
| 100 | 114 |
| 115 int wprintf(const wchar_t* __restrict, ...); |
| 116 int fwprintf(FILE* __restrict, const wchar_t* __restrict, ...); |
| 117 int swprintf(wchar_t* __restrict, size_t, const wchar_t* __restrict, ...); |
| 101 | 118 |
| 102 int fwide (FILE *, int); | 119 int vwprintf(const wchar_t* __restrict, __isoc_va_list); |
| 120 int vfwprintf(FILE* __restrict, const wchar_t* __restrict, __isoc_va_list); |
| 121 int vswprintf(wchar_t* __restrict, |
| 122 size_t, |
| 123 const wchar_t* __restrict, |
| 124 __isoc_va_list); |
| 103 | 125 |
| 126 int wscanf(const wchar_t* __restrict, ...); |
| 127 int fwscanf(FILE* __restrict, const wchar_t* __restrict, ...); |
| 128 int swscanf(const wchar_t* __restrict, const wchar_t* __restrict, ...); |
| 104 | 129 |
| 105 int wprintf (const wchar_t *__restrict, ...); | 130 int vwscanf(const wchar_t* __restrict, __isoc_va_list); |
| 106 int fwprintf (FILE *__restrict, const wchar_t *__restrict, ...); | 131 int vfwscanf(FILE* __restrict, const wchar_t* __restrict, __isoc_va_list); |
| 107 int swprintf (wchar_t *__restrict, size_t, const wchar_t *__restrict, ...); | 132 int vswscanf(const wchar_t* __restrict, |
| 133 const wchar_t* __restrict, |
| 134 __isoc_va_list); |
| 108 | 135 |
| 109 int vwprintf (const wchar_t *__restrict, __isoc_va_list); | 136 wint_t fgetwc(FILE*); |
| 110 int vfwprintf (FILE *__restrict, const wchar_t *__restrict, __isoc_va_list); | 137 wint_t getwc(FILE*); |
| 111 int vswprintf (wchar_t *__restrict, size_t, const wchar_t *__restrict, __isoc_va
_list); | 138 wint_t getwchar(void); |
| 112 | 139 |
| 113 int wscanf (const wchar_t *__restrict, ...); | 140 wint_t fputwc(wchar_t, FILE*); |
| 114 int fwscanf (FILE *__restrict, const wchar_t *__restrict, ...); | 141 wint_t putwc(wchar_t, FILE*); |
| 115 int swscanf (const wchar_t *__restrict, const wchar_t *__restrict, ...); | 142 wint_t putwchar(wchar_t); |
| 116 | 143 |
| 117 int vwscanf (const wchar_t *__restrict, __isoc_va_list); | 144 wchar_t* fgetws(wchar_t* __restrict, int, FILE* __restrict); |
| 118 int vfwscanf (FILE *__restrict, const wchar_t *__restrict, __isoc_va_list); | 145 int fputws(const wchar_t* __restrict, FILE* __restrict); |
| 119 int vswscanf (const wchar_t *__restrict, const wchar_t *__restrict, __isoc_va_li
st); | |
| 120 | 146 |
| 121 wint_t fgetwc (FILE *); | 147 wint_t ungetwc(wint_t, FILE*); |
| 122 wint_t getwc (FILE *); | |
| 123 wint_t getwchar (void); | |
| 124 | |
| 125 wint_t fputwc (wchar_t, FILE *); | |
| 126 wint_t putwc (wchar_t, FILE *); | |
| 127 wint_t putwchar (wchar_t); | |
| 128 | |
| 129 wchar_t *fgetws (wchar_t *__restrict, int, FILE *__restrict); | |
| 130 int fputws (const wchar_t *__restrict, FILE *__restrict); | |
| 131 | |
| 132 wint_t ungetwc (wint_t, FILE *); | |
| 133 | 148 |
| 134 struct tm; | 149 struct tm; |
| 135 size_t wcsftime (wchar_t *__restrict, size_t, const wchar_t *__restrict, const s
truct tm *__restrict); | 150 size_t wcsftime(wchar_t* __restrict, |
| 151 size_t, |
| 152 const wchar_t* __restrict, |
| 153 const struct tm* __restrict); |
| 136 | 154 |
| 137 #undef iswdigit | 155 #undef iswdigit |
| 138 | 156 |
| 139 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ | 157 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ |
| 140 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 158 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 141 FILE *open_wmemstream(wchar_t **, size_t *); | 159 FILE* open_wmemstream(wchar_t**, size_t*); |
| 142 size_t mbsnrtowcs(wchar_t *__restrict, const char **__restrict, size_t, size_t,
mbstate_t *__restrict); | 160 size_t mbsnrtowcs(wchar_t* __restrict, |
| 143 size_t wcsnrtombs(char *__restrict, const wchar_t **__restrict, size_t, size_t,
mbstate_t *__restrict); | 161 const char** __restrict, |
| 144 wchar_t *wcsdup(const wchar_t *); | 162 size_t, |
| 145 size_t wcsnlen (const wchar_t *, size_t); | 163 size_t, |
| 146 wchar_t *wcpcpy (wchar_t *__restrict, const wchar_t *__restrict); | 164 mbstate_t* __restrict); |
| 147 wchar_t *wcpncpy (wchar_t *__restrict, const wchar_t *__restrict, size_t); | 165 size_t wcsnrtombs(char* __restrict, |
| 148 int wcscasecmp(const wchar_t *, const wchar_t *); | 166 const wchar_t** __restrict, |
| 149 int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); | 167 size_t, |
| 150 int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); | 168 size_t, |
| 151 int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); | 169 mbstate_t* __restrict); |
| 152 int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); | 170 wchar_t* wcsdup(const wchar_t*); |
| 153 size_t wcsxfrm_l(wchar_t *__restrict, const wchar_t *__restrict, size_t n, local
e_t); | 171 size_t wcsnlen(const wchar_t*, size_t); |
| 172 wchar_t* wcpcpy(wchar_t* __restrict, const wchar_t* __restrict); |
| 173 wchar_t* wcpncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t); |
| 174 int wcscasecmp(const wchar_t*, const wchar_t*); |
| 175 int wcscasecmp_l(const wchar_t*, const wchar_t*, locale_t); |
| 176 int wcsncasecmp(const wchar_t*, const wchar_t*, size_t); |
| 177 int wcsncasecmp_l(const wchar_t*, const wchar_t*, size_t, locale_t); |
| 178 int wcscoll_l(const wchar_t*, const wchar_t*, locale_t); |
| 179 size_t wcsxfrm_l(wchar_t* __restrict, |
| 180 const wchar_t* __restrict, |
| 181 size_t n, |
| 182 locale_t); |
| 154 #endif | 183 #endif |
| 155 | 184 |
| 156 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 185 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 157 int wcwidth (wchar_t); | 186 int wcwidth(wchar_t); |
| 158 int wcswidth (const wchar_t *, size_t); | 187 int wcswidth(const wchar_t*, size_t); |
| 159 int iswalnum(wint_t); | 188 int iswalnum(wint_t); |
| 160 int iswalpha(wint_t); | 189 int iswalpha(wint_t); |
| 161 int iswblank(wint_t); | 190 int iswblank(wint_t); |
| 162 int iswcntrl(wint_t); | 191 int iswcntrl(wint_t); |
| 163 int iswdigit(wint_t); | 192 int iswdigit(wint_t); |
| 164 int iswgraph(wint_t); | 193 int iswgraph(wint_t); |
| 165 int iswlower(wint_t); | 194 int iswlower(wint_t); |
| 166 int iswprint(wint_t); | 195 int iswprint(wint_t); |
| 167 int iswpunct(wint_t); | 196 int iswpunct(wint_t); |
| 168 int iswspace(wint_t); | 197 int iswspace(wint_t); |
| 169 int iswupper(wint_t); | 198 int iswupper(wint_t); |
| 170 int iswxdigit(wint_t); | 199 int iswxdigit(wint_t); |
| 171 int iswctype(wint_t, wctype_t); | 200 int iswctype(wint_t, wctype_t); |
| 172 wint_t towlower(wint_t); | 201 wint_t towlower(wint_t); |
| 173 wint_t towupper(wint_t); | 202 wint_t towupper(wint_t); |
| 174 wctype_t wctype(const char *); | 203 wctype_t wctype(const char*); |
| 175 | 204 |
| 176 #ifndef __cplusplus | 205 #ifndef __cplusplus |
| 177 #undef iswdigit | 206 #undef iswdigit |
| 178 #define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10) | 207 #define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a) - '0') < 10) |
| 179 #endif | 208 #endif |
| 180 #endif | 209 #endif |
| 181 | 210 |
| 182 #ifdef __cplusplus | 211 #ifdef __cplusplus |
| 183 } | 212 } |
| 184 #endif | 213 #endif |
| 185 | 214 |
| 186 #endif | 215 #endif |
| OLD | NEW |