/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* f_fail.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include #include #include #include #include #include "d_define.h" #include "s_struct.h" static void write_fail(const char concern[], const char msg[], t_msh *msh) { ft_dprintf(STDERR_FILENO, "%s: %s: %s\n", msh->shname, concern, msg); } void f_fail_no_options(const char concern[], t_msh *msh) { write_fail(concern, FT_FAIL_NO_OPTIONS, msh); } void f_fail_identifier(const char concern[], const char identifier[]) { ft_dprintf(STDERR_FILENO, "minishell: %s: `%s': not a valid identifier\n", concern, identifier); } void f_fail_too_many_args(const char concern[], t_msh *msh) { write_fail(concern, FT_FAIL_TOO_MANY_ARGS, msh); }