diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-03 19:00:47 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-03 19:00:47 +0200 |
commit | bfaf4c53a8406ea0bfbd8699807b567a5322a03f (patch) | |
tree | b8ce7d07b3094de0c4ba98160f35cf7e64eeae1d /src/b_export.c | |
parent | Added $ for varname (diff) | |
download | 42-minishell-bfaf4c53a8406ea0bfbd8699807b567a5322a03f.tar.gz 42-minishell-bfaf4c53a8406ea0bfbd8699807b567a5322a03f.tar.bz2 42-minishell-bfaf4c53a8406ea0bfbd8699807b567a5322a03f.tar.xz 42-minishell-bfaf4c53a8406ea0bfbd8699807b567a5322a03f.tar.zst 42-minishell-bfaf4c53a8406ea0bfbd8699807b567a5322a03f.zip |
Export is working
Diffstat (limited to 'src/b_export.c')
-rw-r--r-- | src/b_export.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/b_export.c b/src/b_export.c index 7aeed93..43e1c7d 100644 --- a/src/b_export.c +++ b/src/b_export.c @@ -31,7 +31,7 @@ static t_bool char *ptr; ptr = (char*)arg; - if (ft_isalpha(ptr[0])) + if (ft_isalpha(ptr[0]) || ptr[0] == '_') { return (TRUE); } @@ -89,7 +89,7 @@ uint8_t const uint64_t argc = u_builtins_get_argc((const char**)args); char **ptr; char *varval; - char fmt[255]; + char fmt[4096]; t_bool next; uint8_t r; @@ -112,7 +112,7 @@ uint8_t { next = TRUE; ft_sprintf(fmt, "$%s", *ptr); - varval = get_cstm_vr(fmt, msh); + varval = u_get_cstm_vr(fmt, msh); if (varval != NULL) { ft_sprintf(fmt, "%s=%s", *ptr, varval); |