malloc/subprojects/libft/ft_putendl.c

23 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/04 14:57:59 by gtertysh #+# #+# */
/* Updated: 2016/12/04 15:24:37 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl(char const *s)
{
if (s)
while (*s)
if (write(1, s++, 1) == -1)
return ;
if (write(1, "\n", 1) == -1)
return ;
}