summaryrefslogtreecommitdiff
path: root/libft/ft_putchar_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/ft_putchar_fd.c')
-rw-r--r--libft/ft_putchar_fd.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libft/ft_putchar_fd.c b/libft/ft_putchar_fd.c
new file mode 100644
index 0000000..120c9cc
--- /dev/null
+++ b/libft/ft_putchar_fd.c
@@ -0,0 +1,19 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_putchar_fd.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: kdx <kdx @student.42angouleme.fr +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2022/09/29 02:11:58 by kdx #+# #+# */
+/* Updated: 2022/10/04 04:54:01 by kdx ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+#include <unistd.h>
+
+size_t ft_putchar_fd(char c, int fd)
+{
+ return (write(fd, &c, 1) == 1);
+}