pipex/pipex.h
2023-10-26 18:58:33 +02:00

36 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* pipex.h :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:58:10 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:58:10 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#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