aboutsummaryrefslogtreecommitdiff
path: root/include/eval.h
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-14 20:48:50 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-14 20:48:50 +0200
commit8e40323db9715621d8ab45ff6d943c2eeba46ea0 (patch)
tree010828d6a75dfaaf94535035dc50b6a2a55aa12e /include/eval.h
parent3693acaff9fbf3f34dc2907e95dd221d5a8bc9e4 (diff)
downloadminishell-8e40323db9715621d8ab45ff6d943c2eeba46ea0.tar.gz
minishell-8e40323db9715621d8ab45ff6d943c2eeba46ea0.tar.bz2
minishell-8e40323db9715621d8ab45ff6d943c2eeba46ea0.zip
Removing path hash table, replacing it by brute force searchpath
Diffstat (limited to 'include/eval.h')
-rw-r--r--include/eval.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/eval.h b/include/eval.h
index 6aaefd9..02d0624 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 17:20:14 by charles ### ########.fr */
+/* Updated: 2020/09/14 19:49:18 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,7 +24,6 @@
typedef struct
{
- t_path path;
t_env env;
t_ast *ast;
int fds[2];
@@ -32,7 +31,7 @@ typedef struct
typedef struct
{
- char *exec_path;
+ char exec_path[PATH_MAX + 1];
char **argv;
t_env env;
t_builtin_entry *builtin;
@@ -49,25 +48,25 @@ extern pid_t g_child_pid;
*/
int fork_wrap(int fds[2], void *passed, int (*wrapped)(void *param), pid_t *child_pid);
-int eval(int fds[2], t_env env, t_path path, t_ast *ast, pid_t *child_pid);
+int eval(int fds[2], t_env env, t_ast *ast, pid_t *child_pid);
/*
** cmd.c
*/
-int eval_cmd(int fds[2], t_env env, t_path path, t_ast *ast, pid_t *child_pid);
+int eval_cmd(int fds[2], t_env env, t_ast *ast, pid_t *child_pid);
/*
** operation.c
*/
-int eval_operation(int fds[2], t_env env, t_path path, t_ast *ast);
+int eval_operation(int fds[2], t_env env, t_ast *ast);
/*
** parenthesis.c
*/
-int eval_parenthesis(int fds[2], t_env env, t_path path, t_ast *ast);
+int eval_parenthesis(int fds[2], t_env env, t_ast *ast);
/*
** redir.c
@@ -80,6 +79,5 @@ int redir_extract(t_tok_lst **redirs, t_env env, int fds[2]);
*/
int exec_path_check(char *exec_path);
-int exec_search_path(t_path path, char *path_var, char *exec_name, char **exec_path);
#endif