From 1903646e160346bc2fb3cc617689500cee03ff12 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 21 Apr 2020 22:45:45 +0200 Subject: I'll finish export later --- src/ft_b_export.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ft_b_export.c') diff --git a/src/ft_b_export.c b/src/ft_b_export.c index be4d94d..767db08 100644 --- a/src/ft_b_export.c +++ b/src/ft_b_export.c @@ -50,25 +50,30 @@ uint8_t ft_b_export(char *args[], t_msh *msh) { - char **ptr; const uint64_t argc = ft_get_argc((const char**)args); - int8_t next; + char **ptr; + int8_t next; + uint8_t r; if (argc == 0) { return (ft_b_env(NULL, msh)); } ptr = args; + r = 0; while (*ptr) { next = 0; if (!ft_check_valid_identifier(*ptr)) { ft_fail_identifier("export", *ptr); + next = 1; + r = 1; } - ft_check_equals(*ptr); + if (next == 0 && !ft_check_equals(*ptr)) + next = 1; ptr++; } /* TODO: finish export */ - return (0); + return (r); } -- cgit v1.2.3