-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfdf_clean.c
More file actions
42 lines (37 loc) · 1.18 KB
/
fdf_clean.c
File metadata and controls
42 lines (37 loc) · 1.18 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fdf_clean.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aillia <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/17 11:23:15 by aillia #+# #+# */
/* Updated: 2019/04/17 11:23:30 by aillia ### ########.fr */
/* */
/* ************************************************************************** */
#include "fdf.h"
void clean_map(int ***map, int rows)
{
int i;
i = -1;
while (++i <= rows)
free(map[0][i]);
free(map[0]);
}
void cleaner(char ****s)
{
int i;
int j;
int k;
i = -1;
while (s[0][++i])
{
j = -1;
while (s[0][i][++j])
{
free(s[0][i][j]);
}
free(s[0][i]);
}
free(s[0]);
}