mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 03:16:51 +01:00
「✏️」 norm: normed project.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user