From 613541b99bb02a4dd03d8bd9391eeab5a4c5e986 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 20 Sep 2020 14:51:11 +0200 Subject: Redirs rework in progress --- src/s_struct.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 84271de..0b83158 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -14,6 +14,7 @@ #define S_STRUCT_H #include +#include #include #include "d_define.h" @@ -36,20 +37,27 @@ typedef struct s_lalias /* ** redir(int8_t) index ** ------------------- +** -2: << ** -1: < ** 1: > ** 2: >> ** 0: means no redirection */ +typedef struct s_lredir +{ + char path[PATH_MAX]; + int32_t fd; + int8_t redir; + struct s_lredir *next; +} t_lredir; + typedef struct s_com { char **argv; char **env_fork; char *bin; - char *rdrpath; - int32_t rdrfd; - int8_t redir; + struct s_lredir *rdr; } t_com; struct s_lpipes -- cgit v1.2.3