summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/e_builtins.c31
-rw-r--r--src/e_builtins.h8
2 files changed, 14 insertions, 25 deletions
diff --git a/src/e_builtins.c b/src/e_builtins.c
index 2f6d33f..bc14ced 100644
--- a/src/e_builtins.c
+++ b/src/e_builtins.c
@@ -27,9 +27,7 @@
#include "s_struct.h"
#include "u_utils.h"
-static void
- e_export_env_fork(const t_com *ptr,
- t_msh *msh)
+static void e_export_env_fork(const t_com *ptr, t_msh *msh)
{
char **re_ptr;
@@ -41,10 +39,7 @@ static void
}
}
-static void
- e_builtin_child(const t_com *ptr,
- uint8_t bu_id,
- t_msh *msh)
+static void e_builtin_child(const t_com *ptr, uint8_t bu_id, t_msh *msh)
{
int32_t ret;
@@ -63,11 +58,10 @@ static void
exit(ret);
}
-static void
- e_builtin_parent(pid_t pid,
- const t_com *ptr,
- uint8_t bu_id,
- t_msh *msh)
+static void e_builtin_parent(pid_t pid,
+ const t_com *ptr,
+ uint8_t bu_id,
+ t_msh *msh)
{
int32_t status;
int32_t ret;
@@ -95,12 +89,8 @@ static void
}
}
-void
- e_builtin(const t_com *ptr,
- uint8_t bu_id,
- t_msh *msh)
+void e_builtin(const t_com *ptr, uint8_t bu_id, t_msh *msh)
{
- /* int32_t ret; */
pid_t pid;
if ((pid = fork()) == 0)
@@ -109,13 +99,12 @@ void
}
else if (pid < 0)
{
- /* TODO: handle fork() failed */
+ /*
+ ** TODO: handle fork() failed
+ */
}
else
{
e_builtin_parent(pid, ptr, bu_id, msh);
}
- /* dup_redirs(ptr, msh); */
- /* ret = msh->bu_ptr[bu_id](ptr->argv + 1, msh); */
- /* msh->ret = ret; */
}
diff --git a/src/e_builtins.h b/src/e_builtins.h
index f3492c9..302e795 100644
--- a/src/e_builtins.h
+++ b/src/e_builtins.h
@@ -10,12 +10,12 @@
/* */
/* ************************************************************************** */
-#ifndef E_BUILTINS_H
-#define E_BUILTINS_H
+#ifndef FT_E_BUILTINS_H
+# define FT_E_BUILTINS_H
-#include <stdint.h>
+# include <stdint.h>
-#include "s_struct.h"
+# include "s_struct.h"
void e_builtin(const t_com *ptr, uint8_t bu_id, t_msh *msh);