aboutsummaryrefslogtreecommitdiff
path: root/get_next_line.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-10-24 11:03:09 +0200
committerCharles <sircharlesaze@gmail.com>2019-10-24 11:03:09 +0200
commitd9b69c88cc2105351e230dd7da6ff77045318b00 (patch)
treefb1e3008df2ddcc1e7995073df0aac61798d698a /get_next_line.h
parent9d66e3d084f575187b334d171a8bed40c476aa08 (diff)
downloadget_next_line-d9b69c88cc2105351e230dd7da6ff77045318b00.tar.gz
get_next_line-d9b69c88cc2105351e230dd7da6ff77045318b00.tar.bz2
get_next_line-d9b69c88cc2105351e230dd7da6ff77045318b00.zip
normed and protect against BUFFER_SIZE < 0
Diffstat (limited to 'get_next_line.h')
-rw-r--r--get_next_line.h8
1 files changed, 5 insertions, 3 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <limits.h>
+
# 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 <stdio.h>
/*
** 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);