diff options
Diffstat (limited to '')
-rw-r--r-- | src/b_export.c (renamed from src/ft_b_export.c) | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/ft_b_export.c b/src/b_export.c index fa2de45..5e7ee14 100644 --- a/src/ft_b_export.c +++ b/src/b_export.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_b_export.c :+: :+: :+: */ +/* b_export.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -13,13 +13,14 @@ #include <libft.h> #include <stdlib.h> #include <stdint.h> -#include "ft_b_env.h" -#include "ft_f_fail.h" -#include "ft_s_struct.h" -#include "ft_u_utils.h" + +#include "b_env.h" +#include "f_fail.h" +#include "s_struct.h" +#include "u_utils.h" static int8_t - ft_check_valid_identifier(const char *arg) + check_valid_identifier(const char *arg) { char *ptr; @@ -32,7 +33,7 @@ static int8_t } static int8_t - ft_check_equals(const char *arg) + check_equals(const char *arg) { char *ptr; @@ -47,30 +48,30 @@ static int8_t } uint8_t - ft_b_export(char *args[], + b_export(char *args[], t_msh *msh) { - const uint64_t argc = ft_get_argc((const char**)args); + const uint64_t argc = get_argc((const char**)args); char **ptr; int8_t next; uint8_t r; if (argc == 0) { - return (ft_b_env(NULL, msh)); + return (b_env(NULL, msh)); } ptr = args; r = 0; while (*ptr) { next = 0; - if (!ft_check_valid_identifier(*ptr)) + if (!check_valid_identifier(*ptr)) { - ft_fail_identifier("export", *ptr, msh); + fail_identifier("export", *ptr, msh); next = 1; r = 1; } - if (next == 0 && !ft_check_equals(*ptr)) + if (next == 0 && !check_equals(*ptr)) next = 1; ptr++; } |