aboutsummaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/error.c b/error.c
new file mode 100644
index 0000000..577597a
--- /dev/null
+++ b/error.c
@@ -0,0 +1,11 @@
+#include "cub3d.h"
+
+void error_put_usage_exit(char *name)
+{
+ ft_putstr_fd(name, STDERR_FILENO);
+ ft_putendl_fd(": missing file operand", STDERR_FILENO);
+ ft_putstr_fd("Usage: ", STDERR_FILENO);
+ ft_putstr_fd(name, STDERR_FILENO);
+ ft_putendl_fd(" [.cub file] [--save]", STDERR_FILENO);
+ exit(EXIT_FAILURE);
+}