-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_next_line.h
38 lines (33 loc) · 1.58 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: elanna <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/03/27 17:01:23 by elanna #+# #+# */
/* Updated: 2021/04/01 21:41:56 by elanna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_H
# define GET_NEXT_LINE_H
# include <stdlib.h>
# include <unistd.h>
typedef struct s_content
{
char *buffer;
int fd;
struct s_content *next;
} t_content;
char *ft_strdup(const char *s);
char *ft_strjoin(char const *s1, char const *s2);
char *ft_strchr(const char *s, int c);
t_content *ft_lstnew(char *buffer, int fd);
void ft_lstadd_back(t_content **alst, t_content *new);
void ft_delcont(int fd, t_content **content);
t_content *ft_lstchr_fd(t_content **lst, int fd);
int get_content_line(int fd, char **line, ssize_t rd,
t_content **cont);
void fill_content_struct(t_content **content, char *buffer, int fd);
int get_next_line(int fd, char **line);
#endif