summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-28 16:49:07 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-28 16:49:07 +0200
commited2f6193d141c6b8bab9ee916f74d11db517625b (patch)
tree756225e55b76a8f2098786e23e70b6944f3c3971 /src
parentMakefile update (diff)
download42-minishell-ed2f6193d141c6b8bab9ee916f74d11db517625b.tar.gz
42-minishell-ed2f6193d141c6b8bab9ee916f74d11db517625b.tar.bz2
42-minishell-ed2f6193d141c6b8bab9ee916f74d11db517625b.tar.xz
42-minishell-ed2f6193d141c6b8bab9ee916f74d11db517625b.tar.zst
42-minishell-ed2f6193d141c6b8bab9ee916f74d11db517625b.zip
Trying vars
Diffstat (limited to '')
-rw-r--r--src/ft_s_init.c1
-rw-r--r--src/ft_s_struct.h8
2 files changed, 9 insertions, 0 deletions
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