/* ************************************************************************** */ /* */ /* :::::::: */ /* environment_parse.c :+: :+: */ /* +:+ */ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/02/05 15:52:33 by whaffman #+# #+# */ /* Updated: 2025/02/11 17:18:43 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ #include "minishell.h" int environment_parse(char **envp, t_list **environment) { char **env; *environment = NULL; if (envp == NULL) return (FAILURE); while (*envp != NULL) { env = ft_split(*envp, '='); environment_add(environment, env[0], env[1]); ft_free_arr(env); envp++; } return (SUCCESS); }