-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipex.h
59 lines (50 loc) · 1.93 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
52
53
54
55
56
57
58
59
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipex.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dalves-p <dalves-p@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/23 16:29:46 by dalves-p #+# #+# */
/* Updated: 2022/01/20 16:51:47 by dalves-p ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PIPEX_H
# define PIPEX_H
# include <unistd.h>
# include <fcntl.h>
# include <stdlib.h>
# include <sys/wait.h>
# include <errno.h>
# include <string.h>
# define FD_R 0
# define FD_W 1
# if defined _WIN32
# define SEPARATOR '\\'
# else
# define SEPARATOR "/"
# endif
/*
** FUNCTIONS PROTOTYPE
*/
int error(char *err, int code);
char **get_full_path(char *envp[]);
/*
** LIBFT
*/
size_t ft_count_words(char const *s, char c);
void ft_free_ptrptr(char **cmd);
void ft_putstr_fd(char *s, int fd);
char **ft_split_pipex(char const *s, char c);
char **ft_split(char const *s, char c);
char *ft_strchr(const char *s, int c);
int ft_strcmp(char *s1, char *s2);
char *ft_strdup(const char *s1);
char *ft_strjoin(char const *s1, char const *s2);
size_t ft_strlcat(char *dst, const char *src, size_t dstsize);
size_t ft_strlcpy(char *dst, const char *src, size_t dstsize);
size_t ft_strlen(const char *s);
char *ft_strstr(char *haystack, char *needle);
char *ft_strtrim(char const *s1, char const *set);
char *ft_substr(char const *s, unsigned int start, size_t len);
#endif