36 lines
1.6 KiB
C
36 lines
1.6 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* .--. _ */
|
||
|
/* pipex.h |o_o || | */
|
||
|
/* |:_/ || |_ _ ___ __ */
|
||
|
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
|
||
|
/* (| | )|_| |_| |> < */
|
||
|
/* Created: 2023/02/02 12:37:09 by djonker /'\_ _/`\__|\__,_/_/\_\ */
|
||
|
/* Updated: 2023/02/19 14:00:14 by djonker \___)=(___/ */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#ifndef PIPEX_H
|
||
|
# define PIPEX_H
|
||
|
|
||
|
# include <sys/wait.h>
|
||
|
# include "libft/libft.h"
|
||
|
# include "getnextline/get_next_line.h"
|
||
|
|
||
|
int ft_forkexec(int cmdnbr, char **paths, char **cmd, char **envp);
|
||
|
int ft_dupstuff(int **pipes, int i, int argc, char **argv);
|
||
|
int ft_waitandfree(int number, int **pipes, char **paths, int code);
|
||
|
|
||
|
char **ft_getcommands(char **argv, int argc);
|
||
|
char **ft_getpaths(char **envp, int i);
|
||
|
int **ft_preparepipes(int argc, char **argv);
|
||
|
int ft_heredoc(char *delimiter);
|
||
|
int ft_inputfile(char *file, int argc, char **argv);
|
||
|
int ft_outputfile(int heredoc, int argc, char **argv);
|
||
|
|
||
|
int ft_errorexit(char *reason, char *cmd, int code);
|
||
|
int ft_checkfiles(int argc, char **argv, int file);
|
||
|
int ft_checkcommands(char **current, char **paths, char **cmd, int cmdnbr);
|
||
|
|
||
|
#endif
|