aboutsummaryrefslogtreecommitdiff
path: root/src/lib/mem.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-09 16:51:01 +0200
committerMarvin Borner2020-08-09 16:51:01 +0200
commit162d024a53e1e31e00ff0b6f47dd4590edebc551 (patch)
tree711d3886c300dfaddffdafaa89b690b45eb2101d /src/lib/mem.c
parent79f2fa136f26a0b87917336e089485712ee49bd6 (diff)
Heavy restructuring of libc, kernel and apps
Diffstat (limited to 'src/lib/mem.c')
-rw-r--r--src/lib/mem.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/lib/mem.c b/src/lib/mem.c
deleted file mode 100644
index 00b9735..0000000
--- a/src/lib/mem.c
+++ /dev/null
@@ -1,33 +0,0 @@
-// MIT License, Copyright (c) 2020 Marvin Borner
-
-#include <def.h>
-
-void *memcpy(void *dst, const void *src, u32 n)
-{
- const char *sp = (const char *)src;
- char *dp = (char *)dst;
- for (; n != 0; n--)
- *dp++ = *sp++;
- return dst;
-}
-
-void *memset(void *dst, char val, u32 n)
-{
- char *temp = (char *)dst;
- for (; n != 0; n--)
- *temp++ = val;
- return dst;
-}
-
-int memcmp(const void *s1, const void *s2, u32 n)
-{
- const u8 *a = (const u8 *)s1;
- const u8 *b = (const u8 *)s2;
- for (u32 i = 0; i < n; i++) {
- if (a[i] < b[i])
- return -1;
- else if (b[i] < a[i])
- return 1;
- }
- return 0;
-}