-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.h
39 lines (35 loc) · 1.6 KB
/
env.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* env.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbudau <gbudau@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/09 17:54:37 by gbudau #+# #+# */
/* Updated: 2021/01/27 21:07:29 by gbudau ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef ENV_H
# define ENV_H
# include "minishell.h"
# include "libft.h"
enum e_environ
{
ENV_NAME,
ENV_VALUE
};
void init_env(t_list **environ);
void print_env(t_list *environ);
char *get_env(t_list *environ, char *match);
void set_env(t_list **environ, char **newenv);
void clear_env(void *content);
int compare_env(const void *content, const void *match);
int unset_env(t_list **environ, char *env);
void add_env_front(t_list **environ, char **env);
int is_env_format(char c, int flag);
int verify_env(const char *str);
char **split_env(const char *str, int idx);
void create_and_set_env(t_list **environ, char *name, char *value);
char *double_quoting(const char *str);
int compare_env_name(const void *a, const void *b);
#endif