OrionLibC
Barry Importing existing Orion LibC 03048a9 (2 years, 3 months ago)diff --git a/string/memcpy.c b/string/memcpy.c new file mode 100644 index 0000000..4988f38 --- /dev/null +++ b/string/memcpy.c @@ -0,0 +1,12 @@ +#include <stddef.h> + +/* Copy one region of memory to another */ +void * +memcpy(void *dest, void *src, size_t n) +{ + unsigned char *a = (unsigned char *) dest, + *b = (unsigned char *) src; + while (n-- > 0) + *a++ = *b++; + return dest; +}