42-archive/libftasm/src/printing/ft_putendl_fd.c

22 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/03 14:57:42 by jhalford #+# #+# */
/* Updated: 2016/11/03 14:57:42 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char const *s, int fd)
{
char nl;
nl = '\n';
write(fd, s, ft_strlen(s));
write(fd, &nl, 1);
}