From d4f57e8f7b36ba066b5b7a0654805a1bad933854 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Tue, 8 Nov 2022 14:49:12 +0100 Subject: [PATCH] kekw --- get_next_line.c | 67 +++++++++++++++++++++++-------------------- get_next_line.h | 3 +- get_next_line_utils.c | 19 +++++++++++- gnlTester | 1 - main.c | 26 ----------------- tester | 3 -- 6 files changed, 56 insertions(+), 63 deletions(-) delete mode 160000 gnlTester delete mode 100644 main.c delete mode 100644 tester diff --git a/get_next_line.c b/get_next_line.c index cf9b435..ac52fc5 100644 --- a/get_next_line.c +++ b/get_next_line.c @@ -6,7 +6,7 @@ /* By: cchauvet # include -# define BUFFER_SIZE 10 +//# define BUFFER_SIZE 40 void *ft_calloc(size_t nmemb, size_t size); void *ft_realloc(void *ptr, size_t size); char *ft_strfjoin(char *dst, char *src); char *ft_strndup(char *src, size_t n); size_t ft_strlen(char *str); +ssize_t ft_strchr(char *str, char c); char *get_next_line(int fd); #endif diff --git a/get_next_line_utils.c b/get_next_line_utils.c index 10a0bfa..f4f37a0 100644 --- a/get_next_line_utils.c +++ b/get_next_line_utils.c @@ -6,7 +6,7 @@ /* By: cchauvet - -#include -#include -#include -int main(void) -{ - int fd = open("tester", O_RDONLY); - char *str; - str = get_next_line(fd); - printf("%s", str); - free(str); - str = get_next_line(fd); - printf("%s", str); - free(str); - str = get_next_line(fd); - printf("%s", str); - free(str); -// printf("%s", get_next_line(fd)); -// printf("%s", get_next_line(fd)); -// printf("%s", get_next_line(fd)); -// printf("%s", get_next_line(fd)); -// printf("%s", get_next_line(fd)); - -} diff --git a/tester b/tester deleted file mode 100644 index 7698346..0000000 --- a/tester +++ /dev/null @@ -1,3 +0,0 @@ -test1 -test2 -test3