6 _wcstombs_r (struct _reent
*r
,
8 const wchar_t *__restrict pwcs
,
15 int i
, bytes
, num_to_copy
;
22 bytes
= __WCTOMB (r
, buff
, *pwcs
++, state
);
33 bytes
= __WCTOMB (r
, buff
, *pwcs
, state
);
36 num_to_copy
= (n
> bytes
? bytes
: (int)n
);
37 for (i
= 0; i
< num_to_copy
; ++i
)
41 return ptr
- s
- (n
>= bytes
);