1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
2023-08-03 23:16:27 +02:00

48 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/31 23:14:41 by axdubois #+# #+# */
/* Updated: 2023/08/02 20:37:09 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/utils-h/utils.h"
int ft_while_file(int file, char **argv)
{
int i;
i = 0;
while (argv[i])
{
if (ft_check_map(file) == 1)
return (1);
ft_controller(file);
i++;
}
return (0);
}
int main(int argc, char **argv)
{
int file;
int i;
i = 1;
if (argc == 1)
{
file = 0;
ft_controller(file);
}
else
{
file = open(argv[i], O_RDONLY);
ft_while_file(file, argv);
}
}