1
0

wcstombs.c 363 B

1234567891011121314151617
  1. /*
  2. * This code was written by Rich Felker in 2010; no copyright is claimed.
  3. * This code is in the public domain. Attribution is appreciated but
  4. * unnecessary.
  5. */
  6. #include <stdlib.h>
  7. #include <inttypes.h>
  8. #include <wchar.h>
  9. #include <errno.h>
  10. #include "internal.h"
  11. size_t wcstombs(char *s, const wchar_t *ws, size_t n)
  12. {
  13. return wcsrtombs(s, &ws, n, 0);
  14. }