aboutsummaryrefslogtreecommitdiff
path: root/include/eval.h
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-15 17:54:48 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-15 17:54:48 +0200
commitf626f2715ab696fdb326ed67256d012d86faef9f (patch)
treef25f2d95688a89c662622e3c2f11786f27689713 /include/eval.h
parent170d0b74fa725196bca0fa549520d0d8bfa07576 (diff)
downloadminishell-f626f2715ab696fdb326ed67256d012d86faef9f.tar.gz
minishell-f626f2715ab696fdb326ed67256d012d86faef9f.tar.bz2
minishell-f626f2715ab696fdb326ed67256d012d86faef9f.zip
Refactoring env, Removing bloat from utils, exec and env
Diffstat (limited to 'include/eval.h')
-rw-r--r--include/eval.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/eval.h b/include/eval.h
index 02d0624..0a14406 100644
--- a/include/eval.h
+++ b/include/eval.h
@@ -6,7 +6,7 @@
/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/01 17:05:30 by charles #+# #+# */
-/* Updated: 2020/09/14 19:49:18 by charles ### ########.fr */
+/* Updated: 2020/09/15 17:50:35 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -37,6 +37,8 @@ typedef struct
t_builtin_entry *builtin;
} t_fork_param_cmd;
+typedef int (*t_wrapped_func)(void *param);
+
# define FD_NONE -2
# define FD_WRITE 1
# define FD_READ 0
@@ -47,7 +49,7 @@ extern pid_t g_child_pid;
** eval.c
*/
-int fork_wrap(int fds[2], void *passed, int (*wrapped)(void *param), pid_t *child_pid);
+int fork_wrap(int fds[2], void *passed, t_wrapped_func wrapped, pid_t *child_pid);
int eval(int fds[2], t_env env, t_ast *ast, pid_t *child_pid);
/*
@@ -74,10 +76,4 @@ int eval_parenthesis(int fds[2], t_env env, t_ast *ast);
int redir_extract(t_tok_lst **redirs, t_env env, int fds[2]);
-/*
-** exec.c
-*/
-
-int exec_path_check(char *exec_path);
-
#endif