-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipex.h
51 lines (43 loc) · 1.55 KB
/
pipex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipex.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dvan-der <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/14 13:55:17 by dvan-der #+# #+# */
/* Updated: 2022/02/09 14:27:03 by dvan-der ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PIPEX_H
# define PIPEX_H
# include <stdio.h>
# include <stdlib.h>
# include <unistd.h>
# include <stdbool.h>
# include <fcntl.h>
# include <sys/errno.h>
# include "libft/libft.h"
# include "libft/get_next_line.h"
typedef struct s_fork
{
pid_t child;
struct s_fork *next;
} t_fork;
typedef struct s_pipe
{
int cmd_i;
int cmd_lim;
char **envp;
char **path;
char **mycmd;
char **argv;
} t_pipe;
void pipex(t_pipe *p, int fd);
void conv_info(t_pipe *p, char **argv);
char **ft_split_pipex(char const *s, char c);
int arrange_input(t_pipe *p, int input);
int arrange_output(t_pipe *p, int output, int file2);
void free_pipex(t_pipe *p);
void execute_cmd(t_pipe *p);
#endif