aboutsummaryrefslogtreecommitdiffstats
path: root/libft/inc/libft.h
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-01 00:39:52 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-01 00:39:52 +0100
commit640b02490953858c3d872c8c1a8d517ffd79ab84 (patch)
treebc8d06703556a5e2f53996d8bd654b74e20d27cd /libft/inc/libft.h
parentNo leak (diff)
download42-cub3d-640b02490953858c3d872c8c1a8d517ffd79ab84.tar.gz
42-cub3d-640b02490953858c3d872c8c1a8d517ffd79ab84.tar.bz2
42-cub3d-640b02490953858c3d872c8c1a8d517ffd79ab84.tar.xz
42-cub3d-640b02490953858c3d872c8c1a8d517ffd79ab84.tar.zst
42-cub3d-640b02490953858c3d872c8c1a8d517ffd79ab84.zip
gnl
Diffstat (limited to 'libft/inc/libft.h')
-rw-r--r--libft/inc/libft.h20
1 files changed, 19 insertions, 1 deletions
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);
@@ -146,6 +153,17 @@ 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
*/