char ** env_to_array(t_env *env)
Convert the env linked list to a NULL terminated string array.
int env_list_size(t_env *env_list)
Count the number of nodes in the environment list.
t_env * create_env_node(char *env_string)
Create a single environment node from a KEY=value string.
void ensure_pwd(t_env **env_list)
Ensure PWD exists in the environment.
void add_env_node(t_env **head, t_env *new_node)
Add a node to the end of the environment linked list.
int set_env_value(t_env **env_list, char *key, char *value)
Set or create an environment variable.
char * get_env_value(t_env *env_list, char *key)
Look up an environment variable's value by its key.
void handle_shlvl(t_env **env_list)
Increment the SHLVL environment variable.
void free_env_list(t_env **env_list)
Free all nodes in the env linked list.
t_env * init_env(char **envp)
Initialize the environment linked list from main()'s envp.
Central type definitions for mandatory part.
Environment variable (doubly linked list)