From 69a8ee7115196cb7b8609c570fc197be7436d939 Mon Sep 17 00:00:00 2001 From: Quinn Date: Tue, 23 Dec 2025 20:51:26 +0100 Subject: [PATCH] write TODO comments for implementation notes --- src/string.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/string.c b/src/string.c index bbbd6b0..b6a2816 100644 --- a/src/string.c +++ b/src/string.c @@ -1,10 +1,22 @@ #include "string.h" -int memcmp(const void *s1, const void *s2, usize n) { +int memcmp(const void *s1, const void *s2, usize n) +{ + /* TODO: Compare n bytes of s1 with s2, performing *s1-*s2. + * Returning if non-zero or out of bounds. */ } -void *memset(void *s, int c, usize n) { } +void *memset(void *s, int c, usize n) +{ + /* TODO: Fill memory with c */ +} -void *memcpy(void *restrict dst, const void *restrict src, usize n) { } +void *memcpy(void *restrict dst, const void *restrict src, usize n) +{ + /* TODO: Copies memory area, not allowing overlap */ +} -void *memmove(void *dst, const void *src, usize n) { } +void *memmove(void *dst, const void *src, usize n) +{ + /* TODO: Moves memory area, allowing overlap */ +}