Files
klisp/util.c
2014-05-20 15:32:21 +01:00

12 lines
192 B
C

#include <string.h>
#include <stdlib.h>
#include "util.h"
char * strdup(char* s) {
char *d = calloc(1, strlen (s) + 1);
if (d == NULL) return NULL;
strcpy (d,s);
return d;
}