summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ft_s_lcom.c6
-rw-r--r--src/ft_s_struct.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ft_s_lcom.c b/src/ft_s_lcom.c
index 67ad6a9..7a72378 100644
--- a/src/ft_s_lcom.c
+++ b/src/ft_s_lcom.c
@@ -13,6 +13,7 @@
#include <libft.h>
#include <stdlib.h>
#include <stdint.h>
+#include "ft_p_lcom.h"
#include "ft_s_struct.h"
static int8_t
@@ -100,8 +101,13 @@ t_lcom
if (!(link = (t_lcom*)malloc(sizeof(t_lcom))))
return (NULL);
+ link->redir = 0;
+ link->com = NULL;
+ link->args = NULL;
+ link->rdrpath = NULL;
if (!(words = ft_split(word, ' ')))
return (NULL);
+ /* TODO: redirections here */
if (ft_fill_lcom(words, &link) < 0)
{
ft_delwords(words);
diff --git a/src/ft_s_struct.h b/src/ft_s_struct.h
index 1f062c2..cccfaca 100644
--- a/src/ft_s_struct.h
+++ b/src/ft_s_struct.h
@@ -16,10 +16,21 @@
#include <stdint.h>
#include "ft_d_define.h"
+/*
+** redir(int8_t) index
+** --------------------
+** -1: <
+** 1: >
+** 2: >>
+** 0: means no redirection
+*/
+
typedef struct s_lcom
{
char *com;
char **args;
+ int8_t redir;
+ char *rdrpath;
struct s_lcom *next;
} t_lcom;