summaryrefslogtreecommitdiffstats
path: root/src/ft_error.c
blob: 2cc9cb64c50103bb0f16995f5f0cd4e073cc45d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <libft.h>
#include <minishell.h>

void
ft_error(const char *com, int errno)
{
	ft_putstr("joe-sh: ");
	ft_putstr(com);
	if (errno == 1)
		ft_putendl(": too many arguments");
	else if (errno == 127)
		ft_putendl(": command not found");
	return (errno);
}