From 29b45c0bbdcc3a8eb980d6fdc65efa09382c0ede Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 26 Jan 2020 22:28:11 +0100 Subject: Can't believe it --- src/ft_get_map.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ft_get_map.c (limited to 'src/ft_get_map.c') diff --git a/src/ft_get_map.c b/src/ft_get_map.c new file mode 100644 index 0000000..a45052c --- /dev/null +++ b/src/ft_get_map.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +int +ft_get_map(int fd, t_win *wlist) +{ + size_t i; + char *line; + + ft_free_words(wlist->clist->map, NULL); + i = 0; + if (!(wlist->clist->map = (char**)malloc(40 * sizeof(char*)))) + return (-1); + while (get_next_line(fd, &line) > 0) + { + } + return (0); +} -- cgit v1.2.3