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) --- include/ast.h | 4 +++- include/eval.h | 11 +++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ast.h b/include/ast.h index 0d14779..6470a17 100644 --- a/include/ast.h +++ b/include/ast.h @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:38 by charles #+# #+# */ -/* Updated: 2020/04/01 17:52:43 by charles ### ########.fr */ +/* Updated: 2020/04/02 13:27:59 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -76,12 +76,14 @@ typedef struct s_cmd ** \brief AST node tag (type) ** \param TAG_CMD Command AST node ** \param TAG_LINE Line AST node +** \param TAG_ROOT Root line AST node */ typedef enum e_ast_tag { TAG_CMD, TAG_LINE, + TAG_ROOT, } t_ast_tag; /* diff --git a/include/eval.h b/include/eval.h index 31f729b..31f79c2 100644 --- a/include/eval.h +++ b/include/eval.h @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:30 by charles #+# #+# */ -/* Updated: 2020/04/01 17:53:26 by charles ### ########.fr */ +/* Updated: 2020/04/02 15:38:11 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -43,11 +43,17 @@ typedef struct s_eval_status int status; } t_eval_status; +typedef struct +{ + int pipe_in[2]; + int pipe_out[2]; +} t_io_frame; + /* ** eval.c */ -int eval(t_eval_state *state, t_ast *ast); +int eval(t_io_frame *frame, t_eval_state *state, t_ast *ast); /* ** exec.c @@ -63,5 +69,6 @@ char *exec_search_path(t_path path, char *path_var, char *exec_name); int pipe_setup_parent(t_cmd *cmd, int pipe_in[2], int pipe_out[2]); int pipe_setup_child(int pipe_in[2], int pipe_out[2]); +int io_frame_init(t_io_frame *frame); #endif -- cgit