# HG changeset patch # User Christian Taedcke # Date 1320740862 0 # Node ID 3804ee7f903039926433caf2c0b025407f08d44b # Parent a3ff0e3e9829eaa7866d5353fc507e21a8320b38 Win32 applconfig: CHANGED: - The MSG()-Makros for Visual Studio both print now to OutputDebugString(). ADDED: - Makro CANFESTIVAL_DEBUG_DRV_MSG() and MSG_ERR_DRV() to print into MSG() from a can driver implementation. diff -r a3ff0e3e9829 -r 3804ee7f9030 include/win32/applicfg.h --- a/include/win32/applicfg.h Tue Nov 08 08:27:29 2011 +0000 +++ b/include/win32/applicfg.h Tue Nov 08 08:27:42 2011 +0000 @@ -106,12 +106,9 @@ OutputDebugString(msg);}while(0) #else #define MSG(...) \ - do{printf(__VA_ARGS__);fflush(stdout);}while(0) - -/*do{char msg[300];\ +do{char msg[300];\ sprintf(msg,##__VA_ARGS__);\ OutputDebugString(msg);}while(0) -*/ #endif #else //(_MSC_VER < 1400) //For Visual Studio 2003 and below, without VA_ARGS @@ -132,6 +129,9 @@ MSG(("%s(%d) : 0x%X %s 0x%lX\n",__FILE__, __LINE__,num, str, value)); \ } +#define CANFESTIVAL_DEBUG_DRV_MSG(...)\ + MSG(__VA_ARGS__); + /// Definition of MSG_WAR // --------------------- #ifdef DEBUG_WAR_CONSOLE_ON @@ -148,6 +148,11 @@ # define MSG_ERR(num, str, val) #endif +#ifdef DEBUG_ERR_DRIVER_CONSOLE_ON +# define MSG_ERR_DRV(...) CANFESTIVAL_DEBUG_DRV_MSG(__VA_ARGS__) +#else +# define MSG_ERR_DRV(...) +#endif typedef void* CAN_HANDLE;