scc

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

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

 1#include <sys.h>
 2
 3#include <stdlib.h>
 4#include <string.h>
 5
 6#undef getenv
 7
 8char *
 9getenv(const char *name)
10{
11	char **p, *s;
12	size_t len = strlen(name);
13
14	for (p = _environ; s = *p; ++p) {
15		if (!strncmp(name, s, len) && s[len] == '=')
16			return s + len + 1;
17	}
18	return NULL;
19}