ref: 466cf20d3524b8e42edc333a6d2df2a01e99a95b
dir: /sys/src/ape/lib/ap/gen/getenv.c/
#include <stdlib.h> extern char **environ; char * getenv(const char *name) { char **p = environ; char *s1, *s2; while (*p != NULL){ for(s1 = (char *)name, s2 = *p++; *s1 == *s2; s1++, s2++) continue; if(*s1 == '\0' && *s2 == '=') return s2+1; } return NULL ; }