summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b152dde)
raw | patch | inline | side by side (parent: b152dde)
author | Dan Bornstein <danfuzz@android.com> | |
Tue, 10 Nov 2009 20:15:33 +0000 (12:15 -0800) | ||
committer | Dan Bornstein <danfuzz@android.com> | |
Tue, 10 Nov 2009 20:15:33 +0000 (12:15 -0800) |
As with the other wchar functions in Bionic, these are really
minimally functional stubs.
Change-Id: I805bc5642e7bc22d9d730cfc18f9fb4a5f164416
minimally functional stubs.
Change-Id: I805bc5642e7bc22d9d730cfc18f9fb4a5f164416
libc/include/wchar.h | patch | blob | history | |
libc/stdlib/wchar.c | patch | blob | history |
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index e2feb600268980e82cd5e76cb34c57b5b079a325..97e1b5c4c2ad6f5613e066f8099b5b79d95f6e93 100644 (file)
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
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 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 putwchar(wchar_t);
extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
extern double wcstod(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 size_t wcstombs(char *, const wchar_t *, size_t);
extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
extern int wcswidth(const wchar_t *, size_t);
diff --git a/libc/stdlib/wchar.c b/libc/stdlib/wchar.c
index d805333a02a586e6c9d4ac079420f4ca8ea17c10..7722b34e2b0499cd64b7c29c780f6fd1fc946c95 100644 (file)
--- a/libc/stdlib/wchar.c
+++ b/libc/stdlib/wchar.c
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);
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 );