diff --git a/Makefile b/Makefile index 7634d3c..e3c97d4 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: tmaze +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2018/04/07 12:47:06 by tmaze #+# #+# # -# Updated: 2019/03/23 16:26:19 by tmaze ### ########.fr # +# Updated: 2019/03/23 17:18:32 by tmaze ### ########.fr # # # #******************************************************************************# @@ -16,6 +16,7 @@ CCSTD = NAME = libft.a +<<<<<<< HEAD SRCS = ft_memalloc.c \ ft_memdel.c \ ft_memset.c \ diff --git a/includes/libft.h b/includes/libft.h index 9bd6d39..8efb2a0 100644 --- a/includes/libft.h +++ b/includes/libft.h @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/04/08 00:12:36 by tmaze #+# #+# */ -/* Updated: 2019/03/19 15:18:55 by tmaze ### ########.fr */ +/* Updated: 2019/03/20 16:46:41 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -362,5 +362,6 @@ char **ft_strsplitwhitespace(char *s); int ft_atois(const char *str, int *nb); int ft_getline(char **line); int ft_putendl2(char const *s); +int ft_putendl_fd2(char const *s, int fd); #endif diff --git a/srcs/ft_putendl2.c b/srcs/ft_putendl2.c index 0093d64..af66e22 100644 --- a/srcs/ft_putendl2.c +++ b/srcs/ft_putendl2.c @@ -6,7 +6,7 @@ /* By: tmaze +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/19 15:14:49 by tmaze #+# #+# */ -/* Updated: 2019/03/19 15:18:45 by tmaze ### ########.fr */ +/* Updated: 2019/03/20 17:00:52 by tmaze ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,7 +16,7 @@ int ft_putendl2(char const *s) { char *str; - if (s != NULL && (str = ft_strnew(ft_strlen(s))) != NULL) + if (s != NULL && (str = ft_strnew(ft_strlen(s) + 1)) != NULL) { ft_strcpy(str, s); ft_strcat(str, "\n");