aboutsummaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/env.c b/src/env.c
index 04ab561..c019cb4 100644
--- a/src/env.c
+++ b/src/env.c
@@ -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;