fix subsh in pipeline
This commit is contained in:
@@ -34,7 +34,7 @@ t_node *remove_parentheses(t_node *lst)
|
|||||||
if (deepness == 0)
|
if (deepness == 0)
|
||||||
break ;
|
break ;
|
||||||
add_node_back(&out, str, it->token, it->pressision);
|
add_node_back(&out, str, it->token, it->pressision);
|
||||||
free(str);
|
ft_free(&str);
|
||||||
it = it->next;
|
it = it->next;
|
||||||
}
|
}
|
||||||
ft_free(&str);
|
ft_free(&str);
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ static void update_subsh_l(int *shlvl, t_node *lst)
|
|||||||
if (!lst)
|
if (!lst)
|
||||||
return ;
|
return ;
|
||||||
if (!ft_strncmp(")", lst->val, 1))
|
if (!ft_strncmp(")", lst->val, 1))
|
||||||
*shlvl = 0;
|
*shlvl -= 1;
|
||||||
if (!ft_strncmp("(", lst->val, 1))
|
if (!ft_strncmp("(", lst->val, 1))
|
||||||
*shlvl = 1;
|
*shlvl += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static t_node *get_node(t_node **lst, t_node *expected,
|
static t_node *get_node(t_node **lst, t_node *expected,
|
||||||
@@ -53,7 +53,7 @@ static t_node *get_node(t_node **lst, t_node *expected,
|
|||||||
(*lst) = (*lst)->next;
|
(*lst) = (*lst)->next;
|
||||||
}
|
}
|
||||||
while (limiter == -1 && (*lst)
|
while (limiter == -1 && (*lst)
|
||||||
&& (*shlvl == 1
|
&& (*shlvl >= 2
|
||||||
|| ft_strncmp((*lst)->val, expected->val, ft_strlen((*lst)->val))))
|
|| ft_strncmp((*lst)->val, expected->val, ft_strlen((*lst)->val))))
|
||||||
{
|
{
|
||||||
update_subsh_l(shlvl, *lst);
|
update_subsh_l(shlvl, *lst);
|
||||||
|
|||||||
Reference in New Issue
Block a user