wcsncpy_s.c 801 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // Copyright (c) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
  4. //
  5. /***
  6. *wcsncpy_s.c - copy at most n characters of wide-character string
  7. *
  8. *
  9. *Purpose:
  10. * defines wcsncpy_s() - copy at most n characters of char16_t string
  11. *
  12. *******************************************************************************/
  13. #define _SECURECRT_FILL_BUFFER 1
  14. #define _SECURECRT_FILL_BUFFER_THRESHOLD ((size_t)8)
  15. #include <string.h>
  16. #include <errno.h>
  17. #include <limits.h>
  18. #include "internal_securecrt.h"
  19. #include "mbusafecrt_internal.h"
  20. #define _FUNC_PROLOGUE
  21. #define _FUNC_NAME wcsncpy_s
  22. #define _CHAR char16_t
  23. #define _DEST _Dst
  24. #define _SIZE _SizeInWords
  25. #define _SRC _Src
  26. #define _COUNT _Count
  27. #include "tcsncpy_s.inl"