memcpy.c 502 B

1234567891011121314151617181920212223242526
  1. /* memcpy (the standard C function)
  2. This function is in the public domain. */
  3. /*
  4. @deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, @
  5. size_t @var{length})
  6. Copies @var{length} bytes from memory region @var{in} to region
  7. @var{out}. Returns a pointer to @var{out}.
  8. @end deftypefn
  9. */
  10. #include <ansidecl.h>
  11. #include <stddef.h>
  12. void bcopy (const void*, void*, size_t);
  13. PTR
  14. memcpy (PTR out, const PTR in, size_t length)
  15. {
  16. bcopy(in, out, length);
  17. return out;
  18. }