This commit is contained in:
2025-09-28 22:06:39 -04:00
parent 90fadf3980
commit d847c2fcb6
20 changed files with 636 additions and 450 deletions

12
lib/str_dup.c Normal file
View File

@@ -0,0 +1,12 @@
#include <stdlib.h>
#include <string.h>
#include "xmem.h"
#include "str_dup.h"
char *str_dup(char *s)
{
char *new = xmalloc(strlen(s) + 1);
strcpy(new, s);
return new;
}