libnfc 1.4.2
|
00001 00023 // TODO remove this file from installed headers. 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 WARN(...) warnx ("WARNING: " __VA_ARGS__ ) 00043 # define ERR(...) warnx ("ERROR: " __VA_ARGS__ ) 00044 00045 #endif // _LIBNFC_MESSAGES_H_