summaryrefslogtreecommitdiffstats
path: root/src/e_externs_pipes.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-12 20:43:30 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-12 20:43:30 +0200
commitff116f01c3680d0e5d8c32dd9978ed05a37f800c (patch)
tree73765e5ac7ea4ec8af461f44f6d8288fdad6fd82 /src/e_externs_pipes.c
parentLots of stuff to do (diff)
download42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.gz
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.bz2
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.xz
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.zst
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.zip
FeelsCleanMan
Diffstat (limited to 'src/e_externs_pipes.c')
-rw-r--r--src/e_externs_pipes.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/e_externs_pipes.c b/src/e_externs_pipes.c
index 13842a7..6c78029 100644
--- a/src/e_externs_pipes.c
+++ b/src/e_externs_pipes.c
@@ -23,7 +23,7 @@
#include "f_fail.h"
#include "m_redirs.h"
#include "s_destroy.h"
-#include "s_lcom.h"
+#include "s_line.h"
#include "s_lpipes.h"
#include "s_struct.h"
@@ -44,7 +44,7 @@ static uint8_t
static void
e_extern_child(const char *fullpath,
- t_lcom *ptr,
+ t_com *ptr,
t_msh *msh)
{
uint8_t bu_id;
@@ -53,7 +53,7 @@ static void
dup_redirs(ptr, msh);
if (ft_strncmp(fullpath, "builtin", 8) == 0)
{
- bu_id = get_builtin_id(ptr->com, msh);
+ bu_id = get_builtin_id(ptr->bin, msh);
ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh);
exit(ret);
}
@@ -114,7 +114,7 @@ static void
close(fd[j][FT_READ_END]);
j++;
}
- e_extern_child(fullpath[i], head->one, msh);
+ e_extern_child(fullpath[i], head->com, msh);
}
head = head->next;
i++;
@@ -151,21 +151,21 @@ void
i = 0;
while (rptr != NULL)
{
- if (ft_ischarset("/.", rptr->one->com[0]))
+ if (ft_ischarset("/.", rptr->com->bin[0]))
{
- if ((fullpath[i] = ft_strdup(rptr->one->com)) == NULL)
+ if ((fullpath[i] = ft_strdup(rptr->com->bin)) == NULL)
f_alloc_and_destroy_msh(msh);
}
else if ((envpath = get_env_path(msh)) != NULL)
{
- if ((bu_id = get_builtin_id(rptr->one->com, msh))
+ if ((bu_id = get_builtin_id(rptr->com->bin, msh))
< FT_BUILTINS_COUNT)
{
if ((fullpath[i] = ft_strdup("builtin")) == NULL)
f_alloc_and_destroy_msh(msh);
}
else
- fullpath[i] = search_in_path(rptr->one->com, envpath, msh);
+ fullpath[i] = search_in_path(rptr->com->bin, envpath, msh);
ft_delwords(envpath);
}
i++;