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/strcat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/userspace/libc/string/strcat.c (limited to 'src/userspace/libc/string/strcat.c') diff --git a/src/userspace/libc/string/strcat.c b/src/userspace/libc/string/strcat.c new file mode 100644 index 0000000..f62d6e2 --- /dev/null +++ b/src/userspace/libc/string/strcat.c @@ -0,0 +1,12 @@ +#include +#include + +void strcat(char *dest, char *orig) +{ + u8 s_dest = strlen(dest); + u8 s_orig = strlen(orig); + + for (u8 i = 0; i < s_orig; i++) + dest[s_dest + i] = orig[i]; + dest[s_dest + s_orig] = 0; +} \ No newline at end of file -- cgit v1.2.3