From d9b69c88cc2105351e230dd7da6ff77045318b00 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 24 Oct 2019 11:03:09 +0200 Subject: normed and protect against BUFFER_SIZE < 0 --- get_next_line.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'get_next_line.h') diff --git a/get_next_line.h b/get_next_line.h index 6a08080..f1f45aa 100644 --- a/get_next_line.h +++ b/get_next_line.h @@ -6,15 +6,17 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/09 13:52:59 by cacharle #+# #+# */ -/* Updated: 2019/10/20 08:28:34 by cacharle ### ########.fr */ +/* Updated: 2019/10/24 10:56:13 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef GET_NEXT_LINE_H # define GET_NEXT_LINE_H +# include + # ifndef BUFFER_SIZE -# define BUFFER_SIZE 66 +# define BUFFER_SIZE 1 # endif # define LINE_READ 1 @@ -26,11 +28,11 @@ typedef int t_bool; -#include /* ** get_next_line.c */ +int real_get_next_line(int fd, char **line, int ret, int split_at); int get_next_line(int fd, char **line); int put_rest(char **line, char *rest); int find_newline(char *str); -- cgit