diff --git a/get_next_line.c b/get_next_line.c index 4da115b..7217708 100644 --- a/get_next_line.c +++ b/get_next_line.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/12/11 00:27:09 by hulamy #+# #+# */ -/* Updated: 2019/12/16 13:54:20 by hulamy ### ########.fr */ +/* Updated: 2019/12/16 14:21:00 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -128,7 +128,7 @@ void free_lst(t_gnlist **lst, const int fd) int get_next_line(const int fd, char **line) { - char buf[BUFF_SIZE + 1]; + char buf[BUFFER_SIZE + 1]; int ret; static t_gnlist *lst = NULL; char *str; @@ -139,7 +139,7 @@ int get_next_line(const int fd, char **line) { if ((str = ft_strchr(lst->string, '\n'))) return (hasnewline(str, lst, line)); - if ((ret = read(fd, buf, BUFF_SIZE)) < 0) + if ((ret = read(fd, buf, BUFFER_SIZE)) < 0) return (-1); buf[ret] = '\0'; if (!(lst->string = ft_strjoinfree(lst->string, buf))) diff --git a/get_next_line_bonus.c b/get_next_line_bonus.c index 02761f4..1f292cd 100644 --- a/get_next_line_bonus.c +++ b/get_next_line_bonus.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/12/16 14:08:36 by hulamy #+# #+# */ -/* Updated: 2019/12/16 14:10:35 by hulamy ### ########.fr */ +/* Updated: 2019/12/16 14:21:34 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -128,7 +128,7 @@ void free_lst(t_gnlist **lst, const int fd) int get_next_line(const int fd, char **line) { - char buf[BUFF_SIZE + 1]; + char buf[BUFFER_SIZE + 1]; int ret; static t_gnlist *lst = NULL; char *str; @@ -139,7 +139,7 @@ int get_next_line(const int fd, char **line) { if ((str = ft_strchr(lst->string, '\n'))) return (hasnewline(str, lst, line)); - if ((ret = read(fd, buf, BUFF_SIZE)) < 0) + if ((ret = read(fd, buf, BUFFER_SIZE)) < 0) return (-1); buf[ret] = '\0'; if (!(lst->string = ft_strjoinfree(lst->string, buf)))