2013-11-27 01:21:01 +08:00
|
|
|
/* doc in mbsnrtowcs.c */
|
|
|
|
|
2003-12-05 14:13:44 +08:00
|
|
|
#include <reent.h>
|
2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* configure.in: Define _MB_CAPABLE if mb supported.
* configure: Regenerated.
* configure.host: Remove manual setting of MB_CAPABLE compiler
flag.
* newlib.hin: Add _MB_CAPABLE flag.
* libc/ctype/iswalpha.c, libc/ctype/iswblank.c: Include <newlib.h>
and check for _MB_CAPABLE flag instead of MB_CAPABLE.
* libc/ctype/iswcntrl.c, libc/ctype/iswprint.c: Ditto.
* libc/ctype/iswpunct.c, libc/ctype/iswspace.c: Ditto.
* libc/ctype/jp2uc.c: Ditto.
* libc/ctype/towlower.c, libc/ctype/towupper.c: Ditto.
* libc/locale/locale.c: Ditto
* libc/machine/powerpc/vfscanf.c: Ditto
* libc/stdio/vfprintf.c, libc/stdio/vfscanf.c: Ditto
* libc/stdlib/mblen.c: Ditto
* libc/stdlib/mblen_r.c, libc/stdlib/mbrlen.c: Ditto
* libc/stdlib/mbrtowc.c, libc/stdlib/mbsrtowcs.c: Ditto
* libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c: Ditto
* libc/stdlib/mbtowc_r.c, libc/stdlib/wcrtomb.c: Ditto
* libc/stdlib/wcsrtombs.c, libc/stdlib/wcstombs.c: Ditto
* libc/stdlib/wctomb.c, libc/sys/linux/intl/dcigettext.c: Ditto
* libc/sys/linux/intl/explodename.c: Ditto
* libc/sys/linux/intl/finddomain.c: Ditto
* libc/sys/linux/intl/l10nflist.c: Ditto
* libc/sys/linux/intl/loadmsgcat.c: Ditto
* libc/sys/linux/intl/localealias.c: Ditto
2004-04-24 05:44:22 +08:00
|
|
|
#include <newlib.h>
|
2002-08-23 09:56:05 +08:00
|
|
|
#include <wchar.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
size_t
|
2017-12-04 11:43:30 +08:00
|
|
|
_mbsrtowcs_r (struct _reent *r,
|
2017-12-04 09:31:41 +08:00
|
|
|
wchar_t *dst,
|
|
|
|
const char **src,
|
|
|
|
size_t len,
|
2002-09-10 05:42:14 +08:00
|
|
|
mbstate_t *ps)
|
2002-08-23 09:56:05 +08:00
|
|
|
{
|
2009-02-19 17:19:42 +08:00
|
|
|
return _mbsnrtowcs_r (r, dst, src, (size_t) -1, len, ps);
|
2002-09-10 05:42:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef _REENT_ONLY
|
|
|
|
size_t
|
2017-12-04 11:43:30 +08:00
|
|
|
mbsrtowcs (wchar_t *__restrict dst,
|
2017-12-04 09:31:41 +08:00
|
|
|
const char **__restrict src,
|
|
|
|
size_t len,
|
2013-11-27 01:21:01 +08:00
|
|
|
mbstate_t *__restrict ps)
|
2002-09-10 05:42:14 +08:00
|
|
|
{
|
2009-02-19 17:19:42 +08:00
|
|
|
return _mbsnrtowcs_r (_REENT, dst, src, (size_t) -1, len, ps);
|
2002-08-23 09:56:05 +08:00
|
|
|
}
|
2002-09-10 05:42:14 +08:00
|
|
|
#endif /* !_REENT_ONLY */
|