-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_next_line.h
37 lines (31 loc) · 1.31 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: joandre- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/16 02:38:32 by joandre- #+# #+# */
/* Updated: 2024/10/15 15:22:52 by joandre- ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_H
# define GET_NEXT_LINE_H
# include <unistd.h>
# include <stdlib.h>
# include <stdbool.h>
# ifndef BUFFER_SIZE
# define BUFFER_SIZE 42
# endif
typedef struct s_line
{
char *buff;
struct s_line *next;
} t_line;
void *clean_buffer(size_t len);
bool is_newline(t_line *node);
size_t get_line_size(t_line *node);
void copy_line(t_line *node, char *line);
t_line *last_node(t_line *node);
char *get_next_line(int fd);
#endif