-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_ber.c
More file actions
42 lines (39 loc) · 1.21 KB
/
Copy pathcheck_ber.c
File metadata and controls
42 lines (39 loc) · 1.21 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_ber.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ekutlay <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/30 02:22:55 by ekutlay #+# #+# */
/* Updated: 2022/08/05 00:27:22 by ekutlay ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void check_ber(char *argv)
{
int i;
int e;
int l;
i = 0;
e = 0;
l = ft_strlen_lib(argv);
while (argv[i] != '.')
i++;
i++;
if (argv[i] != 'b')
e++;
i++;
if (argv[i] != 'e')
e++;
i++;
if (argv[i] != 'r')
e++;
if (argv[i] != l)
e++;
if (e != 0)
{
write (1, "Map Error\n", 10);
exit (0);
}
}