execute ok, il manque les heredocs

This commit is contained in:
hugogogo
2021-10-30 15:34:45 +02:00
parent 118e2e5bef
commit 698dcbe1ed
2 changed files with 26 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
/* Updated: 2021/10/30 14:37:31 by hulamy ### ########.fr */
/* Updated: 2021/10/30 15:32:49 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -77,14 +77,17 @@ void shell_loop(t_all *c)
// builtin_echo(ft_lstsize((t_list *)c->token_list) + 1, tokens_list_to_argv(c->token_list), c);
// else
// {
c->cmd_arr = parsing(c->token_list, c->envp);
if (c->cmd_arr == NULL)
ft_putstr_fd("Syntax KO:\n-----------\n", 1);
else
ft_putstr_fd("Syntax OK:\n-----------\n", 1);
ft_putstr_fd("TOKENS LIST :\n-----------\n", 1);
ft_lstprint((t_list *)c->token_list, 1);
// execute_cmd(c->envp, c->cmd_arr);
// else
// ft_putstr_fd("Syntax OK:\n-----------\n", 1);
// ft_putstr_fd("TOKENS LIST :\n-----------\n", 1);
// ft_lstprint((t_list *)c->token_list, 1);
execute_cmd(c->envp, c->cmd_arr);
ft_lstclear((t_list **)&c->token_list, free);
// }
}