missing simX changes from OPAE

This commit is contained in:
Blaise Tine
2020-03-27 22:44:16 -04:00
parent e80fa7f233
commit 89d5bfbef1
11 changed files with 552 additions and 425 deletions

View File

@@ -4,20 +4,34 @@
#ifndef __DEBUG_H
#define __DEBUG_H
// #define USE_DEBUG 9
// #define USE_DEBUG 3
//#define USE_DEBUG 9
#ifdef USE_DEBUG
#include <iostream>
#define D(lvl, x) do { \
using namespace std; \
if ((lvl) == USE_DEBUG) { \
if ((lvl) <= USE_DEBUG) { \
cout << "DEBUG " << __FILE__ << ':' << dec << __LINE__ << ": " \
<< x << endl; \
} \
} while(0)
#define DPH(lvl, x) do { \
using namespace std; \
if ((lvl) <= USE_DEBUG) { \
cout << "DEBUG " << __FILE__ << ':' << dec << __LINE__ << ": " \
<< x; \
} \
} while(0)
#define DPN(lvl, x) do { \
using namespace std; \
if ((lvl) <= USE_DEBUG) { \
cout << x; \
} \
} while(0)
#define D_RAW(x) do { \
std::cout << x; \
} while (0)
@@ -25,6 +39,8 @@
#else
#define D(lvl, x) do {} while(0)
#define DPH(lvl, x) do {} while(0)
#define DPN(lvl, x) do {} while(0)
#define D_RAW(x) do {} while(0)
#endif