summaryrefslogtreecommitdiff
path: root/tools/rsfont/global.h
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-05-27 15:08:48 -0700
committerYamaArashi <shadow962@live.com>2016-05-30 02:19:25 -0700
commit0ebfe95d65fc2852a6b7f0528a2a114de7fe698e (patch)
treea20b2e0e839661df88664d6547841a3a79e07222 /tools/rsfont/global.h
parent1d8ca2c1b995be87bb78dcf9bdfdc1d924a48979 (diff)
text.c
Diffstat (limited to 'tools/rsfont/global.h')
-rw-r--r--tools/rsfont/global.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/rsfont/global.h b/tools/rsfont/global.h
new file mode 100644
index 000000000..65dd351d2
--- /dev/null
+++ b/tools/rsfont/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H