diff options
Diffstat (limited to 'src/praise_the_norme.c')
| -rw-r--r-- | src/praise_the_norme.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/praise_the_norme.c b/src/praise_the_norme.c index 5639b7d..7b72172 100644 --- a/src/praise_the_norme.c +++ b/src/praise_the_norme.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/20 18:35:41 by dkaiser #+# #+# */ -/* Updated: 2025/01/23 18:31:49 by chuhlig ### ########.fr */ +/* Updated: 2025/01/25 11:34:26 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,19 +16,15 @@ void i_love_the_norme(t_token **cur, t_token **tokens) { t_token *next_token; - next_token = (*cur)->next;//setting next token to the adress of the next token - free_token_and_connect(*cur);// do i neee a double call here - //but technically it would remove the redir token - if (next_token)// if after redir is stuff + next_token = (*cur)->next; + free_token_and_connect2(*cur); + if (next_token) { - if (next_token->previous == NULL)// then if is the first token or token after pipe - *tokens = next_token->next;// how does here come no error - //anyways i twould the redir adress token to the next token + if (next_token->previous == NULL) + *tokens = next_token->next; *cur = next_token->next; free_token_and_connect(next_token); } - else // else makes sense + else *cur = NULL; } - -// takes adress of token head or pos after pipe and the token specifer
\ No newline at end of file |
