From c5aae008dee36276154882d8fd56c3bdeb473474 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 27 Oct 2020 19:59:20 +0100 Subject: Now norme --- src/p_redirs.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/p_redirs.c') diff --git a/src/p_redirs.c b/src/p_redirs.c index c12201e..aee845b 100644 --- a/src/p_redirs.c +++ b/src/p_redirs.c @@ -11,7 +11,6 @@ /* ************************************************************************** */ #include -#include #include #include #ifdef __linux__ @@ -30,14 +29,14 @@ #include "u_parse.h" #include "u_vars.h" -static uint8_t p_append_redir(const char path[], - int32_t fd_rdr[], +static unsigned char p_append_redir(const char path[], + int fd_rdr[], t_com *com, t_msh *msh) { struct s_lredir *new; - int32_t fd; - int8_t redir; + int fd; + char redir; fd = fd_rdr[FD]; redir = fd_rdr[RDR]; @@ -85,7 +84,7 @@ static size_t p_get_path(char path[], return (pos[1]); } -static int32_t p_get_fd(const char word[], char *ptr) +static int p_get_fd(const char word[], char *ptr) { char digit[255]; char *tmp; @@ -110,12 +109,12 @@ static int32_t p_get_fd(const char word[], char *ptr) return (ft_atoi(digit)); } -static uint8_t p_get_redir(char word[], char *ptr, t_com *com, t_msh *msh) +static unsigned char p_get_redir(char word[], char *ptr, t_com *com, t_msh *msh) { struct s_rdr_tmp tmp; char path[PATH_MAX]; size_t pos[2]; - int32_t fd_rdr[2]; + int fd_rdr[2]; pos[0] = 0; if ((fd_rdr[FD] = p_get_fd(word, ptr)) == -1) @@ -138,7 +137,7 @@ static uint8_t p_get_redir(char word[], char *ptr, t_com *com, t_msh *msh) return (p_append_redir(path, fd_rdr, com, msh)); } -int8_t p_redirs(char word[], t_com **com, t_msh *msh) +char p_redirs(char word[], t_com **com, t_msh *msh) { char *ptr; t_quote_mode mode; -- cgit v1.2.3