-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.c
33 lines (29 loc) · 1.25 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
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* error.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zayaz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/08 14:42:00 by itulgar #+# #+# */
/* Updated: 2024/11/07 15:37:28 by zayaz ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int error_message(char *str)
{
printf("<< Error: %s honey >>\n", str);
return (0);
}
int p_error(t_program *program, char *str)
{
write(2, "<< Error: ", ft_strlen("<< Error: "));
write(2, str, ft_strlen(str));
write(2, " honey >>\n", ft_strlen(" honey >>\n"));
program->status = 258;
return (0);
}
void file_error(t_program *program)
{
program->status = 1;
}