33 shlvl_num = ft_atoi(shlvl_str);
38 new_shlvl = ft_itoa(shlvl_num);
59 if (getcwd(cwd, PATH_MAX))
101 current = current->
next;
Environment variable management prototypes.
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.
int env_list_size(t_env *env_list)
Count the number of nodes in the environment list.
void ensure_pwd(t_env **env_list)
Ensure PWD exists in the environment.
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.
Environment variable (doubly linked list)
char * value
Value (NULL if export only)
struct s_env * next
Next node.