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/path.c | |
| parent | 74787eefa2ac85d85b484d0ca5dffc6a2a13331d (diff) | |
| download | minishell-941099778b59da6b904c284e8a82affe4766124b.tar.gz minishell-941099778b59da6b904c284e8a82affe4766124b.tar.bz2 minishell-941099778b59da6b904c284e8a82affe4766124b.zip | |
Added doc
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) |
