summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2009-11-10 12:15:33 -0800
committerDan Bornstein <danfuzz@android.com>2009-11-10 12:15:33 -0800
commit03c643b493d0d6e4385fe5a33d33d2cb945493d2 (patch)
tree409dfcce50223b11168fb23383bfb9618ab65878 /libc/stdlib
parentb152dde4cafffb3b37ca60c589f71110ca988c79 (diff)
downloadbionic-03c643b493d0d6e4385fe5a33d33d2cb945493d2.zip
bionic-03c643b493d0d6e4385fe5a33d33d2cb945493d2.tar.gz
bionic-03c643b493d0d6e4385fe5a33d33d2cb945493d2.tar.bz2
Add stdlib functions mbstowcs() and wcstombs().
As with the other wchar functions in Bionic, these are really minimally functional stubs. Change-Id: I805bc5642e7bc22d9d730cfc18f9fb4a5f164416
Diffstat (limited to 'libc/stdlib')
-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 );