put_endl_fd, deso deso wescande

This commit is contained in:
Jack Halford 2017-02-20 18:19:59 +01:00
parent e181f3bf64
commit 7326e33f92
3 changed files with 11 additions and 6 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */ /* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */ /* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */
/* Updated: 2017/02/18 18:48:49 by jhalford ### ########.fr */ /* Updated: 2017/02/20 17:25:39 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/09 15:59:39 by jhalford #+# #+# */ /* Created: 2017/02/09 15:59:39 by jhalford #+# #+# */
/* Updated: 2017/02/10 00:28:45 by jhalford ### ########.fr */ /* Updated: 2017/02/20 17:19:25 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,17 +6,22 @@
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */ /* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/03 14:57:40 by jhalford #+# #+# */ /* Created: 2016/11/03 14:57:40 by jhalford #+# #+# */
/* Updated: 2016/11/03 14:57:41 by jhalford ### ########.fr */ /* Updated: 2017/02/20 18:17:01 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "libft.h"
void ft_putendl(char const *s) void ft_putendl_fd(char const *s, int fd)
{ {
char nl; char nl;
nl = '\n'; nl = '\n';
write(1, s, ft_strlen(s)); write(fd, s, ft_strlen(s));
write(1, &nl, 1); write(fd, &nl, 1);
}
void ft_putendl(char const *s)
{
ft_putendl_fd(s, 1);
} }