/* Prompt for environment variable Interactively edit an environment variable Look up variable from environment, return address of storage for that variable, or NULL if not found  */
char* env_get(const char *name)
/* Prompt for environment variable Interactively edit an environment variable Look up variable from environment, return address of storage for that variable, or NULL if not found  */
char* env_get(const char *name)
{
	if (gd->flags & GD_FLG_ENV_READY) {
		struct env_entry e, *ep;
		WATCHDOG_RESET();
		e.key	= name;
		e.data	= NULL;
		hsearch_r(e, ENV_FIND, &ep, &env_htab, 0);
		return ep ? ep->data : NULL;
	}
	if (env_get_f(name, (char *)(gd->env_buf), sizeof(gd->env_buf)) > 0)
		return (char *)(gd->env_buf);
	return NULL;
}