-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdebug.cpp
50 lines (49 loc) · 1.39 KB
/
debug.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "debug.hpp"
#include <cstdio>
using namespace std;
void debugPrint(const char *pPrintMsg,
const char *pFile,
const int pLine,
const char *pFunction) {
cout << pFile << ":" << dec << pLine << ":" << pFunction << ":" << pPrintMsg << endl;
return;
}
void tracePrint(const char *pPrintMsg,
const char *pFile,
const int pLine,
const char *pFunction) {
#ifdef MBMEX_DEBUG_ON
debugPrint(pPrintMsg, pFile, pLine, pFunction);
#endif
return;
}
void debugParamCharPrint(const char *pPrintMsg_1,
const char *pParamChar,
const char *pFile,
const int pLine,
const char *pFunction) {
#ifdef MBMEX_DEBUG_ON
cout << pFile << ":" << dec << pLine << ":" << pFunction << ":" << pPrintMsg_1 << "="<< pParamChar << endl;
#endif
return;
}
void debugParamIntPrint(const char *pPrintMsg_1,
const int paramInt,
const char *pFile,
const int pLine,
const char *pFunction) {
#ifdef MBMEX_DEBUG_ON
cout << pFile << ":" << dec << pLine << ":" << pFunction << ":" << pPrintMsg_1 << "="<< paramInt << endl;
#endif
return;
}
void debugParamIntHexPrint(const char *pPrintMsg_1,
const int paramInt,
const char *pFile,
const int pLine,
const char *pFunction) {
#ifdef MBMEX_DEBUG_ON
cout << pFile << ":" << dec << pLine << ":" << pFunction << ":" << pPrintMsg_1 << "=0x" << hex << paramInt << endl;
#endif
return;
}