diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:27:16 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:27:16 +0200 |
| commit | 941099778b59da6b904c284e8a82affe4766124b (patch) | |
| tree | 4457787a1b09408fcd1a5607109cc1c902c80af8 /src/env.c | |
| parent | 74787eefa2ac85d85b484d0ca5dffc6a2a13331d (diff) | |
| download | minishell-941099778b59da6b904c284e8a82affe4766124b.tar.gz minishell-941099778b59da6b904c284e8a82affe4766124b.tar.bz2 minishell-941099778b59da6b904c284e8a82affe4766124b.zip | |
Added doc
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; |
