refonte de la gestion des cmd dans parsing

This commit is contained in:
hugogogo
2021-10-29 13:26:38 +02:00
parent b1b8a61921
commit 15bc4d2158
7 changed files with 182 additions and 48 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/28 20:45:09 by hulamy ### ########.fr */
/* Updated: 2021/10/29 12:49:08 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -79,11 +79,11 @@ void shell_loop(t_all *c)
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);
}
}