summaryrefslogtreecommitdiffstats
path: root/src/s_struct.h
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-08-12 20:43:30 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-08-12 20:43:30 +0200
commitff116f01c3680d0e5d8c32dd9978ed05a37f800c (patch)
tree73765e5ac7ea4ec8af461f44f6d8288fdad6fd82 /src/s_struct.h
parentLots of stuff to do (diff)
download42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.gz
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.bz2
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.xz
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.tar.zst
42-minishell-ff116f01c3680d0e5d8c32dd9978ed05a37f800c.zip
FeelsCleanMan
Diffstat (limited to '')
-rw-r--r--src/s_struct.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/s_struct.h b/src/s_struct.h
index a730b78..e03bbf2 100644
--- a/src/s_struct.h
+++ b/src/s_struct.h
@@ -26,8 +26,6 @@
** 0: means no redirection
*/
-typedef struct s_lpipes *t_lpipes;
-
typedef struct s_lvars
{
char *name;
@@ -35,24 +33,29 @@ typedef struct s_lvars
struct s_lvars *next;
} t_lvars;
-typedef struct s_lcom
+typedef struct s_com
{
- char *com;
+ char *bin;
char **argv;
int8_t redir;
int32_t rdrfd;
char *rdrpath;
char **env_fork;
- struct s_lpipes *pipes;
- struct s_lcom *next;
-} t_lcom;
+} t_com;
struct s_lpipes
{
- struct s_lcom *one;
+ struct s_com *com;
struct s_lpipes *next;
};
+typedef struct s_line
+{
+ struct s_com *com;
+ struct s_lpipes *pipes;
+ struct s_line *next;
+} t_line;
+
typedef struct s_msh
{
char **envp;
@@ -63,7 +66,7 @@ typedef struct s_msh
char *cwd;
char env_fork_tmp[128][1024];
uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*);
- struct s_lcom *curr;
+ struct s_line *curr;
struct s_lvars *vars;
} t_msh;