From 941099778b59da6b904c284e8a82affe4766124b Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 30 Mar 2020 22:27:16 +0200 Subject: Added doc --- src/path.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/path.c') diff --git a/src/path.c b/src/path.c index 3ac12d9..c2b6582 100644 --- a/src/path.c +++ b/src/path.c @@ -10,12 +10,24 @@ /* */ /* ************************************************************************** */ +/** +** \file path.c +** \brief Path hash table manipulation +*/ + #include "minishell.h" +/** +** \brief Number of buckets of a path hash table +*/ + #define MS_PATH_HT_SIZE 4096 -/* -** Update `path` with all files in the directory named `dirname`. +/** +** \brief Update `path` with all files in the directory named `dirname`. +** \param path Path hash table +** \param dirname directory name +** \return Same path or NULL on error */ static t_path st_path_dir_update(t_path path, char *dirname) @@ -38,9 +50,11 @@ static t_path st_path_dir_update(t_path path, char *dirname) return (path); } -/* -** Update (or create if `path` is NULL) `path` according to `path_str` -** (each directory is separated by a ':'). +/** +** \brief Update the path +** \param path Path hash table or NULL to create a new one +** \param path_var PATH environment variable where each directory is separated by a ':' +** \return The updated/created path hash table or NULL on error */ t_path ms_path_update(t_path path, char *path_var) -- cgit