2015-11-14 06:57:22 +01:00
|
|
|
// Copyright (c) 2015 YamaArashi
|
|
|
|
|
|
|
|
#ifndef GLOBAL_H
|
|
|
|
#define GLOBAL_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
|
|
|
#define FATAL_ERROR(format, ...) \
|
|
|
|
do { \
|
2015-11-14 07:44:23 +01:00
|
|
|
fprintf(stderr, format, __VA_ARGS__); \
|
|
|
|
exit(1); \
|
2015-11-14 06:57:22 +01:00
|
|
|
} while (0)
|
|
|
|
|
2015-11-24 02:44:06 +01:00
|
|
|
#define UNUSED
|
|
|
|
|
2015-11-14 06:57:22 +01:00
|
|
|
#else
|
|
|
|
|
|
|
|
#define FATAL_ERROR(format, ...) \
|
|
|
|
do { \
|
2015-11-14 07:44:23 +01:00
|
|
|
fprintf(stderr, format, ##__VA_ARGS__); \
|
|
|
|
exit(1); \
|
2015-11-14 06:57:22 +01:00
|
|
|
} while (0)
|
|
|
|
|
2015-11-24 02:44:06 +01:00
|
|
|
#define UNUSED __attribute__((__unused__))
|
2015-11-14 06:57:22 +01:00
|
|
|
|
2015-11-24 02:44:06 +01:00
|
|
|
#endif // _MSC_VER
|
2015-11-14 06:57:22 +01:00
|
|
|
|
|
|
|
#endif // GLOBAL_H
|