21void set_env(
t_env **env,
const char *key,
const char *value);
33 while (str[start_quotes] == quote_type)
36 while (len - end_quotes - 1 >= 0 && str[len - end_quotes - 1] == quote_type)
38 if (start_quotes > 0 && start_quotes == end_quotes)
40 new_str =
ft_strndup(str + start_quotes, len - 2 * start_quotes);
61 new_node = malloc(
sizeof(
t_env));
69 new_node->
next = NULL;
71 *data_envp = new_node;
77 curr->
next = new_node;
89 return (curr_node->
value);
90 curr_node = curr_node->
next;
109 *env = current->
next;
111 free(current->
value);
116 current = current->
next;
int unset_env(t_env **env, const char *name)
void set_env(t_env **env, const char *key, const char *value)
void init_env(t_env **data_envp, char **envp)
char * get_env(t_env *envp, const char *key)
char * ft_remove_all_edge_quotes(char *str, char quote_type)
void add_env_node(t_env **data_envp, char *line)
int ft_strcmp(const char *s1, const char *s2)
char * ft_strndup(const char *s, size_t n)
char * ft_strchr(const char *s, int c)
size_t ft_strlen(const char *s)
char * ft_strdup(const char *s)