1
0
mirror of https://github.com/KeyZox71/ft_minipowershell.git synced 2025-06-25 02:13:35 +02:00

🔨」 fix(builtins/ft_unset): fixed unset, now takes multiples arguments

This commit is contained in:
y-syo
2024-07-16 13:36:56 +02:00
parent b55a715fcc
commit f496b7140e
3 changed files with 15 additions and 6 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/25 16:45:04 by mmoussou #+# #+# */
/* Updated: 2024/06/25 17:13:38 by mmoussou ### ########.fr */
/* Updated: 2024/07/16 13:35:38 by mmoussou ### ########.fr */
/* */
/* ************************************************************************** */
@ -24,7 +24,7 @@ void pop_first_el(t_env *env)
free(tmp);
}
void ft_unset(char *arg, t_env *env)
void ft_unset_arg(char *arg, t_env *env)
{
t_env *tmp;
@ -51,3 +51,12 @@ void ft_unset(char *arg, t_env *env)
env = env->next;
}
}
void ft_unset(char **args, t_env *env)
{
while (*args)
{
ft_unset_arg(*args, env);
args++;
}
}