33 if (!shell_var || !line)
41 new_node->
next = NULL;
42 if (*shell_var == NULL)
43 *shell_var = new_node;
46 curr_node = *shell_var;
47 while (curr_node->
next != NULL)
48 curr_node = curr_node->
next;
49 curr_node->
next = new_node;
67 current = current->
next;
69 new_env = malloc(
sizeof(
t_env));
72 new_env->
next = *shell_var;
80 curr_node = shell_var;
84 return (curr_node->
value);
85 curr_node = curr_node->
next;
95 curr_node = shell_var;
98 next_node = curr_node->
next;
100 free(curr_node->
value);
102 curr_node = next_node;
char * ft_strcdup(const char *s, int c)
int ft_strcmp(const char *s1, const char *s2)
char * ft_strchr(const char *s, int c)
char * ft_strdup(const char *s)
void set_shell_var(t_env **shell_var, const char *key, const char *value)
char * get_shell_variable(t_env *shell_var, const char *key)
void free_shell_var_list(t_env *shell_var)
void add_shell_var_node(t_env **shell_var, const char *line)