mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-08-15 05:27:32 +00:00
style cleanups and an ERRQUIT
This commit is contained in:
18
src/common.h
18
src/common.h
@@ -22,11 +22,11 @@
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic push
|
# pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
#pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Werror=unused-variable"
|
# pragma clang diagnostic ignored "-Werror=unused-variable"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static FILE *error_log=0;
|
static FILE *error_log=0;
|
||||||
@@ -41,12 +41,18 @@ static FILE *error_log=0;
|
|||||||
fprintf(error_log ? error_log : stderr, "\n"); \
|
fprintf(error_log ? error_log : stderr, "\n"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define ERRQUIT(...) \
|
||||||
|
{ \
|
||||||
|
ERRLOG(__VA_ARGS__); \
|
||||||
|
exit(0); \
|
||||||
|
}
|
||||||
|
|
||||||
#else // NDEBUG
|
#else // NDEBUG
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
#pragma clang diagnostic pop
|
# pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ERRLOG(...) \
|
#define ERRLOG(...) \
|
||||||
|
Reference in New Issue
Block a user