did some slight norming (200 lines of norminette and i'm not even done yet... :c)

This commit is contained in:
mdev9
2024-04-22 19:56:22 +02:00
parent 642a9ab232
commit e4df4a5655
15 changed files with 98 additions and 112 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/05 18:15:27 by marde-vr #+# #+# */
/* Updated: 2024/04/22 19:12:50 by marde-vr ### ########.fr */
/* Updated: 2024/04/22 19:50:00 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -27,7 +27,6 @@ void redirect_input(t_msh *msh, int i, char **cmd_args)
{
if (dup2(msh->fds[i - 1][0], 0) < 0)
{
perror("dup2"); //debug
free(cmd_args);
ft_exit(msh, 1);
}
@ -82,7 +81,8 @@ int get_in_type(t_msh *msh, t_cmd *tokens)
if (open_input_file(msh, &cur_token))
return (1);
}
if (cur_token && cur_token->next && !is_operand_type(cur_token->next) && cur_token->cmd_type != PIPE && cur_token->next->cmd_type != PIPE)
if (cur_token && cur_token->next && !is_operand_type(cur_token->next)
&& cur_token->cmd_type != PIPE && cur_token->next->cmd_type != PIPE)
return (get_in_type(msh, cur_token->next));
return (0);
}