aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-02 15:50:13 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-03 08:57:45 +0200
commite5393671a265e1c301c6c303f21f938c4cf9ca75 (patch)
tree0190ff9ba762cf820b1846b01adc339092370e2c /src/main.c
parentf66cb8f28a2779159baeef6ea91a7684d59cc295 (diff)
downloadminishell-e5393671a265e1c301c6c303f21f938c4cf9ca75.tar.gz
minishell-e5393671a265e1c301c6c303f21f938c4cf9ca75.tar.bz2
minishell-e5393671a265e1c301c6c303f21f938c4cf9ca75.zip
Evaluation pipe frame (not tested)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 9 insertions, 4 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}