summaryrefslogtreecommitdiff
path: root/lib/libc/memcpy.c
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2026-05-24 11:09:31 +0000
committerAda Christine <adachristine18@gmail.com>2026-05-24 11:09:31 +0000
commitd07bd08dd0446e8c41eccaccbb07e9112200e8ee (patch)
tree742a3f9d9d84c8ee55858b2ebc7e0e0f8c714c7c /lib/libc/memcpy.c
parent9aaf21bf10d00ec12b24499817e3e91dca08c461 (diff)
rename and move, function renames in stdio
Diffstat (limited to 'lib/libc/memcpy.c')
-rw-r--r--lib/libc/memcpy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libc/memcpy.c b/lib/libc/memcpy.c
new file mode 100644
index 0000000..58b1e40
--- /dev/null
+++ b/lib/libc/memcpy.c
@@ -0,0 +1,12 @@
+/* Public domain. */
+#include <stddef.h>
+
+void *
+memcpy (void *dest, const void *src, size_t len)
+{
+ char *d = dest;
+ const char *s = src;
+ while (len--)
+ *d++ = *s++;
+ return dest;
+}