make code more readable and fix things

This commit is contained in:
mcolonna 2024-05-15 19:31:57 +02:00
parent 3adace7f33
commit 0c3d0ff95b
2 changed files with 47 additions and 49 deletions

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/05/13 10:22:54 by jschaft ### ########.fr */
/* Updated: 2024/05/15 18:10:34 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -52,13 +52,11 @@ typedef struct s_command
int output_fd; // fd to use with '>' redirection (1 by default)
} t_command;
// To make a list of pipe when needed
// An element of a list of pipes
typedef struct s_pipes
{
int pipe[2]; // simple pipe
int i; //index of the pipe
int inout; //in case of first or last pipe
} t_pipes;
int pipe[2]; // Simple pipe, we write on pipe[1] and we read on pipe[0]
} t_pipes;
// Return the t_command representing the command given by the user.
// If error, return a t_command wth the value .error = true.