42_minishell/env/env.h

27 lines
702 B
C
Raw Normal View History

#ifndef ENV_H
# define ENV_H
2023-03-10 06:37:09 -05:00
# include <stdbool.h>
# include "../libftx/libft/list.h"
# include "../data/data.h"
typedef struct s_env
{
char *key;
char *value;
2023-03-10 06:37:09 -05:00
bool original;
} t_env;
char *ft_env_filler(t_data *data, const char *str);
void env_del(void *content);
t_list **init_env(char **env);
char **env_to_strs(t_list **head);
int create_value_by_key(char *key, char *value, t_list **head);
int create_value_by_key_dup(char *key, char *value, t_list **head);
int set_value_by_key(char *key, char *value, t_list **head);
char *get_value_by_key(char *key, t_list **head);
void env_del(void *ptr);
int delete_by_key(char *key, t_list **head);
int possible_key(char *key);
#endif