diff --git a/sources/exec/separator/semicolon.c b/sources/exec/separator/semicolon.c index 2657d6b1..1b7e1fb7 100644 --- a/sources/exec/separator/semicolon.c +++ b/sources/exec/separator/semicolon.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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); } diff --git a/sources/exec/separator/separator.h b/sources/exec/separator/separator.h new file mode 100644 index 00000000..f8c924b6 --- /dev/null +++ b/sources/exec/separator/separator.h @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* separator.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rparodi +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2024/05/12 16:53:15 by rparodi #+# #+# */ +/* Updated: 2024/05/12 16:54:01 by rparodi ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef SEPARATOR_H +# define SEPARATOR_H + +# include "minishell.h" + +t_error ft_command_exec(t_node *node, t_i32 *ret_value); +t_error semicolon_exec(t_node *first, t_node *second, t_i32 *ret_value); + +#endif +