From 640b02490953858c3d872c8c1a8d517ffd79ab84 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 1 Mar 2020 00:39:52 +0100 Subject: gnl --- libft/inc/libft.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'libft/inc') diff --git a/libft/inc/libft.h b/libft/inc/libft.h index ccc1c65..e3dae43 100644 --- a/libft/inc/libft.h +++ b/libft/inc/libft.h @@ -30,6 +30,14 @@ typedef struct s_list struct s_list *next; } t_list; + +typedef struct s_gnl +{ + int fd; + char *rest; + struct s_gnl *next; +} t_gnl; + typedef struct s_printflist { int putlen; @@ -128,7 +136,6 @@ int ft_putendl(const char *s); int ft_putchar_fd(char c, int fd); int ft_putstr_fd(char *s, int fd); int ft_strcmp(const char *s1, const char *s2); -int get_next_line(int fd, char **line); long ft_memlchr(const void *s, int c, size_t n); long ft_strlchr(const char *s, int c); size_t ft_strlen(const char *s); @@ -145,6 +152,17 @@ t_list *ft_lstnew(void *content); t_list *ft_lstlast(t_list *lst); t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)); +/* +** get_next_line +*/ + +char *ft_strchr_gnl(const char *s, int c); +char *ft_swap_gnl(char *s1, char *free_ft); +int get_next_line(int fd, char **line); +int ft_free_gnl(int fd, t_gnl **list); +size_t ft_strlen_gnl(const char *s, char c); +t_gnl *ft_find_fd(int fd, t_gnl **list); + /* ** ft_printf */ -- cgit v1.2.3