-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspecific_error_messages.c
More file actions
37 lines (33 loc) · 1.34 KB
/
specific_error_messages.c
File metadata and controls
37 lines (33 loc) · 1.34 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* specific_error_messages.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cerdelen <cerdelen@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/07 17:26:39 by cerdelen #+# #+# */
/* Updated: 2022/03/07 17:26:39 by cerdelen ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void no_surrounding_wall(char a)
{
if (a != '1')
{
write(2, "Map is not entirely surrounded by Walls!\n", 41);
exit(EXIT_SUCCESS);
}
}
void non_rectangular_map(void)
{
write(2, "Map has no rectangular Shape!\n", 30);
exit(EXIT_SUCCESS);
}
void check_interior(char a)
{
if (a != '0' && a != '1' && a != 'C' && a != 'E' && a != 'P')
{
write(2, "Map includes unknown character!\n", 32);
exit(EXIT_SUCCESS);
}
}