diff options
author | 2007-12-31 02:04:39 +0000 | |
---|---|---|
committer | 2007-12-31 02:04:39 +0000 | |
commit | 460437f8d13a49302d5ce11cf5ba613083e4780a (patch) | |
tree | fcc6a7819ef6078d7ba6925e368438e33d62d06e /src/emu/cpu/i8085/i8085.c | |
parent | 3f6e8e1abfc478371e1e6f1a9cd317fbf5460424 (diff) |
(From Atari Ace)
The attached patch adjusts most conditional logging in MAME to use the
idiom "do { if (VERBOSE) logerror x; } while (0)". This has the
benefit that the compiler checks the syntax of the logging even in the
case it will be eliminated, and in fact a number of cases here needed
adjustments to compile because of this.
Diffstat (limited to 'src/emu/cpu/i8085/i8085.c')
-rw-r--r-- | src/emu/cpu/i8085/i8085.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index db23ae009ea..119b3e907da 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -120,18 +120,14 @@ /*int survival_prot = 0; */ -#define VERBOSE 0 - #include "debugger.h" #include "i8085.h" #include "i8085cpu.h" #include "i8085daa.h" -#if VERBOSE -#define LOG(x) logerror x -#else -#define LOG(x) -#endif +#define VERBOSE 0 + +#define LOG(x) do { if (VERBOSE) logerror x; } while (0) #define I8085_INTR 0xff |