libnfc  1.4.2
nfc-messages.h
Go to the documentation of this file.
1 
23 // TODO remove this file from installed headers.
24 #ifndef _LIBNFC_MESSAGES_H_
25 # define _LIBNFC_MESSAGES_H_
26 
27 # include <err.h>
28 
29 // #define DEBUG /* DEBUG flag can also be enabled using ./configure --enable-debug */
30 
31 // Useful macros
32 # ifdef DEBUG
33 // #define DBG(x, args...) printf("DBG %s:%d: " x "\n", __FILE__, __LINE__,## args )
34 # define DBG(...) do { \
35  warnx ("DBG %s:%d", __FILE__, __LINE__); \
36  warnx (" " __VA_ARGS__ ); \
37  } while (0)
38 # else
39 # define DBG(...) {}
40 # endif
41 
42 # define WARN(...) warnx ("WARNING: " __VA_ARGS__ )
43 # define ERR(...) warnx ("ERROR: " __VA_ARGS__ )
44 
45 #endif // _LIBNFC_MESSAGES_H_