/* s1 is either a simple 'name', or a 'name=value' pair. s2 is a 'name=value' pair. If the names match, return the value of s2, else NULL.  */
static char * envmatch(char *s1, char *s2)
/* s1 is either a simple 'name', or a 'name=value' pair. s2 is a 'name=value' pair. If the names match, return the value of s2, else NULL.  */
static char * envmatch(char *s1, char *s2)
{
	while (*s1 == *s2++)
		if (*s1++ == '=')
			return s2;
	if (*s1 == '\0' && *(s2 - 1) == '=')
		return s2;
	return NULL;
}