✏️」 norm: normed project.

This commit is contained in:
2024-08-13 16:34:53 +02:00
parent 26d351586a
commit 8deeac5d93
2 changed files with 4 additions and 12 deletions

0
non
View File

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/18 20:13:50 by adjoly #+# #+# */
/* Updated: 2024/08/13 15:53:00 by adjoly ### ########.fr */
/* Updated: 2024/08/13 16:33:04 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -30,7 +30,6 @@ t_list *tokenizer(char *readline, t_env *env)
t_list *tmp;
t_cmd *ret;
(void)(env);
piped = __split_pipe(readline);
free(readline);
cmd = NULL;
@ -39,22 +38,15 @@ t_list *tokenizer(char *readline, t_env *env)
while (tmp)
{
ret = __to_cmd(split_argv(env_var_replace(tmp->content, env)));
if (!ret)
return (clear_all(cmd, piped));
if (((t_cmd *)ret)->infile == -2)
return (clear_all(cmd, piped));
ft_lstadd_back(&cmd, ft_lstnew(ret));
if (!cmd)
if (!ret || ((t_cmd *)ret)->infile == -2 || !cmd)
return (clear_all(cmd, piped));
if (!cmd->next)
get_list2(&cmd);
tmp = tmp->next;
}
ft_lstclear(&piped, free);
if (check_redir(cmd))
{
ft_lstclear(&cmd, free_cmd);
return (NULL);
}
return (clear_all(cmd, piped));
ft_lstclear(&piped, free);
return (cmd);
}