implement open_wmemstream

not heavily tested, but it seems to be correct, including the odd
behavior that seeking is in terms of wide character count. this
precludes any simple buffering, so we just make the stream unbuffered.
This commit is contained in:
Rich Felker 2011-09-03 19:49:46 -04:00
commit 1461e02757
2 changed files with 96 additions and 0 deletions

View file

@ -133,6 +133,7 @@ size_t wcsftime (wchar_t *, size_t, const wchar_t *, const struct tm *);
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
FILE *open_wmemstream(wchar_t **, size_t *);
size_t mbsnrtowcs(wchar_t *, const char **, size_t, size_t, mbstate_t *);
size_t wcsnrtombs(char *, const wchar_t **, size_t, size_t, mbstate_t *);
#endif