-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_exit_with_error.c
21 lines (19 loc) · 1.06 KB
/
ft_exit_with_error.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_exit_with_error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: younhwan <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/25 16:15:47 by younhwan #+# #+# */
/* Updated: 2022/08/25 16:17:49 by younhwan ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/libft.h"
void ft_exit_with_error(const char *str)
{
ft_putstr_fd("\033[31mError\n", 2);
ft_putstr_fd(str, 2);
ft_putstr_fd("\033[0m\n", 2);
exit(EXIT_FAILURE);
}