equal
deleted
inserted
replaced
99 do{printf(__VA_ARGS__);fflush(stdout);}while(0) |
99 do{printf(__VA_ARGS__);fflush(stdout);}while(0) |
100 #elif (_MSC_VER >= 1400) |
100 #elif (_MSC_VER >= 1400) |
101 //Visual Studio 2005 and above |
101 //Visual Studio 2005 and above |
102 #ifdef UNICODE |
102 #ifdef UNICODE |
103 #define MSG(...) \ |
103 #define MSG(...) \ |
104 do{wchar_t msg[300];\ |
104 do{char msg[300];\ |
105 swprintf(msg,sizeof(msg)/sizeof(msg[0]), L##__VA_ARGS__); \ |
105 sprintf(msg, __VA_ARGS__); \ |
106 OutputDebugString(msg);}while(0) |
106 OutputDebugStringA(msg);}while(0) |
107 #else |
107 #else |
108 #define MSG(...) \ |
108 #define MSG(...) \ |
109 do{char msg[300];\ |
109 do{char msg[300];\ |
110 sprintf(msg,##__VA_ARGS__);\ |
110 sprintf(msg,##__VA_ARGS__);\ |
111 OutputDebugString(msg);}while(0) |
111 OutputDebugString(msg);}while(0) |
124 |
124 |
125 #endif //_MSC_VER |
125 #endif //_MSC_VER |
126 |
126 |
127 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\ |
127 #define CANFESTIVAL_DEBUG_MSG(num, str, val)\ |
128 {unsigned long value = val;\ |
128 {unsigned long value = val;\ |
129 MSG(("%s(%d) : 0x%X %s 0x%lX\n",__FILE__, __LINE__,num, str, value)); \ |
129 MSG("%s(%d) : 0x%X %s 0x%lX\n",__FILE__, __LINE__,num, str, value); \ |
130 } |
130 } |
131 |
131 |
132 #define CANFESTIVAL_DEBUG_DRV_MSG(...)\ |
132 #define CANFESTIVAL_DEBUG_DRV_MSG(...)\ |
133 MSG(__VA_ARGS__); |
133 MSG(__VA_ARGS__); |
134 |
134 |