#include "enviroment.h" #include "libft.h" #include #include void add_enviroment(t_enviroment **enviroment, char *name, char *value) { t_enviroment *new_enviroment; if (name != NULL && value != NULL) { new_enviroment = malloc(sizeof(t_enviroment)); if (new_enviroment == NULL) { perror("malloc"); return ; } new_enviroment->name = ft_strdup(name); new_enviroment->value = ft_strdup(value); new_enviroment->next = *enviroment; *enviroment = new_enviroment; } }