des trucs
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* utils2.c :+: :+: :+: */
|
||||
/* utils_bonus.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/27 17:19:27 by tomoron #+# #+# */
|
||||
/* Updated: 2024/03/28 13:55:48 by tomoron ### ########.fr */
|
||||
/* Updated: 2024/04/02 17:16:06 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -18,3 +18,23 @@ t_token *parsing_syntax_error(t_token *res)
|
||||
ft_putstr_fd("minishell: syntax error\n", 2);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int is_input_type(t_cmd *cmd)
|
||||
{
|
||||
return(cmd->cmd_type == HERE_DOC || cmd->cmd_type == RED_I);
|
||||
}
|
||||
|
||||
int is_output_type(t_cmd *cmd)
|
||||
{
|
||||
return(cmd->cmd_type == RED_O || cmd->cmd_type == RED_O_APP);
|
||||
}
|
||||
|
||||
int is_cmd_type(t_cmd *cmd)
|
||||
{
|
||||
return(cmd->cmd_type == CMD || cmd->cmd_type == PAREN);
|
||||
}
|
||||
|
||||
int is_operand_type(t_cmd *cmd)
|
||||
{
|
||||
return(cmd->cmd_type == AND || cmd->cmd_type == OR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user