From 4543c3ba3222d47780ad3e091cfe6f3098cc2bca Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 6 Sep 2020 21:56:20 +0200 Subject: Stacked --- src/b_export_mute.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/b_export_mute.c') 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) -- cgit v1.2.3