-
Notifications
You must be signed in to change notification settings - Fork 1
/
get_next_line.h
73 lines (58 loc) · 1.99 KB
/
get_next_line.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cvidon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/15 18:00:00 by cvidon #+# #+# */
/* Updated: 2022/08/15 18:00:00 by cvidon ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_H
# define GET_NEXT_LINE_H
/*
** =========[ Includes ]==========
*/
/* get_next_line */
# include <unistd.h>
# include <stdlib.h>
/*
** =========[ Defines ]===========
*/
/*
** @brief The minimum amount of characters (bytes) read by one
** get_next_line call on the given file descriptor.
*/
# ifndef BUFFER_SIZE
# define BUFFER_SIZE 42
# endif
/*
** @brief The maximum number of file that can be read simultaneously by
** get_next_line.
*/
# ifndef OPEN_MAX
# define OPEN_MAX 1024
# endif
/*
** =========[ Prototypes ]========
*/
/*
** get_next_line_utils.c
**
** Libft functions required by get_next_line_utils.
*/
char *ft_strchr(char const *s, int c);
size_t ft_strlen(char const *str);
char *ft_strdup(char const *s1);
char *ft_strjoin_free_s1(char *s1, char const *s2);
char *ft_substr(char const *str, unsigned int start, size_t size);
/*
** get_next_line.c
**
** Read each line of the given file, one at a function call.
*/
/* static char *ft_next(char **temp) */
/* static char *ft_read(char *temp, int fd) */
char *get_next_line(int fd);
#endif