ARM application development SDK for MNT ZZ9000 graphics and coprocessor card for classic Amiga computers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

memmove.c 254B

123456789101112131415161718
  1. #include <stddef.h>
  2. void *memmove(void *dest, void const *src, size_t n)
  3. {
  4. char *dp = dest;
  5. char const *sp = src;
  6. if(dp < sp) {
  7. while(n-- > 0)
  8. *dp++ = *sp++;
  9. } else {
  10. dp += n;
  11. sp += n;
  12. while(n-- > 0)
  13. *--dp = *--sp;
  14. }
  15. return dest;
  16. }