diff --git a/include/minishell.h b/include/minishell.h index 4a3b4ff..6b61cd8 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -39,4 +39,7 @@ void free_redir(void *redir_v); void free_token(void *token_v); void free_cmd(void *content); +t_env **get_env(t_env **env); +t_list **get_list(t_list **list); + #endif diff --git a/src/exec/heredoc.c b/src/exec/heredoc.c index 65d0c4e..68738a7 100644 --- a/src/exec/heredoc.c +++ b/src/exec/heredoc.c @@ -6,7 +6,7 @@ /* By: mmoussou +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2024/07/09 17:24:15 by adjoly #+# #+# */ +/* Updated: 2024/07/09 18:05:07 by adjoly ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "env.h" +#include "libft.h" + +t_env **get_env(t_env **env) +{ + static t_env **ret; + + if (env) + ret = env; + return (ret); +} + +t_list **get_list(t_list **list) +{ + static t_list **ret; + + if (list) + ret = list; + return (ret); +} diff --git a/src/main.c b/src/main.c index 78aa710..4d0b65a 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: mmoussou