Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
wchar.h
Go to the documentation of this file.
1 #ifndef WCHAR_H_
2 #define WCHAR_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stddef.h>
9 #include <stdint.h>
10 #include <wctype.h>
11 
12 #pragma mark - Definitions -
13 
14 typedef struct
15 {
16  unsigned __opaque1, __opaque2;
17 } mbstate_t;
18 
19 #pragma mark - Supported APIs -
20 
21 int wcwidth(wchar_t);
22 int wcswidth(const wchar_t*, size_t);
23 wchar_t* wcschr(const wchar_t*, wchar_t);
24 
25 #pragma mark - Unspported API -
26 
27 #ifndef DISABLE_UNIMPLEMENTED_LIBC_APIS
28 wint_t btowc(int);
29 int wctob(wint_t);
30 
31 wchar_t* wcscpy(wchar_t* __restrict, const wchar_t* __restrict);
32 wchar_t* wcsncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);
33 
34 wchar_t* wcscat(wchar_t* __restrict, const wchar_t* __restrict);
35 wchar_t* wcsncat(wchar_t* __restrict, const wchar_t* __restrict, size_t);
36 
37 int wcscmp(const wchar_t*, const wchar_t*);
38 int wcsncmp(const wchar_t*, const wchar_t*, size_t);
39 
40 int wcscoll(const wchar_t*, const wchar_t*);
41 size_t wcsxfrm(wchar_t* __restrict, const wchar_t* __restrict, size_t);
42 
43 wchar_t* wcsrchr(const wchar_t*, wchar_t);
44 
45 size_t wcscspn(const wchar_t*, const wchar_t*);
46 size_t wcsspn(const wchar_t*, const wchar_t*);
47 wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
48 
49 wchar_t* wcstok(wchar_t* __restrict, const wchar_t* __restrict, wchar_t** __restrict);
50 
51 size_t wcslen(const wchar_t*);
52 
53 wchar_t* wcsstr(const wchar_t* __restrict, const wchar_t* __restrict);
54 wchar_t* wcswcs(const wchar_t*, const wchar_t*);
55 
56 wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
57 int wmemcmp(const wchar_t*, const wchar_t*, size_t);
58 wchar_t* wmemcpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);
59 wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
60 wchar_t* wmemset(wchar_t*, wchar_t, size_t);
61 
62 int mbsinit(const mbstate_t*);
63 size_t mbrtowc(wchar_t* __restrict, const char* __restrict, size_t, mbstate_t* __restrict);
64 size_t wcrtomb(char* __restrict, wchar_t, mbstate_t* __restrict);
65 
66 size_t mbrlen(const char* __restrict, size_t, mbstate_t* __restrict);
67 
68 size_t mbsrtowcs(wchar_t* __restrict, const char** __restrict, size_t, mbstate_t* __restrict);
69 size_t wcsrtombs(char* __restrict, const wchar_t** __restrict, size_t, mbstate_t* __restrict);
70 
71 float wcstof(const wchar_t* __restrict, wchar_t** __restrict);
72 double wcstod(const wchar_t* __restrict, wchar_t** __restrict);
73 long double wcstold(const wchar_t* __restrict, wchar_t** __restrict);
74 
75 long wcstol(const wchar_t* __restrict, wchar_t** __restrict, int);
76 unsigned long wcstoul(const wchar_t* __restrict, wchar_t** __restrict, int);
77 
78 long long wcstoll(const wchar_t* __restrict, wchar_t** __restrict, int);
79 unsigned long long wcstoull(const wchar_t* __restrict, wchar_t** __restrict, int);
80 
81 size_t mbsnrtowcs(wchar_t* __restrict, const char** __restrict, size_t, size_t,
82  mbstate_t* __restrict);
83 size_t wcsnrtombs(char* __restrict, const wchar_t** __restrict, size_t, size_t,
84  mbstate_t* __restrict);
85 wchar_t* wcsdup(const wchar_t*);
86 size_t wcsnlen(const wchar_t*, size_t);
87 wchar_t* wcpcpy(wchar_t* __restrict, const wchar_t* __restrict);
88 wchar_t* wcpncpy(wchar_t* __restrict, const wchar_t* __restrict, size_t);
89 
90 int wcscasecmp(const wchar_t*, const wchar_t*);
91 int wcsncasecmp(const wchar_t*, const wchar_t*, size_t);
92 
93 struct tm;
94 size_t wcsftime(wchar_t* __restrict, size_t, const wchar_t* __restrict,
95  const struct tm* __restrict);
96 #endif
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif // WCHAR_H_
unsigned wint_t
Definition: wctype.h:11
int wcwidth(wchar_t)
Definition: wcwidth.c:11
int wmemcmp(const wchar_t *, const wchar_t *, size_t)
size_t wcsftime(wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict)
size_t wcsxfrm(wchar_t *__restrict, const wchar_t *__restrict, size_t)
int wcswidth(const wchar_t *, size_t)
Definition: wcswidth.c:3
size_t mbrtowc(wchar_t *__restrict, const char *__restrict, size_t, mbstate_t *__restrict)
wchar_t * wcpcpy(wchar_t *__restrict, const wchar_t *__restrict)
size_t wcsrtombs(char *__restrict, const wchar_t **__restrict, size_t, mbstate_t *__restrict)
wchar_t * wcscat(wchar_t *__restrict, const wchar_t *__restrict)
unsigned __opaque2
Definition: wchar.h:16
wchar_t * wcpncpy(wchar_t *__restrict, const wchar_t *__restrict, size_t)
wchar_t * wcswcs(const wchar_t *, const wchar_t *)
size_t mbrlen(const char *__restrict, size_t, mbstate_t *__restrict)
size_t wcscspn(const wchar_t *, const wchar_t *)
wchar_t * wmemmove(wchar_t *, const wchar_t *, size_t)
wchar_t * wmemset(wchar_t *, wchar_t, size_t)
wchar_t * wcsncpy(wchar_t *__restrict, const wchar_t *__restrict, size_t)
int wcscoll(const wchar_t *, const wchar_t *)
wchar_t * wcstok(wchar_t *__restrict, const wchar_t *__restrict, wchar_t **__restrict)
wchar_t * wcsstr(const wchar_t *__restrict, const wchar_t *__restrict)
size_t wcrtomb(char *__restrict, wchar_t, mbstate_t *__restrict)
wchar_t * wcspbrk(const wchar_t *, const wchar_t *)
wchar_t * wcschr(const wchar_t *, wchar_t)
int wcsncasecmp(const wchar_t *, const wchar_t *, size_t)
int wcscasecmp(const wchar_t *, const wchar_t *)
wchar_t * wcsncat(wchar_t *__restrict, const wchar_t *__restrict, size_t)
float wcstof(const wchar_t *__restrict, wchar_t **__restrict)
int wctob(wint_t)
wchar_t * wmemcpy(wchar_t *__restrict, const wchar_t *__restrict, size_t)
Definition: time.h:41
double wcstod(const wchar_t *__restrict, wchar_t **__restrict)
wchar_t * wmemchr(const wchar_t *, wchar_t, size_t)
wchar_t * wcscpy(wchar_t *__restrict, const wchar_t *__restrict)
size_t mbsnrtowcs(wchar_t *__restrict, const char **__restrict, size_t, size_t, mbstate_t *__restrict)
size_t wcsnlen(const wchar_t *, size_t)
size_t mbsrtowcs(wchar_t *__restrict, const char **__restrict, size_t, mbstate_t *__restrict)
unsigned long long wcstoull(const wchar_t *__restrict, wchar_t **__restrict, int)
wchar_t * wcsdup(const wchar_t *)
size_t wcsspn(const wchar_t *, const wchar_t *)
wint_t btowc(int)
wchar_t * wcsrchr(const wchar_t *, wchar_t)
int wcsncmp(const wchar_t *, const wchar_t *, size_t)
int wcscmp(const wchar_t *, const wchar_t *)
long long wcstoll(const wchar_t *__restrict, wchar_t **__restrict, int)
long wcstol(const wchar_t *__restrict, wchar_t **__restrict, int)
unsigned long wcstoul(const wchar_t *__restrict, wchar_t **__restrict, int)
size_t wcsnrtombs(char *__restrict, const wchar_t **__restrict, size_t, size_t, mbstate_t *__restrict)
long double wcstold(const wchar_t *__restrict, wchar_t **__restrict)
int mbsinit(const mbstate_t *)
size_t wcslen(const wchar_t *)