-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_next_line_bonus.h
40 lines (34 loc) · 1.5 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: awerebea <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/13 12:42:55 by awerebea #+# #+# */
/* Updated: 2020/09/22 18:37:35 by awerebea ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_BONUS_H
# define GET_NEXT_LINE_BONUS_H
# include <stdlib.h>
# include <unistd.h>
/*
** fd - file descriptor
** rmndr - remainder of readed line from last iteration of GNL function
** rmndr_start - pointer to start of 'rmndr' string (for 'free')
*/
typedef struct s_glst
{
int fd;
char *rmndr;
char *rmndr_start;
struct s_glst *next;
} t_glst;
int get_next_line(int fd, char **line);
t_glst *f_gnl_new(int fd);
t_glst *f_search_gnl(int fd, t_glst **g_head);
char *ft_strdup(const char *s);
char *ft_strchr(const char *s, int c);
char *ft_strjoin(char const *s1, char const *s2);
#endif