From 4546c75d685475d8b9f215b588364e1d1bbd0b79 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Apr 2020 19:21:29 +0200 Subject: MUCH work in libc Also cleaned up some syscalls etc --- src/userspace/libc/string/strcmp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/userspace/libc/string/strcmp.c (limited to 'src/userspace/libc/string/strcmp.c') diff --git a/src/userspace/libc/string/strcmp.c b/src/userspace/libc/string/strcmp.c new file mode 100644 index 0000000..4282520 --- /dev/null +++ b/src/userspace/libc/string/strcmp.c @@ -0,0 +1,14 @@ +#include +#include + +char strcmp(char *a, char *b) +{ + if (strlen(a) != strlen(b)) + return 1; + + for (u8 i = 0; i < strlen(a); i++) + if (a[i] != b[i]) + return 1; + + return 0; +} \ No newline at end of file -- cgit v1.2.3