scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <string.h>
 2#include <stdlib.h>
 3
 4#undef strdup
 5
 6char *
 7strdup(const char *s)
 8{
 9	char *newstr;
10	size_t len = strlen(s);
11
12	if ((newstr = malloc(len + 1)) == NULL)
13		return NULL;
14	return memcpy(newstr, s, len + 1);
15}