summaryrefslogtreecommitdiffstats
path: root/src/b_export.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/b_export.c')
-rw-r--r--src/b_export.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/b_export.c b/src/b_export.c
index 9987583..aa0c5d0 100644
--- a/src/b_export.c
+++ b/src/b_export.c
@@ -84,12 +84,11 @@ void
}
uint8_t
- b_export(char *args[],
- t_msh *msh)
+ b_export(char *args[], t_msh *msh)
{
/* TODO: norme */
char **ptr;
- char *varval;
+ char varval[4096];
char fmt[4096];
t_bool next;
uint8_t r;
@@ -111,12 +110,11 @@ uint8_t
{
next = TRUE;
ft_sprintf(fmt, "$%s", *ptr);
- varval = u_get_cstm_vr(fmt, msh);
- if (varval != NULL)
+ u_get_custom_var(varval, fmt, 4096, msh);
+ if (varval[0] != C_NUL)
{
ft_sprintf(fmt, "%s=%s", *ptr, varval);
b_add_to_env_from_globals(*ptr, fmt, msh);
- ft_memdel((void*)&varval);
}
}
else if (next == FALSE && check_equals(*ptr) == TRUE)