1#ifndef __SIMPLE_LIBC_WCHAR_H__
2#define __SIMPLE_LIBC_WCHAR_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
18#if VSF_LINUX_APPLET_USE_LIBC_WCHAR == ENABLED
80# ifndef __VSF_APPLET__
85#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_LIBC_WCHAR_LIB__))\
86 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_LIBC_WCHAR == ENABLED
88#ifndef VSF_LINUX_APPLET_LIBC_WCHAR_VPLT
89# if VSF_LINUX_USE_APPLET == ENABLED
90# define VSF_LINUX_APPLET_LIBC_WCHAR_VPLT \
91 ((vsf_linux_libc_wchar_vplt_t *)(VSF_LINUX_APPLET_VPLT->libc_wchar_vplt))
93# define VSF_LINUX_APPLET_LIBC_WCHAR_VPLT \
94 ((vsf_linux_libc_wchar_vplt_t *)vsf_vplt((void *)0))
98#define VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(__NAME) \
99 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_LIBC_WCHAR_VPLT, __NAME)
100#define VSF_LINUX_APPLET_LIBC_WCHAR_IMP(...) \
101 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_LIBC_WCHAR_VPLT, __VA_ARGS__)
103VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcslen,
size_t,
const wchar_t *str) {
105 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcslen)(str);
107VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcscat,
wchar_t *,
wchar_t *dest,
const wchar_t *src) {
109 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcscat)(dest, src);
111VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsncat,
wchar_t *,
wchar_t *dest,
const wchar_t *src,
size_t n) {
113 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsncat)(dest, src, n);
115VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcschr,
_CONST_RETURN wchar_t *,
const wchar_t *str,
wchar_t c) {
117 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcschr)(str, c);
119VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsrchr,
_CONST_RETURN wchar_t *,
const wchar_t *str,
wchar_t c) {
121 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsrchr)(str, c);
123VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcscmp,
int,
const wchar_t *str1,
const wchar_t *str2) {
125 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcscmp)(str1, str2);
127VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsncmp,
int,
const wchar_t *str1,
const wchar_t *str2,
size_t n) {
129 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsncmp)(str1, str2, n);
131VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcscoll,
int,
const wchar_t *str1,
const wchar_t *str2) {
133 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcscoll)(str1, str2);
135VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcscpy,
wchar_t *,
wchar_t *dest,
const wchar_t *src) {
137 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcscpy)(dest, src);
139VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsncpy,
wchar_t *,
wchar_t *dest,
const wchar_t *src,
size_t n) {
141 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsncpy)(dest, src, n);
143VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsstr,
_CONST_RETURN wchar_t *,
const wchar_t *str1,
const wchar_t *str2) {
145 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsstr)(str1, str2);
147VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstok,
wchar_t *,
wchar_t *str,
const wchar_t *delim) {
149 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstok)(str, delim);
152VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wmemset,
wchar_t *,
wchar_t *dest,
wchar_t c,
size_t n) {
154 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wmemset)(dest, c, n);
156VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wmemchr,
wchar_t *,
const wchar_t *str,
wchar_t c,
size_t n) {
158 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wmemchr)(str, c, n);
160VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wmemcmp,
int,
const wchar_t *str1,
const wchar_t *str2,
size_t n) {
162 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wmemcmp)(str1, str2, n);
164VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wmemcpy,
wchar_t *,
wchar_t *dest,
const wchar_t *src,
size_t n) {
166 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wmemcpy)(dest, src, n);
168VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wmemmove,
wchar_t *,
wchar_t *dest,
const wchar_t *src,
size_t n) {
170 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wmemmove)(dest, src, n);
173VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstol,
long,
const wchar_t *str,
wchar_t **ptr,
int base) {
175 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstol)(str, ptr, base);
177VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstof,
float,
const wchar_t *str,
wchar_t **ptr) {
179 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstof)(str, ptr);
181VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstod,
double,
const wchar_t *str,
wchar_t **ptr) {
183 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstod)(str, ptr);
185VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstold,
long double,
const wchar_t *str,
wchar_t **ptr) {
187 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstold)(str, ptr);
189VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstoll,
long long,
const wchar_t *str,
wchar_t **ptr,
int base) {
191 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstoll)(str, ptr, base);
193VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstoull,
unsigned long long,
const wchar_t *str,
wchar_t **ptr,
int base) {
195 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstoull)(str, ptr, base);
197VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcstoul,
unsigned long,
const wchar_t *str,
wchar_t **ptr,
int base) {
199 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcstoul)(str, ptr, base);
202VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcspbrk,
wchar_t *,
wchar_t *str,
const wchar_t *charset) {
204 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcspbrk)(str, charset);
206VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsspn,
size_t,
const wchar_t *str,
const wchar_t *charset) {
208 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsspn)(str, charset);
210VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcscspn,
size_t,
const wchar_t *str,
const wchar_t *charset) {
212 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcscspn)(str, charset);
214VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsxfrm,
size_t,
wchar_t *dest,
const wchar_t *src,
size_t n) {
216 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsxfrm)(dest, src, n);
219VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
wcsftime,
size_t,
wchar_t *dest,
size_t n,
const wchar_t *
format,
const struct tm *timeptr) {
221 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
wcsftime)(dest, n,
format, timeptr);
224VSF_LINUX_APPLET_LIBC_WCHAR_IMP(
vswprintf,
int,
wchar_t *str,
size_t n,
const wchar_t *
format, va_list ap) {
226 return VSF_LINUX_APPLET_LIBC_WCHAR_ENTRY(
vswprintf)(str, n,
format, ap);
239# define WEOF ((wint_t)-1)
244# define _CONST_RETURN const
246# define _CONST_RETURN
249# define _CONST_RETURN
251# if !__IS_COMPILER_IAR__
260#define getwc_unlocked getwc
261#define getwchar_unlocked getwchar
262#define fgetwc_unlocked fgetwc
263#define fputwc_unlocked fputwc
264#define putwc_unlocked putwc
265#define putwchar_unlocked putwchar
266#define fgetws_unlocked fgetws
267#define fputws_unlocked fputws
270typedef struct _Mbstatet _Mbstatet;
307int vswprintf(
wchar_t *str,
size_t n,
const wchar_t *
format, va_list ap);
310wchar_t *
wcscat(
wchar_t *dest,
const wchar_t *src);
311wchar_t *
wcsncat(
wchar_t *dest,
const wchar_t *src,
size_t n);
314int wcscmp(
const wchar_t *str1,
const wchar_t *str2);
315int wcsncmp(
const wchar_t *str1,
const wchar_t *str2,
size_t n);
316int wcscoll(
const wchar_t *str1,
const wchar_t *str2);
317wchar_t *
wcscpy(
wchar_t *dest,
const wchar_t *src);
318wchar_t *
wcsncpy(
wchar_t *dest,
const wchar_t *src,
size_t n);
320wchar_t *
wcstok(
wchar_t *str,
const wchar_t *delim);
322wchar_t *
wmemset(
wchar_t *dest,
wchar_t c,
size_t n);
323wchar_t *
wmemchr(
const wchar_t *str,
wchar_t c,
size_t n);
324int wmemcmp(
const wchar_t *str1,
const wchar_t *str2,
size_t n);
325wchar_t *
wmemcpy(
wchar_t *dest,
const wchar_t *src,
size_t n);
326wchar_t *
wmemmove(
wchar_t *dest,
const wchar_t *src,
size_t n);
328long wcstol(
const wchar_t *str,
wchar_t **ptr,
int base);
329float wcstof(
const wchar_t *str,
wchar_t **ptr);
330double wcstod(
const wchar_t *str,
wchar_t **ptr);
331long double wcstold(
const wchar_t *str,
wchar_t **ptr);
332long long wcstoll(
const wchar_t *str,
wchar_t **ptr,
int base);
333unsigned long long wcstoull(
const wchar_t *str,
wchar_t **ptr,
int base);
334unsigned long wcstoul(
const wchar_t *str,
wchar_t **ptr,
int base);
336wchar_t *
wcspbrk(
wchar_t *str,
const wchar_t *charset);
337size_t wcsspn(
const wchar_t *str,
const wchar_t *charset);
338size_t wcscspn(
const wchar_t *str,
const wchar_t *charset);
339size_t wcsxfrm(
wchar_t *dest,
const wchar_t *src,
size_t n);
unsigned short wint_t
Definition stddef.h:49
unsigned long wc
Definition wchar.h:254
unsigned short byte
Definition wchar.h:255
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstoul)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstof)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(swprintf)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wctype)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsncat)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswxdigit)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsstr)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsftime)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswalnum)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswdigit)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstok)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswspace)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(vswprintf)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswblank)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcslen)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswgraph)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(towlower)
vsf_vplt_info_t info
Definition wchar.h:20
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstol)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(towupper)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcscpy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wmemcpy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswlower)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsncmp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcscspn)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsxfrm)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(towctrans)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsspn)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wctrans)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcscmp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswpunct)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcspbrk)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wmemset)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcscoll)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsrchr)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstold)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wmemcmp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcscat)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wmemmove)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wmemchr)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswupper)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcsncpy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcschr)
VSF_APPLET_VPLT_ENTRY_MOD_DEF(libc_wchar)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstoull)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswprint)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswctype)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswcntrl)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(iswalpha)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstod)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(wcstoll)
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165
#define VSF_APPLET_VPLT_FUNC_DECORATOR(__NAME)
Definition vsf_linux_applet_lib.c:1
uint8_t state
Definition vsf_msg_tree.h:247
_CONST_RETURN wchar_t * wcsstr(const wchar_t *str1, const wchar_t *str2)
size_t wcsftime(wchar_t *dest, size_t n, const wchar_t *format, const struct tm *timeptr)
long long wcstoll(const wchar_t *str, wchar_t **ptr, int base)
__VSF_VPLT_DECORATOR__ vsf_linux_libc_wchar_vplt_t vsf_linux_libc_wchar_vplt
Definition vsf_linux_glibc.c:367
int swprintf(wchar_t *str, size_t n, const wchar_t *format,...)
Definition simple_swprintf.c:738
struct vsf_linux_libc_wchar_vplt_t vsf_linux_libc_wchar_vplt_t
unsigned long wcstoul(const wchar_t *str, wchar_t **ptr, int base)
size_t wcrtomb(char *str, wchar_t wc, mbstate_t *ps)
wint_t ungetwc(wint_t c, FILE *f)
int vfwscanf(FILE *f, const wchar_t *format, va_list ap)
int wscanf(const wchar_t *format,...)
size_t wcscspn(const wchar_t *str, const wchar_t *charset)
wchar_t * wmemmove(wchar_t *dest, const wchar_t *src, size_t n)
Definition vsf_linux_glibc.c:353
wchar_t * wcscat(wchar_t *dest, const wchar_t *src)
size_t mbrlen(const char *str, size_t n, mbstate_t *ps)
long double wcstold(const wchar_t *str, wchar_t **ptr)
size_t wcsrtombs(char *mbstr, const wchar_t **wcstr, size_t n, mbstate_t *ps)
long wcstol(const wchar_t *str, wchar_t **ptr, int base)
int fputws(const wchar_t *str, FILE *f)
int wcscoll(const wchar_t *str1, const wchar_t *str2)
int wmemcmp(const wchar_t *str1, const wchar_t *str2, size_t n)
Definition vsf_linux_glibc.c:333
int wcscmp(const wchar_t *str1, const wchar_t *str2)
size_t wcsxfrm(wchar_t *dest, const wchar_t *src, size_t n)
size_t mbrtowc(wchar_t *pwc, const char *str, size_t n, mbstate_t *ps)
wchar_t * wcscpy(wchar_t *dest, const wchar_t *src)
size_t mbsrtowcs(wchar_t *dst, const char **src, size_t n, mbstate_t *ps)
wchar_t * wcspbrk(wchar_t *str, const wchar_t *charset)
#define _CONST_RETURN
Definition wchar.h:249
int fwide(FILE *f, int mode)
wchar_t * wcstok(wchar_t *str, const wchar_t *delim)
int wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t n)
wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t n)
wchar_t * fgetws(wchar_t *str, int n, FILE *f)
wchar_t * wmemchr(const wchar_t *str, wchar_t c, size_t n)
Definition vsf_linux_glibc.c:322
wchar_t * wmemcpy(wchar_t *dest, const wchar_t *src, size_t n)
Definition vsf_linux_glibc.c:344
int fwprintf(FILE *f, const wchar_t *format,...)
float wcstof(const wchar_t *str, wchar_t **ptr)
wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t n)
int vswprintf(wchar_t *str, size_t n, const wchar_t *format, va_list ap)
Definition simple_swprintf.c:155
int vwprintf(const wchar_t *format, va_list ap)
int vfwprintf(FILE *f, const wchar_t *format, va_list ap)
int vwscanf(const wchar_t *format, va_list ap)
int fwscanf(FILE *f, const wchar_t *format,...)
int mbsinit(const mbstate_t *ps)
unsigned long long wcstoull(const wchar_t *str, wchar_t **ptr, int base)
wint_t putwc(wchar_t c, FILE *f)
wchar_t * wmemset(wchar_t *dest, wchar_t c, size_t n)
Definition vsf_linux_glibc.c:313
_CONST_RETURN wchar_t * wcschr(const wchar_t *str, wchar_t c)
int vswscanf(const wchar_t *str, const wchar_t *format, va_list ap)
double wcstod(const wchar_t *str, wchar_t **ptr)
size_t wcslen(const wchar_t *str)
wint_t fputwc(wchar_t c, FILE *f)
_CONST_RETURN wchar_t * wcsrchr(const wchar_t *str, wchar_t c)
size_t wcsspn(const wchar_t *str, const wchar_t *charset)
int wprintf(const wchar_t *format,...)
wint_t putwchar(wchar_t c)
int swscanf(const wchar_t *str, const wchar_t *format,...)