blob: 165c3d90a3a582f803dc9c4d73aee48b9c3ce7b3 (
plain)
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
29
|
#include <libft.h>
#include <cub3d.h>
#include <stdlib.h>
#include <inttypes.h>
static void
ft_free_lists(t_win *wlist)
{
ft_memdel(wlist->clist->no_tex_path);
ft_memdel(wlist->clist->so_tex_path);
ft_memdel(wlist->clist->ea_tex_path);
ft_memdel(wlist->clist->we_tex_path);
ft_memdel(wlist->clist->sprite_path);
ft_memdel(wlist->clist);
ft_memdel(wlist->winptr);
ft_memdel(wlist->wlx);
ft_memdel(wlist);
}
int
ft_exit(uint8_t exit_code, t_win *wlist)
{
ft_printf("Exiting program\n");
if (exit_code < 0 || exit_code > 0)
ft_printf("Exit code: %hhu\n", exit_code);
ft_free_lists(wlist);
exit(exit_code);
return (0);
}
|