From b905869a35f062a4e5072f10bec3a2ba3db0e365 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Wed, 30 Jul 2025 14:32:01 -0400 Subject: working userland with some invoke syscalls --- lib/strcmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/strcmp.c (limited to 'lib/strcmp.c') diff --git a/lib/strcmp.c b/lib/strcmp.c new file mode 100644 index 0000000..da6a51a --- /dev/null +++ b/lib/strcmp.c @@ -0,0 +1,8 @@ +#include "string.h" + +int +strcmp(const char *s1, const char *s2) +{ + while(*s1 && *s2 && *(s1++) == *(s2++)); + return *s2 - *s1; +} -- cgit v1.2.1