summaryrefslogtreecommitdiffstats
path: root/src/p_redirs.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-28 01:26:44 +0100
commitf6faf88cd0991be3184af67d5fa271b12f70e925 (patch)
tree02c283541fd2c0b4ccacd31172cccf2ba9711c51 /src/p_redirs.c
parentNorming in progress (diff)
download42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.gz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.bz2
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.xz
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.tar.zst
42-minishell-f6faf88cd0991be3184af67d5fa271b12f70e925.zip
Norming
Diffstat (limited to 'src/p_redirs.c')
-rw-r--r--src/p_redirs.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/p_redirs.c b/src/p_redirs.c
index aee845b..fc26a6e 100644
--- a/src/p_redirs.c
+++ b/src/p_redirs.c
@@ -30,12 +30,12 @@
#include "u_vars.h"
static unsigned char p_append_redir(const char path[],
- int fd_rdr[],
- t_com *com,
- t_msh *msh)
+ int fd_rdr[],
+ t_com *com,
+ t_msh *msh)
{
struct s_lredir *new;
- int fd;
+ int fd;
char redir;
fd = fd_rdr[FD];
@@ -54,9 +54,9 @@ static unsigned char p_append_redir(const char path[],
return (0);
}
-static size_t p_get_path(char path[],
- struct s_rdr_tmp tmp,
- t_msh *msh)
+static size_t p_get_path(char path[],
+ struct s_rdr_tmp tmp,
+ t_msh *msh)
{
char h[PATH_MAX];
size_t pos[2];
@@ -84,7 +84,7 @@ static size_t p_get_path(char path[],
return (pos[1]);
}
-static int p_get_fd(const char word[], char *ptr)
+static int p_get_fd(const char word[], char *ptr)
{
char digit[255];
char *tmp;
@@ -109,7 +109,10 @@ static int p_get_fd(const char word[], char *ptr)
return (ft_atoi(digit));
}
-static unsigned char 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];
@@ -137,7 +140,7 @@ static unsigned char p_get_redir(char word[], char *ptr, t_com *com, t_msh *msh)
return (p_append_redir(path, fd_rdr, com, msh));
}
-char 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;