Adding the semicolons

This commit is contained in:
EniumRaphael 2024-05-12 16:54:29 +02:00
parent 771deeb02a
commit 4e4a448d75
2 changed files with 42 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/12 16:00:33 by rparodi #+# #+# */
/* Updated: 2024/05/12 16:03:31 by rparodi ### ########.fr */
/* Updated: 2024/05/12 16:21:34 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,7 +21,25 @@
#include "minishell.h"
#include "me/string/str_clone.h"
t_error semicolon_exec(t_node *first, t_node *second, t_i32 ret_value)
t_error ft_command_exec(t_node *node, t_i32 *ret_value)
{
printf("execve : %s\n", node->single_str);
return (NO_ERROR);
}
t_error semicolon_exec(t_node *first, t_node *second, t_i32 *ret_value)
{
if (!first && !second)
return (ERROR);
if (!first)
ft_command_exec(second, ret_value);
else if (!second)
ft_command_exec(first, ret_value);
else
{
ft_command_exec(first, ret_value);
ft_command_exec(second, ret_value);
}
return (NO_ERROR);
}