summaryrefslogtreecommitdiffstats
path: root/src/ft_b_export.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_b_export.c')
-rw-r--r--src/ft_b_export.c13
1 files changed, 9 insertions, 4 deletions
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);
}