/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_getchar.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/06/15 18:46:16 by bchanot #+# #+# */ /* Updated: 2017/11/13 15:31:49 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include int ft_getchar(int fd) { char c; if (read(fd, &c, 1) != 1) return (-1); return ((int)c); }