Fixed sim_debug macro implementation to allow for the case when a sim_debug invocation is used as a single expression following an if condition. Found by Michael Bloom

This commit is contained in:
Mark Pizzolato 2012-03-23 12:39:42 -07:00
parent 5863e1bc38
commit 7c51414228

2
scp.h
View file

@ -131,7 +131,7 @@ void sim_debug (uint32 dbits, DEVICE* dptr, const char* fmt, ...);
#else
void _sim_debug (uint32 dbits, DEVICE* dptr, const char* fmt, ...);
extern FILE *sim_deb; /* debug file */
#define sim_debug(dbits, dptr, ...) if (sim_deb && ((dptr)->dctrl & dbits)) _sim_debug (dbits, dptr, __VA_ARGS__)
#define sim_debug(dbits, dptr, ...) if (sim_deb && ((dptr)->dctrl & dbits)) _sim_debug (dbits, dptr, __VA_ARGS__); else 0
#endif
void fprint_stopped_gen (FILE *st, t_stat v, REG *pc, DEVICE *dptr);