aboutsummaryrefslogtreecommitdiff
path: root/src/env.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-30 22:27:16 +0200
committerCharles <sircharlesaze@gmail.com>2020-03-30 22:27:16 +0200
commit941099778b59da6b904c284e8a82affe4766124b (patch)
tree4457787a1b09408fcd1a5607109cc1c902c80af8 /src/env.c
parent74787eefa2ac85d85b484d0ca5dffc6a2a13331d (diff)
downloadminishell-941099778b59da6b904c284e8a82affe4766124b.tar.gz
minishell-941099778b59da6b904c284e8a82affe4766124b.tar.bz2
minishell-941099778b59da6b904c284e8a82affe4766124b.zip
Added doc
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;