fix and free

This commit is contained in:
Camille Chauvet 2023-02-14 07:08:25 +01:00
parent 1a04f73b49
commit 6ab114eeeb
98 changed files with 10 additions and 33 deletions

Binary file not shown.

BIN
file.o

Binary file not shown.

View File

@ -1,7 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_split.c :+: :+: :+: */
/* ft_split_quoted.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */

Binary file not shown.

BIN
heredoc.o

Binary file not shown.

BIN
infile.o

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "extra.h"
void ft_swap(void *a, void *b)
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

15
main.c
View File

@ -3,17 +3,14 @@
void ft_lstdel(void *ptr)
{
t_list *element;
t_cmd *content;
element = (t_list *) ptr;
content = (t_cmd *) element->content;
content = (t_cmd *) ptr;
if (content->executable != NULL)
free(content->executable);
if (content->args != NULL)
ft_freer_tab_ultimate(1, content->args);
free(content);
free(element);
}
int ft_cmds_init(t_list **cmds, size_t len)
@ -151,7 +148,6 @@ int ft_cmds_fill(t_list **cmds, const char *line)
t_list *current;
size_t i;
(void) cmds;
tab = ft_split_quoted(line, '|');
if (tab == NULL)
return (1);
@ -163,12 +159,13 @@ int ft_cmds_fill(t_list **cmds, const char *line)
if (ft_cmd_filler(current, args) == 1)
{
ft_lstclear(cmds, ft_lstdel);
ft_freer_tab_ultimate(1, args);
ft_freer_tab_ultimate(2, args, tab);
return (1);
}
current = current->next;
i++;
}
ft_freer_tab_ultimate(1, tab);
return (0);
}
@ -221,7 +218,11 @@ int main(int ac, char **av)
if (cmds == NULL)
return (1);
if (ft_cmds_excutor(cmds) == 1)
{
ft_lstclear(cmds, ft_lstdel);
return (1);
ft_lstclear(cmds);
}
ft_lstclear(cmds, ft_lstdel);
free(cmds);
return (1);
}

BIN
main.o

Binary file not shown.

BIN
minishell

Binary file not shown.

BIN
outfile.o

Binary file not shown.

Binary file not shown.

24
t
View File

@ -1,24 +0,0 @@
a.out
argprinter
d
execution.c
file.c
file.o
ft_split_quoted.c
ft_split_quoted.o
heredoc.c
heredoc.o
infile.c
infile.o
libftx
main.c
main.o
Makefile
minishell
minishell.h
outfile.c
outfile.o
syntatics.c
syntatics.o
t
utils

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.