feat: added task names

This commit is contained in:
2021-08-12 20:22:00 +02:00
parent be71f9a7e9
commit 94c6332e27
7 changed files with 32 additions and 12 deletions

View File

@@ -5,6 +5,7 @@
#include <string.h>
#include <sys/param.h>
#include <sys/types.h>
#include <myke/mem/malloc.h>
int memcpy(void *dst, const void *src, size_t amount) {
for (size_t i = 0; i < amount; i++) {
@@ -118,3 +119,14 @@ char *strncat(char *dest, const char *src, size_t n) {
}
return dest;
}
char* strdup(const char* s) {
return strndup(s, strlen(s));
}
char* strndup(const char* s, size_t n) {
char* new = malloc(n + 1);
memcpy(new, s, n);
new[n] = 0;
return new;
}