aboutsummaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-10 11:44:44 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-10 17:53:02 +0100
commit988e058680280e25d345b17d840c3c6d40e30a76 (patch)
tree0cdb0fe6bbf2b3a55edb5347d35aadf6576876c1 /error.c
parent2875f205e24f19964d44ddce2470659d21fe902d (diff)
downloadcub3d-988e058680280e25d345b17d840c3c6d40e30a76.tar.gz
cub3d-988e058680280e25d345b17d840c3c6d40e30a76.tar.bz2
cub3d-988e058680280e25d345b17d840c3c6d40e30a76.zip
refactoring
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);
+}