#ifndef __DEBUG_H
#define __DEBUG_H

#ifdef DEBUG
extern bool debug;
extern bool debug_z;

#define DBG if (debug)
#define MSG(x) DBG msg x
#define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__)
#else
#define DBG if (0)
#define MSG(x)
#define PRECONDITION(x) // nothing
#endif

#endif

#ifndef __DEBUG_H
#define __DEBUG_H

#ifdef DEBUG
extern bool debug;
extern bool debug_z;

#define DBG if (debug)
#define MSG(x) DBG msg x
#else
#define DBG if (0)
#define MSG(x)
#endif

#if defined(DEBUG) || defined(PRECON)
#define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__)
#else
#define PRECONDITION(x) // nothing
#endif

#endif

Make PRECONDITION usable in isolation by compile time define PRECON.
Make PRECONDITION usable in isolation by compile time define PRECON.
