mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
2e10d61ccb
(_mbsnrtowcs_r): Declare. (wcsnrtombs): Declare. (_wcsnrtombs_r): Declare. * libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c and wcsnrtombs.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r and mbsnrtowcs. Document mbsnrtowcs and mbsrtowcs. * libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r. (mbsrtowcs): Ditto. * libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r and wcsnrtombs. Document wcsrtombs and wcsnrtombs. * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r. (wcsrtombs): Ditto. * libc/stdlib/stdlib.tex: Accommodate new documentation.
27 lines
513 B
C
27 lines
513 B
C
#include <reent.h>
|
|
#include <newlib.h>
|
|
#include <wchar.h>
|
|
|
|
size_t
|
|
_DEFUN (_wcsrtombs_r, (r, dst, src, len, ps),
|
|
struct _reent *r _AND
|
|
char *dst _AND
|
|
const wchar_t **src _AND
|
|
size_t len _AND
|
|
mbstate_t *ps)
|
|
{
|
|
return _wcsnrtombs_r (r, dst, src, (size_t) -1, len, ps);
|
|
}
|
|
|
|
#ifndef _REENT_ONLY
|
|
size_t
|
|
_DEFUN (wcsrtombs, (dst, src, len, ps),
|
|
char *dst _AND
|
|
const wchar_t **src _AND
|
|
size_t len _AND
|
|
mbstate_t *ps)
|
|
{
|
|
return _wcsnrtombs_r (_REENT, dst, src, (size_t) -1, len, ps);
|
|
}
|
|
#endif /* !_REENT_ONLY */
|