summaryrefslogtreecommitdiffstats
path: root/src/m_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/m_loop.c')
-rw-r--r--src/m_loop.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/m_loop.c b/src/m_loop.c
index 1641d53..8ae81e7 100644
--- a/src/m_loop.c
+++ b/src/m_loop.c
@@ -44,7 +44,6 @@ static void m_parse_and_run_line(char line[],
t_msh *msh)
{
t_line_block *ptr;
- size_t i;
t_bool pipe;
p_line(line, msh);
@@ -55,26 +54,8 @@ static void m_parse_and_run_line(char line[],
|| (previf == 2 && msh->ret != 0))
{
pipe = p_find_good_pipe(ptr->lblock);
- if ((pipe == TRUE && s_split_pipes(ptr->lblock, msh) == NULL)
- || (msh->com = s_com_new(ptr->lblock, msh)) == NULL)
- {
- previf = ptr->nextif;
- ptr = ptr->next;
+ if (!(m_set_all(ptr, previf, pipe, msh)))
continue ;
- }
- if (msh->com != NULL && pipe == FALSE)
- {
- i = 0;
- while (msh->com->argv != NULL && msh->com->argv[i] != NULL)
- i++;
- if (msh->com->argv != NULL && msh->com->argv[0] != NULL)
- u_subst_var_value("$_", msh->com->argv[i - 1], msh);
- else
- u_subst_var_value("$_", msh->com->bin, msh);
- }
- e_line_block(msh);
- s_com_destroy(&msh->com);
- s_lpipes_clear(&msh->pipes);
}
previf = ptr->nextif;
ptr = ptr->next;