libnfc 1.3.9
|
00001 00024 #ifndef _LIBNFC_MESSAGES_H_ 00025 # define _LIBNFC_MESSAGES_H_ 00026 00027 # include <err.h> 00028 00029 // #define DEBUG /* DEBUG flag can also be enabled using ./configure --enable-debug */ 00030 00031 // Useful macros 00032 # ifdef DEBUG 00033 // #define DBG(x, args...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__,## args ) 00034 # define DBG(...) do { \ 00035 warnx ("DBG %s:%d", __FILE__, __LINE__); \ 00036 warnx (" " __VA_ARGS__ ); \ 00037 } while (0) 00038 # else 00039 # define DBG(...) {} 00040 # endif 00041 00042 # define INFO(...) warnx ("INFO: " __VA_ARGS__ ) 00043 # define WARN(...) warnx ("WARNING: " __VA_ARGS__ ) 00044 # define ERR(...) warnx ("ERROR: " __VA_ARGS__ ) 00045 00046 #endif // _LIBNFC_MESSAGES_H_