init with functionnal works

This commit is contained in:
Hugo LAMY
2019-12-11 01:00:33 +01:00
commit 7fd709fcac
5 changed files with 513 additions and 0 deletions

41
get_next_line.h Normal file
View File

@@ -0,0 +1,41 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/01/29 10:19:37 by hulamy #+# #+# */
/* Updated: 2019/12/11 00:56:04 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_H
# define GET_NEXT_LINE_H
# include <string.h>
# include <unistd.h>
# include <stdlib.h>
# ifndef BUFF_SIZE
# define BUFF_SIZE 9999
# endif
typedef struct s_gnlist
{
int lfd;
char *string;
struct s_gnlist *next;
} t_gnlist;
int get_next_line(const int fd, char **line);
int multi_fd(int fd, t_gnlist **lst);
char *ft_strjoinfree(char const *s1, char const *s2);
int hasnewline(char *str, t_gnlist *lst, char **line);
size_t ft_strlen(const char *str);
void *ft_memmove(void *dst, const void *src, size_t len);
char *ft_strchr(const char *s, int c);
char *ft_strdup(const char *src);
#endif