Add stdlib functions mbstowcs() and wcstombs().
As with the other wchar functions in Bionic, these are really minimally functional stubs. Change-Id: I805bc5642e7bc22d9d730cfc18f9fb4a5f164416
This commit is contained in:
parent
b152dde4ca
commit
03c643b493
@ -100,6 +100,7 @@ extern int mbsinit(const mbstate_t *);
|
|||||||
extern size_t mbrlen(const char *, size_t, mbstate_t *);
|
extern size_t mbrlen(const char *, size_t, mbstate_t *);
|
||||||
extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
|
extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
|
||||||
extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
|
extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
|
||||||
|
extern size_t mbstowcs(wchar_t *, const char *, size_t);
|
||||||
extern wint_t putwc(wchar_t, FILE *);
|
extern wint_t putwc(wchar_t, FILE *);
|
||||||
extern wint_t putwchar(wchar_t);
|
extern wint_t putwchar(wchar_t);
|
||||||
extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
|
extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
|
||||||
@ -130,6 +131,7 @@ extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
|
|||||||
extern double wcstod(const wchar_t *, wchar_t **);
|
extern double wcstod(const wchar_t *, wchar_t **);
|
||||||
extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
|
extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
|
||||||
extern long int wcstol(const wchar_t *, wchar_t **, int);
|
extern long int wcstol(const wchar_t *, wchar_t **, int);
|
||||||
|
extern size_t wcstombs(char *, const wchar_t *, size_t);
|
||||||
extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
|
extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
|
||||||
extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
|
extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
|
||||||
extern int wcswidth(const wchar_t *, size_t);
|
extern int wcswidth(const wchar_t *, size_t);
|
||||||
|
@ -227,6 +227,11 @@ size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t mbstowcs(wchar_t *dst, const char *src, size_t len)
|
||||||
|
{
|
||||||
|
return mbsrtowcs(dst, &src, len, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
wint_t putwc(wchar_t wc, FILE *stream)
|
wint_t putwc(wchar_t wc, FILE *stream)
|
||||||
{
|
{
|
||||||
return fputc((char)wc, stream);
|
return fputc((char)wc, stream);
|
||||||
@ -339,6 +344,11 @@ size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *ps)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t wcstombs(char *dst, const wchar_t *src, size_t len)
|
||||||
|
{
|
||||||
|
return wcsrtombs(dst, &src, len, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2)
|
size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2)
|
||||||
{
|
{
|
||||||
return strspn( (const char*)ws1, (const char*)ws2 );
|
return strspn( (const char*)ws1, (const char*)ws2 );
|
||||||
|
Loading…
Reference in New Issue
Block a user