strncpy_s.c 685 B

12345678910111213141516171819202122232425262728293031
  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. *strncpy_s.c - copy at most n characters of string
  7. *
  8. *
  9. *Purpose:
  10. * defines strncpy_s() - copy at most n characters of string
  11. *
  12. *******************************************************************************/
  13. #include <string.h>
  14. #include <errno.h>
  15. #include <limits.h>
  16. #include "internal_securecrt.h"
  17. #include "mbusafecrt_internal.h"
  18. #define _FUNC_PROLOGUE
  19. #define _FUNC_NAME strncpy_s
  20. #define _CHAR char
  21. #define _DEST _Dst
  22. #define _SIZE _SizeInBytes
  23. #define _SRC _Src
  24. #define _COUNT _Count
  25. #include "tcsncpy_s.inl"