diff --git a/include/include.h b/include/include.h index 338de2b..81ed7fd 100644 --- a/include/include.h +++ b/include/include.h @@ -6,7 +6,7 @@ /* By: mcolonna +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */ -/* Updated: 2024/04/29 15:48:25 by mcolonna ### ########.fr */ +/* Updated: 2024/04/29 15:56:26 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,8 +77,10 @@ void fatal_error(const char *msg); // Return a list of strings ended by NULL. char **get_path(char *const envp[]); -// Search the program in PATH. +// Search the program in $PATH. // Returns the path of the program to use, or NULL if there is none. +// If there is several possibilities, it returns the one from the first path +// given in $PATH. const char *search_path( const t_memclass mc, const char **path, const char *prog); diff --git a/src/exec_command.c b/src/exec_command.c index 7a28b44..1440798 100644 --- a/src/exec_command.c +++ b/src/exec_command.c @@ -6,7 +6,7 @@ /* By: jschaft +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/24 13:48:00 by jschaft #+# #+# */ -/* Updated: 2024/04/26 14:21:15 by mcolonna ### ########.fr */ +/* Updated: 2024/04/29 15:51:00 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,7 +26,6 @@ static void free_tab(char **tab) free(tab); } -// TODO is t_call.argv ended by NULL? static void fork_exec(const char *path, t_call call, const int inout[2], char *const envp[]) { diff --git a/src/path.c b/src/path.c index 8283163..be44a0e 100644 --- a/src/path.c +++ b/src/path.c @@ -6,7 +6,7 @@ /* By: jschaft +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/16 12:07:26 by jschaft #+# #+# */ -/* Updated: 2024/04/26 12:24:41 by mcolonna ### ########.fr */ +/* Updated: 2024/04/29 15:54:40 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -27,7 +27,6 @@ char **get_path(char *const envp[]) return (re); } -// TODO does it return the good path if there is several possibilities? const char *search_path( const t_memclass mc, const char **path, const char *prog) {