summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 19:44:25 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-12 19:44:25 +0200
commitbbbd573c5595d41413cd74393f0539f56b9e9dfc (patch)
tree8218d359f065311ad58a4c69d7644aff7019110f /src
parentClang (diff)
download42-minishell-bbbd573c5595d41413cd74393f0539f56b9e9dfc.tar.gz
42-minishell-bbbd573c5595d41413cd74393f0539f56b9e9dfc.tar.bz2
42-minishell-bbbd573c5595d41413cd74393f0539f56b9e9dfc.tar.xz
42-minishell-bbbd573c5595d41413cd74393f0539f56b9e9dfc.tar.zst
42-minishell-bbbd573c5595d41413cd74393f0539f56b9e9dfc.zip
Norm update
Diffstat (limited to '')
-rw-r--r--src/e_pipes.c32
-rw-r--r--src/e_unshebanged.c2
-rw-r--r--src/e_unshebanged.h6
-rw-r--r--src/p_split.h4
4 files changed, 7 insertions, 37 deletions
diff --git a/src/e_pipes.c b/src/e_pipes.c
index 1fb6fcf..9ab08ba 100644
--- a/src/e_pipes.c
+++ b/src/e_pipes.c
@@ -29,7 +29,7 @@
#include "u_utils.h"
#include "u_path.h"
-static uint8_t e_get_current_path(char fullpath[],
+static uint8_t e_get_current_path(char fullpath[],
struct s_lpipes *ptr,
t_msh *msh)
{
@@ -117,36 +117,6 @@ static void e_pipe_exec(size_t pipes, t_msh *msh)
msh->ret = WEXITSTATUS(status);
}
-/* static void e_fullpath_not_found(t_com *ptr, t_msh *msh) */
-/* { */
-/* f_command_not_found(ptr->bin); */
-/* u_eof_fd(msh->fd); */
-/* s_com_destroy(&msh->com); */
-/* s_line_clear(&msh->curr); */
-/* s_destroy(msh); */
-/* exit(127); */
-/* } */
-
-/* static char **e_get_fullpath(size_t pipes, t_msh *msh) */
-/* { */
-/* struct s_lpipes *rptr; */
-/* char **fullpath; */
-/* size_t i; */
-
-/* rptr = msh->pipes; */
-/* if ((fullpath = (char **)malloc((pipes + 2) * sizeof(char *))) == NULL) */
-/* f_alloc_and_destroy_msh(msh); */
-/* fullpath[pipes + 1] = NULL; */
-/* i = 0; */
-/* while (rptr != NULL) */
-/* { */
-/* fullpath[i] = e_get_current_path(rptr, msh); */
-/* i++; */
-/* rptr = rptr->next; */
-/* } */
-/* return (fullpath); */
-/* } */
-
void e_pipes(t_msh *msh)
{
const size_t pipes = e_get_pipes_count(msh->pipes);
diff --git a/src/e_unshebanged.c b/src/e_unshebanged.c
index 1e4e33c..fabba8a 100644
--- a/src/e_unshebanged.c
+++ b/src/e_unshebanged.c
@@ -64,7 +64,7 @@ void e_extern_read_script(const char fullpath[],
char **argv;
argv = e_get_new_argv(fullpath, ptr, msh);
- if (execve(msh->argv[0], (char* const *)argv, msh->envp) == -1)
+ if (execve(msh->argv[0], (char *const *)argv, msh->envp) == -1)
{
f_exec(msh->argv[0], argv[0]);
ft_delwords(argv);
diff --git a/src/e_unshebanged.h b/src/e_unshebanged.h
index d9499ef..ce1d49c 100644
--- a/src/e_unshebanged.h
+++ b/src/e_unshebanged.h
@@ -11,11 +11,11 @@
/* ************************************************************************** */
#ifndef FT_E_UNSHEBANGED_H
-#define FT_E_UNSHEBANGED_H
+# define FT_E_UNSHEBANGED_H
-#include <libft.h>
+# include <libft.h>
-#include "s_struct.h"
+# include "s_struct.h"
void e_extern_read_script(const char fullpath[],
t_com *ptr,
diff --git a/src/p_split.h b/src/p_split.h
index a7de10b..7e770bb 100644
--- a/src/p_split.h
+++ b/src/p_split.h
@@ -13,8 +13,8 @@
#ifndef FT_P_SPLIT_H
# define FT_P_SPLIT_H
-#include <stddef.h>
-#include <stdint.h>
+# include <stddef.h>
+# include <stdint.h>
# ifdef __linux__
# include <linux/limits.h>
# else