splited execution into multiple files and normed everything

This commit is contained in:
mdev9
2024-03-05 19:30:58 +01:00
parent f000625ab9
commit e19a9a6114
16 changed files with 584 additions and 473 deletions

24
other/is_fd_open.c Normal file
View File

@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* is_fd_open.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/05 17:31:53 by marde-vr #+# #+# */
/* Updated: 2024/03/05 17:35:39 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
#include "../srcs/minishell.h"
int is_fd_open(int fd)
{
if (fcntl(fd, F_GETFL) == -1)
{
ft_printf_fd(2, "%d:closed\n", fd);
return (0);
}
ft_printf_fd(2, "%d:open\n", fd);
return (1);
}