/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* env_to_strlst.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: dkaiser next; } result = malloc(sizeof(char *) * (size + 1)); if (result == NULL) return (NULL); i = 0; cur = env; while (i < size) { result[i] = get_var_assign(cur); cur = cur->next; i++; } result[i] = NULL; return (result); } static char *get_var_assign(t_env *cur) { char *left_side; char *result; left_side = ft_strjoin(cur->name, "="); if (left_side == NULL) return (NULL); result = ft_strjoin(left_side, cur->value); free(left_side); return (result); }