From 9af2885d872de9c60b11159efe0685738031096d Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 14 Feb 2020 03:46:08 +0100 Subject: Added documentation for all functions and refactored ft_strjoin_free -> ft_strjoinf --- src/io/ft_getchar.c | 2 +- src/io/ft_next_line.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/io') diff --git a/src/io/ft_getchar.c b/src/io/ft_getchar.c index 54b44d4..9d233c0 100644 --- a/src/io/ft_getchar.c +++ b/src/io/ft_getchar.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/18 10:29:54 by cacharle #+# #+# */ -/* Updated: 2020/01/18 10:46:56 by cacharle ### ########.fr */ +/* Updated: 2020/02/14 02:24:56 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/src/io/ft_next_line.c b/src/io/ft_next_line.c index 51d21ec..0f4cc2c 100644 --- a/src/io/ft_next_line.c +++ b/src/io/ft_next_line.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/31 10:39:38 by cacharle #+# #+# */ -/* Updated: 2020/01/31 10:39:40 by cacharle ### ########.fr */ +/* Updated: 2020/02/14 03:38:01 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,11 +53,11 @@ static int st_read_line(int fd, char **line, char *rest) { ft_strcpy(rest, buf + split_at + 1); buf[split_at] = '\0'; - if ((*line = ft_strjoin_free(*line, buf, 1)) == NULL) + if ((*line = ft_strjoinf(*line, buf, FT_STRJOINF_FST)) == NULL) return (st_free_return(&buf, NULL, FTNL_STATUS_ERROR)); return (st_free_return(&buf, NULL, FTNL_STATUS_LINE)); } - if ((*line = ft_strjoin_free(*line, buf, 1)) == NULL) + if ((*line = ft_strjoinf(*line, buf, FT_STRJOINF_FST)) == NULL) return (st_free_return(&buf, NULL, FTNL_STATUS_ERROR)); } if (ret == -1) -- cgit