libft/ft_close.c
Tanguy MAZE d49f964045 let's test this
added ft_open, ft_close and ft_gets functions not tested
modified ft_getline with read 1 by 1
2019-03-08 14:14:56 +01:00

23 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_close.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/08 13:39:05 by tmaze #+# #+# */
/* Updated: 2019/03/08 13:44:25 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_close(t_file *file)
{
int filedes;
filedes = file->fd;
ft_memdel(file);
return (close(filedes) == 0);
}