summaryrefslogtreecommitdiffstats
path: root/src/p_redirs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/p_redirs.c')
-rw-r--r--src/p_redirs.c17
1 files changed, 8 insertions, 9 deletions
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 <libft.h>
-#include <stdint.h>
#include <stddef.h>
#include <unistd.h>
#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;