summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/wchar.c
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2009-11-10 12:15:33 -0800
committerJean-Baptiste Queru <jbq@google.com>2010-03-03 10:25:29 -0800
commitfd5b1bb85d0a971fd8469112a157380c4d3a146f (patch)
treee11bd80576f8ee1625f13d4a81808621e9dde557 /libc/stdlib/wchar.c
parentca07064c9ebd8523ed88fa09e97feaaafb7e9c15 (diff)
downloadbionic-fd5b1bb85d0a971fd8469112a157380c4d3a146f.zip
bionic-fd5b1bb85d0a971fd8469112a157380c4d3a146f.tar.gz
bionic-fd5b1bb85d0a971fd8469112a157380c4d3a146f.tar.bz2
Add stdlib functions mbstowcs() and wcstombs(). DO NOT MERGE.
As with the other wchar functions in Bionic, these are really minimally functional stubs.
Diffstat (limited to 'libc/stdlib/wchar.c')
-rw-r--r--libc/stdlib/wchar.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/stdlib/wchar.c b/libc/stdlib/wchar.c
index d805333..7722b34 100644
--- a/libc/stdlib/wchar.c
+++ b/libc/stdlib/wchar.c
@@ -227,6 +227,11 @@ size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps)
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)
{
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;
}
+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)
{
return strspn( (const char*)ws1, (const char*)ws2 );