93 |
93 |
94 /// Definition of error and warning macros |
94 /// Definition of error and warning macros |
95 // -------------------------------------- |
95 // -------------------------------------- |
96 |
96 |
97 #ifdef UNICODE |
97 #ifdef UNICODE |
98 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\ |
98 #define MSG(...) \ |
99 {wchar_t msg[300];\ |
99 do{wchar_t msg[300];\ |
100 unsigned long value = val;\ |
100 swprintf(msg,L##__VA_ARGS__);\ |
101 swprintf(msg,L"%s(%d) : 0x%X %s 0x%X\n",__FILE__, __LINE__,num, str, value);\ |
101 OutputDebugString(msg);}while(0) |
102 OutputDebugString(msg);} |
|
103 #else |
102 #else |
104 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\ |
103 #define MSG(...) \ |
105 {char msg[300];\ |
104 do{char msg[300];\ |
106 unsigned long value = val;\ |
105 sprintf(msg,##__VA_ARGS__);\ |
107 sprintf(msg,"%s(%d) : 0x%X %s 0x%X\n",__FILE__, __LINE__,num, str, value);\ |
106 OutputDebugString(msg);}while(0) |
108 OutputDebugString(msg);} |
|
109 #endif |
107 #endif |
|
108 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\ |
|
109 {unsigned long value = val;\ |
|
110 MSG("%s(%d) : 0x%X %s 0x%X\n",__FILE__, __LINE__,num, str, value);\ |
|
111 } |
110 |
112 |
111 /// Definition of MSG_WAR |
113 /// Definition of MSG_WAR |
112 // --------------------- |
114 // --------------------- |
113 #ifdef DEBUG_WAR_CONSOLE_ON |
115 #ifdef DEBUG_WAR_CONSOLE_ON |
114 #define MSG_WAR(num, str, val) CANFESTIVAL_DEBUG_MSG(num, str, val) |
116 #define MSG_WAR(num, str, val) CANFESTIVAL_DEBUG_MSG(num, str, val) |