aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDominik Kaiser2025-01-14 16:39:40 +0100
committerGitHub2025-01-14 16:39:40 +0100
commit553204e584dd08987902c7693e47744192e6bd85 (patch)
treeb0658fe9e82309111baf36018b45a397b279494e /include
parentf9fc11476a511d5fff51d3cf5d4a759060cac261 (diff)
parent36b693a56d4f0d2841d7323ca7ae8df900c611dc (diff)
downloadminishell-553204e584dd08987902c7693e47744192e6bd85.tar.gz
minishell-553204e584dd08987902c7693e47744192e6bd85.zip
Merge interpreter into main
Interpreter
Diffstat (limited to 'include')
-rw-r--r--include/env.h9
-rw-r--r--include/minishell.h10
2 files changed, 12 insertions, 7 deletions
diff --git a/include/env.h b/include/env.h
index 0d0b696..a35bec3 100644
--- a/include/env.h
+++ b/include/env.h
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/08 16:53:39 by dkaiser #+# #+# */
-/* Updated: 2024/10/17 15:37:32 by chuhlig ### ########.fr */
+/* Updated: 2024/10/25 19:53:38 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,6 +19,7 @@ typedef struct s_env
struct s_env *next;
} t_env;
-void getenvlst(t_env **env, char **en);
-void free_envlst(t_env **env);
-
+void getenvlst(t_env **env, char **en);
+void free_envlst(t_env **env);
+char *env_get(t_env *env, char *name);
+char **env_to_strlst(t_env *env); \ No newline at end of file
diff --git a/include/minishell.h b/include/minishell.h
index 6997b15..b2a3845 100644
--- a/include/minishell.h
+++ b/include/minishell.h
@@ -3,10 +3,10 @@
/* ::: :::::::: */
/* minishell.h :+: :+: :+: */
/* +:+ +:+ +:+ */
-/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:49 by dkaiser #+# #+# */
-/* Updated: 2024/08/11 12:22:07 by dkaiser ### ########.fr */
+/* Updated: 2024/10/25 16:10:21 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -29,11 +29,15 @@
int init(void);
int init_signal_handling(void);
-void repl(const char *prompt);
+void repl(const char *prompt, t_env **env);
t_list *parse(t_token *tokens);
t_node *parse_cmd(t_token *tokens);
t_redirection *collect_redirs(t_token **tokens);
void print_ast(t_node *ast);
+
+int eval(t_node *node, t_env **env);
+char *get_cmd_path(char *cmd, t_env *env);
+int execute_cmd(t_cmd *cmd, t_env *env);
#endif