aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-27 19:20:28 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-01-27 19:20:28 +0100
commit0c2bb0f610c0af0680b46fc4566a207d59781e4d (patch)
tree986d6dd6a19416593c9b2c043312ffa5d4f0be73 /src/ft_exit.c
parentin progress (diff)
download42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.gz
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.bz2
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.xz
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.tar.zst
42-cub3d-0c2bb0f610c0af0680b46fc4566a207d59781e4d.zip
Switched lists entierly
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 14f1f2a..925bbd5 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -4,27 +4,27 @@
#include <inttypes.h>
static void
-ft_free_lists(t_win *wlist)
+ft_free_lists(t_cub *clist)
{
- 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_free_words(wlist->clist->map, NULL);
- ft_memdel(wlist->clist);
- ft_memdel(wlist->winptr);
- ft_memdel(wlist->wlx);
- ft_memdel(wlist);
+ ft_memdel(clist->no_tex_path);
+ ft_memdel(clist->so_tex_path);
+ ft_memdel(clist->ea_tex_path);
+ ft_memdel(clist->we_tex_path);
+ ft_memdel(clist->sprite_path);
+ ft_free_words(clist->map, NULL);
+ ft_memdel(clist->wlist->winptr);
+ ft_memdel(clist->wlist->wlx);
+ ft_memdel(clist->wlist);
+ ft_memdel(clist);
}
int
-ft_exit(uint8_t exit_code, t_win *wlist)
+ft_exit(uint8_t exit_code, t_cub *clist)
{
ft_printf("Exiting program\n");
if (exit_code < 0 || exit_code > 0)
ft_printf("Exit code: %hhu\n", exit_code);
- ft_free_lists(wlist);
+ ft_free_lists(clist);
exit(exit_code);
return (0);
}