/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_getchar.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/18 10:29:54 by cacharle #+# #+# */ /* Updated: 2020/02/14 02:24:56 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char ft_getchar(void) { char c; if (read(STDIN_FILENO, &c, 1) < 0) return (-1); return (c); }