summaryrefslogtreecommitdiff
path: root/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'base.c')
-rw-r--r--base.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/base.c b/base.c
index 8e7c03b..8d095be 100644
--- a/base.c
+++ b/base.c
@@ -15,6 +15,16 @@ void *memset(void *s, int c, size_t n) {
return s;
}
+void *memcpy(void *dest, const void *src, size_t n) {
+ uint8_t *out = (uint8_t *)dest;
+ const uint8_t *in = (const uint8_t *)src;
+
+ while (n--)
+ *out++ = *in++;
+
+ return dest;
+}
+
size_t strlen(const char *s) {
const char *start = s;
while (*s++);