-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_next_line_bonus.h
39 lines (32 loc) · 1.47 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/05 22:07:37 by nkawaguc #+# #+# */
/* Updated: 2024/05/05 22:07:37 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_BONUS_H
# define GET_NEXT_LINE_BONUS_H
# include <unistd.h>
# include <stdlib.h>
# include <limits.h>
# ifndef BUFFER_SIZE
# define BUFFER_SIZE 1024
# endif
typedef struct s_node
{
unsigned int fd;
char *buf;
struct s_node *ch[2];
} t_nodes;
// # define DEBUG
char *get_next_line(int fd);
void *gnl_realloc(void *ptr, size_t new_size, size_t old_size);
int gnl_strncat(char **dst, const char *src, int *line_size, int *cat_size);
int gnl_read(int fd, char **line, int *line_size, char *buf);
void gnl_bzero(void *buf, size_t size);
#endif