aboutsummaryrefslogtreecommitdiffstats
path: root/libc/memset.c
diff options
context:
space:
mode:
authorEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-05-05 01:08:00 -0400
committerEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-05-05 01:08:00 -0400
commit4aa74dbe2a35a45668b33d688f17b680c2232572 (patch)
tree42794e2fe2ba653ccbf772bb02dbfda07f75943e /libc/memset.c
parent2d59766eb330b9d15a9bcbcd7e1695809fc099c5 (diff)
improved makefile somewhat
Diffstat (limited to 'libc/memset.c')
-rw-r--r--libc/memset.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/memset.c b/libc/memset.c
new file mode 100644
index 0000000..67dadfe
--- /dev/null
+++ b/libc/memset.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+void* memset(void* bufptr, int value, size_t size) {
+ unsigned char* buf = (unsigned char*) bufptr;
+ for (size_t i = 0; i < size; i++)
+ buf[i] = (unsigned char) value;
+ return bufptr;
+} \ No newline at end of file