diff options
Diffstat (limited to '')
-rw-r--r-- | src/e_externs_next.c (renamed from src/ft_e_externs_next.c) | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ft_e_externs_next.c b/src/e_externs_next.c index 36bf5e6..ba3c2d5 100644 --- a/src/ft_e_externs_next.c +++ b/src/e_externs_next.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_e_externs_next.c :+: :+: :+: */ +/* e_externs_next.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -15,13 +15,13 @@ #include <stdlib.h> #include <stddef.h> -#include "ft_f_fail.h" -#include "ft_s_destroy.h" -#include "ft_s_lcom.h" -#include "ft_s_struct.h" +#include "f_fail.h" +#include "s_destroy.h" +#include "s_lcom.h" +#include "s_struct.h" static char - *ft_get_fullpath(const char p_path[], + *get_fullpath(const char p_path[], const char d_name[], t_msh *msh) { @@ -31,19 +31,19 @@ static char if (!(fullpath = (char*)malloc((path_len + name_len + 2) * sizeof(char)))) { - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); - ft_fail_alloc(msh); + lcom_clear(&msh->curr); + s_destroy(msh); + fail_alloc(msh); } - ft_memcpy(fullpath, p_path, path_len); + (void)ft_memcpy(fullpath, p_path, path_len); *(fullpath + (path_len)) = '/'; - ft_memcpy(fullpath + path_len + 1, d_name, name_len); + (void)ft_memcpy(fullpath + path_len + 1, d_name, name_len); *(fullpath + (path_len + name_len + 1)) = '\0'; return (fullpath); } char - *ft_search_in_path(const char com[], + *search_in_path(const char com[], char *envpath[], t_msh *msh) { @@ -63,7 +63,7 @@ char /* TODO: check for not bins (dirs, etc) */ if (ft_strncmp(com, ent->d_name, ft_strlen(com) + 1) == 0) { - fullpath = ft_get_fullpath(*p_path, ent->d_name, msh); + fullpath = get_fullpath(*p_path, ent->d_name, msh); closedir(dir); return (fullpath); } @@ -76,7 +76,7 @@ char } char - **ft_get_env_path(t_msh *msh) + **get_env_path(t_msh *msh) { char **p_env; char **envpath; @@ -95,9 +95,9 @@ char { if (!(envpath = ft_split(envline, ':'))) { - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); - ft_fail_alloc(msh); + lcom_clear(&msh->curr); + s_destroy(msh); + fail_alloc(msh); } return (envpath); } |