memcpy.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /********************************************************************
  2. ** File: memcpy.h
  3. **
  4. ** Copyright (C) 2005 Daniel Vik
  5. **
  6. ** This software is provided 'as-is', without any express or implied
  7. ** warranty. In no event will the authors be held liable for any
  8. ** damages arising from the use of this software.
  9. ** Permission is granted to anyone to use this software for any
  10. ** purpose, including commercial applications, and to alter it and
  11. ** redistribute it freely, subject to the following restrictions:
  12. **
  13. ** 1. The origin of this software must not be misrepresented; you
  14. ** must not claim that you wrote the original software. If you
  15. ** use this software in a product, an acknowledgment in the
  16. ** use this software in a product, an acknowledgment in the
  17. ** product documentation would be appreciated but is not
  18. ** required.
  19. **
  20. ** 2. Altered source versions must be plainly marked as such, and
  21. ** must not be misrepresented as being the original software.
  22. **
  23. ** 3. This notice may not be removed or altered from any source
  24. ** distribution.
  25. **
  26. **
  27. ** Description: Implementation of the standard library function memcpy.
  28. ** This implementation of memcpy() is ANSI-C89 compatible.
  29. **
  30. *******************************************************************/
  31. /********************************************************************
  32. ** Includes for size_t definition
  33. *******************************************************************/
  34. #include <stddef.h>
  35. /********************************************************************
  36. **
  37. ** void *memcpy(void *dest, const void *src, size_t count)
  38. **
  39. ** Args: dest - pointer to destination buffer
  40. ** src - pointer to source buffer
  41. ** count - number of bytes to copy
  42. **
  43. ** Return: A pointer to destination buffer
  44. **
  45. ** Purpose: Copies count bytes from src to dest. No overlap check
  46. ** is performed.
  47. **
  48. *******************************************************************/
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52. void *fast_memcpy(void *dest, const void *src, size_t count);
  53. #ifdef __cplusplus
  54. }
  55. #endif