/* ************************************************************************** */
/*                                                                            */
/*                                                        ::::::::            */
/*   redirect.h                                         :+:    :+:            */
/*                                                     +:+                    */
/*   By: qmennen <qmennen@student.codam.nl>           +#+                     */
/*                                                   +#+                      */
/*   Created: 2025/02/23 12:26:29 by Quinten       #+#    #+#                 */
/*   Updated: 2025/02/28 14:08:33 by whaffman      ########   odam.nl         */
/*                                                                            */
/* ************************************************************************** */

#ifndef REDIRECT_H
# define REDIRECT_H
# include "minishell.h"

t_redirect	*redirect_new(t_minishell *msh, t_token_type type, char *value);
void		redirect_new_error(t_minishell *msh, t_list **redirects, int flag);
int			redirect_create(t_minishell *msh, t_list **tokens,
				t_list **redirects, t_token_type type);
t_list		*redirect_get_inputs(t_minishell *msh, t_list *list);
t_list		*redirect_get_outputs(t_minishell *msh, t_list *list);
int			redirect_is_valid(t_list *lst, t_token *token, int mode);
int			redirect_token_type(t_token *token);
int			redirect_is_delimiter(t_token *token);
int			process_heredoc(t_minishell *msh, t_token *heredoc, t_token *delim);

#endif
