From e5393671a265e1c301c6c303f21f938c4cf9ca75 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 2 Apr 2020 15:50:13 +0200 Subject: Evaluation pipe frame (not tested) --- src/main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index c46324f..f898bf8 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/28 11:45:44 by cacharle #+# #+# */ -/* Updated: 2020/04/01 23:12:51 by charles ### ########.fr */ +/* Updated: 2020/04/03 08:56:46 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -70,9 +70,14 @@ int main(int argc, char **argv, char **envp) state.pipe_out[1] = -1; state.path = path; state.env = env; - printf("ret: %d %s\n", eval(&state, ast), strerror(errno)); + t_io_frame frame; + io_frame_init(&frame); + printf("ret: %d %s\n", eval(&frame,&state, ast), strerror(errno)); - ast_destroy(ast); + /* char buf[2048]; */ + /* printf("%s\n", getcwd(buf, 2048)); */ + /* builtin_env(NULL, state.env); */ + /* ast_destroy(ast); */ /* while ((ret = ft_next_line(STDIN_FILENO, &line)) == 1) */ /* { */ /* if (eval(parse(line)) == -1) */ @@ -80,7 +85,7 @@ int main(int argc, char **argv, char **envp) /* free(line); */ /* } */ /* free(line); */ - ft_htdestroy(path, ht_del_str_entry); + ft_htdestroy(path, free); ft_vecdestroy(env, free); return (0); } -- cgit