27 lines
1.2 KiB
C
27 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* error_wrappers.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2021/12/01 17:16:30 by lperrey #+# #+# */
|
|
/* Updated: 2021/12/01 17:19:02 by lperrey ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "minishell.h"
|
|
|
|
void shell_error(char *s1, char *s2)
|
|
{
|
|
char *prefix;
|
|
|
|
prefix = "minishell: ";
|
|
write(STDERR_FILENO, prefix, ft_strlen(prefix));
|
|
if (s1)
|
|
write(STDERR_FILENO, s1, ft_strlen(s1));
|
|
if (s2)
|
|
write(STDERR_FILENO, s2, ft_strlen(s2));
|
|
write(STDERR_FILENO, "\n", 1);
|
|
}
|