* unnecessary.
*/
-#include <stdlib.h>
-#include <inttypes.h>
#include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
{
ws++; wn--;
/* safe - this loop runs fewer than sizeof(buf) times */
s+=l; n-=l;
- cnt++;
+ cnt += l;
}
if (dst) *wcs = ws;
return cnt;