minishell/src/ft_errno.h
Khaïs COLIN f1a0af09f8 feat(here_doc): handle signals (^C, ^\) correctly
This is a bit of a big commit, because I had to move some stuff to other files,
sorry about that. I can split it up if it's too big to review.
2025-04-17 12:06:48 +02:00

37 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_errno.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/17 11:40/12 by khais #+# #+# */
/* Updated: 2025/04/17 11:40:12 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_ERRNO_H
# define FT_ERRNO_H
typedef enum e_errno
{
FT_EERRNO = -2,
FT_EGET = -1,
FT_ESUCCESS = 0,
FT_ENOMEM,
FT_EINVAL,
FT_EBADID,
FT_EUNEXPECTED_PIPE,
FT_EMALFORMED_REDIRECTION,
FT_STATFAIL,
FT_ISDIR,
FT_EHEREDOC_FAILED,
FT_EMAXERRNO,
} t_errno;
t_errno ft_errno(t_errno errno);
t_errno ft_errno_get(void);
char *ft_strerror(t_errno errno);
t_errno ft_perror(char *desc);
#endif