25 lines
664 B
C
25 lines
664 B
C
|
#ifndef ENV_H
|
||
|
# define ENV_H
|
||
|
# include "../libftx/libft/list.h"
|
||
|
# include "../data/data.h"
|
||
|
|
||
|
typedef struct s_env
|
||
|
{
|
||
|
char *key;
|
||
|
char *value;
|
||
|
} 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
|