summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-20 15:32:25 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-20 15:32:25 +0200
commit5aa3ef224665685ec35313b960603273cc377a15 (patch)
treecfcf2af924ef5b48fada2f4a83a1faca17f8e907 /src
parentIn progress (diff)
download42-minishell-5aa3ef224665685ec35313b960603273cc377a15.tar.gz
42-minishell-5aa3ef224665685ec35313b960603273cc377a15.tar.bz2
42-minishell-5aa3ef224665685ec35313b960603273cc377a15.tar.xz
42-minishell-5aa3ef224665685ec35313b960603273cc377a15.tar.zst
42-minishell-5aa3ef224665685ec35313b960603273cc377a15.zip
Unfinished work
Diffstat (limited to '')
-rw-r--r--src/p_redirs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/p_redirs.c b/src/p_redirs.c
index aec3ba6..0be5c99 100644
--- a/src/p_redirs.c
+++ b/src/p_redirs.c
@@ -15,10 +15,22 @@
#include <stddef.h>
#include "d_define.h"
+#include "s_lredir.h"
#include "s_struct.h"
#include "u_parse.h"
-int8_t p_redirs(char word[], t_com **com)
+static int8_t p_get_redir(char word[], char *ptr, t_com **com)
+{
+ struct s_lredir *rdr;
+
+ (void)word;
+ (void)ptr;
+ (void)com;
+ (void)rdr;
+ return (0);
+}
+
+int8_t p_redirs(char word[], t_com **com)
{
struct s_com *com_ptr;
char *ptr;
@@ -34,7 +46,8 @@ int8_t p_redirs(char word[], t_com **com)
mode = u_meet_squote(word, ptr, mode);
else if (mode == Q_NONE && (*ptr == '<' || *ptr == '>') == 1)
{
- if (p_get_redir(ptr, (ptr - word), com) != )
+ if (p_get_redir(word, ptr, com) != 0)
+ return (1);
ptr = word;
}
ptr++;