diff options
Diffstat (limited to 'philo/src/main.c')
| -rw-r--r-- | philo/src/main.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/philo/src/main.c b/philo/src/main.c index bca80b5..efcc9a5 100644 --- a/philo/src/main.c +++ b/philo/src/main.c @@ -6,13 +6,27 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/14 17:13:30 by dkaiser #+# #+# */ -/* Updated: 2025/01/14 17:14:12 by dkaiser ### ########.fr */ +/* Updated: 2025/01/17 11:53:53 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ #include "philo.h" +int ft_err(char *str) +{ + printf("\e[31m[ERROR] %s\e[0m\n", str); + return (EXIT_FAILURE); +} + int main(int argc, char *argv[]) { - return 0; + t_phdata data; + int result; + + if (argc != 5 && argc != 6) + return(ft_err(ERR_USAGE)); + result = load_data(&data, argc, argv); + if (result != EXIT_SUCCESS) + return (result); + return (EXIT_SUCCESS); } |
