7 #if defined( _SMALL_PRINTF ) || defined(SMALL_SCANF)
12 _DEFUN (_wcsrtombs_r, (r, dst, src, len, ps),
15 const wchar_t **src _AND
31 ps = &(_REENT_WCSRTOMBS_STATE(r));
40 pwcs = (
wchar_t *)(*src);
44 int count = ps->__count;
45 wint_t wch = ps->__value.__wch;
47 int bytes = _wcrtomb_r (r, buff, *pwcs, ps);
58 if (n <= len - bytes && bytes < len)
63 for (i = 0; i < bytes; ++i)
79 ps->__value.__wch = wch;
89 _DEFUN (wcsrtombs, (dst, src, len, ps),
91 const wchar_t **src _AND
95 return _wcsrtombs_r (_REENT, dst, src, len, ps);