memmove.c 446 B

1234567891011121314151617181920212223242526272829
  1. /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
  2. /* This function is in the public domain. --Per Bothner. */
  3. #include <sys/types.h>
  4. #ifdef __STDC__
  5. #define PTR void *
  6. #define CPTR const void *
  7. PTR memmove (PTR, CPTR, size_t);
  8. #else
  9. #define PTR char *
  10. #define CPTR char *
  11. PTR memmove ();
  12. #endif
  13. PTR
  14. memmove (PTR s1, CPTR s2, size_t n)
  15. {
  16. bcopy (s2, s1, n);
  17. return s1;
  18. }
  19. /*
  20. Local Variables:
  21. c-file-style: "gnu"
  22. End:
  23. */