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> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/18 20:13:50 by adjoly #+# #+# */
|
/* 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_list *tmp;
|
||||||
t_cmd *ret;
|
t_cmd *ret;
|
||||||
|
|
||||||
(void)(env);
|
|
||||||
piped = __split_pipe(readline);
|
piped = __split_pipe(readline);
|
||||||
free(readline);
|
free(readline);
|
||||||
cmd = NULL;
|
cmd = NULL;
|
||||||
@ -39,22 +38,15 @@ t_list *tokenizer(char *readline, t_env *env)
|
|||||||
while (tmp)
|
while (tmp)
|
||||||
{
|
{
|
||||||
ret = __to_cmd(split_argv(env_var_replace(tmp->content, env)));
|
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));
|
ft_lstadd_back(&cmd, ft_lstnew(ret));
|
||||||
if (!cmd)
|
if (!ret || ((t_cmd *)ret)->infile == -2 || !cmd)
|
||||||
return (clear_all(cmd, piped));
|
return (clear_all(cmd, piped));
|
||||||
if (!cmd->next)
|
if (!cmd->next)
|
||||||
get_list2(&cmd);
|
get_list2(&cmd);
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
ft_lstclear(&piped, free);
|
|
||||||
if (check_redir(cmd))
|
if (check_redir(cmd))
|
||||||
{
|
return (clear_all(cmd, piped));
|
||||||
ft_lstclear(&cmd, free_cmd);
|
ft_lstclear(&piped, free);
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
return (cmd);
|
return (cmd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user