1 | #ifndef _WCHAR_H |
---|
2 | #define _WCHAR_H |
---|
3 | |
---|
4 | #include <stddef.h> |
---|
5 | #include <stdarg.h> |
---|
6 | #include <stdio.h> |
---|
7 | |
---|
8 | #if defined(__WINT_TYPE__) |
---|
9 | typedef __WINT_TYPE__ wint_t; |
---|
10 | #else |
---|
11 | typedef unsigned int wint_t; |
---|
12 | #endif |
---|
13 | typedef int (*wctype_t)(wint_t) __attribute__((__const__)); |
---|
14 | |
---|
15 | #ifndef WCHAR_MIN |
---|
16 | #define WCHAR_MIN (-2147483647 - 1) |
---|
17 | #define WCHAR_MAX (2147483647) |
---|
18 | #endif |
---|
19 | #ifndef WEOF |
---|
20 | #define WEOF 0xffffffffu |
---|
21 | #endif |
---|
22 | |
---|
23 | typedef struct { |
---|
24 | int count; |
---|
25 | wchar_t sofar; |
---|
26 | } mbstate_t; |
---|
27 | |
---|
28 | wint_t btowc(int); |
---|
29 | wint_t fgetwc(FILE *); |
---|
30 | wchar_t* fgetws(wchar_t *, int, FILE *); |
---|
31 | wint_t fputwc(wchar_t, FILE *); |
---|
32 | int fputws(const wchar_t *, FILE *); |
---|
33 | int fwide(FILE *, int); |
---|
34 | int fwprintf(FILE *, const wchar_t *, ...); |
---|
35 | int fwscanf(FILE *, const wchar_t *, ...); |
---|
36 | wint_t getwc(FILE *); |
---|
37 | wint_t getwchar(void); |
---|
38 | |
---|
39 | size_t mbrlen(const char *, size_t, mbstate_t *); |
---|
40 | size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); |
---|
41 | int mbsinit(const mbstate_t *); |
---|
42 | size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); |
---|
43 | wint_t putwc(wchar_t, FILE *); |
---|
44 | wint_t putwchar(wchar_t); |
---|
45 | int swprintf(wchar_t *, size_t, const wchar_t *, ...); |
---|
46 | int swscanf(const wchar_t *, const wchar_t *, ...); |
---|
47 | |
---|
48 | wint_t ungetwc(wint_t, FILE *); |
---|
49 | int vfwprintf(FILE *, const wchar_t *, va_list); |
---|
50 | int vfwscanf(FILE *, const wchar_t *, va_list); |
---|
51 | int vwprintf(const wchar_t *, va_list); |
---|
52 | int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); |
---|
53 | int vswscanf(const wchar_t *, const wchar_t *, va_list); |
---|
54 | int vwscanf(const wchar_t *, va_list); |
---|
55 | size_t wcrtomb(char *, wchar_t, mbstate_t *); |
---|
56 | wchar_t *wcscat(wchar_t *, const wchar_t *); |
---|
57 | wchar_t *wcschr(const wchar_t *, wchar_t); |
---|
58 | int wcscmp(const wchar_t *, const wchar_t *); |
---|
59 | int wcscoll(const wchar_t *, const wchar_t *); |
---|
60 | wchar_t* wcscpy(wchar_t *, const wchar_t *); |
---|
61 | size_t wcscspn(const wchar_t *, const wchar_t *); |
---|
62 | size_t wcslen(const wchar_t *); |
---|
63 | wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t); |
---|
64 | int wcsncmp(const wchar_t *, const wchar_t *, size_t); |
---|
65 | wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t); |
---|
66 | wchar_t *wcspbrk(const wchar_t *, const wchar_t *); |
---|
67 | wchar_t *wcsrchr(const wchar_t *, wchar_t); |
---|
68 | size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); |
---|
69 | size_t wcsspn(const wchar_t *, const wchar_t *); |
---|
70 | wchar_t *wcsstr(const wchar_t *, const wchar_t *); |
---|
71 | double wcstod(const wchar_t *, wchar_t **); |
---|
72 | float wcstof(const wchar_t *, wchar_t **); |
---|
73 | wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **); |
---|
74 | long wcstol(const wchar_t *, wchar_t **, int); |
---|
75 | long double wcstold(const wchar_t *, wchar_t **); |
---|
76 | long long wcstoll(const wchar_t *, wchar_t **, int); |
---|
77 | unsigned long wcstoul(const wchar_t *, wchar_t **, int); |
---|
78 | unsigned long long wcstoull(const wchar_t *, wchar_t **, int); |
---|
79 | |
---|
80 | size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); |
---|
81 | int wctob(wint_t); |
---|
82 | |
---|
83 | wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); |
---|
84 | int wmemcmp(const wchar_t *, const wchar_t *, size_t); |
---|
85 | wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t); |
---|
86 | wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); |
---|
87 | wchar_t *wmemset(wchar_t *, wchar_t, size_t); |
---|
88 | int wprintf(const wchar_t *, ...); |
---|
89 | int wscanf(const wchar_t *, ...); |
---|
90 | |
---|
91 | #ifdef _XOPEN_SOURCE |
---|
92 | int wcwidth(wchar_t c); |
---|
93 | #endif |
---|
94 | |
---|
95 | #endif |
---|