From daf41fc015b4cd475e6169fb6186fddf46c7a5ac Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Thu, 23 Jan 2020 20:18:36 +0100 Subject: Work in progress, split redone --- src/ft_get_res.c | 13 +++++++------ src/ft_parse_map.c | 5 +++++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ft_get_res.c b/src/ft_get_res.c index c610fc1..ff39280 100644 --- a/src/ft_get_res.c +++ b/src/ft_get_res.c @@ -12,11 +12,12 @@ ft_get_res(int fd, t_win *wlist) get_next_line(fd, &line); words = ft_split(line, ' '); i = 0; - while (words) - { - ft_printf("[%s] ", words[i]); - i++; - } - ft_printf("\n"); + ft_printf("%s\n", line); + /* while (words) */ + /* { */ + /* ft_printf("[%s] ", words[i]); */ + /* i++; */ + /* } */ + /* ft_printf("\n"); */ return (0); } diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index d2fbe0d..d3d1f53 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -14,5 +14,10 @@ ft_parse_map(t_win *wlist, t_cub *clist, const char *map_path) (void)clist; fd = open(map_path, O_RDONLY); + if (fd < 0) + { + ft_printf("\033[31;1mNo map\033[0m\n"); + ft_exit(2); + } ft_get_res(fd, wlist); } -- cgit v1.2.3