added finished algorithm
merged algorithm from other personnal repo
This commit is contained in:
22
libft/srcs/ft_close.c
Normal file
22
libft/srcs/ft_close.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
Reference in New Issue
Block a user