」 feat: Parsing working but not handling error

This commit is contained in:
2024-05-31 19:26:09 +02:00
parent 6bbdef9d7c
commit 5a71c50897
7 changed files with 57 additions and 32 deletions

View File

@ -0,0 +1,29 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_cmd_list.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/31 12:47:13 by adjoly #+# #+# */
/* Updated: 2024/05/31 13:29:46 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "parsing.h"
t_list *get_cmd_list(t_list *list)
{
t_list *tmp;
t_list *cmd_list;
tmp = list;
cmd_list = NULL;
while (tmp)
{
ft_lstadd_back(&cmd_list, ft_lstnew(get_redir_fd(tmp->content)));
tmp = tmp->next;
}
return (cmd_list);
}