From 5373e9e53accb20438d92a78224221734786d051 Mon Sep 17 00:00:00 2001 From: Christopher Uhlig Date: Thu, 29 Aug 2024 15:57:14 +0200 Subject: [PATCH] added other token append to remove the error that its not at the start --- src/new_token.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/new_token.c b/src/new_token.c index 92ff421..6431c7d 100644 --- a/src/new_token.c +++ b/src/new_token.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* new_token.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: dkaiser +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/27 14:29:44 by dkaiser #+# #+# */ -/* Updated: 2024/06/28 14:59:34 by dkaiser ### ########.fr */ +/* Updated: 2024/08/29 15:30:52 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -50,3 +50,28 @@ t_token *new_redir_token(int type, t_token *previous, t_token *next) token->content.redir_type = type; return (token); } + +// void ft_append_token(int type, t_token **list)// but we need somewhere token/node head initialize with nul +// { +// t_token *node; +// t_token *last_node; + +// if (!list) +// return ; +// node = malloc(sizeof(t_token)); +// if (!node) +// return ; +// node->next = NULL; +// node->type = type; +// if (!*list) +// { +// *list = node; +// node->previous = NULL; +// } +// else +// { +// last_node = ft_lstlast(*list); +// last_node->next = node; +// node->previous = last_node; +// } +// } \ No newline at end of file -- 2.47.2