diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-07 14:33:49 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-07 14:33:49 +0200 |
commit | d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898 (patch) | |
tree | ee428a2eb811bef0f749ba7f7c5adebd43c47e06 /src/ft_e_lcom.c | |
parent | Still pipin' (diff) | |
download | 42-minishell-d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898.tar.gz 42-minishell-d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898.tar.bz2 42-minishell-d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898.tar.xz 42-minishell-d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898.tar.zst 42-minishell-d324d8b4fbdd9ca4e5426f34ea0f97d60b92e898.zip |
UFS reinstall, will finish pipes later
Diffstat (limited to 'src/ft_e_lcom.c')
-rw-r--r-- | src/ft_e_lcom.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ft_e_lcom.c b/src/ft_e_lcom.c index 4a57f7b..3f5f81a 100644 --- a/src/ft_e_lcom.c +++ b/src/ft_e_lcom.c @@ -40,16 +40,21 @@ void ptr = msh->curr; while (ptr != NULL) { - if (ptr->com) + if (ptr->pipes) + { + ft_printf("%s\n", ptr->pipes->one->com); + if ((bu_id = ft_get_builtin_id(ptr->pipes->one->com, msh)) + < FT_BUILTINS_COUNT) + ft_e_builtin(ptr->pipes->one, bu_id, msh); + else + ft_e_extern(ptr->pipes->one, msh); + } + else if (ptr->com) { if ((bu_id = ft_get_builtin_id(ptr->com, msh)) < FT_BUILTINS_COUNT) - { ft_e_builtin(ptr, bu_id, msh); - } else - { ft_e_extern(ptr, msh); - } } ptr = ptr->next; } |