diff options
| author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-07 10:50:35 +0200 | 
|---|---|---|
| committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-05-07 10:50:35 +0200 | 
| commit | 959294d57b03788b09935f98431c1360d1a3b442 (patch) | |
| tree | a5d63a4dc75001f99e87c492e986849140195b79 | |
| parent | Smart-ass Makefile (diff) | |
| download | 42-minishell-959294d57b03788b09935f98431c1360d1a3b442.tar.gz 42-minishell-959294d57b03788b09935f98431c1360d1a3b442.tar.bz2 42-minishell-959294d57b03788b09935f98431c1360d1a3b442.tar.xz 42-minishell-959294d57b03788b09935f98431c1360d1a3b442.tar.zst 42-minishell-959294d57b03788b09935f98431c1360d1a3b442.zip | |
Preparing the structs
Diffstat (limited to '')
| -rw-r--r-- | src/ft_s_lpipes.c | 3 | ||||
| -rw-r--r-- | src/ft_s_lpipes.h | 5 | ||||
| -rw-r--r-- | src/ft_s_struct.h | 17 | 
3 files changed, 17 insertions, 8 deletions
| diff --git a/src/ft_s_lpipes.c b/src/ft_s_lpipes.c index c23808b..addbe7b 100644 --- a/src/ft_s_lpipes.c +++ b/src/ft_s_lpipes.c @@ -10,3 +10,6 @@  /*                                                                            */  /* ************************************************************************** */ +#include <stdint.h> + +#include "ft_s_lpipes.h" diff --git a/src/ft_s_lpipes.h b/src/ft_s_lpipes.h index fc641de..bbde11b 100644 --- a/src/ft_s_lpipes.h +++ b/src/ft_s_lpipes.h @@ -10,6 +10,7 @@  /*                                                                            */  /* ************************************************************************** */ -#ifndef FT_P_LPIPES_H -#define FT_P_LPIPES_H +#ifndef FT_S_LPIPES_H +#define FT_S_LPIPES_H +  #endif diff --git a/src/ft_s_struct.h b/src/ft_s_struct.h index 58c4273..56c1eeb 100644 --- a/src/ft_s_struct.h +++ b/src/ft_s_struct.h @@ -26,12 +26,7 @@  **  0: means no redirection  */ -typedef struct		s_lpipes -{ -	char			*com; -	char			**argv; -	struct s_lpipes	*next; -}					t_lpipes; +typedef struct s_lpipes *t_lpipes;  typedef struct		s_lvars  { @@ -47,9 +42,19 @@ typedef struct		s_lcom  	int8_t			redir;  	int32_t			rdrfd;  	char			*rdrpath; +	struct s_lpipes	*pipes;  	struct s_lcom	*next;  }					t_lcom; +struct		s_lpipes +{ +	int32_t			pipefd[2]; +	char			*com; +	char			**argv; +	struct s_lcom	*one; +	struct s_lpipes	*next; +}; +  typedef struct		s_msh  {  	char			**envp; | 
