2024-09-24 19:18:38 -04:00

17 lines
237 B
C

#include <stdlib.h>
#include <strings.h>
#include "util.h"
string String(char *s)
{
string p = checked_malloc(strlen(s)+1);
strcpy(p,s);
return p;
}
void *checked_malloc(int len)
{
void *p = malloc(len);
assert(p);
return p;
}