feat: added task names
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user