42_minishell/include/error.h
mcolonna 0898d3b79a [ADD] signals handler *
also reorganize the code
2024-06-18 15:43:22 +02:00

31 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* error.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/06/13 13:50:43 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef ERROR_H
# define ERROR_H
# include "include.h"
// Set the global mc freed when exit.
void set_global_mc(t_memclass mc);
// Call to show an error.
// If msg == "errno", use perror()
void minishell_error(const char *msg);
// Show the errno error and exit the program.
void fatal_error(const char *msg);
// Show a specific message and exit the program.
void fatal_error_msg(const char *msg);
#endif