summaryrefslogtreecommitdiffstats
path: root/src/b_export_mute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/b_export_mute.c')
-rw-r--r--src/b_export_mute.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/b_export_mute.c b/src/b_export_mute.c
index 4969320..ac72a7e 100644
--- a/src/b_export_mute.c
+++ b/src/b_export_mute.c
@@ -16,7 +16,7 @@
#include "b_export.h"
#include "b_export_next.h"
-#include "d_enum.h"
+#include "d_define.h"
#include "f_fail.h"
#include "s_destroy.h"
#include "s_line.h"
@@ -26,12 +26,11 @@
#include "u_vars.h"
uint8_t
- b_export_mute(char *args[],
- t_msh *msh)
+ b_export_mute(char *args[], t_msh *msh)
{
/* TODO: norme */
char **ptr;
- char *varval;
+ char varval[4096];
char fmt[4096];
t_bool next;
uint8_t r;
@@ -52,12 +51,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)