/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* check_redir.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/09 16:32:21 by adjoly #+# #+# */ /* Updated: 2024/07/09 23:09:41 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "parsing.h" #include "error_msg.h" #include "minishell.h" bool check_redir(t_list *list) { t_list *tmp; t_cmd *cmd; tmp = list; while (tmp) { cmd = (t_cmd *)tmp->content; if (cmd->infile == -1 || cmd->outfile == -1) return (send_error_parsing(ERROR_NO_FILE)); tmp = tmp->next; } return (false); }