envlist_to_environ(const envlist_t *envlist, size_t *count)

{

	struct envlist_entry *entry;

	char **env, **penv;



	penv = env = malloc((envlist->el_count + 1) * sizeof (char *));

	if (env == NULL)

		return (NULL);



	for (entry = envlist->el_entries.lh_first; entry != NULL;

	    entry = entry->ev_link.le_next) {

		*(penv++) = strdup(entry->ev_var);

	}

	*penv = NULL; /* NULL terminate the list */



	if (count != NULL)

		*count = envlist->el_count;



	return (env);

}

envlist_to_environ(const envlist_t *envlist, size_t *count)

{

	struct envlist_entry *entry;

	char **env, **penv;



	penv = env = malloc((envlist->el_count + 1) * sizeof (char *));

	if (env == NULL)

		return (NULL);



	for (entry = envlist->el_entries.lh_first; entry != NULL;

	    entry = entry->ev_link.le_next) {

		*(penv++) = strdup(entry->ev_var);

	}

	*penv = NULL; 



	if (count != NULL)

		*count = envlist->el_count;



	return (env);

}

		return (NULL); 	penv = env = malloc((envlist->el_count + 1) * sizeof (char *)); 	if (env == NULL) 		return (NULL); 		*(penv++) = strdup(entry->ev_var);
FUNC_0(const envlist_t *VAR_0, size_t *VAR_1)

{

	struct envlist_entry *VAR_2;

	char **VAR_3, **VAR_4;



	VAR_4 = VAR_3 = malloc((VAR_0->el_count + 1) * sizeof (char *));

	if (VAR_3 == NULL)

		return (NULL);



	for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NULL;

	    VAR_2 = VAR_2->ev_link.le_next) {

		*(VAR_4++) = strdup(VAR_2->ev_var);

	}

	*VAR_4 = NULL; 



	if (VAR_1 != NULL)

		*VAR_1 = VAR_0->el_count;



	return (VAR_3);

}

FUNC_0(const envlist_t *VAR_0, size_t *VAR_1)
{ struct envlist_entry *VAR_2; char **VAR_3, **VAR_4; VAR_4 = VAR_3 = malloc((VAR_0->el_count + 1) * sizeof (char *)); if (VAR_3 == NULL)
return (NULL); for (VAR_2 = VAR_0->el_entries.lh_first; VAR_2 != NULL; VAR_2 = VAR_2->ev_link.le_next) { *(VAR_4++) = strdup(VAR_2->ev_var); } *VAR_4 = NULL; if (VAR_1 != NULL)
*VAR_1 = VAR_0->el_count; return (VAR_3); }