mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 03:16:51 +01:00
「🔨」 fix: fixed conditional jump when heredoc in pipe TODO: leak 😭
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
# By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ #
|
# By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/01/22 07:21:18 by mmoussou #+# #+# #
|
# Created: 2024/01/22 07:21:18 by mmoussou #+# #+# #
|
||||||
# Updated: 2024/07/29 19:27:29 by adjoly ### ########.fr #
|
# Updated: 2024/08/01 17:48:26 by adjoly ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ SHELL = bash
|
|||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
|
|
||||||
CFLAGS = -Wall -Werror -Wextra -pipe -fPIE
|
CFLAGS = -Wall -Werror -Wextra -pipe -fPIE -g
|
||||||
|
|
||||||
INCLUDE = ./include
|
INCLUDE = ./include
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angoulem +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/08 21:44:04 by mmoussou #+# #+# */
|
/* Created: 2023/11/08 21:44:04 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/05/22 11:35:58 by adjoly ### ########.fr */
|
/* Updated: 2024/08/01 17:49:16 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -18,10 +18,11 @@ void ft_lstclear(t_list **lst, void (*del)(void *))
|
|||||||
|
|
||||||
if (!lst || !del)
|
if (!lst || !del)
|
||||||
return ;
|
return ;
|
||||||
while (*lst && lst && del)
|
while (lst && *lst && del)
|
||||||
{
|
{
|
||||||
tmp = (*lst)->next;
|
tmp = (*lst)->next;
|
||||||
ft_lstdelone(*lst, del);
|
if ((*lst)->content)
|
||||||
|
ft_lstdelone(*lst, del);
|
||||||
*lst = tmp;
|
*lst = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/20 09:19:39 by mmoussou #+# #+# */
|
/* Created: 2024/05/20 09:19:39 by mmoussou #+# #+# */
|
||||||
/* Updated: 2024/07/16 13:53:57 by adjoly ### ########.fr */
|
/* Updated: 2024/08/01 17:51:13 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/07/10 01:14:10 by adjoly #+# #+# */
|
/* Created: 2024/07/10 01:14:10 by adjoly #+# #+# */
|
||||||
/* Updated: 2024/07/15 17:03:12 by adjoly ### ########.fr */
|
/* Updated: 2024/08/01 17:58:58 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -32,13 +32,13 @@ void ft_lstclear_till_nxt(t_list **lst, void (*del)(void *))
|
|||||||
{
|
{
|
||||||
t_list *tmp;
|
t_list *tmp;
|
||||||
|
|
||||||
|
if (!lst || !del)
|
||||||
|
return ;
|
||||||
if (!(*lst)->next)
|
if (!(*lst)->next)
|
||||||
{
|
{
|
||||||
free(*lst);
|
free(*lst);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if (!lst || !del)
|
|
||||||
return ;
|
|
||||||
while (lst && *lst && (*lst)->next && del)
|
while (lst && *lst && (*lst)->next && del)
|
||||||
{
|
{
|
||||||
tmp = (*lst)->next;
|
tmp = (*lst)->next;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/31 12:47:13 by adjoly #+# #+# */
|
/* Created: 2024/05/31 12:47:13 by adjoly #+# #+# */
|
||||||
/* Updated: 2024/07/20 17:11:41 by adjoly ### ########.fr */
|
/* Updated: 2024/08/01 18:07:13 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -41,8 +41,7 @@ t_list *get_cmd_list(t_list *list)
|
|||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
while (tmp)
|
while (tmp)
|
||||||
{
|
{
|
||||||
ft_lstadd_back(&cmd_list, ft_lstnew(get_redir_fd(tmp->content, \
|
ft_lstadd_back(&cmd_list, make_lst(tmp));
|
||||||
((t_token *)tmp->content)->redirection)));
|
|
||||||
if (!ft_lstlast(cmd_list)->content)
|
if (!ft_lstlast(cmd_list)->content)
|
||||||
{
|
{
|
||||||
ft_lstclear(&cmd_list, &free_cmd);
|
ft_lstclear(&cmd_list, &free_cmd);
|
||||||
|
Reference in New Issue
Block a user