diff options
Diffstat (limited to 'src/env.c')
| -rw-r--r-- | src/env.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -10,10 +10,25 @@ /* */ /* ************************************************************************** */ +/** +** \file env.c +** \brief Environment hash table manipulation +*/ + #include "minishell.h" +/** +** \brief Number of buckets of an environment hash table +*/ + #define MS_ENV_HT_SIZE 2048 +/** +** \brief Convert array of string to environment hash table +** \param envp array of string (each in the format `name=value`) +** \return Environment hash table or NULL on error +*/ + t_env ms_env_from_array(char **envp) { t_env env; @@ -42,6 +57,12 @@ t_env ms_env_from_array(char **envp) return (env); } +/** +** \brief Convert environment to array of string +** \param env Environment hash table +** \return Array of string on NULL on error +*/ + char **ms_env_to_array(t_env env) { (void)env; |
