From ed2f6193d141c6b8bab9ee916f74d11db517625b Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 28 Apr 2020 16:49:07 +0200 Subject: Trying vars --- src/ft_s_init.c | 1 + src/ft_s_struct.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/ft_s_init.c b/src/ft_s_init.c index 26b196b..88a3817 100644 --- a/src/ft_s_init.c +++ b/src/ft_s_init.c @@ -80,5 +80,6 @@ t_msh msh->ret = 0; ft_init_buptr(msh); msh->curr = NULL; + msh->vars = NULL; return (msh); } diff --git a/src/ft_s_struct.h b/src/ft_s_struct.h index 38eeb43..5b99acb 100644 --- a/src/ft_s_struct.h +++ b/src/ft_s_struct.h @@ -26,6 +26,13 @@ ** 0: means no redirection */ +typedef struct s_vars +{ + char *name; + char *val; + struct s_vars *next; +} t_vars; + typedef struct s_lcom { char *com; @@ -46,6 +53,7 @@ typedef struct s_msh char **bu_ref; uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); struct s_lcom *curr; + struct s_vars *vars; } t_msh; #endif -- cgit v1.2.3