maxishell
Implementation of a shell for Linux-like systems
|
Go to the source code of this file.
Functions | |
void | init_env (t_env **data_envp, char **envp) |
void | add_env_node (t_env **data_envp, char *line) |
char * | get_env (t_env *envp, const char *key) |
void | set_env (t_env **env, const char *key, const char *value) |
int | unset_env (t_env **env, const char *name) |
void add_env_node | ( | t_env ** | data_envp, |
char * | line | ||
) |
Definition at line 33 of file env.c.
References ft_strchr(), ft_strdup(), ft_strndup(), s_env::key, s_env::next, and s_env::value.
Referenced by init_env().
char * get_env | ( | t_env * | envp, |
const char * | key | ||
) |
Definition at line 59 of file env.c.
References ft_strcmp(), s_env::key, s_env::next, and s_env::value.
Referenced by builtin_cd(), ft_find_path(), generate_prompt_string(), get_env_variable(), handle_get_shell_variable(), test_get_env(), test_set_env(), and test_unset_env().
void init_env | ( | t_env ** | data_envp, |
char ** | envp | ||
) |
Definition at line 24 of file env.c.
References add_env_node().
Referenced by init_ms_data(), test_get_env(), test_init_env(), and test_set_env().
void set_env | ( | t_env ** | env, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 73 of file env.c.
References ft_strcmp(), ft_strdup(), s_env::key, s_env::next, and s_env::value.
Referenced by add_env(), builtin_cd(), test_set_env(), and test_unset_env().
int unset_env | ( | t_env ** | env, |
const char * | name | ||
) |
Definition at line 96 of file env.c.
References ft_strcmp(), s_env::key, s_env::next, and s_env::value.
Referenced by builtin_unset(), and test_unset_env().