aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/builtins_part_two.c2
-rw-r--r--src/env.c2
-rw-r--r--src/interpreter.c1
-rw-r--r--src/new_token.c29
-rw-r--r--src/tokenizer.c2
5 files changed, 31 insertions, 5 deletions
diff --git a/src/builtins_part_two.c b/src/builtins_part_two.c
index 9fabc81..d3c0929 100644
--- a/src/builtins_part_two.c
+++ b/src/builtins_part_two.c
@@ -59,7 +59,7 @@ void update_pwd(t_env **env)
int cd(t_env **env, char **av)
{
t_env *current;
-
+
current = *env;
if (av[1] == NULL)
{
diff --git a/src/env.c b/src/env.c
index cc9cfae..63a0f8a 100644
--- a/src/env.c
+++ b/src/env.c
@@ -78,4 +78,4 @@ void free_env_node(t_env *node)
free(node->name);
free(node->value);
free(node);
-}
+} \ No newline at end of file
diff --git a/src/interpreter.c b/src/interpreter.c
index f31e965..6d71022 100644
--- a/src/interpreter.c
+++ b/src/interpreter.c
@@ -53,3 +53,4 @@ int eval(t_node *node, t_env **env)
{
return (eval_rec(node, env, STDIN_FILENO));
}
+
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 <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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
diff --git a/src/tokenizer.c b/src/tokenizer.c
index eb5d8fe..e202de6 100644
--- a/src/tokenizer.c
+++ b/src/tokenizer.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/28 20:55:50 by chuhlig #+# #+# */
-/* Updated: 2025/01/16 18:57:38 by dkaiser ### ########.fr */
+/* Updated: 2024/10/17 14:21:26 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */