diff options
Diffstat (limited to '')
-rw-r--r-- | src/e_builtins.c (renamed from src/ft_e_builtins.c) | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ft_e_builtins.c b/src/e_builtins.c index 382f85d..e35416a 100644 --- a/src/ft_e_builtins.c +++ b/src/e_builtins.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_e_builtins.c :+: :+: :+: */ +/* e_builtins.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -16,27 +16,27 @@ #include <stdint.h> #include <unistd.h> -#include "ft_m_redirs.h" -#include "ft_s_destroy.h" -#include "ft_s_lcom.h" -#include "ft_s_struct.h" +#include "m_redirs.h" +#include "s_destroy.h" +#include "s_lcom.h" +#include "s_struct.h" static void - ft_e_builtin_child(const t_lcom *ptr, + e_builtin_child(const t_lcom *ptr, uint8_t bu_id, t_msh *msh) { int32_t ret; - ft_dup_redirs(ptr, msh); + dup_redirs(ptr, msh); ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh); - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); + lcom_clear(&msh->curr); + s_destroy(msh); exit(ret); } static void - ft_e_builtin_parent(pid_t pid, + e_builtin_parent(pid_t pid, const t_lcom *ptr, uint8_t bu_id, t_msh *msh) @@ -60,14 +60,14 @@ static void ret = ft_atoi(ptr->argv[1]); else ret = msh->ret; - ft_lcom_clear(&msh->curr); - ft_s_destroy(msh); + lcom_clear(&msh->curr); + s_destroy(msh); exit(ret); } } void - ft_e_builtin(const t_lcom *ptr, + e_builtin(const t_lcom *ptr, uint8_t bu_id, t_msh *msh) { @@ -76,7 +76,7 @@ void /* TODO: find a way to handle exit | bu_id = 6 */ if ((pid = fork()) == 0) { - ft_e_builtin_child(ptr, bu_id, msh); + e_builtin_child(ptr, bu_id, msh); } else if (pid < 0) { @@ -84,6 +84,6 @@ void } else { - ft_e_builtin_parent(pid, ptr, bu_id, msh); + e_builtin_parent(pid, ptr, bu_id, msh); } } |