diff options
author | Marvin Borner | 2019-12-18 17:59:22 +0100 |
---|---|---|
committer | Marvin Borner | 2019-12-18 17:59:22 +0100 |
commit | 07530dd08e0b29573712b54543a7fc42672bb34b (patch) | |
tree | 3026395a952e66a489b3fcf24a89d64f2bb6198c /src/userspace/mlibc/string/memcpy.c | |
parent | 025709e8643eb24e3360e575564b34ebd8062fd7 (diff) |
Added very basic command support
Diffstat (limited to 'src/userspace/mlibc/string/memcpy.c')
-rw-r--r-- | src/userspace/mlibc/string/memcpy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/userspace/mlibc/string/memcpy.c b/src/userspace/mlibc/string/memcpy.c new file mode 100644 index 0000000..e4e9c76 --- /dev/null +++ b/src/userspace/mlibc/string/memcpy.c @@ -0,0 +1,9 @@ +#include <stddef.h> + +void *memcpy(void *dest, const void *src, size_t count) +{ + const char *sp = (const char *) src; + char *dp = (char *) dest; + for (; count != 0; count--) *dp++ = *sp++; + return dest; +}
\ No newline at end of file |