aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_putendl_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_putendl_fd.c')
-rw-r--r--src/ft_putendl_fd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ft_putendl_fd.c b/src/ft_putendl_fd.c
new file mode 100644
index 0000000..f7c7334
--- /dev/null
+++ b/src/ft_putendl_fd.c
@@ -0,0 +1,9 @@
+#include "libft.h"
+#include <unistd.h>
+
+void
+ft_putendl_fd (char *s, int fd)
+{
+ write (fd, s, ft_strlen (s));
+ write (fd, "\n", 1);
+}