-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathget_next_line_bonus.h
46 lines (35 loc) · 1.44 KB
/
get_next_line_bonus.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yde-goes <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/30 22:12:25 by yde-goes #+# #+# */
/* Updated: 2022/08/06 21:17:26 by yde-goes ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_BONUS_H
# define GET_NEXT_LINE_BONUS_H
# ifndef OPEN_MAX
# define OPEN_MAX 1024
# endif
# ifndef BUFFER_SIZE
# define BUFFER_SIZE 1024
# endif
# include <stdlib.h>
# include <fcntl.h>
# include <unistd.h>
typedef struct s_line
{
char *content;
int length;
struct s_line *next;
} t_line;
char *get_next_line(int fd);
t_line *ft_lstnew(char *content);
t_line *ft_lstlast(t_line *lst);
void ft_lstadd_back(t_line **lst, t_line *new);
void ft_lstclear(t_line **lst, void (*del)(void *));
void *ft_calloc(size_t nmemb, size_t size);
#endif