-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.c
29 lines (27 loc) · 1.16 KB
/
error.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ctreton <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/01/05 10:11:19 by ctreton #+# #+# */
/* Updated: 2014/01/10 20:04:08 by ctreton ### ########.fr */
/* */
/* ************************************************************************** */
#include "select.h"
void print_error(int e)
{
if (e == 0)
ft_putendl_fd("usage: ft_select [arg ...]", 2);
else if (e == 1)
ft_putendl_fd("error: environment error", 2);
else if (e == 2)
{
close_term();
ft_putendl_fd("open failed", 2);
}
else if (e == 3)
close_term();
exit(1);
}