/* ************************************************************************** */ /* */ /* :::::::: */ /* parse_enviroment.c :+: :+: */ /* +:+ */ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/02/05 15:52:33 by whaffman #+# #+# */ /* Updated: 2025/02/05 15:52:34 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ #include "minishell.h" int parse_enviroment(char **envp, t_enviroment **enviroment) { char **env; *enviroment = NULL; if (envp == NULL) return (FAILURE); while (*envp != NULL) { env = ft_split(*envp, '='); add_enviroment(enviroment, env[0], env[1]); ft_free_arr(env); envp++; } return (SUCCESS); }