style: error message are now in red
This commit is contained in:
parent
66a523d4b5
commit
f48e586896
5 changed files with 38 additions and 8 deletions
25
sources/error.c
Normal file
25
sources/error.c
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* error.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/31 11:09:00 by rparodi #+# #+# */
|
||||
/* Updated: 2024/10/31 11:21:59 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "cub3d.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void print_error(char *msg)
|
||||
{
|
||||
write(2, BOLD_RED, strlen(BOLD_RED));
|
||||
write(2, "Error:\n", strlen("Error:\n"));
|
||||
write(2, RESET, strlen(RESET));
|
||||
write(2, RED, strlen(RED));
|
||||
write(2, msg, strlen(msg));
|
||||
write(2, RESET, strlen(RESET));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue