diff options
| author | Christopher Uhlig | 2025-01-25 13:01:10 +0100 |
|---|---|---|
| committer | Christopher Uhlig | 2025-01-25 13:01:10 +0100 |
| commit | 87b90103930d83d74baa998866b0995cb8887d51 (patch) | |
| tree | 0eb876341c2794f2165b83c1d339fb3b38e9f711 /src/praise_the_norme.c | |
| parent | 18fb7cb8ae69fc3439266a154aa6b0f947d6805d (diff) | |
| download | minishell-87b90103930d83d74baa998866b0995cb8887d51.tar.gz minishell-87b90103930d83d74baa998866b0995cb8887d51.zip | |
fixed leaks in tokenizer and collectargs also fixed seg for < > and improved value add by $ use
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 |
