-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
28 lines (25 loc) · 1.22 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: muerdoga <muerdoga@student.42kocaeli.co +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/31 15:02:13 by muerdoga #+# #+# */
/* Updated: 2023/01/31 15:22:34 by muerdoga ### ########.fr */
/* */
/* ************************************************************************** */
#include "philo.h"
int main(int argc, char **argv)
{
t_rules rules;
int ret;
if (argc != 5 && argc != 6)
return (write_error("Hatalı argüman sayısı girdiniz."));
ret = init_all(&rules, argv);
if (ret)
return (error_manager(ret));
if (launcher(&rules))
return (write_error("Threadler oluşturulurken bir hata oluştu."));
return (0);
}