minishell/inc/environment.h
whaffman ab72bd5bbb malloc_safe
- add freelist to minishell
- add t_minishell *minishell to all function calling malloc_free
- substituted all malloc calls but the first to malloc_safe
2025-02-25 14:54:17 +01:00

29 lines
1.4 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* environment.h :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/02/04 16:26:35 by whaffman #+# #+# */
/* Updated: 2025/02/25 13:31:55 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef ENVIRONMENT_H
# define ENVIRONMENT_H
# include "minishell.h"
void environment_add(t_minishell *minishell,
char *name, char *value);
void environment_print(t_minishell *minishell);
t_environment *environment_get(t_minishell *minishell, char *name);
void environment_free_list(t_minishell *minishell);
int environment_parse(t_minishell *minishell, char **envp);
char **environment_get_arr(t_minishell *minishell);
void environment_del(t_minishell *minishell, char *name);
void environment_free(void *content);
#endif // ENVIRONMENT_H