summaryrefslogtreecommitdiffstats
path: root/src/b_export_next.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-12 15:07:22 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-12 15:07:22 +0200
commit477ea057edf32486e944ef4e33023e9ab6636e07 (patch)
treee8d6996c27b5bb6fde380eadea0c751bb9c2e117 /src/b_export_next.c
parenthow tf will I norm this (diff)
download42-minishell-477ea057edf32486e944ef4e33023e9ab6636e07.tar.gz
42-minishell-477ea057edf32486e944ef4e33023e9ab6636e07.tar.bz2
42-minishell-477ea057edf32486e944ef4e33023e9ab6636e07.tar.xz
42-minishell-477ea057edf32486e944ef4e33023e9ab6636e07.tar.zst
42-minishell-477ea057edf32486e944ef4e33023e9ab6636e07.zip
Aliases work, fucker
Diffstat (limited to '')
-rw-r--r--src/b_export_next.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/b_export_next.c b/src/b_export_next.c
index 059fbc6..1fc732e 100644
--- a/src/b_export_next.c
+++ b/src/b_export_next.c
@@ -13,6 +13,7 @@
#include <libft.h>
#include <stdlib.h>
+#include "d_define.h"
#include "b_export_next.h"
#include "f_fail.h"
#include "s_lvars.h"
@@ -21,8 +22,7 @@
#include "u_vars.h"
static char
- **b_get_var(const char arg[],
- t_msh *msh)
+ **b_get_var(const char arg[], t_msh *msh)
{
size_t len;
char **var;
@@ -44,8 +44,7 @@ static char
}
static int64_t
- b_is_it_in_env(const char varname[],
- t_msh *msh)
+ b_is_it_in_env(const char varname[], t_msh *msh)
{
char **env_dup;
size_t i;
@@ -66,8 +65,7 @@ static int64_t
}
static void
- b_add_to_env(const char arg[],
- t_msh *msh)
+ b_add_to_env(const char arg[], t_msh *msh)
{
size_t i;
char **nenvp;
@@ -98,6 +96,7 @@ void
char **var;
int64_t env_i;
+ varval[0] = C_NUL;
var = b_get_var(arg, msh);
if ((env_i = b_is_it_in_env(var[FT_VAR_NAME] + 1, msh)) != -1)
{