|
|
@ -6,7 +6,7 @@ |
|
|
|
/* By: mea <marvin@42.fr> +#+ +:+ +#+ */ |
|
|
|
/* +#+#+#+#+#+ +#+ */ |
|
|
|
/* Created: 2022/05/06 13:15:59 by narnaud #+# #+# */ |
|
|
|
/* Updated: 2022/05/27 08:47:01 by narnaud ### ########.fr */ |
|
|
|
/* Updated: 2022/05/27 09:16:02 by narnaud ### ########.fr */ |
|
|
|
/* */ |
|
|
|
/* ************************************************************************** */ |
|
|
|
|
|
|
@ -35,17 +35,17 @@ int is_valid_identifier(char *ident, int silent) |
|
|
|
if (!ft_isalpha(ident[i]) && !ft_isdigit(ident[i]) |
|
|
|
&& ident[i] != '_') |
|
|
|
{ |
|
|
|
if (!silent) |
|
|
|
cmd_error("export", "not an identifier: ", ident); |
|
|
|
ft_putchar_fd('\n', 2); |
|
|
|
if (!silent && cmd_error("export", |
|
|
|
"not an identifier: ", ident)) |
|
|
|
ft_putchar_fd('\n', 2); |
|
|
|
return (0); |
|
|
|
} |
|
|
|
i++; |
|
|
|
} |
|
|
|
return (1); |
|
|
|
} |
|
|
|
if (!silent) |
|
|
|
cmd_error("export", "not an identifier: ", ident); |
|
|
|
ft_putchar_fd('\n', 2); |
|
|
|
if (!silent && cmd_error("export", |
|
|
|
"not an identifier: ", "\n")) |
|
|
|
ft_putchar_fd('\n', 2); |
|
|
|
return (0); |
|
|
|
} |
|
|
|