ft_putchar.c 1.0 KB

1234567891011121314151617181920212223242526
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_putchar.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2015/11/25 16:39:02 by bchanot #+# #+# */
  9. /* Updated: 2016/11/02 13:56:35 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. #include <unistd.h>
  14. int ft_putchar_fd(int c, int fd)
  15. {
  16. write(fd, &c, 1);
  17. return (1);
  18. }
  19. int ft_putchar(int c)
  20. {
  21. write(1, &c, 1);
  22. return (1);
  23. }