From 179898160d7a6c3d0c6032c78c8731a23631c2aa Mon Sep 17 00:00:00 2001 From: nass1pro Date: Tue, 16 Jun 2020 12:37:32 +0200 Subject: Test main.c --- src/parse/parse.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/parse') diff --git a/src/parse/parse.c b/src/parse/parse.c index 867325b..36e603a 100755 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -47,17 +47,19 @@ t_ret *parse(t_ftlst *input) } } } - while(ret->ast->cmd_argv != NULL) - { - printf("[%s]\n", ((t_token *)ret->ast->cmd_argv->data)->content); - ret->ast->cmd_argv = ret->ast->cmd_argv->next; - } - while(ret->ast->redirs != NULL) - { - printf("[%s]\n", ((t_token *)ret->ast->redirs->data)->content); - ret->ast->redirs = ret->ast->redirs->next; - } - ast_destroy(ret->ast); - ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy); + // printf("===========cmd=============\n"); + // while(ret->ast->cmd_argv != NULL) + // { + // printf("[%s]\n", ((t_token *)ret->ast->cmd_argv->data)->content); + // ret->ast->cmd_argv = ret->ast->cmd_argv->next; + // } + // printf("=========redir============\n"); + // while(ret->ast->redirs != NULL) + // { + // printf("[%s]\n", ((t_token *)ret->ast->redirs->data)->content); + // ret->ast->redirs = ret->ast->redirs->next; + // } + //ast_destroy(ret->ast); + //ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy); return first; } -- cgit