diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-20 14:51:11 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-20 14:51:11 +0200 |
commit | 613541b99bb02a4dd03d8bd9391eeab5a4c5e986 (patch) | |
tree | 83c129b139e7865cbc81d6237ace8e9e1fdb78a2 /src/s_struct.h | |
parent | Good luck have fuck (diff) | |
download | 42-minishell-613541b99bb02a4dd03d8bd9391eeab5a4c5e986.tar.gz 42-minishell-613541b99bb02a4dd03d8bd9391eeab5a4c5e986.tar.bz2 42-minishell-613541b99bb02a4dd03d8bd9391eeab5a4c5e986.tar.xz 42-minishell-613541b99bb02a4dd03d8bd9391eeab5a4c5e986.tar.zst 42-minishell-613541b99bb02a4dd03d8bd9391eeab5a4c5e986.zip |
Redirs rework in progress
Diffstat (limited to '')
-rw-r--r-- | src/s_struct.h | 14 |
1 files changed, 11 insertions, 3 deletions
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 <stdint.h> +#include <stddef.h> #include <limits.h> #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 |