aboutsummaryrefslogtreecommitdiff
path: root/include/eval.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-01 15:55:57 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-01 15:55:57 +0200
commit2eb59ee61e49b60472f82c000dd4f3536bd1987c (patch)
tree190ac7bc42051ee9fcc7c1d781be16afa4d43075 /include/eval.h
parent551e668e1b7a030fdff236067963100c7d8747a5 (diff)
downloadminishell-2eb59ee61e49b60472f82c000dd4f3536bd1987c.tar.gz
minishell-2eb59ee61e49b60472f82c000dd4f3536bd1987c.tar.bz2
minishell-2eb59ee61e49b60472f82c000dd4f3536bd1987c.zip
Added builtin support in command eval, Refactoring eval/builtin function, Added doc
Diffstat (limited to 'include/eval.h')
-rw-r--r--include/eval.h26
1 files changed, 19 insertions, 7 deletions
diff --git a/include/eval.h b/include/eval.h
index 0c3240a..55cd497 100644
--- a/include/eval.h
+++ b/include/eval.h
@@ -15,8 +15,8 @@
typedef struct
{
- int in_pipe[2]; // need stack pipe
- int out_pipe[2];
+ int pipe_in[2]; // need stack pipe
+ int pipe_out[2];
t_path path;
t_env env;
} t_eval_state;
@@ -31,13 +31,25 @@ typedef struct
int status;
} t_eval_status;
-
-/**
-** \brief Evaluate an AST
-** \param state State of the evaluation
-** \param ast Abstract syntax tree to evaluate
+/*
+** eval.c
*/
int eval(t_eval_state *state, t_ast *ast);
+/*
+** exec.c
+*/
+
+bool exec_is_path(char *path_str);
+bool exec_is_valid(char *exec_path);
+char *exec_search_path(t_path path, char *path_var, char *exec_name);
+
+/*
+** pipe.c
+*/
+
+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]);
+
#endif