-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.c
More file actions
33 lines (29 loc) · 1.31 KB
/
errors.c
File metadata and controls
33 lines (29 loc) · 1.31 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zrdouane <zrdouane@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/29 23:32:28 by zrdouane #+# #+# */
/* Updated: 2022/03/29 23:32:29 by zrdouane ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
/* Returns 0 printing <message> in red */
int error(char *message)
{
printf("\033[0;31m" " Error\n %s\n" "\033[0m", message);
return (0);
}
/* Returns NULL printing <message> in red */
void *null_error(char *message)
{
printf("\033[0;31m" " Error\n %s\n" "\033[0m", message);
return (0);
}
/* Prints <message> in yellow */
void print_warning(char *message)
{
printf("\033[0;33m" " Warning\n %s\n" "\033[0m", message);
}