aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/minishell.h10
-rw-r--r--include/ms_parse.h8
2 files changed, 13 insertions, 5 deletions
diff --git a/include/minishell.h b/include/minishell.h
index 5e27ffa..97293c2 100644
--- a/include/minishell.h
+++ b/include/minishell.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/26 15:33:51 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:34:21 by cacharle ### ########.fr */
+/* Updated: 2020/02/28 15:30:10 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,6 +30,8 @@
# include "ms_parse.h"
# define MS_PATH_KEY "PATH"
+# define MS_PIPE_WRITE 1
+# define MS_PIPE_READ 0
typedef struct
{
@@ -43,6 +45,12 @@ typedef struct
t_ftht *environment;
} t_state;
+typedef struct
+{
+ int pipe_in[2];
+ int pipe_out[2];
+} t_command_frame;
+
/*
** state.c
*/
diff --git a/include/ms_parse.h b/include/ms_parse.h
index 043f065..59c9ca8 100644
--- a/include/ms_parse.h
+++ b/include/ms_parse.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:28:59 by cacharle ### ########.fr */
+/* Updated: 2020/02/28 14:57:58 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -32,15 +32,15 @@ typedef struct
{
char *name;
char **argv;
- t_ftlst *redirections;
+ t_ftlst *redirections; // need to store them in reverse order
} t_command;
typedef enum
{
SEPARATOR_SEMICOLON,
SEPARATOR_PIPE,
- SEPARATOR_AND,
- SEPARATOR_OR,
+ // SEPARATOR_AND, // with parhenthesis => harder
+ // SEPARATOR_OR,
} t_separator;
typedef struct