diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-01 14:40:02 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-01 14:40:02 +0200 |
commit | aae7ad207625996732f133188fc7a403855ce86d (patch) | |
tree | 86c3745fe3a224b0de82216ed314f022a4a64db5 /src/ft_u_vars.c | |
parent | Merge branch 'vars' (diff) | |
download | 42-minishell-aae7ad207625996732f133188fc7a403855ce86d.tar.gz 42-minishell-aae7ad207625996732f133188fc7a403855ce86d.tar.bz2 42-minishell-aae7ad207625996732f133188fc7a403855ce86d.tar.xz 42-minishell-aae7ad207625996732f133188fc7a403855ce86d.tar.zst 42-minishell-aae7ad207625996732f133188fc7a403855ce86d.zip |
Vars not ok
Diffstat (limited to '')
-rw-r--r-- | src/ft_u_vars.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/ft_u_vars.c b/src/ft_u_vars.c index 99f35bb..cb020e3 100644 --- a/src/ft_u_vars.c +++ b/src/ft_u_vars.c @@ -85,8 +85,8 @@ static char } static char - *ft_get_special(const char varname[], - t_msh *msh) + *ft_get_special_var(const char varname[], + t_msh *msh) { char *varval; @@ -113,6 +113,15 @@ static char return (NULL); } +static char + *ft_get_cstm_vr(const char varname[], + t_msh *msh) +{ + (void)varname; + (void)msh; + return (NULL); +} + /* ** char * ** ft_subst_var_value(const char varname[], const t_msh *msh); @@ -136,7 +145,11 @@ char char *rvarname; varval = NULL; - if ((varval = ft_get_special(varname, msh)) != NULL) + if ((varval = ft_get_special_var(varname, msh)) != NULL) + { + return (varval); + } + else if ((varval = ft_get_cstm_vr(varname, msh)) != NULL) { return (varval); } |