/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* cmd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet args != NULL) ft_freer_tab_ultimate(1, content->args); if (content->executable != NULL) free(content->executable); if (content->fd_in > 2) close(content->fd_in); if (content->fd_out > 2) close(content->fd_in); free(content); } int ft_cmd_filler(t_list *element, char **args, t_list **env) { t_cmd *content; char *temp; size_t i; if (args == NULL) return (1); content = (t_cmd *)element->content; i = 0; while (args[i] != NULL) { temp = ft_env_filler(env, args[i]); if (temp == NULL) return (1); free(args[i]); args[i] = temp; ft_quote_remover(temp); i++; } content->args = args; content->executable = args[0]; return (0); }