diff --git a/include/execution.h b/include/execution.h index b542d12..77fef6b 100644 --- a/include/execution.h +++ b/include/execution.h @@ -6,7 +6,7 @@ /* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/29 13:20:22 by mmoussou #+# #+# */ -/* Updated: 2024/04/29 13:21:31 by mmoussou ### ########.fr */ +/* Updated: 2024/05/06 20:29:58 by mmoussou ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,4 +20,19 @@ typedef struct s_env struct s_env *next; } t_env; +int env_init(char **env_d, t_env *env); +void env_print(t_env *env); +char **env_get(t_env *env); +int env_append(char *name, char *content, t_env *env); +int env_edit(char *name, char *content, t_env *env); +int env_delete(char *name, t_env *env); + +void ft_envadd_back(t_env **env, t_env *new); +void ft_envadd_front(t_env **lst, t_env *new); +void ft_envclear(t_env **lst, void (*del)(void *)); +void ft_envdelone(t_env *lst, void (*del)(void *)); +t_env *ft_envlast(t_env *env); +t_env *ft_envnew(char *name, char *content); +uint ft_envsize(t_env *lst); + #endif diff --git a/include/minishell.h b/include/minishell.h index c80edc6..3871d2b 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,21 +6,22 @@ /* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/26 09:38:51 by mmoussou #+# #+# */ -/* Updated: 2024/05/02 15:31:38 by adjoly ### ########.fr */ +/* Updated: 2024/05/06 20:30:42 by mmoussou ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef MINISHELL_H # define MINISHELL_H -# include "parsing.h" -# include "execution.h" - # include <readline/readline.h> # include <stdio.h> # include <stdlib.h> +# include <stdint.h> # include "libft.h" +# include "parsing.h" +# include "execution.h" + char set_env(char **env, const char *name, char *content); char *get_hostname(void); char *get_prompt(void);