hidden norm cleanup

This commit is contained in:
Tanguy MAZE
2019-03-16 17:50:27 +01:00
parent d49f964045
commit acf5431d14
12 changed files with 104 additions and 106 deletions

View File

@@ -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));