put_endl_fd, deso deso wescande
This commit is contained in:
parent
e181f3bf64
commit
7326e33f92
3 changed files with 11 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,17 +6,22 @@
|
|||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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"
|
||||
|
||||
void ft_putendl(char const *s)
|
||||
void ft_putendl_fd(char const *s, int fd)
|
||||
{
|
||||
char nl;
|
||||
|
||||
nl = '\n';
|
||||
write(1, s, ft_strlen(s));
|
||||
write(1, &nl, 1);
|
||||
write(fd, s, ft_strlen(s));
|
||||
write(fd, &nl, 1);
|
||||
}
|
||||
|
||||
void ft_putendl(char const *s)
|
||||
{
|
||||
ft_putendl_fd(s, 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue