hidden norm cleanup
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/24 18:08:15 by tmaze #+# #+# */
|
||||
/* Updated: 2018/06/07 16:55:21 by tmaze ### ########.fr */
|
||||
/* Updated: 2019/03/16 15:53:27 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -61,16 +61,16 @@ static int read_gnl(const int fd, char **buff, char **line)
|
||||
|
||||
if ((tmp = ft_strnew(BUFF_SIZE)) == NULL)
|
||||
return (-1);
|
||||
while (ft_strrnchr(*buff, '\n', BUFF_SIZE) == NULL &&\
|
||||
(ret = read(fd, tmp, BUFF_SIZE)) > 0)
|
||||
while (ft_strrnchr(*buff, '\n', BUFF_SIZE) == NULL
|
||||
&& (ret = read(fd, tmp, BUFF_SIZE)) > 0)
|
||||
if (supercat(buff, &tmp) == NULL)
|
||||
{
|
||||
ft_strdel(&tmp);
|
||||
return (-1);
|
||||
}
|
||||
ft_strdel(&tmp);
|
||||
if (buff != NULL && *buff != NULL &&\
|
||||
ft_strrnchr(*buff, '\n', BUFF_SIZE) != NULL)
|
||||
if (buff != NULL && *buff != NULL
|
||||
&& ft_strrnchr(*buff, '\n', BUFF_SIZE) != NULL)
|
||||
return (get_next_line(fd, line));
|
||||
else
|
||||
return (check_buff(buff, line));
|
||||
|
Reference in New Issue
Block a user