diff options
Diffstat (limited to 'src/path.c')
| -rw-r--r-- | src/path.c | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -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) |
