aboutsummaryrefslogtreecommitdiff
path: root/src/parse_cmd.c
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-20 18:41:55 +0100
committerDominik Kaiser2025-01-20 18:41:55 +0100
commit4e249399780b53dad6fa1bf6db8a7c6d32ee2d13 (patch)
tree21ec55386702455222d320cbf270f3c2065ccc3a /src/parse_cmd.c
parenteceed405102e019b1f001751de60f5534be0a0ef (diff)
downloadminishell-4e249399780b53dad6fa1bf6db8a7c6d32ee2d13.tar.gz
minishell-4e249399780b53dad6fa1bf6db8a7c6d32ee2d13.zip
I love the norme sooooooooooo much!!!!
Diffstat (limited to 'src/parse_cmd.c')
-rw-r--r--src/parse_cmd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/parse_cmd.c b/src/parse_cmd.c
index 5502f74..b30d126 100644
--- a/src/parse_cmd.c
+++ b/src/parse_cmd.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/08 15:06:25 by dkaiser #+# #+# */
-/* Updated: 2025/01/20 17:30:06 by dkaiser ### ########.fr */
+/* Updated: 2025/01/20 17:57:50 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,10 +35,10 @@ t_node *parse_cmd(t_token *tokens, t_env **env)
static char **collect_args(t_token **tokens, t_env **env)
{
- t_token *cur;
- t_token *next; // 2
- char **result;
- int i;
+ t_token *cur;
+ char **result;
+ int i;
+ t_token *next;
cur = *tokens;
i = 0;
@@ -51,13 +51,12 @@ static char **collect_args(t_token **tokens, t_env **env)
i = 0;
while (cur != NULL && cur->type == STRING_TOKEN)
{
- next = cur->next; // 2
+ next = cur->next;
if (cur->previous)
free_token(cur->previous);
result[i] = format_string(cur->content.string, *env, ft_atoi("0"));
i++;
- // cur = cur->next;
- cur = next; // 2
+ cur = next;
}
result[i] = NULL;
return (result);